platform/upstream/mesa.git
22 months agonir: validate that store_buffer_amd doesn't use a non-trivial writemask
Marek Olšák [Wed, 7 Dec 2022 09:29:59 +0000 (04:29 -0500)]
nir: validate that store_buffer_amd doesn't use a non-trivial writemask

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422>

22 months agoac/llvm: implement ACCESS_USE_FORMAT_AMD as buffer_load/store_format
Marek Olšák [Mon, 7 Nov 2022 00:21:54 +0000 (19:21 -0500)]
ac/llvm: implement ACCESS_USE_FORMAT_AMD as buffer_load/store_format

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422>

22 months agoac/llvm: unify load_buffer_amd and store_buffer_amd code
Marek Olšák [Mon, 7 Nov 2022 00:15:01 +0000 (19:15 -0500)]
ac/llvm: unify load_buffer_amd and store_buffer_amd code

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422>

22 months agonir: add ACCESS_USES_FORMAT_AMD for typed buffer opcodes
Marek Olšák [Mon, 7 Nov 2022 00:09:27 +0000 (19:09 -0500)]
nir: add ACCESS_USES_FORMAT_AMD for typed buffer opcodes

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422>

22 months agonir: replace IS_SWIZZLED flag with ACCESS_IS_SWIZZLED_AMD
Marek Olšák [Sun, 6 Nov 2022 23:55:46 +0000 (18:55 -0500)]
nir: replace IS_SWIZZLED flag with ACCESS_IS_SWIZZLED_AMD

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422>

22 months agonir: remove redundant SLC_AMD in favor of ACCESS_STREAM_CACHE_POLICY
Marek Olšák [Sun, 6 Nov 2022 23:44:50 +0000 (18:44 -0500)]
nir: remove redundant SLC_AMD in favor of ACCESS_STREAM_CACHE_POLICY

ACCESS_STREAM_CACHE_POLICY was added to map to SLC for AMD.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422>

22 months agonir: add nir_texop_sampler_descriptor_amd
Marek Olšák [Fri, 28 Oct 2022 12:32:02 +0000 (08:32 -0400)]
nir: add nir_texop_sampler_descriptor_amd

We'll use it to query the min/mag filter in the shader.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19422>

22 months agoanv: move functions around to plan for generated draws
Lionel Landwerlin [Sat, 19 Nov 2022 23:10:15 +0000 (01:10 +0200)]
anv: move functions around to plan for generated draws

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agogenxml: add gen12/12.5 CS prefetch disable bits
Lionel Landwerlin [Thu, 17 Mar 2022 12:24:01 +0000 (14:24 +0200)]
genxml: add gen12/12.5 CS prefetch disable bits

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agoanv: move draw command helpers to their own file
Lionel Landwerlin [Wed, 16 Mar 2022 12:26:27 +0000 (14:26 +0200)]
anv: move draw command helpers to their own file

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agoanv: move total_batch_size to anv_batch
Lionel Landwerlin [Sat, 26 Feb 2022 11:31:01 +0000 (13:31 +0200)]
anv: move total_batch_size to anv_batch

We'll want 2 batches :

   * the main one

   * another to contain dispatch commands to generate stuff in the
     main batch

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agoanv: add helper to get current address of a batch
Lionel Landwerlin [Sat, 26 Feb 2022 19:58:35 +0000 (21:58 +0200)]
anv: add helper to get current address of a batch

And allow the function to get the very first address in the batch.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agoanv: add a utility function to ensure command buffer space
Lionel Landwerlin [Sat, 26 Feb 2022 11:07:18 +0000 (13:07 +0200)]
anv: add a utility function to ensure command buffer space

Ensuring the space is contiguous.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agoanv: document utrace field
Lionel Landwerlin [Sat, 26 Feb 2022 20:00:50 +0000 (22:00 +0200)]
anv: document utrace field

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agoanv: Use extended parameters on Gen11+
Jason Ekstrand [Sun, 15 Dec 2019 00:00:56 +0000 (18:00 -0600)]
anv: Use extended parameters on Gen11+

