Samuel Pitoiset
69ff204422
radv: remove the optimization for equal immutable samplers
...
This optimization used to optimize the allocated space for descriptors
when immutable samplers are equal. Though, this was basically broken :
- descriptor copies were broken for combiner image sampler (or sampler)
with equal immutable samplers because 96 bytes were copied instead of
64 bytes (cf. the linked ticket). This could be fixed but it's not
worth it.
- the value returned by vkGetDescriptorLayoutSupport() was broken, it
should have been 96 with no immutable samplers (or when they aren't
equal)
This optimization was also not applied for descriptor buffers which is
the default for vkd3d-proton and Zink. DXVK doesn't use db but it
doesn't use immutable samplers, so basically only native vulkan games
would be concerned.
Note that immutable samplers would still be inlined in shaders if no
indirect access which should be 99.9% of the usecase.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11165
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34928 >
2025-05-13 16:27:22 +00:00
Samuel Pitoiset
9a07ccbc89
radv: fix emitting dynamic viewports/scissors when the count is static
...
In a scenario where the viewports/scissors are a dynamic state but the
count is static (ie. updated when a graphics pipeline is bound), the
driver wasn't considering that and it was re-emitting the previous
number of viewports/scissors.
This fixes rendering issue with Blender.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13127
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34921 >
2025-05-13 16:08:14 +00:00
David Rosca
5fee04bcae
radv/video: Use ac_uvd_alloc_stream_handle
...
ac_uvd_alloc_stream_handle tries to avoid collisions in the case
when PID is not unique (eg. in sandboxes like Flatpak).
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12607
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807 >
2025-05-13 09:36:48 +00:00
David Rosca
69455e8208
ac/uvd: Add ac_uvd_alloc_stream_handle
...
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807 >
2025-05-13 09:36:47 +00:00
Natalie Vock
e32a90b57c
radv,driconf: Add radv_force_64k_sparse_alignment config
...
Needed by DOOM: The Dark Ages.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34944 >
2025-05-13 07:58:03 +00:00
Samuel Pitoiset
4b73d7e817
radv: fix SDMA copies for linear 96-bits formats
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The hardware requires a power of two bpe. To do that, the driver
needs to adjust the pitch/offset/extent based on a texel scale factor
which only applies to 96-bits formats.
This fixes new VKCTS coverage.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34927 >
2025-05-13 06:15:55 +00:00
Konstantin Seurer
2d48b2cb47
radv: Use subgroup OPs for BVH updates on GFX12
...
This patch changes the update code to launch 8 invocations for every
internal node. The internal nodes update their child leaf nodes using
the geometry index and primitive index stored inside the primitive node.
Processing 8 child nodes in parallel is faster than looping over them.
Moving to one dispatch that updates all nodes in one go lets us get rid
of atomics and will also enable updatable BVHs to use pair compression.
Improves Elden Ring (high settings, max RT settings, 1080p) by around
10%.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:31 +02:00
Konstantin Seurer
c6fdf11303
radv: Make radv_update_memory non-static
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:25 +02:00
Konstantin Seurer
8157f84246
radv: Refactor the update scratch layout code
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:06 +02:00
Konstantin Seurer
b2aa0647d5
radv: Use a specialized shader for in place updates
...
If src == dst, we only need to update aabbs for the internal nodes.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:00 +02:00
Konstantin Seurer
e1110d20f8
vulkan: Add acceleration structure update keys
...
The driver can use an optimized shader when src == dst.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:44:56 +02:00
Sergi Blanch Torne
0796d8c502
fluster: xfile update
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
During the maintenance, and proably the previous MR to the first attempt
to merge, fixed a failing test without testing on fluster because the
farm was disabled.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34922 >
2025-05-12 14:25:54 +00:00
Rhys Perry
d0a09b6ff7
ac/llvm: correctly set alignment of vector global load/store
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For coherent/volatile access, this would be too high for vector access.
Even when we didn't set the alignment, LLVM seemed to assume too high of
an alignment for 8/16-bit vector access.
Fixes generated_tests/cl/vload/vload-char-constant.cl
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903 >
2025-05-12 10:51:57 +00:00
Rhys Perry
c1ecad2b11
ac/llvm: correctly split vector 8/16-bit stores
...
This assumes that the start of the load is 32-bit aligned.
For example, a vec3 16-bit store with align_offset=2 should split off the
first component, not the last.
This probably also fixed splitting with 8-bit stores.
Fixes arb_copy_buffer-overlap
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903 >
2025-05-12 10:51:57 +00:00
Samuel Pitoiset
219a2b1e32
radv: ignore radv_zero_vram=true if zeroInitialDeviceMemory is enabled
...
To let applications like vkd3d-proton to take full control.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896 >
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
21badbf336
radv: advertise VK_EXT_zero_initialize_device_memory
...
Only expose this extension when AMDGPU supports zerovram allocations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896 >
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
eaf646d020
radv: implement VK_EXT_zero_initialize_device_memory
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896 >
2025-05-12 06:53:55 +00:00
Samuel Pitoiset
4b16de5e0d
ac/gpu_info: add has_zerovram_support
...
AMDGPU 3.59.0+ clears VRAM on allocations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34896 >
2025-05-12 06:53:55 +00:00
Eric Engestrom
86a29ce0ea
radv/ci: document flakes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916 >
2025-05-11 18:46:12 +00:00
Eric Engestrom
50c60dd07e
radeonsi/ci: document flakes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916 >
2025-05-11 18:46:12 +00:00
Eric Engestrom
6935f28cb3
radeonsi/ci: document regression
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34916 >
2025-05-11 18:46:12 +00:00
Eric Engestrom
7c4f501e99
radv/ci: drop unnecessary CI_TRON_TIMEOUT__BOOT_CYCLE__MINUTES
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It doesn't serve any purpose when `CI_TRON_TIMEOUT__BOOT_CYCLE__RETRIES`
is not set to 1 or more.
The two exception are `zink-radv-vangogh-valve` and
`radv-polaris10-vkcts` which do set `retries` > 0.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34899 >
2025-05-09 22:19:39 +00:00
Eric Engestrom
61ba1fceff
radv/ci: move the timeout from polaris10 job template to polaris10 job
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34899 >
2025-05-09 22:19:39 +00:00
Boyuan Zhang
e1f9dde5c0
radeonsi/vcn: add drm keyblob for cenc
...
Add new message buffer for drm keyblob which contains local policy
for cenc
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34854 >
2025-05-09 17:54:14 +00:00
Boyuan Zhang
2b6ecc8269
radeonsi/vcn: add drm key for cenc
...
Add new function to handle drm message buffer for cenc, which is
different than legacy mode.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34854 >
2025-05-09 17:54:14 +00:00
Boyuan Zhang
d6e2438113
radeonsi/vcn: add subsample for cenc
...
Create new buffer for subsample parameters and submit it for cenc decryption
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34854 >
2025-05-09 17:54:14 +00:00
Daniel Schürmann
83fcd0e908
aco/insert_exec_mask: don't create unnecessary loop-header and -exit phis after demote
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No fossil changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479 >
2025-05-09 17:20:29 +00:00
Daniel Schürmann
7adad4fc0e
aco/isel: assert that terminate intrinsics don't appear in loops
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479 >
2025-05-09 17:20:29 +00:00
Daniel Schürmann
46f6c73d36
aco/isel: remove check for empty exec mask on uniform continues
...
This could only happen after terminate_if inside loops.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479 >
2025-05-09 17:20:29 +00:00
Daniel Schürmann
2b0536e921
aco: remove block_kind_continue_or_break workaround and tests
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479 >
2025-05-09 17:20:29 +00:00
Daniel Schürmann
fa4eb37bf6
radv: move terminate{_if} out of loops.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33479 >
2025-05-09 17:20:29 +00:00
Eric Engestrom
5fc98ce169
amd/ci: set kernel for amdgpu jobs in .ci-tron-test-amdgpu
...
This fixes the kernel used by `radeonsi-vangogh-glcts`.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34898 >
2025-05-09 15:56:18 +00:00
Eric Engestrom
1d902e3372
amd/ci: split .ci-tron-test-amdgpu from .ci-tron-test-radv
...
To be reused by the other ci-tron amdgpu jobs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34898 >
2025-05-09 15:56:18 +00:00
Georg Lehmann
f1c066b353
aco/optimizer: remove instr_usedef_labels completely
...
Some changes because omod/clamp/insert no longer remove label_extract.
Foz-DB GFX1201:
Totals from 15 (0.02% of 79789) affected shaders:
Instrs: 15328 -> 15299 (-0.19%)
CodeSize: 76416 -> 76292 (-0.16%)
Latency: 62306 -> 62288 (-0.03%)
InvThroughput: 6165 -> 6148 (-0.28%)
Copies: 710 -> 709 (-0.14%)
VALU: 7908 -> 7892 (-0.20%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
eb6f5202ac
aco/optimizer: remove label_usedef
...
No Foz-DB changes on NAvi21 and GFX1201.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
ffe11c0235
aco/optimizer: create fma without label_usedef
...
Foz-DB GFX1201:
Totals from 1 (0.00% of 79789) affected shaders:
Instrs: 1492 -> 1485 (-0.47%)
CodeSize: 7436 -> 7384 (-0.70%)
Latency: 2738 -> 2743 (+0.18%)
InvThroughput: 364 -> 365 (+0.27%)
SClause: 50 -> 56 (+12.00%)
Copies: 101 -> 100 (-0.99%)
PreSGPRs: 32 -> 31 (-3.12%)
VALU: 700 -> 701 (+0.14%)
SALU: 351 -> 350 (-0.28%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
177c98f95a
aco/optimizer: apply dpp without label_usedef
...
Less interference with output modifier labels.
Foz-DB GFX1201:
Totals from 109 (0.14% of 79789) affected shaders:
Instrs: 161005 -> 160890 (-0.07%); split: -0.08%, +0.01%
CodeSize: 859472 -> 859720 (+0.03%); split: -0.03%, +0.06%
VGPRs: 6420 -> 6432 (+0.19%)
Latency: 1453659 -> 1452201 (-0.10%); split: -0.14%, +0.04%
InvThroughput: 171403 -> 171135 (-0.16%); split: -0.21%, +0.06%
VClause: 2746 -> 2743 (-0.11%)
SClause: 5256 -> 5257 (+0.02%)
Copies: 11085 -> 11008 (-0.69%); split: -0.89%, +0.20%
Branches: 3758 -> 3756 (-0.05%)
VALU: 90903 -> 90793 (-0.12%); split: -0.14%, +0.02%
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
94ea9fd999
aco/optimizer: label p_extract as usedef
...
Helpful for combine_add_or_then_and_lshl on gfx11+.
Foz-DB GFX1201:
Totals from 478 (0.60% of 79789) affected shaders:
Instrs: 3844774 -> 3843719 (-0.03%); split: -0.03%, +0.00%
CodeSize: 20268684 -> 20268120 (-0.00%); split: -0.01%, +0.00%
Latency: 27005820 -> 27002460 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 5438686 -> 5436935 (-0.03%); split: -0.03%, +0.00%
Copies: 312458 -> 312469 (+0.00%); split: -0.00%, +0.01%
VALU: 2141236 -> 2140406 (-0.04%)
SALU: 527973 -> 527922 (-0.01%); split: -0.01%, +0.00%
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
edfba93f4c
aco/optimizer: apply f2f32 without label_usedef
...
This means we apply it to instructions where an omod label removed label_usedef.
Foz-DB Navi21:
Totals from 52 (0.07% of 79789) affected shaders:
Instrs: 144945 -> 144304 (-0.44%); split: -0.45%, +0.01%
CodeSize: 835956 -> 833992 (-0.23%); split: -0.30%, +0.06%
Latency: 2850900 -> 2850018 (-0.03%); split: -0.05%, +0.02%
InvThroughput: 1299486 -> 1299116 (-0.03%); split: -0.05%, +0.02%
Copies: 29638 -> 29803 (+0.56%); split: -0.16%, +0.71%
VALU: 94971 -> 94329 (-0.68%); split: -0.69%, +0.01%
SALU: 29272 -> 29274 (+0.01%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
c0e88c376a
aco/optimizer: validate context data
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
906b7dbcec
aco: replace novalidateir with novalidate debug option
...
The next commits will add more validation that's enabled by default.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
1540db244b
aco/optimizer: store parent_instr for all temps
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
918359b41e
aco/optimizer: add semantic aliases for info.instr
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:25 +00:00
Georg Lehmann
c62d7e680c
aco/optimizer: remove label_mul
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:24 +00:00
Georg Lehmann
f773860a23
aco/optimizer: remove label_bitwise
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:24 +00:00
Georg Lehmann
cf3ec4a28f
aco/optimizer: remove label_split
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:24 +00:00
Georg Lehmann
907e86e8fb
aco/optimizer: remove label_vec
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:24 +00:00
Georg Lehmann
2c0a924521
aco/optimizer: remove label_minmax
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:24 +00:00
Georg Lehmann
dca8a7981d
aco/optimizer: remove label_f2f32
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:24 +00:00
Georg Lehmann
17a973c6fa
aco/optimizer: remove label_dpp8 and label_dpp16
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34858 >
2025-05-09 14:23:24 +00:00