platform/upstream/mesa.git
14 months agopvr: Add missing NULL checks in some vkDestroy...() functions
Karmjit Mahil [Thu, 4 May 2023 15:37:28 +0000 (16:37 +0100)]
pvr: Add missing NULL checks in some vkDestroy...() functions

Seems like `dEQP-VK.api.null_handle.destroy_device` was already
passing but let's add the null check in case of future changes
which might not accept NULL.

Fixes:
  dEQP-VK.api.null_handle.destroy_descriptor_set_layout
  dEQP-VK.api.null_handle.destroy_pipeline_layout
  dEQP-VK.api.null_handle.destroy_query_pool

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>

14 months agopvr: Transfer PBE gamma is unset
Oskar Rundgren [Wed, 3 May 2023 18:14:16 +0000 (19:14 +0100)]
pvr: Transfer PBE gamma is unset

PBE gamma is set in pvr_pbe_get_src_format_and_gamma but later
always set to NONE. Should be enabled for SRGB formats.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>

14 months agopvr: Transfer PBE source snorm format should be signed
Oskar Rundgren [Wed, 3 May 2023 16:56:13 +0000 (17:56 +0100)]
pvr: Transfer PBE source snorm format should be signed

Wrong shader was picked because snorm formats were treated as unsigned.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>

14 months agopvr: Allow block compressed source blit
Oskar Rundgren [Wed, 3 May 2023 13:15:53 +0000 (14:15 +0100)]
pvr: Allow block compressed source blit

Allow blit from block compressed formats to unorm and float formats.

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>

14 months agopvr: Fix cs corruption in pvr_pack_clear_vdm_state()
Karmjit Mahil [Tue, 2 May 2023 16:23:34 +0000 (17:23 +0100)]
pvr: Fix cs corruption in pvr_pack_clear_vdm_state()

VDMCTRL_INDEX_LIST3 is packed conditionally which can cause the
generation of a corrupted control stream as the function mandated
the provided buffer to be of a fixed size always including the
possibly unpacked word. This would leave a gap in the control
stream when the caller ends up copying the buffer into the control
stream.

Reported-by: James Glanville <james.glanville@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22918>

14 months agotu: Use common GetPhysicalDeviceFeatures2
Alyssa Rosenzweig [Fri, 12 May 2023 21:47:00 +0000 (17:47 -0400)]
tu: Use common GetPhysicalDeviceFeatures2

Delete the code. This isn't quite as nice as for the C drivers, because we can't
use a designated initializer in C++ without matching the order and this is an
autogenerated struct where it may not necessarily make sense to fix an order.
Not a big deal to workaround though.

Tested by diff'ing vulkaninfo output before/after the patch and confirming no
changes (other than the driverInfo git sha, the pipelineCacheUUID, the
driverUUID, and slight fluctuation in the memory budget).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23000>

14 months agolvp: Use common GetPhysicalDeviceFeatures2
Alyssa Rosenzweig [Fri, 12 May 2023 20:46:52 +0000 (16:46 -0400)]
lvp: Use common GetPhysicalDeviceFeatures2

This is a big delete-the-code win. Tested by diff'ing vulkaninfo output
before/after the patch and confirming no changes (other than the driverInfo git
sha and the pipelineCacheUUID).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23000>

14 months agoradv/ci: document more flakes for navi21
Martin Roukala (né Peres) [Mon, 15 May 2023 06:35:32 +0000 (09:35 +0300)]
radv/ci: document more flakes for navi21

The following flakes were found in the latest stress run:

 * dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.2_cmdbuffers_resuming
 * dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_primary_cmdbuffers_resuming

Rather than documenting them directly, let's use a broad regular
expression, to match the already-existing `dEQP-VK.dynamic_rendering.basic.*`.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23014>

14 months agozink: Move the workaround before the EDS setting.
MrRobbin [Tue, 16 May 2023 05:54:49 +0000 (13:54 +0800)]
zink: Move the workaround before the EDS setting.

 Then we can guarantee the settings correct, otherwise the  'screen->info.have_EXT_extended_dynamic_state3 = false' and 'screen->info.have_EXT_vertex_input_dynamic_state = false'
 will be enable, but actually we should disable it when 'have_EXT_extended_dynamic_state2 = false'.

Fixes: d5cf6f7d2f9 ("zink: disable dynamic state exts if the previous ones aren't present")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23046>

14 months agocrocus: fix scratch_bos memory leak
Patrick Lerda [Tue, 9 May 2023 18:22:40 +0000 (20:22 +0200)]
crocus: fix scratch_bos memory leak