Gen11 added a nifty feature where we have three custom system-generated
values called extended parameters that we can set to any 32-bit values
we want.  These work just like vertex and instance ID and are controlled
in the pipeline by the 3DSTATE_SGVS_2 packet.  They are provided to the
draw call either by extra DWORDs on the end of 3DSTATE_PRIMITIVE or by
storing values to more state registers.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agointel/blorp: Emit a dummy 3DSTATE_VF_SGVS_2
Jason Ekstrand [Sun, 15 Dec 2019 05:10:44 +0000 (23:10 -0600)]
intel/blorp: Emit a dummy 3DSTATE_VF_SGVS_2

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agointel/genxml: Add 3DPRIMITIVE_EXTENDED opcodes on Gen11+
Jason Ekstrand [Sun, 15 Dec 2019 01:24:58 +0000 (19:24 -0600)]
intel/genxml: Add 3DPRIMITIVE_EXTENDED opcodes on Gen11+

On Gen11 and above, the 3DPRIMITIVE command takes an optional additional
three DWORDs of data as "extended parameters".  These extended
parameters only exist in the packet if "Extended Parameters Present" is
set.  Because our packing code doesn't handle variable-length commands
well, this commit adds a second version of the command which isn't real
but is just a copy of 3DPRIMITIVE with the additional dwords where the
"Extended Parameters Present" defaults to true and "DWord Length" is
adjusted by 3 as needed.  The 3DPRIMITIVE command is then the gen4-9
version which still works fine but doesn't have the new parameters.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agointel/genxml: Make some fields Booleans
Jason Ekstrand [Sat, 14 Dec 2019 23:46:29 +0000 (17:46 -0600)]
intel/genxml: Make some fields Booleans

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agoanv/utrace: only record the emitted pipecontrol flags
Lionel Landwerlin [Wed, 30 Nov 2022 16:52:24 +0000 (18:52 +0200)]
anv/utrace: only record the emitted pipecontrol flags

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agointel/ds: trace a couple of more pipe control flags
Lionel Landwerlin [Wed, 30 Nov 2022 16:50:32 +0000 (18:50 +0200)]
intel/ds: trace a couple of more pipe control flags

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20295>

22 months agocso: fix a regression from draw_vbo rework
Marek Olšák [Tue, 13 Dec 2022 03:17:26 +0000 (22:17 -0500)]
cso: fix a regression from draw_vbo rework

Fixes: c9b13a93385 - cso: remove cso_draw_vbo from all draws, call the driver or u_vbuf directly

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20288>

22 months agopanfrost: fix sampler_count and unbind samplers in bind_sampler_states
Aleksey Komarov [Mon, 12 Dec 2022 16:32:32 +0000 (19:32 +0300)]
panfrost: fix sampler_count and unbind samplers in bind_sampler_states

1. Old approach did not support unbind (set to NULL) samplers because
it only copied memory if sampler is not empty. New approach checks
if sampler is empty - it will set NULL.

2. Old approach just set sampler_count to 0 if sampler is empty.
That's wrong and we need to find highest non-null samplers[] entry.
It was done in new approach.

3. Gallium dosc says:
```
NOTE: at this time, start is always zero ...
This may change in the future.
```
It's better to take into consideration start parameter in new approach.

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

22 months agoanv: disable Wa_1806565034 when robustImageAccess is enabled
Lionel Landwerlin [Mon, 12 Dec 2022 13:32:22 +0000 (15:32 +0200)]
anv: disable Wa_1806565034 when robustImageAccess is enabled

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5711
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7859
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20280>

22 months agointel/fs: make Wa_1806565034 conditional to non robust access
Lionel Landwerlin [Mon, 12 Dec 2022 13:31:41 +0000 (15:31 +0200)]
intel/fs: make Wa_1806565034 conditional to non robust access

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20280>

22 months agoisl: make Wa_1806565034 conditional to non robust access
Lionel Landwerlin [Mon, 12 Dec 2022 13:30:40 +0000 (15:30 +0200)]
isl: make Wa_1806565034 conditional to non robust access

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20280>

22 months agofrontends/va: fix crash during grayscale rendering
Sathishkumar S [Fri, 2 Dec 2022 14:16:48 +0000 (19:46 +0530)]
frontends/va: fix crash during grayscale rendering

crash is observed as format is assumed to be yuv and buffer plane
order is undefined for monochrome. luma only format is not to be
considered yuv format. It has to be rendered with rgb=rrr.

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20165>

