Lionel Landwerlin
18bbcf9a63
intel: introduce new VUE layout for separate compiled shader with mesh
...
Mesh shaders have per vertex block in URB pretty much identical to the
VUE format. Let's just reuse that concept to do all of our layout in
the payload attribute registers. This will ensure that we have
consistent VUE layout between Mesh & non-Mesh pipelines.
We need a new way of laying out the VUE though as we have to
accomodate a HW constraint of maximum (per-primitive + per-vertex) of
32 varying. This means we cannot have 2 locations in the payload for
things like PrimitiveID which can come from either the per-primitive
or the per-vertex block. The new layout places the PrimitiveID at the
end of the per-vertex attributes and shrinks the delivery dynamically
if the mesh stage is active. The shader is compiled with a
MOV_INDIRECT to read the PrimitiveID from the right location in the
attributes.
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/34109 >
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
2d396f6085
intel: prepare VUE layout for more than 2 layouts
...
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/34109 >
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
95efdca00b
brw: add documentation pointers to FS attribute layout
...
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/34109 >
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
9d342081e7
brw/nir: add intrinsics to read attribute payload register indirectly
...
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/34109 >
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
ef17fbf8e5
anv/brw: use separate_shader to deduced MUE compaction
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:35 +00:00
Lionel Landwerlin
6230f3029f
brw: fix brw_nir_move_interpolation_to_top
...
In a case like this :
block_0:
%5 = ...
%6 = ...
block_1:
%7 = load_interpolated_input %5, %6
The current logic would move load_interpolated_input to block_0 before
%5 but not move %5 & %6 which are sources of that instruction.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
5ff1b31c3f
brw: document some brw_wm_prog_data fields
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
2f654ddd03
brw: use VARYING_BIT_* macros more
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
75b2d000fc
anv: tidy up (CLIP|SBE)_MESH emission
...
Moving it to is related functions.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
62d2e323ba
anv/brw: shrink FS varying payload
...
We're currently allocating payload spots for 3 fields already
delivered somewhere else in the payload.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
c467444670
brw/nir: use a new intrinsic for fs_msaa_flag
...
Avoid NIR code doing offset computations.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
dd1ef73aae
brw: use newer NIR constructs
...
nir_shader_intrinsics_pass() & NIR_PASS()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
b64f237dc4
brw: move helper to brw_nir.c
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
cbbe7ff66e
brw: add new helper to print out FS URB setup
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
b8a80c88cb
brw: improve VUE printout
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
4f10a1f618
anv: switch to brw helpers to figure out if a fragment is dynamic
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
cb461fa287
anv: switch to use the tcs_prog_data for dynamic input vertices
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
7f500cc6e4
brw: store input_vertices on tcs_prog_data
...
Will allow the driver to know if the vertices count is dynamic.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
a9ee498347
brw: add helpers to check if a fragment shader execution is dynamic
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
4717382f84
anv: lower input vertices for TCS unconditionally
...
Take the opportunity to reuse the backend pass.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
119ef792c5
anv: remove tbimr workaround check
...
Already handled by having a special range created
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
99580a815f
compiler: add VARYING_BIT_PRIMITIVE_INDICES
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Lionel Landwerlin
07303c3fbc
compiler: add VARYING_BIT_CULL_PRIMITIVE
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34109 >
2025-05-08 06:48:34 +00:00
Ella Stanforth
b3cc871b7c
v3d/compiler: remove requirement for format information for fbfetch
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742 >
2025-05-08 06:25:22 +00:00
Ella Stanforth
9a71e6dcc2
v3d/compiler: use mask for 16bit and 32bit return values
...
There are only ever two possibilities here so lets use a mask.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742 >
2025-05-08 06:25:22 +00:00
Ella Stanforth
bb07364c54
v3d/compiler: remove num_samplers_used from shader key
...
This is only ever used by assertions.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742 >
2025-05-08 06:25:22 +00:00
Ella Stanforth
01d0ccd664
v3d/compiler: remove unused texture swizzle
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742 >
2025-05-08 06:25:22 +00:00
Ella Stanforth
76e27d2d0d
v3d/compiler: remove return_channels from the shader key
...
This isn't used anywhere.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742 >
2025-05-08 06:25:22 +00:00
Ella Stanforth
b39fc710ee
v3d/compiler: remove int/uint tracking
...
We don't need this anymore as we do not support anything older than 4.2.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34742 >
2025-05-08 06:25:22 +00:00
Jesse.Zhang
d8624e6a79
winsys/amdgpu: Add support for queue priority in Mesa
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This patch adds support for queue priority levels in Mesa's AMDGPU winsys layer.
The changes include:
1. Updated ac_drm_create_userqueue() to accept and pass through flags parameter
2. Modified amdgpu_userq_init() to use the flags when creating queues
3. Added flags field to amdgpu_userq struct to store priority settings
4. Updated header definitions to match kernel UAPI changes
This aligns with the kernel changes provided by Alex:
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122782.html
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122780.html
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122786.html
v2: We only need 1 normal priority queue and 1 TMZ normal priority queue.(Marek Olšák)
v3: Simplified to only support normal priority queues
v4: use a local variable instead of being in struct amdgpu_userq.(Marek Olšák)
v5: rebase the latest main branch.
Signed-off-by: Jesse.Zhang <Jesse.zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34568 >
2025-05-08 04:29:29 +00:00
Marek Olšák
870d17012a
ac: adjust maximum HS workgroup size
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This has no effect on triangles because max 64 patches implied max 192
threads, but it improves performance for cases when the number of threads
per patch is > 3.
This improves the score for gfxbench5 "gl_tess_off" (offscreen) by 11%
on Navi48.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:13 +00:00
Marek Olšák
b960137ebf
aco: remove unused aco_shader_info::tcs_offchip_layout
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:13 +00:00
Marek Olšák
f6b3c2c97a
radeonsi: remove dead gfx12 tess code from a gfx6-11 function
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:13 +00:00
Marek Olšák
dfc3c1135c
ac/nir/tess: don't pass nir_intrinsic_instr to hs_output_lds_offset
...
It will be used without intrinsics.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:13 +00:00
Marek Olšák
4bbe497d9b
ac/nir/tess: don't pass nir_intrinsic_instr to VMEM IO calc helpers
...
These will be used without intrinsics.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:13 +00:00
Marek Olšák
360494f50d
ac/nir/tess: remove unused variables
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:12 +00:00
Marek Olšák
f58c0cbb6a
nir: split *_accessed_indirectly* bitmasks into *_read/written_indirectly*
...
for AMD
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:12 +00:00
Marek Olšák
afd8fefb79
nir: add shader_info::tess::tcs_cross_invocation_outputs_written
...
for AMD
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34863 >
2025-05-08 02:54:12 +00:00
Emma Anholt
f45356f4ac
tu/perfetto: Forward VkDebugUtilsObjectNameInfoEXT to perfetto.
...
This gets us names on zink/wsi command buffers in perfetto, but may also
be useful some day for getting app names onto framebuffers and non-dynamic
renderpasses.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
e0355b926d
tu/perfetto: Move "have we already sent initial state?" into the helper.
...
I'm going to have to send initial state from another function too, shortly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
131284b943
tu/perfetto: Attach VkCommandBuffer handles to the GPU events.
...
All of the GPU renderstage events show a command buffer id/name field in
the UI (default 0/NULL), so let's get it filled with something useful.
This will also be used by perfetto's trace processor for associating
object names with cmdbuf executions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
7c130e5dcf
intel/ds: Fix formatting of stage index.
...
draws had been bumped to stage #10 , so they ended up appearing nested
between frame (#1 ) and cmdbuf (#2 ), instead of nested under them.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
4cc66123ec
anv/ds: Forward VkDebugUtilsObjectNameInfoEXT to perfetto.
...
This gets us names on zink/wsi command buffers in perfetto, but may also
be useful some day for getting app names onto framebuffers and non-dynamic
renderpasses.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
b47a6a5418
perfetto: Add helpers for passing VkDebugUtilsObjectNameInfoEXT to perfetto.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
55d788f434
anv/ds: Associate the VkCommandBuffer some anv-only renderstage events.
...
This means the perfetto UI will have a non-zero/NULL handle/name in the UI
on these renderstages. Unfortunately, intel/ds is outside of vulkan so
unless we pull in anv headers, we can't just pass in the anv_cmd_buffer.
This also means it would be much more painful to pass the cmd buffer to
the rest of the events, so they'll still have unset command buffers.
Still, being able to see the name of the command buffer in at least one of
the events should be useful once that's glued together.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
f873b15a48
perfetto: Allow tracepoint args to map to native perfetto fields.
...
Previously, our args all had to be an extra_data name/value pair. But
some fields we want to set (such as Vulkan object names) will be a
set_fieldname() call directly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
546a100f26
intel/ds: Move "have we already sent initial state?" into the helper.
...
I'm going to have to send initial state from another function too, shortly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
ccfc3b5c12
perfetto: Move the debug_markers to the incremental state.
...
You need to re-emit name interning when incremental state is lost, so this
is the right home for the HT of "have we interned this name?". The
emitter function is still on the datasource because it needs the
templating to get the tracecontext type, but now getting the locked
datasource is not really necessary other than being way more ergonomic
than repeating the template parameters.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
dd81420ef1
perfetto: Create a common MesaRenderpassIncrementalState.
...
... and explain what its role is.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00
Emma Anholt
82656de029
zink: Add debug names to our command buffers.
...
This will be nice when debugging multiple sources of command buffers on a
system to see who's responsible.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22350 >
2025-05-08 01:21:25 +00:00