This change is inspired from iris_destroy_context().

For instance, this issue is triggered with
"piglit/bin/glsl-1.50-gs-max-output -scan 1 20 -auto -fbo":
Direct leak of 320 byte(s) in 2 object(s) allocated from:
    #0 0x7f34fc769987 in calloc (/usr/lib64/libasan.so.6+0xb1987)
    #1 0x7f34f4fa168a in bo_calloc ../src/gallium/drivers/crocus/crocus_bufmgr.c:288
    #2 0x7f34f4fa168a in alloc_fresh_bo ../src/gallium/drivers/crocus/crocus_bufmgr.c:350
    #3 0x7f34f4fa168a in bo_alloc_internal ../src/gallium/drivers/crocus/crocus_bufmgr.c:419
    #4 0x7f34f4fe50a9 in crocus_get_scratch_space ../src/gallium/drivers/crocus/crocus_program.c:2678
    #5 0x7f34f55e8954 in crocus_upload_dirty_render_state ../src/gallium/drivers/crocus/crocus_state.c:6871
    #6 0x7f34f55e8954 in crocus_upload_render_state ../src/gallium/drivers/crocus/crocus_state.c:7812
    #7 0x7f34f5d9f680 in crocus_simple_draw_vbo ../src/gallium/drivers/crocus/crocus_draw.c:332
    #8 0x7f34f5d9f680 in crocus_draw_vbo ../src/gallium/drivers/crocus/crocus_draw.c:438
    #9 0x7f34f1d2eeba in tc_call_draw_single ../src/gallium/auxiliary/util/u_threaded_context.c:3735
    #10 0x7f34f1d12e03 in batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:394
    #11 0x7f34f1d12e03 in tc_batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:445
    #12 0x7f34f1d22c9a in _tc_sync ../src/gallium/auxiliary/util/u_threaded_context.c:680
    #13 0x7f34f1d238f8 in tc_texture_map ../src/gallium/auxiliary/util/u_threaded_context.c:2754
    #14 0x7f34f120b9d9 in pipe_texture_map_3d ../src/gallium/auxiliary/util/u_inlines.h:579
    #15 0x7f34f120b9d9 in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:530
    #16 0x7f34f10d7355 in read_pixels ../src/mesa/main/readpix.c:1178
    #17 0x7f34f10d7355 in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1195
    #18 0x7f34f10d7e10 in _mesa_ReadPixels ../src/mesa/main/readpix.c:1210

Fixes: f3630548f1da ("f3630548f1da crocus: initial gallium driver for Intel gfx 4-7")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23019>

14 months agopvr: switch pvr_spm to use pvr_bo_suballoc
Luigi Santivetti [Wed, 10 May 2023 07:29:54 +0000 (08:29 +0100)]
pvr: switch pvr_spm to use pvr_bo_suballoc

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22940>

14 months agopvr: switch pvr_clear to use pvr_bo_suballoc
Luigi Santivetti [Wed, 10 May 2023 07:29:49 +0000 (08:29 +0100)]
pvr: switch pvr_clear to use pvr_bo_suballoc

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22940>

14 months agopvr: switch pvr_descriptor_set_create to use pvr_bo_suballoc
Luigi Santivetti [Wed, 10 May 2023 07:29:46 +0000 (08:29 +0100)]
pvr: switch pvr_descriptor_set_create to use pvr_bo_suballoc

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22940>

14 months agopvr: switch pvr_cmd_buffer_alloc_mem to use pvr_bo_suballoc
Luigi Santivetti [Wed, 10 May 2023 07:29:41 +0000 (08:29 +0100)]
pvr: switch pvr_cmd_buffer_alloc_mem to use pvr_bo_suballoc

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22940>

14 months agopvr: switch pvr_gpu_upload_* to use pvr_bo_suballoc
Luigi Santivetti [Wed, 10 May 2023 07:29:35 +0000 (08:29 +0100)]
pvr: switch pvr_gpu_upload_* to use pvr_bo_suballoc

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22940>

14 months agopvr: introduce suballocator for internal allocations
Luigi Santivetti [Wed, 10 May 2023 07:29:15 +0000 (08:29 +0100)]
pvr: introduce suballocator for internal allocations

Add implementation for a simple sub-allocator in order to save
memory when doing internal driver allocations.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22940>

14 months agoradv: small fix for VkDescriptorSetVariableDescriptorCountLayoutSupport
George Ouzounoudis [Sun, 14 May 2023 07:54:35 +0000 (10:54 +0300)]
radv: small fix for VkDescriptorSetVariableDescriptorCountLayoutSupport