22 months agoradeonsi/vcn: fix regression in yuv422 jpeg decode
Sathishkumar S [Fri, 2 Dec 2022 06:31:03 +0000 (12:01 +0530)]
radeonsi/vcn: fix regression in yuv422 jpeg decode

- yuv422 decode was blocked in 12acee17fad5, enable it back.
- nv12 yuv422 and grayscale decode is supported on all versions.
- JPEG2 and higher versions supports 444p decode.
- add l8_unorm to supported formats, can be used for grayscale.

Fixes: 12acee17fad5 (frontends/va: reallocate surface for yuv400/yuv444 picture)

v2: indent the switch case correctly (Thong Thai)

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20165>

22 months agoradv: do not remove the PointSize built-in for polygon mode as points
Samuel Pitoiset [Mon, 12 Dec 2022 13:13:46 +0000 (14:13 +0100)]
radv: do not remove the PointSize built-in for polygon mode as points

Determine if it can be removed when generating the graphics pipeline
key because of dynamic states.

Fixes new CTS dEQP-VK.rasterization.polygon_as_large_points.* and also
spec@!opengl 1.1@polygon-offset with Zink/RADV.

Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20073>

22 months agointel/compiler/mesh: extract emit_urb_direct_vec4_write
Marcin Ślusarz [Mon, 14 Nov 2022 10:32:53 +0000 (11:32 +0100)]
intel/compiler/mesh: extract emit_urb_direct_vec4_write

No functional changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292>

22 months agointel/compiler: optimize away local_inv_index and local_inv_id if workgroup size...
Marcin Ślusarz [Fri, 2 Dec 2022 13:47:19 +0000 (14:47 +0100)]
intel/compiler: optimize away local_inv_index and local_inv_id if workgroup size is 1

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292>

22 months agointel/compiler: split lower_cs_intrinsics_convert_block
Marcin Ślusarz [Fri, 2 Dec 2022 09:47:00 +0000 (10:47 +0100)]
intel/compiler: split lower_cs_intrinsics_convert_block

No functional changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292>

22 months agointel/compiler/mesh: extract shared code for offset adjustment
Marcin Ślusarz [Wed, 9 Nov 2022 16:03:13 +0000 (17:03 +0100)]
intel/compiler/mesh: extract shared code for offset adjustment

No functional changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292>

22 months agoanv: simplify EXT_mesh_shader lowering
Marcin Ślusarz [Mon, 28 Nov 2022 16:26:56 +0000 (17:26 +0100)]
anv: simplify EXT_mesh_shader lowering

No functional changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292>

22 months agoanv,intel/compiler/mesh: drop lowering of gl_Primitive*IndicesEXT
Marcin Ślusarz [Wed, 9 Nov 2022 15:46:27 +0000 (16:46 +0100)]
anv,intel/compiler/mesh: drop lowering of gl_Primitive*IndicesEXT

Until U888X index format lands this change shouldn't have any impact on performance.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20292>

22 months agointel: fix the wrong function name
车扬 [Tue, 13 Dec 2022 02:23:45 +0000 (10:23 +0800)]
intel: fix the wrong function name

pipe not create_vertex_elements fuction

Signed-off-by: cheyang <cheyang@bytedance.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20291>

22 months agoanv: fixup descriptor copies
Lionel Landwerlin [Wed, 7 Dec 2022 21:33:41 +0000 (23:33 +0200)]
anv: fixup descriptor copies

I did not properly understood that we cannot access the views written
to the descriptor sets because they might have been destroyed after
the write operation and the copy operation is allowed to copy what is
invalid data. The shader just can't access it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 03e1e19246 ("anv: Refactor descriptor copy")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20222>

22 months agor600: Lower all bitfield ops on pre-EG
Gert Wollny [Mon, 12 Dec 2022 15:58:38 +0000 (16:58 +0100)]
r600: Lower all bitfield ops on pre-EG

Fixes:  4dff3ff005b47befd3e4a903b08d5b4bdbef6ae3
    nir/opt_algebraic: Optimize open coded bfm.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283>

