Rhys Perry
810d4ff299
nir/lower_atomics: set ACCESS_COHERENT
...
The lack of ACCESS_COHERENT was probably fine, the worst it would do would
add a pointless iteration after loading an out-of-date value.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37417 >
2025-09-17 11:29:21 +00:00
Rhys Perry
e819160705
nir/lower_atomics_to_ssbo: set ACCESS_COHERENT for loads
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37417 >
2025-09-17 11:29:21 +00:00
Rhys Perry
5d2c17a5fd
vtn: skip make-available/visible for shared
...
These barriers could prevent optimizations.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37417 >
2025-09-17 11:29:21 +00:00
Ella Stanforth
753af683b5
pco: Switch to common alpha_to_coverage intrinsic
...
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:43 +00:00
Ella Stanforth
5ab606ccda
nir: assert when we do not have a sample count when not using intrinsic
...
Signed-off-by: Ella Stanforth <ella@igalia.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:42 +00:00
Simon Perretta
6edb72d28b
pco: replace {un,}packing alu ops with intrinsics
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:19 +00:00
Simon Perretta
8104ef4e01
pco: support 1010102 snorm, [us]scaled formats
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:19 +00:00
Simon Perretta
c3325b22d8
pco: image atomics support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:12 +00:00
Simon Perretta
672541d036
nir, asahi: commonize interleave_agx
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:12 +00:00
Simon Perretta
a67120cda3
pvr, pco: full support for tile buffer eot handling
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:12 +00:00
Simon Perretta
59dc07e02c
pco: improve image write using pck.prog
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:12 +00:00
Simon Perretta
5fa1bb9194
pvr, pco: alpha to coverage support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:11 +00:00
Simon Perretta
22c67a3c4e
pvr, pco: add dummy stores for tilebuffer-only loadops
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:11 +00:00
Simon Perretta
297a0c269a
pvr, pco: tile buffer support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:11 +00:00
Simon Perretta
de4dd8e9ea
pvr, pco: fragment shader metadata boilerplate code
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:11 +00:00
Simon Perretta
78062fbb75
pvr, pco: improved image write (with format) support, handle 111110
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:11 +00:00
Simon Perretta
0c7dc07c93
pvr, pco: add support for gl_FrontFacing
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:11 +00:00
Simon Perretta
ed652e10fc
pco: force image/texture array coordinate f2i32 conversions to be rtne
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:11 +00:00
Simon Perretta
0ff8f57392
pvr, pco: simple end-of-tile/render nir shader gen
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:10 +00:00
Simon Perretta
46c9239c11
pvr, pco: initial texture gather support with gather sampler
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:10 +00:00
Simon Perretta
ac41e9dd18
pco: support combined depth/discard isp feedback
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:10 +00:00
Simon Perretta
0367dc1e42
pco, pvr: sample mask out support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:10 +00:00
Simon Perretta
486ca8bbc1
pvr, pco: basic depth feedback/discard/terminate support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:09 +00:00
Simon Perretta
b50f0b47d2
pco: add support for sscaled8* formats
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:09 +00:00
Simon Perretta
db686e190a
pvr, pco: per frag/vertex input/output rework
...
Adds support for packing and unpacking r10g10b10a2 unorm and
r11g11b10 float formats, as well as partial 2x16 and 4x8 formats.
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:09 +00:00
Simon Perretta
3af73ef199
pco: initial image support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:09 +00:00
Simon Perretta
8b634881f8
pco: add intrinsic for loading instance num in slot
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:09 +00:00
Simon Perretta
4ca0e4991e
pco, pygen: add mutex op
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:09 +00:00
Simon Perretta
5088429170
pco: basic arrayed image/sampler descriptor support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:08 +00:00
Simon Perretta
7df32ba09d
pco: initial texture/sampler compiler support
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:08 +00:00
Simon Perretta
b7c0863b97
pco: add uadd64_32 op
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:08 +00:00
Simon Perretta
8ec174b3f9
pco: add support for various selection, complex, trig ops
...
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412 >
2025-09-16 18:26:08 +00:00
Eric R. Smith
475222b022
glcpp: prevent accidental token pasting
...
Explicit token pasting is handled specially, but the token
printing code can accidentally paste identifiers. Check for
this accidental pasting and prevent it by inserting a space
if necessary.
Supersedes a similar but much more limited test to prevent pasting
`+` and `-` to make `++` and `--`.
A test is provided in glcpp/tests/150-token-accidental-concatenation.
The accidental pasting test in 068-accidental-pasting is also updated
to cover some of the other cases.
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37214 >
2025-09-16 11:27:43 +00:00
Georg Lehmann
714a149396
nir: remove unsigned upper bound config
...
All config information is now either in nir->info or nir->options.
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/37361 >
2025-09-16 09:24:04 +00:00
Georg Lehmann
bb67dae12d
nir/uub: remove max_workgroup_size from config
...
For most hardware, this is the same as max invocations in the workgroup.
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/37361 >
2025-09-16 09:24:04 +00:00
Georg Lehmann
f3c08c9d27
nir/uub: use shader_info subgroup size
...
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/37361 >
2025-09-16 09:24:04 +00:00
Georg Lehmann
112e160946
nir/uub: remove vertex input handling
...
Unused since radv started lowering vertex inputs in NIR.
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/37361 >
2025-09-16 09:24:04 +00:00
Iago Toral Quiroga
ac11e00b15
nir/serialize: make alu src deserialization consistent for unused swizzles
...
Currently we have 3 paths for ALU serialization/deserialization in NIR:
1. If the ALU is qualified as packed_src_ssa_16bit (identity swizzle)
- The write will store an object index only.
- The read will only load the swizzles actually used, the rest are 0.
2. If the ALU is not qualified as packed_src_ssa_16bit, we have two cases:
2.1 Up to vec4:
- The write stores all 4 swizzle components.
- The read loads all 4 swizzle components.
2.2 vec8/16
- The write stores only swizzle components used, the rest are 0.
- The read loads only swizzle components used, the rest are 0.
This inconsistency in how these paths encode/decode unsused swizzle components
can cause issues in some scenarios where a backend compiler may receive
functionally equivalent NIR shaders from Mesa that won't produce the same sha1,
leading to unnecessary cache misses.
This patch makes path 2.1 always encode and decode unused swizzle components
as 0, making it consistent with the other paths.
This fixes issues where sometimes backends need to compile a shader twice
before it is effectively retrieved from the disk cache. This has been
observed at least with V3d and Panfrost.
The problem occurs when an ALU src with unused swizzle components is serialized
in the Mesa frontend using path 1, but when it later hits the backend it is
serialized using path 2.1. The backend uses the sha1 of the serialized NIR for
the cache key. On the second execution the Mesa frontend has a cache hit and
when it deserializes the alu src, it sets its unused components to 0 but that
will cause the backend to have a cache miss since that NIR doesn't match the one
it cached on the first execution.
By always making unused swizzle components decode and encode consistently to 0
in all paths we ensure the issue never happens and that NIR variants that only
differ in swizzle components that are not used lead to cache hits.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37218 >
2025-09-16 07:33:34 +02:00
Georg Lehmann
76df6cd321
nir: remove has_ddx_intrinsics option
...
I thought this was already gone but apparently not quite.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37362 >
2025-09-15 10:16:27 +00:00
Yonggang Luo
bebd167d74
glsl: Fixes warning: deprecated directive: ‘%pure-parser’, ‘%error-verbose’
...
../../src/compiler/glsl/glcpp/glcpp-parse.y:179.1-12: warning: deprecated directive: ‘%pure-parser’, use ‘%define api.pure’ [-Wdeprecated]
179 | %pure-parser
| ^~~~~~~~~~~~
| %define api.pure
../../src/compiler/glsl/glcpp/glcpp-parse.y:180.1-14: warning: deprecated directive: ‘%error-verbose’, use ‘%define parse.error verbose’ [-Wdeprecated]
180 | %error-verbose
| ^~~~~~~~~~~~~~
| %define parse.error verbose
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37289 >
2025-09-13 08:23:07 +00:00
Christian Gmeiner
5977c0026d
nak: Move dataflow to compiler crate
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37348 >
2025-09-13 07:30:50 +00:00
Georg Lehmann
2ac5641473
shader_info: remove gl_subgroup_size enum
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Georg Lehmann
04d3b3bde5
mesa,glsl,spirv: set new subgroup size info
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Georg Lehmann
ce91b0be08
nir: define new subgroup size info
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Georg Lehmann
95c2a65662
nir: remove unused shader_info param in nir_create_shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258 >
2025-09-12 21:05:17 +00:00
Konstantin Seurer
2a4b1ea69b
nir/opt_ray_queries: Cleanup and return if functions is not singular
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37283 >
2025-09-12 19:11:02 +00:00
Mel Henning
611c5ebce5
compiler/rust: impl AsSlice for Box
...
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Seán de Búrca <leftmostcat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37315 >
2025-09-12 10:33:32 +00:00
Samuel Pitoiset
9fbf29fc6d
spirv: add missing non-uniform access for SSBO atomics
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes new VKCTS coverage
dEQP-VK.descriptor_indexing.non_uniform_atomics.
Found this while implementing a new extension.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37295 >
2025-09-12 07:40:50 +00:00
David Rosca
4b54277d2e
Remove VDPAU
...
VDPAU only supports X11 and GL interop. There is no Wayland or Vulkan
interop support. The API has limitations that makes it impossible to
correctly decode certain streams.
Application support is also very limited, and VAAPI is always a better
choice over VDPAU.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632 >
2025-09-10 12:33:57 +00:00
Timothy Arceri
11a434f3df
glsl: remove now unused NumUniformRemapTable
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36997 >
2025-09-10 05:11:47 +00:00