The VkDescriptorSetVariableDescriptorCountLayoutSupport structure should
be in the pNext chain of VkDescriptorSetLayoutSupport.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23009>

14 months agomesa: set a type for depth fallback texture
Tapani Pälli [Mon, 15 May 2023 05:34:35 +0000 (08:34 +0300)]
mesa: set a type for depth fallback texture

Otherwise we will later attempt to figure out format with type GL_NONE
which is not handled by _mesa_format_from_format_and_type.

Fixes: 0c6e56c391a ("mesa: (more) correctly handle incomplete depth textures")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9012
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23013>

14 months agodrm-shim: Use anonymous file for file override
Joshua Watt [Wed, 31 Aug 2022 13:15:29 +0000 (08:15 -0500)]
drm-shim: Use anonymous file for file override

Using a pipe might mean that either the read or write call can block,
most likely deadlocking the calling process. Instead, write the contents
in an anonymous file when the file is opened to be read back.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18341>

14 months agodrm-shim: Set file type in readdir()
Joshua Watt [Wed, 31 Aug 2022 13:04:39 +0000 (08:04 -0500)]
drm-shim: Set file type in readdir()

Some programs (in particular, older QEMU) will check the type of the
rendernode returned in readdir() to see if it is a character device
before opening it.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18341>

14 months agoac/llvm: remove redundant nir_lower_legacy_atomics
Qiang Yu [Mon, 15 May 2023 08:30:52 +0000 (16:30 +0800)]
ac/llvm: remove redundant nir_lower_legacy_atomics

Now both radeonsi and radv call it in driver.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23018>

14 months agoradeonsi: fix aco compile for atomic ops
Qiang Yu [Mon, 15 May 2023 08:03:13 +0000 (16:03 +0800)]
radeonsi: fix aco compile for atomic ops

LLVM path will do this in ac_nir_translate(), ACO path
need driver to handle it.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23018>

14 months agoac/llvm: remove the double frcp special handling
Qiang Yu [Mon, 15 May 2023 03:23:06 +0000 (11:23 +0800)]
ac/llvm: remove the double frcp special handling

KHR-GL45.gpu_shader_fp64.builtin.mod_* relaxed precision
requirement.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23012>

14 months agoci/freedreno: add recent a630 flake
David Heidelberg [Tue, 16 May 2023 00:13:40 +0000 (01:13 +0100)]
ci/freedreno: add recent a630 flake

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23044>

14 months agoci/venus: add recent flakes
David Heidelberg [Tue, 16 May 2023 00:07:37 +0000 (01:07 +0100)]
ci/venus: add recent flakes

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23043>

14 months agoanv: enable the GPL feature based on whether the extension is supported
Iván Briano [Mon, 15 May 2023 22:10:39 +0000 (15:10 -0700)]
anv: enable the GPL feature based on whether the extension is supported

Instead of checking if the very same bit we want to enable is already
enabled, which obviously doesn't work.

Fixes: fbc0e74bdac ("anv: enable graphics pipeline libraries by default")

Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23039>

14 months agozink: flag batch usage on swapchain images
Mike Blumenkrantz [Thu, 11 May 2023 13:29:34 +0000 (09:29 -0400)]
zink: flag batch usage on swapchain images

while swapchains themselves are protected against early deletion
during presentation, there is nothing protecting them from
deletion while they are rendering if a swapchain updates
while rendering but before presentation

to address this, add batch usage to swapchains which can be
checked during pruning to ensure a rendering swapchain isn't
pruned

Fixes: dc8c9d20568 ("zink: prune old swapchains on present")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22962>

14 months agozink: set higher prio on dedicated memory allocations
Mike Blumenkrantz [Wed, 3 May 2023 20:37:54 +0000 (16:37 -0400)]
zink: set higher prio on dedicated memory allocations

this should guarantee that e.g., swapchain type images aren't paged
out

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>

14 months agozink: hook up some memory extensions
Mike Blumenkrantz [Wed, 3 May 2023 20:36:25 +0000 (16:36 -0400)]
zink: hook up some memory extensions

enabling VK_EXT_pageable_device_local_memory guarantees that host memory
allocations will not consume device-local memory and enables overallocation
of device memory when paging can be done

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>

14 months agozink: slightly simplify bda allocation chaining
Mike Blumenkrantz [Wed, 3 May 2023 20:34:11 +0000 (16:34 -0400)]
zink: slightly simplify bda allocation chaining

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22855>