22 months agor600/sfn: Use variable length DOT on Evergreen and Cayman
Gert Wollny [Mon, 12 Dec 2022 13:02:03 +0000 (14:02 +0100)]
r600/sfn: Use variable length DOT on Evergreen and Cayman

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283>

22 months agor600/sfn: prepare alu split for use of variable length dot
Gert Wollny [Mon, 12 Dec 2022 12:56:16 +0000 (13:56 +0100)]
r600/sfn: prepare alu split for use of variable length dot

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283>

22 months agor600/sfn: check used channels when evaluating allowed mask
Gert Wollny [Mon, 12 Dec 2022 12:44:01 +0000 (13:44 +0100)]
r600/sfn: check used channels when evaluating allowed mask

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7878

v2: Fix ws in comment (iorn10)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20283>

22 months agoci/test-vk: uprev vkd3d
Martin Roukala (né Peres) [Mon, 12 Dec 2022 10:29:26 +0000 (12:29 +0200)]
ci/test-vk: uprev vkd3d

This commit uprevs vkd3d, which flags
test_primitive_restart_list_topology_stream_output as being a flake on
RADV / NAVI21.

Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20278>

22 months agoac/nir: add ac_nir_lower_legacy_gs
Qiang Yu [Wed, 30 Nov 2022 09:57:37 +0000 (17:57 +0800)]
ac/nir: add ac_nir_lower_legacy_gs

For legacy (non-NGG) GS to lower outputs to memory stores and add
shader query when required.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
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/20158>

22 months agoac/nir: move ngg_gs_shader_query to a common function
Qiang Yu [Wed, 30 Nov 2022 08:49:11 +0000 (16:49 +0800)]
ac/nir: move ngg_gs_shader_query to a common function

To be shared by NGG GS and legacy GS. Legacy GS need this when
GFX10 which mix use NGG and legacy GS. For example when streamout
is enabled, it uses legacy GS, otherwise uses NGG GS. So legacy
GS also need to update query emulation which is a sum of NGG and
legacy GS results.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
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/20158>

22 months agonir,ac/llvm,radv: add stream id index to nir_load_ring_gsvs_amd
Qiang Yu [Mon, 5 Dec 2022 11:03:15 +0000 (19:03 +0800)]
nir,ac/llvm,radv: add stream id index to nir_load_ring_gsvs_amd

For used by legacy GS to store output to different ring according
to stream id.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
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/20158>

22 months agoac/llvm,radv,radeonsi: pass instruction to intrinsic_load abi
Qiang Yu [Fri, 9 Dec 2022 02:32:48 +0000 (10:32 +0800)]
ac/llvm,radv,radeonsi: pass instruction to intrinsic_load abi

For simple intrinsic which also need other fields to translate
to LLVM like stream_id.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
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/20158>

22 months agonir: add nir_load_ring_gs2vs_offset_amd
Qiang Yu [Sun, 27 Nov 2022 04:25:26 +0000 (12:25 +0800)]
nir: add nir_load_ring_gs2vs_offset_amd

Used by legacy GS output lowering.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
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/20158>

22 months agoac/nir,radeonsi: replace llvm ngg gs invocation query with nir
Qiang Yu [Wed, 30 Nov 2022 13:43:59 +0000 (21:43 +0800)]
ac/nir,radeonsi: replace llvm ngg gs invocation query with nir

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/20156>

22 months agonir,radv,radeonsi: add nir_atomic_add_gs_invocation_count_amd
Qiang Yu [Wed, 30 Nov 2022 10:12:39 +0000 (18:12 +0800)]
nir,radv,radeonsi: add nir_atomic_add_gs_invocation_count_amd

For shader query emulation.

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/20156>

22 months agofreedreno/registers: Add some docs for PM4 events.
Emma Anholt [Thu, 10 Nov 2022 21:06:58 +0000 (13:06 -0800)]
freedreno/registers: Add some docs for PM4 events.

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

22 months agodoc/freedreno: Add a bunch of docs of the hardware and drivers.
Emma Anholt [Thu, 10 Nov 2022 19:35:46 +0000 (11:35 -0800)]
doc/freedreno: Add a bunch of docs of the hardware and drivers.

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

22 months agofreedreno: Clarify that CACHE_FLUSH is pre-5xx.
Emma Anholt [Thu, 10 Nov 2022 19:36:01 +0000 (11:36 -0800)]
freedreno: Clarify that CACHE_FLUSH is pre-5xx.

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

22 months agoci/docs: Always expose the built docs.
Emma Anholt [Mon, 14 Nov 2022 21:22:53 +0000 (13:22 -0800)]
ci/docs: Always expose the built docs.

When testing my docs changes outside of an MR, there was no way to look at
the result.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19733>

22 months agointel: Fix crashes for importing drm buffer
Peng Huang [Sun, 11 Dec 2022 21:07:06 +0000 (16:07 -0500)]
intel: Fix crashes for importing drm buffer

image_aspect_to_binding() converts aspect to index by subrracting
VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT, however these enum values
are bitfields, not consecutive numbers, so comparing and subtracting
them won't work.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20269>

22 months agohasvk: pipelineStageCreationFeedbackCount is allowed to be 0
Iván Briano [Tue, 6 Sep 2022 22:28:26 +0000 (15:28 -0700)]
hasvk: pipelineStageCreationFeedbackCount is allowed to be 0

Fixes: 6601e5d6fc6 ("anv: implement VK_EXT_pipeline_creation_feedback")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20216>

22 months agovdpau: allow building vdpau st with virgl only
Jan Palus [Thu, 1 Dec 2022 17:32:53 +0000 (18:32 +0100)]
vdpau: allow building vdpau st with virgl only

Fixes: 6b5aecb1955 ("virgl: add support for hardware video acceleration")

Signed-off-by: Jan Palus <jpalus@fastmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20108>

22 months agoglsl: fix function inlining for images
Timothy Arceri [Mon, 12 Dec 2022 02:06:54 +0000 (13:06 +1100)]
glsl: fix function inlining for images

Here we skip replacing parameters with their actual values for
images as glsl_to_nir() expects them to be copied to temps first.
Tree grafting has a similiar rule to avoid this happening also.

Fixes: 8d10a6835f32 ("glsl: dont create temps for builtin function inputs")

Tested-by: Martin Roukala <martin.roukala@mupuf.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20274>

22 months agoradv: Improved export conflict bug workaround.
Bas Nieuwenhuizen [Mon, 12 Dec 2022 01:29:34 +0000 (02:29 +0100)]
radv: Improved export conflict bug workaround.

Based on f129db911bd ("radeonsi/gfx11: use a better workaround for the export conflict bug")
which claims better performance.

I couldn't be bothered to do the refactor to check the sample count with
dynamic sample counts, so this is just conservative there.

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

22 months agomesa: move the _mesa_set_varying_vp_inputs call to where the state changes
Marek Olšák [Wed, 23 Nov 2022 10:08:07 +0000 (05:08 -0500)]
mesa: move the _mesa_set_varying_vp_inputs call to where the state changes

This removes the _mesa_update_vao_state() call from all glDraw* functions
where it was executed unconditionally.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: move _DrawVAOEnabledAttribs determination into st_update_array
Marek Olšák [Tue, 22 Nov 2022 11:57:43 +0000 (06:57 -0500)]
mesa: move _DrawVAOEnabledAttribs determination into st_update_array

This can just be computed where it's used.

Now the non-glDraw paths like glRasterPos, glBegin/End, and the slow
display list path have to save and restore _VPModeInputFilter, which
is the only field that's different from the glDraw* path.

_VPModeInputFilter is a bitmask of VP inputs that might have to be bound.
The only difference with glBegin/End and the slow display list path is
that they also add VERT_BIT_MAT_ALL to the bitmask, whereas the glDraw* path
doesn't have that.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: inline _mesa_draw_array_bits & _mesa_draw_current_bits
Marek Olšák [Tue, 22 Nov 2022 09:37:31 +0000 (04:37 -0500)]
mesa: inline _mesa_draw_array_bits & _mesa_draw_current_bits

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: don't AND with VERT_BIT_ALL because it's ~0u
Marek Olšák [Tue, 22 Nov 2022 09:34:04 +0000 (04:34 -0500)]
mesa: don't AND with VERT_BIT_ALL because it's ~0u

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: simplify VBO state flagging in _mesa_update_vao_state
Marek Olšák [Tue, 22 Nov 2022 09:30:46 +0000 (04:30 -0500)]
mesa: simplify VBO state flagging in _mesa_update_vao_state

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: remove VAO::NewVertexBuffers/Elements, set the dirty flags directly
Marek Olšák [Tue, 22 Nov 2022 09:25:42 +0000 (04:25 -0500)]
mesa: remove VAO::NewVertexBuffers/Elements, set the dirty flags directly