14 months agoci/broadcom: skip timeouting ssbo.layout.3_level_array.std430.mat4 on RPi4
David Heidelberg [Mon, 15 May 2023 23:03:12 +0000 (00:03 +0100)]
ci/broadcom: skip timeouting ssbo.layout.3_level_array.std430.mat4 on RPi4

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23042>

14 months agolavapipe: EXT_attachment_feedback_loop_layout_dynamic_state
Mike Blumenkrantz [Mon, 1 May 2023 23:16:04 +0000 (19:16 -0400)]
lavapipe: EXT_attachment_feedback_loop_layout_dynamic_state

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22964>

14 months agozink: only add feedback loop usage bit if extension is supported
Mike Blumenkrantz [Thu, 11 May 2023 14:32:42 +0000 (10:32 -0400)]
zink: only add feedback loop usage bit if extension is supported

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>

14 months agozink: ignore no-op image copies
Mike Blumenkrantz [Thu, 11 May 2023 15:07:45 +0000 (11:07 -0400)]
zink: ignore no-op image copies

rare, but it happens and is illegal

affects:
GTF-GL46.gtf30.GLCoverage.CoverageGL30

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>

14 months agozink: reorder some image copy code
Mike Blumenkrantz [Thu, 11 May 2023 15:07:26 +0000 (11:07 -0400)]
zink: reorder some image copy code

no functional changes, just making other fixes easier to see

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>

14 months agozink: reject blits where src/dst is 3D and dst/src z!=0
Mike Blumenkrantz [Thu, 11 May 2023 13:54:22 +0000 (09:54 -0400)]
zink: reject blits where src/dst is 3D and dst/src z!=0

this is technically illegal even though it works everywhere,
though future spec changes may make it legal

affects KHR-GLES3.copy_tex_image_conversions.required.texture3d_cubemap_negz

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>

14 months agozink: reorder some native blit code
Mike Blumenkrantz [Thu, 11 May 2023 13:54:01 +0000 (09:54 -0400)]
zink: reorder some native blit code

no functional changes, but this will make it more convenient to
reject certain blits

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22960>

14 months agozink: destroy current batch state after all other batch states
Mike Blumenkrantz [Mon, 15 May 2023 14:02:44 +0000 (10:02 -0400)]
zink: destroy current batch state after all other batch states

some resources may not be destroyed immediately and may instead be
queued for deletion onto the current batch state, so ensure that the
current state is the last one to be destroyed so that all deferred resources
are also destroyed

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23033>

14 months agozink: don't leak swapchain readback semaphores
Mike Blumenkrantz [Mon, 15 May 2023 13:13:35 +0000 (09:13 -0400)]
zink: don't leak swapchain readback semaphores

these are considered usable after the queue goes idle, so add them
back into the cache