These intermediate dirty flags are unnecessary now.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: move calling _mesa_update_vao_derived_arrays into st_update_array
Marek Olšák [Mon, 21 Nov 2022 13:24:17 +0000 (08:24 -0500)]
mesa: move calling _mesa_update_vao_derived_arrays into st_update_array

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: remove the NewVAO flag, set directly what we need to set
Marek Olšák [Mon, 21 Nov 2022 13:20:24 +0000 (08:20 -0500)]
mesa: remove the NewVAO flag, set directly what we need to set

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agost/mesa: move st_atom.c contents into st_context.c
Marek Olšák [Mon, 21 Nov 2022 13:03:23 +0000 (08:03 -0500)]
st/mesa: move st_atom.c contents into st_context.c

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agost/mesa: inline st_validate_state and remove redundant checking in callers
Marek Olšák [Mon, 21 Nov 2022 12:59:14 +0000 (07:59 -0500)]
st/mesa: inline st_validate_state and remove redundant checking in callers

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agost/mesa: remove the switch from st_validate_state by passing state mask directly
Marek Olšák [Mon, 21 Nov 2022 12:47:59 +0000 (07:47 -0500)]
st/mesa: remove the switch from st_validate_state by passing state mask directly

Instead of passing the enum that represents which states should be updated
to st_validate_state, pass the state bitmask to st_validate_state directly.
This removes the switch statement over the enums.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agost/mesa: remove st_context::dirty, use gl_context::NewDirtyState instead
Marek Olšák [Mon, 21 Nov 2022 12:37:45 +0000 (07:37 -0500)]
st/mesa: remove st_context::dirty, use gl_context::NewDirtyState instead

We stored the same state in 2 different variables, and then we OR'd them.

This changes the st_validate_state logic slightly, but should be identical.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: remove per_vertex_edgeflags parameter from DrawGalliumVertexState
Marek Olšák [Mon, 21 Nov 2022 12:15:03 +0000 (07:15 -0500)]
mesa: remove per_vertex_edgeflags parameter from DrawGalliumVertexState

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: completely rewrite the edge flag state update logic
Marek Olšák [Mon, 21 Nov 2022 09:53:39 +0000 (04:53 -0500)]
mesa: completely rewrite the edge flag state update logic

This removes the edge flag logic from st_validate_state, which was always
executed and added overhead there. Now it's done only when needed.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: don't call _mesa_set_varying_vp_inputs in set_vertex_processing_mode
Marek Olšák [Fri, 18 Nov 2022 23:59:46 +0000 (18:59 -0500)]
mesa: don't call _mesa_set_varying_vp_inputs in set_vertex_processing_mode

It's redundant because it's always called in _mesa_update_draw_vao.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: don't call _mesa_update_vao_derived_arrays for dynamic VAOs
Marek Olšák [Fri, 18 Nov 2022 23:43:19 +0000 (18:43 -0500)]
mesa: don't call _mesa_update_vao_derived_arrays for dynamic VAOs

This just moves the exit into the caller. There is nothing else in
_mesa_update_vao_derived_arrays that dynamic VAOs care about.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: merge 2 switch statements into one in _mesa_get_derived_vao_masks
Marek Olšák [Fri, 18 Nov 2022 23:38:39 +0000 (18:38 -0500)]
mesa: merge 2 switch statements into one in _mesa_get_derived_vao_masks

_mesa_vao_enable_to_vp_inputs has a switch statement and we call it twice.
Let's inline it.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: remove derived _EffEnabled* fields and compute them at their only use
Marek Olšák [Fri, 18 Nov 2022 23:18:33 +0000 (18:18 -0500)]
mesa: remove derived _EffEnabled* fields and compute them at their only use

We were passing the fields to their only use and used them only once,
so let's just compute them there.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: merge _mesa_draw_(user_array,nonzero_divisor)_bits into one helper
Marek Olšák [Fri, 18 Nov 2022 23:06:55 +0000 (18:06 -0500)]
mesa: merge _mesa_draw_(user_array,nonzero_divisor)_bits into one helper

preparation for the next change

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: remove unused inline functions from arrayobj.h
Marek Olšák [Fri, 18 Nov 2022 22:40:38 +0000 (17:40 -0500)]
mesa: remove unused inline functions from arrayobj.h

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: keep the current VAO also set as _DrawVAO
Marek Olšák [Fri, 18 Nov 2022 22:04:50 +0000 (17:04 -0500)]
mesa: keep the current VAO also set as _DrawVAO

This removes setting _DrawVAO from all glDraw* functions that draw
primitives because now _DrawVAO is always equal to the current VAO.

glEnd, glRasterPos, and the slow display list path now have to save
_DrawVAO before changing it, and restore it after they are done.

This also removes _EmptyVAO, which becomes unused because we no longer
bind "no VAO" into _DrawVAO.

Rules:
- only glBindVertexArray and non-glDraw* paths should call
  _mesa_set_draw_vao, other places shouldn't
- only draws should call _mesa_update_vao_state, other places shouldn't

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agomesa: split _mesa_set_draw_vao into set and update functions
Marek Olšák [Fri, 18 Nov 2022 21:27:36 +0000 (16:27 -0500)]
mesa: split _mesa_set_draw_vao into set and update functions

This is the beginning of splitting _mesa_set_draw_vao and moving pieces
of it out of draw functions.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19953>

22 months agoradv: Handle NULL miss shaders
Friedrich Vock [Sun, 11 Dec 2022 21:49:18 +0000 (22:49 +0100)]
radv: Handle NULL miss shaders

Fixes reflections in DOOM Eternal.

Fixes: 85580faa ("radv: Add ray traversal loop.")
Closes: #6210
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20270>

22 months agoradv: Change shaderGroupBaseAlignment to RADV_RT_HANDLE_SIZE
Friedrich Vock [Tue, 29 Nov 2022 00:25:31 +0000 (01:25 +0100)]
radv: Change shaderGroupBaseAlignment to RADV_RT_HANDLE_SIZE

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

22 months agoradv: Force non uniform texture sampling with NV Remix
Konstantin Seurer [Sat, 10 Dec 2022 11:38:24 +0000 (12:38 +0100)]
radv: Force non uniform texture sampling with NV Remix

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

22 months agoradv: Add a driconf option to force non uniform texture sampling
Konstantin Seurer [Sat, 10 Dec 2022 11:37:56 +0000 (12:37 +0100)]
radv: Add a driconf option to force non uniform texture sampling

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

22 months agospirv: Add a debug option to force non uniform texture sampling
Konstantin Seurer [Sat, 10 Dec 2022 11:36:57 +0000 (12:36 +0100)]
spirv: Add a debug option to force non uniform texture sampling

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20243>

22 months agoradv/rt: Hash the pipeline key
Konstantin Seurer [Sat, 10 Dec 2022 12:13:09 +0000 (13:13 +0100)]
radv/rt: Hash the pipeline key

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

22 months agoradv/rt: Propagate radv_pipeline_key
Konstantin Seurer [Sat, 10 Dec 2022 11:36:13 +0000 (12:36 +0100)]
radv/rt: Propagate radv_pipeline_key

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

22 months agoradv/rt: Work around incorrect NOT_DEFERRED handling in Portal RTX
Konstantin Seurer [Fri, 9 Dec 2022 07:16:34 +0000 (08:16 +0100)]
radv/rt: Work around incorrect NOT_DEFERRED handling in Portal RTX

Allows Portal RTX to reach the main menu.

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

22 months agotu: Implement VK_EXT_descriptor_buffer
Connor Abbott [Mon, 19 Sep 2022 14:59:53 +0000 (16:59 +0200)]
tu: Implement VK_EXT_descriptor_buffer

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

22 months agovk/descriptor_set_layout: Add optional destructor
Connor Abbott [Thu, 6 Oct 2022 14:46:19 +0000 (16:46 +0200)]
vk/descriptor_set_layout: Add optional destructor

Drivers implementing descriptor buffers will want to allocate and free
descriptors with the layout for embedded samplers, so we need a hook to
allow them to free any GPU buffers.

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