Fixes: e9f18f64b9e ("zink: also cache swapchain semaphores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23033>

14 months agor600: Use unified atomics
Alyssa Rosenzweig [Mon, 15 May 2023 13:17:32 +0000 (09:17 -0400)]
r600: Use unified atomics

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23026>

14 months agoiris: Init CCS_E to COMPRESSED_NO_CLEAR for XeHP
Nanley Chery [Wed, 12 Apr 2023 02:10:46 +0000 (19:10 -0700)]
iris: Init CCS_E to COMPRESSED_NO_CLEAR for XeHP

Use COMPRESSED_NO_CLEAR for the initial CCS aux state instead of
COMPRESSED_CLEAR. This removes a dependency on the initial clear color,
meaning that some resolves related to clear color management are now
avoided.

In the Car Chase benchmark, this avoids all 50 CCS resolves. These only
happen during the warm-up phase of the benchmark, so I'm not sure there
is an impact on FPS. This was tested on a DG2 in small-BAR mode.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22857>

14 months agointel/blorp: Assert an 8bpp fast clear restriction
Nanley Chery [Tue, 25 Apr 2023 18:20:05 +0000 (11:20 -0700)]
intel/blorp: Assert an 8bpp fast clear restriction

We can't do fast clear operations on some LODs of 8bpp surfaces. Add an
assertion to BLORP to protect against drivers attempting to do this.

This assertion was successfully hit with some local modifications to
iris and with the piglit test case, "generatemipmap-base-change format".

Ref: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7301
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22857>

14 months agodocs: Update list of extensions implemented by dzn
Jesse Natalie [Mon, 15 May 2023 16:18:08 +0000 (09:18 -0700)]
docs: Update list of extensions implemented by dzn

I hadn't been keeping this up-to-date as development was rapid but
now that we're starting to stabilize and new work is largely going
to be new extensions, it makes sense to start tracking this better.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23038>

14 months agovenus: drop unused sem_feedback_count from vn_queue_bind_sparse_submit_batch
David Heidelberg [Mon, 15 May 2023 14:51:48 +0000 (15:51 +0100)]
venus: drop unused sem_feedback_count from vn_queue_bind_sparse_submit_batch

The values isn't used later.

Resolves gcc warning:
```
../src/virtio/vulkan/vn_queue.c:1006:13: error: variable 'sem_feedback_count' set but not used [-Werror,-Wunused-but-set-variable]
   uint32_t sem_feedback_count = 0;
```

Fixes: a55d26b566f1 ("venus: add back sparse binding support")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23034>

14 months agointel/isl: Fix map between sRGB and linear formats
Zhang, Jianxun [Sat, 1 Apr 2023 03:35:13 +0000 (20:35 -0700)]
intel/isl: Fix map between sRGB and linear formats

Some SRGB formats don't get the expected linear counterparts in
isl_format_srgb_to_linear() in the generated isl_format_layout.c.

The replace() of string in python returns the unchanged input
string when no replacement occurred, so the first rule
('_SRGB', '') returns the original SRGB format name that passes
the following check unintendedly.

Another quirk is needed for a pair of formats not following
the patterns of other formats.

Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22247>

14 months agorusticl: implement cl_khr_pci_bus_info
norablackcat [Mon, 15 May 2023 11:20:16 +0000 (05:20 -0600)]
rusticl: implement cl_khr_pci_bus_info

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23022>

14 months agospirv: fix argument to ray query intrinsic
Lionel Landwerlin [Mon, 15 May 2023 14:27:11 +0000 (17:27 +0300)]
spirv: fix argument to ray query intrinsic

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0cf22f9af3 ("nir: Make rq_load committed src an index")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23032>

14 months agodzn: Hook up fd semaphore import/export
Jesse Natalie [Fri, 5 May 2023 15:45:53 +0000 (08:45 -0700)]
dzn: Hook up fd semaphore import/export

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agodzn: Hook up win32 semaphore import/export
Jesse Natalie [Fri, 5 May 2023 15:41:45 +0000 (08:41 -0700)]
dzn: Hook up win32 semaphore import/export

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agodzn: External Fd memory extension
Jesse Natalie [Thu, 4 May 2023 19:44:25 +0000 (12:44 -0700)]
dzn: External Fd memory extension

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agodzn: External Win32 memory extension
Jesse Natalie [Thu, 4 May 2023 19:36:05 +0000 (12:36 -0700)]
dzn: External Win32 memory extension

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agodzn: Dedicated resource cleanup
Jesse Natalie [Thu, 4 May 2023 04:17:12 +0000 (21:17 -0700)]
dzn: Dedicated resource cleanup

Vulkan's concept of dedicated resources is dangerously close to
D3D12's concept of a "committed" resource, where the memory and
resource are inextricably tied. This is a minor optimization,
but will start to be more important going forward with external
memory.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agodzn: Finish implementing KHR_synchronization2
Jesse Natalie [Fri, 5 May 2023 18:16:00 +0000 (11:16 -0700)]
dzn: Finish implementing KHR_synchronization2

This was already mostly implemented.

Without this, the synchronization2 sharing tests will crash,
because there's a CTS bug that's missing a skip check for Windows.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agodzn: Don't zero an output struct that can have pNext
Jesse Natalie [Fri, 5 May 2023 17:39:28 +0000 (10:39 -0700)]
dzn: Don't zero an output struct that can have pNext

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agovulkan: Win32 sync import/export support
Jesse Natalie [Fri, 5 May 2023 04:06:41 +0000 (21:06 -0700)]
vulkan: Win32 sync import/export support

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879>

14 months agointel: switch over to unified atomics
Lionel Landwerlin [Fri, 12 May 2023 23:22:47 +0000 (02:22 +0300)]
intel: switch over to unified atomics

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23004>

14 months agoradv: Move perf counter CS creation to where it's used.
Timur Kristóf [Mon, 24 Apr 2023 15:13:38 +0000 (17:13 +0200)]
radv: Move perf counter CS creation to where it's used.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22668>

14 months agoradv/amdgpu: Use STACK_ARRAY for IB array to reduce stack usage.
Timur Kristóf [Mon, 24 Apr 2023 14:46:41 +0000 (16:46 +0200)]
radv/amdgpu: Use STACK_ARRAY for IB array to reduce stack usage.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22668>

14 months agoradv/amdgpu: Pass preambles to get_bo_list.
Timur Kristóf [Mon, 24 Apr 2023 14:25:11 +0000 (16:25 +0200)]
radv/amdgpu: Pass preambles to get_bo_list.

Instead of allocating an array for them.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22668>

14 months agoradv/amdgpu: Split radv_amdgpu_get_bo_list to smaller functions.
Timur Kristóf [Mon, 24 Apr 2023 13:11:49 +0000 (15:11 +0200)]
radv/amdgpu: Split radv_amdgpu_get_bo_list to smaller functions.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22668>

14 months agoradv/amdgpu: Remove unused extra BO array.
Timur Kristóf [Mon, 24 Apr 2023 12:46:04 +0000 (14:46 +0200)]
radv/amdgpu: Remove unused extra BO array.

Not needed anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22668>

14 months agozink: do not open-code memcpy
Erik Faye-Lund [Mon, 15 May 2023 12:53:46 +0000 (14:53 +0200)]
zink: do not open-code memcpy

There's a lot of optimized memcpy implementations out there, let's use
them instead of manually copying.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23027>

14 months agozink: clean up tcs_vertices_out_word handling
Erik Faye-Lund [Mon, 15 May 2023 12:48:59 +0000 (14:48 +0200)]
zink: clean up tcs_vertices_out_word handling

At this point, we already have the index of the declaration itself in
the tcs_vertices_out_word variable, so we only need to add the offset
from the start of the exec_modes buffer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23027>

14 months agozink: fix bad indent
Erik Faye-Lund [Mon, 15 May 2023 12:39:37 +0000 (14:39 +0200)]
zink: fix bad indent

This was indented too much

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23027>

14 months agonir/inline_uniforms: Handle num_components > 1
Konstantin Seurer [Tue, 18 Apr 2023 07:34:48 +0000 (09:34 +0200)]
nir/inline_uniforms: Handle num_components > 1

Vulkan UBO loads can have a buffer_index source with more than one component.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23016>

14 months agogallium/nir: Handle unified atomics in nir_to_tgsi_info
Konstantin Seurer [Mon, 15 May 2023 07:38:20 +0000 (09:38 +0200)]
gallium/nir: Handle unified atomics in nir_to_tgsi_info

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23016>

14 months agoradv: Use common GetPhysicalDeviceFeatures2
Alyssa Rosenzweig [Fri, 12 May 2023 18:09:49 +0000 (14:09 -0400)]
radv: Use common GetPhysicalDeviceFeatures2

This is a big delete-the-code win. Tested by diff'ing vulkaninfo output
before/after the patch and confirming no changes (other than the driverInfo git
sha and the pipelineCacheUUID).

Note: removes handling for VkDeviceMemoryOverallocationCreateInfoAMD. This was
surely added as a mistake.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22999>

14 months agoradv: Constify radv_device_supports_etc
Alyssa Rosenzweig [Fri, 12 May 2023 18:29:37 +0000 (14:29 -0400)]
radv: Constify radv_device_supports_etc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22999>

14 months agopvr: fixup stack overflow in {start,end}_sub_cmd
Luigi Santivetti [Thu, 20 Apr 2023 08:10:00 +0000 (09:10 +0100)]
pvr: fixup stack overflow in {start,end}_sub_cmd

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22955>

14 months agozink: add some ci flakes
Mike Blumenkrantz [Mon, 15 May 2023 11:34:46 +0000 (07:34 -0400)]
zink: add some ci flakes

roundup from recent ci jobs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23021>

14 months agoamd/drm-shim: add navi10
Rhys Perry [Fri, 12 May 2023 14:30:02 +0000 (15:30 +0100)]
amd/drm-shim: add navi10

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22989>

14 months agoamd/drm-shim: add vega10
Rhys Perry [Fri, 12 May 2023 14:28:49 +0000 (15:28 +0100)]
amd/drm-shim: add vega10

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22989>

14 months agoamd/drm-shim: add polaris10
Rhys Perry [Fri, 12 May 2023 14:28:42 +0000 (15:28 +0100)]
amd/drm-shim: add polaris10

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22989>

14 months agoamd/drm-shim: move device list to external file
Rhys Perry [Fri, 12 May 2023 14:23:11 +0000 (15:23 +0100)]
amd/drm-shim: move device list to external file

This is already pretty large.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22989>

14 months agozink: don't create invalid inputs in `zink_create_quads_emulation_gs`
antonino [Fri, 5 May 2023 16:19:54 +0000 (18:19 +0200)]
zink: don't create invalid inputs in `zink_create_quads_emulation_gs`

The helper was creating input locations for some builtin bariables.

This caused validation errors in zink because those builtins can't be
used as input.

Fixes: e2220ee55e4 ("zink: filled quad emulation gs generation function")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

14 months agonir: make var arrays large enough in `nir_create_passthrough_gs`
antonino [Fri, 5 May 2023 16:13:32 +0000 (18:13 +0200)]
nir: make var arrays large enough in `nir_create_passthrough_gs`

Because each location has 4 possible different values for location_frac
the arrays need to br 4x the size.

Fixes: d0342e28 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

14 months agozink: handle interface blocks in `copy_vars`
antonino [Fri, 5 May 2023 15:40:32 +0000 (17:40 +0200)]
zink: handle interface blocks in `copy_vars`

Fixes: edaf49160e5 ("zink: fix array copying in pv lowering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

14 months agonir: handle interface blocks in `copy_vars`
antonino [Fri, 5 May 2023 15:39:38 +0000 (17:39 +0200)]
nir: handle interface blocks in `copy_vars`

Fixes: 99121c9b779 ("nir/gs: fix array type copying for passthrough gs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

14 months agozink: don't replace non generated gs
antonino [Fri, 5 May 2023 11:57:54 +0000 (13:57 +0200)]
zink: don't replace non generated gs

Zink replaced the gs emulation shader when the primitive type changes,
however it didn't check whether the gs being replaced was generated.

Fixes: eedbf9046e7 ("zink: handle switching between primitives")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

14 months agonir: don't create invalid inputs in `nir_create_passthrough_gs`
antonino [Fri, 5 May 2023 09:53:55 +0000 (11:53 +0200)]
nir: don't create invalid inputs in `nir_create_passthrough_gs`

The helper was creating input locations for some builtin bariables.

This caused validation errors in zink because those builtins can't be
used as input.

Fixes: d0342e28b32 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

14 months agonir: use `nir_variable_clone` in `nir_create_passthrough_gs`
antonino [Fri, 5 May 2023 09:20:55 +0000 (11:20 +0200)]
nir: use `nir_variable_clone` in `nir_create_passthrough_gs`

Some stream out properties where not being copied causing problems in
zink.

Use the appropiate helper instead of copying fields by hand.

Fixes: d0342e28b32 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22871>

14 months agopvr: Remove unneeded assert in pvr_get_hw_clear_color()
Matt Coster [Thu, 4 May 2023 08:53:32 +0000 (09:53 +0100)]
pvr: Remove unneeded assert in pvr_get_hw_clear_color()

Fixes: dEQP-VK.synchronization.op.single_queue.fence
  .write_draw_read_image_compute.image_128x128_r8_unorm

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22868>

14 months agopvr: Fix off-by-one in pvr_cmd_buffer_upload_desc_set_table() assert
Matt Coster [Thu, 4 May 2023 08:49:16 +0000 (09:49 +0100)]
pvr: Fix off-by-one in pvr_cmd_buffer_upload_desc_set_table() assert

Fixes: dEQP-VK.pipeline.monolithic.dynamic_offset.compute.multiset
  .uniform_buffer.numcmdbuffers_1.sameorder.numdescriptorsetbindings_1
  .numdynamicbindings_2.numnondynamicbindings_1

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22868>

14 months agopvr: Correctly compile graphics pipelines without a fragment shader
Matt Coster [Tue, 2 May 2023 15:06:17 +0000 (16:06 +0100)]
pvr: Correctly compile graphics pipelines without a fragment shader

Fixes: dEQP-VK.pipeline.monolithic.stencil.nocolor.format.s8_uint
  .states.fail_keep.pass_keep.dfail_repl.comp_greater_or_equal

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22868>

14 months agopvr: Initialize aspect_mask when creating buffer views
Matt Coster [Tue, 2 May 2023 13:28:28 +0000 (14:28 +0100)]
pvr: Initialize aspect_mask when creating buffer views

Fixes random aborts in CSB handling.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22868>

14 months agopvr: Actually check for depth load when setting up load op constants
Matt Coster [Tue, 2 May 2023 13:21:39 +0000 (14:21 +0100)]
pvr: Actually check for depth load when setting up load op constants

Fixes: Assorted tests in dEQP-VK.draw.renderpass.*

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22868>

14 months agoradv: stop using the pipeline for determining the null export workaround
Samuel Pitoiset [Fri, 12 May 2023 08:03:14 +0000 (10:03 +0200)]
radv: stop using the pipeline for determining the null export workaround

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22981>

14 months agoradv: remove unused pipeline param in radv_generate_ps_epilog_key()
Samuel Pitoiset [Fri, 12 May 2023 07:48:18 +0000 (09:48 +0200)]
radv: remove unused pipeline param in radv_generate_ps_epilog_key()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22981>

14 months agoradv: reset the emitted PS epilog when a new fragment shader is bound
Samuel Pitoiset [Fri, 12 May 2023 07:45:20 +0000 (09:45 +0200)]
radv: reset the emitted PS epilog when a new fragment shader is bound

When a new fragment shader is bound, the PS epilog needs to be
re-emitted, and this allows us to avoid tracking if the pipeline is
dirty.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22981>

14 months agopanvk: drop path from panvk_physical_device struct
David Heidelberg [Fri, 5 May 2023 20:32:47 +0000 (22:32 +0200)]
panvk: drop path from panvk_physical_device struct

Unnecessary. Only produces warning:
```
../src/panfrost/vulkan/panvk_device.c:437:4: warning: 'strncpy' specified bound 20 equals destination size [-Wstringop-truncation]
  437 |    strncpy(device->path, path, ARRAY_SIZE(device->path));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22880>

14 months agoradv/ci: Test ray tracing pipelines
Konstantin Seurer [Wed, 1 Mar 2023 21:26:03 +0000 (22:26 +0100)]
radv/ci: Test ray tracing pipelines

Since we expose them for a few games by default now, it would make sense
to have test coverage for them.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21638>

14 months agoradv: advertise VK_EXT_tooling_info
Samuel Pitoiset [Thu, 11 May 2023 07:48:00 +0000 (09:48 +0200)]
radv: advertise VK_EXT_tooling_info

This small extension just returns active tools running like RGP.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22954>

14 months agobroadcom/compiler: use unified atomics
Iago Toral Quiroga [Wed, 10 May 2023 07:11:06 +0000 (09:11 +0200)]
broadcom/compiler: use unified atomics

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22939>

14 months agoradv: stop compiling a noop FS when the application doesn't provide a FS
Samuel Pitoiset [Thu, 4 May 2023 06:54:53 +0000 (08:54 +0200)]
radv: stop compiling a noop FS when the application doesn't provide a FS

This is unnecessary because the hardware doesn't execute a FS when it
has no effect and it's possible to execute pre-rasterization stages
without a FS.

This might improve depth-only pass performance very slightly because
the number of packets emitted is reduced a bit.

No fossils-db changes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22848>

14 months agoradv: allow to determine NGG settings with a NULL fragment shader
Samuel Pitoiset [Fri, 12 May 2023 11:04:45 +0000 (13:04 +0200)]
radv: allow to determine NGG settings with a NULL fragment shader

This shouldn't change anything because a noop FS doesn't read any
inputs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22848>

14 months agoradv: rework the checks for implicit exports with GPL
Samuel Pitoiset [Fri, 12 May 2023 10:57:30 +0000 (12:57 +0200)]
radv: rework the checks for implicit exports with GPL

No logical changes but this allows us to distinguish between noop FS
and unknown FS with GPL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22848>

14 months agoradv: handle NULL fragment shaders when creating graphics pipelines
Samuel Pitoiset [Thu, 4 May 2023 07:06:01 +0000 (09:06 +0200)]
radv: handle NULL fragment shaders when creating graphics pipelines

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22848>

14 months agoradv: handle NULL fragment shaders when recording cmdbuf
Samuel Pitoiset [Thu, 4 May 2023 07:05:34 +0000 (09:05 +0200)]
radv: handle NULL fragment shaders when recording cmdbuf

This will be useful for shader objects and also because creating and
emitting a noop FS is useless, the hardware doesn't execute it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22848>

14 months agoradv: implement dynamic sample locations enable
Samuel Pitoiset [Wed, 10 May 2023 15:29:29 +0000 (17:29 +0200)]
radv: implement dynamic sample locations enable

VK_EXT_sample_locations is only supported on < GFX10 due to some weird
issues on recent GPUs. extendedDynamicState3SampleLocationsEnable is
only enabled on GFX6-GFX9 for the same reason.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22947>

14 months agoglx: fix build with APPLEGL
Filip Gawin [Fri, 21 Apr 2023 08:25:53 +0000 (10:25 +0200)]
glx: fix build with APPLEGL

fixes: 1eab7e69e2ba84244f551f6901f4307a687a9504

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8885
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22621>