22 months agotu: Fall back to ldg for variable-size inline uniform blocks
Connor Abbott [Wed, 30 Nov 2022 16:43:15 +0000 (17:43 +0100)]
tu: Fall back to ldg for variable-size inline uniform blocks

With descriptor buffers, we have no way to know how big the descriptor
set actually is, so we have no idea how many constants we can safely
push. If we use a UBO then it will still get pushed, because we normally
assume that we can freely access UBOs without any fear of faults due to
the range checking. This does the easiest thing of using raw pointer
loads, although performance will fall off a cliff, because we don't have
many better options.

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

22 months agoir3/a6xx: Fix immediate offset stg/ldg path
Connor Abbott [Wed, 30 Nov 2022 16:40:47 +0000 (17:40 +0100)]
ir3/a6xx: Fix immediate offset stg/ldg path

The immediate offset is in units of bytes, whereas the register offset
is in dwords. We need to compensate for that.

Also, fix an off-by-one when checking the range - the offset field is 13
bits, but the sign bit means we can only represent up to 1 << 12 in
bytes or 1 << 10 in dwords.

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

22 months agomicrosoft/compiler: Fix codegen when a loop ends in a jump
Jesse Natalie [Fri, 9 Dec 2022 19:29:02 +0000 (11:29 -0800)]
microsoft/compiler: Fix codegen when a loop ends in a jump

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

22 months agomicrosoft/compiler: Handle holes in driver_location when adding sysvals
Jesse Natalie [Fri, 9 Dec 2022 18:48:13 +0000 (10:48 -0800)]
microsoft/compiler: Handle holes in driver_location when adding sysvals

All of the full runtime+compiler stacks reassign these driver_location
values to compact them and sort between shader stages, but for the
spirv2dxil tool, we leave the original shader's "location" intact. That
means that there can be holes in the driver_location space, and simply
counting how many inputs there are can lead to collisions. So instead
place all sysvals after the last-used driver_location.

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

22 months agoci: Bump virglrenderer version
Corentin Noël [Mon, 5 Dec 2022 14:51:00 +0000 (15:51 +0100)]
ci: Bump virglrenderer version

Update virglrenderer to the latest version on time.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20277>

22 months agoir3/freedreno: Find regs for FS inputs when printing info
Danylo Piliaiev [Fri, 9 Dec 2022 11:31:56 +0000 (12:31 +0100)]
ir3/freedreno: Find regs for FS inputs when printing info

FS inputs are not directly loaded into regs, but require additional
instruction to do so. So in order to print in which reg the input
is loaded we have to scan the shader for the instruction
which loads the input.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20247>

22 months agoradv: fix assertion on gpu hang detection
Mikhail Korolev [Mon, 12 Dec 2022 08:02:43 +0000 (09:02 +0100)]
radv: fix assertion on gpu hang detection

fixes assert in RADV_DECL_PIPELINE_DOWNCAST when bound pipline is a compute
pipeline

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

22 months agointel/compiler: Remove leftover declarations of old NIR passes
Caio Oliveira [Sat, 12 Nov 2022 06:33:31 +0000 (22:33 -0800)]
intel/compiler: Remove leftover declarations of old NIR passes

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19805>

22 months agointel/nir/rt: fixup primitive id
Lionel Landwerlin [Thu, 27 Oct 2022 13:56:38 +0000 (16:56 +0300)]
intel/nir/rt: fixup primitive id

There is a delta index value in the hit structure, we forgot to add it
to the base value.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 046571479028 ("intel/nir/rt: add more helpers for ray queries")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7565
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19346>

22 months agoradv: fix hashing descriptor set layout
Samuel Pitoiset [Fri, 9 Dec 2022 14:59:52 +0000 (15:59 +0100)]
radv: fix hashing descriptor set layout

Shouldn't have pointers.

Fixes: 19f8d338761 ("radv: Use vk_descriptor_set_layout")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20250>

22 months agonir/lower_shader_calls: Remove phis after dead control flow
Friedrich Vock [Thu, 8 Dec 2022 20:37:06 +0000 (21:37 +0100)]
nir/lower_shader_calls: Remove phis after dead control flow

This potentially gets rid of some more phis without sources.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19960>