Commit graph

20282 commits

Author SHA1 Message Date
Rhys Perry
2260105ba1 radv: move radv_shader_create out of radv_graphics_shaders_compile
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:46 +00:00
Rhys Perry
618cad6bfe radv: move radv_shader_create out of radv_graphics_shaders_nir_to_asm
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:46 +00:00
Rhys Perry
6e2debe27c radv: copy spirv in radv_graphics_shaders_nir_to_asm instead
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:46 +00:00
Rhys Perry
06b9660baf radv: move radv_shader_create out of radv_compute_pipeline_compile
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:46 +00:00
Rhys Perry
41ffb087d2 radv: add radv_shader_debug_info parameter to radv_shader_create
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:46 +00:00
Rhys Perry
98f96bd076 radv: add radv_parse_binary_debug_info
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:46 +00:00
Rhys Perry
8cf1fc930c radv: simplify radv_shader_dump_debug_info
And rename to better reflect what it does.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:46 +00:00
Rhys Perry
4073cdf753 radv: add radv_shader_debug_info
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:45 +00:00
Rhys Perry
574f577657 radv: fix memory leak in radv_rt_nir_to_asm
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 26.0
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40627>
2026-03-30 09:42:45 +00:00
Samuel Pitoiset
3324abad06 radv: introduce RADV_EXPERIMENTAL envvar for experimental features
Abusing RADV_PERFTEST for experimental features doesn't make real
sense, and I think we should stop doing that.

The existing RADV_PERFTEST options like RADV_PERFTEST=transfer_queue
still exists but they are marked as deprecated, they will be removed
in future Mesa releases.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40646>
2026-03-30 07:27:01 +00:00
Faith Ekstrand
4d56fa661f vulkan: Rename some VK_EXT_descriptor_buffer properties
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40649>
2026-03-30 06:51:26 +00:00
Benjamin Cheng
34e090ae11 radv/video: Add low-latency flags
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
radv equivalent of 62f07b8c.

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40524>
2026-03-29 15:56:50 +00:00
Benjamin Cheng
917dff0b22 ac: Update FW required for variable slice mode
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There are some compatiblity issues with variable slice mode and
preencode that are fixed with newer FW.

Fixes: d9ba641e28 ("ac: Add variable slice mode interface")
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40604>
2026-03-29 15:30:55 +00:00
Natalie Vock
1f9bc71051 radv/rt: Remove RADV_OFFSET_UNUSED
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
RADV_OFFSET_UNUSED became unused, itself.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39985>
2026-03-28 16:48:46 +01:00
Natalie Vock
579feda38b radv/rt: Fix cases in which the bound BVH build pipeline gets clobbered
The most egregious case was AS updates, in which case radv_copy_memory
would decide to use compute, which overwrites the bound pipeline with
a copy shader. Subsequent dispatches assumed the update pipeline to be
bound, but dispatched another copy shader instead.

There is also a chance of this happening for geometry info copying for
RRA, so add another pass for that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39985>
2026-03-28 16:48:46 +01:00
Natalie Vock
6f80027447 vulkan: Rename {encode,update}_bind_pipeline to {encode,update}_prepare
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39985>
2026-03-28 16:12:09 +01:00
Samuel Pitoiset
dede14cce3 radv: advertise VK_KHR_device_address_commands
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40386>
2026-03-27 16:17:02 +00:00
Samuel Pitoiset
a97c889a7b radv: implement VK_KHR_device_address_commands
Because there is no way to know where the address has been allocated
(GTT or VRAM), the existing entrypoints aren't dropped and the sparse
bit is derived from VK_ADDRESS_COMMAND_FULLY_BOUND_BIT_KHR.

It would be nice to figure out if the CP DMA vs compute heuristic for
GTT BOs on dGPUs could be removed to simplify this implementation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40386>
2026-03-27 16:17:02 +00:00
Samuel Pitoiset
479a992b02 radv: replace radv_copy_flags by VkAddressCopyFlagsKHR
Same meaning.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40386>
2026-03-27 16:17:02 +00:00
Samuel Pitoiset
72ac5e6d29 radv/ci: fix a typo in radv-navi10-vkcts-full
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Oops.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40679>
2026-03-27 15:53:39 +00:00
Samuel Pitoiset
566e4c25d9 radv/ci: fix radv-slow-skips.txt path
This was causing issues with personal branches.

Suggested-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40676>
2026-03-27 14:53:37 +00:00
Rhys Perry
3b52d61bb0 radv: don't copy radv_vertex_input_state in CmdSetVertexInputEXT
This doubles vkoverhead's draw_16vattrib_change_dynamic performance.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40603>
2026-03-27 13:38:29 +00:00
Georg Lehmann
ae2968c4ec aco: allow spilling to LDS in RT shaders without stack pointer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No Foz-DB changes because most RT shaders use function calls now.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36367>
2026-03-27 13:08:44 +00:00
Georg Lehmann
133ef9f94b aco: spill VGPRs to LDS if it doesn't further limit occupancy
Only use LDS for VGPR spilling if we can use addtid access, to avoid having a VGPR addr.
Limit to single wave workgroups, to avoid needing the wave_id for the offset.
If we have a scratch stack pointer, don't use LDS at all.

Limit LDS spilling to not reduce occupancy further.
Note that in theory, this can still limit occupancy of other shaders running
on the CU at the same time, but that's unlikely and impossible to know at this point.

Removes all scratch usage in emulated FSR4 and parallel_rdp.
Besides that, only a single GoW shader is affected.

Foz-DB Navi31:
Totals from 9 (0.01% of 114641) affected shaders:
Instrs: 68863 -> 68830 (-0.05%); split: -0.07%, +0.02%
CodeSize: 416108 -> 416000 (-0.03%); split: -0.05%, +0.02%
LDS: 2048 -> 45056 (+2100.00%)
Scratch: 261888 -> 220672 (-15.74%)
Latency: 727951 -> 657155 (-9.73%); split: -9.73%, +0.00%
InvThroughput: 418644 -> 383269 (-8.45%)
VClause: 1506 -> 1200 (-20.32%)
Copies: 10651 -> 10624 (-0.25%)
VALU: 48700 -> 48684 (-0.03%)
SALU: 6200 -> 6199 (-0.02%); split: -0.05%, +0.03%
VMEM: 4139 -> 3589 (-13.29%)
VOPD: 580 -> 574 (-1.03%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36367>
2026-03-27 13:08:44 +00:00
Samuel Pitoiset
eecb37962c radv/amdgpu: always return VK_ERROR_INVALID_EXTERNAL_HANDLE for host ptr imports
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Less confusing than VK_ERROR_UNKNOWN.

Related to https://gitlab.freedesktop.org/mesa/mesa/-/issues/15144.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40574>
2026-03-27 07:07:31 +00:00
Georg Lehmann
bcdef7c79b radv: preserve fp_math_ctrl when lowering cmat alu ops
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40630>
2026-03-26 13:15:50 +00:00
Georg Lehmann
5d2be211ea nir: add fp_math_ctrl to ddx/ddy
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40630>
2026-03-26 13:15:49 +00:00
Samuel Pitoiset
8483acdc29 radv/ci: add new jobs that run full VKCTS on NAVI21/NAVI31/GFX1201
They are only nightly jobs that run full VKCTS. The main advantage is
that we have mesh shaders coverage on NAVI31/GFX1201. It's still not
possible to enable that on pre-merge because of random GPU hangs.

Expect random GPU hangs on NAVI31/GFX1201 nightly jobs but I think
it's better than no coverage at all.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40626>
2026-03-26 08:39:33 +00:00
Samuel Pitoiset
749eb41b59 radv/ci: add a new dEQP test suite for nightly jobs
These jobs only skip the tests that are known to hang. The timeout is
also increased to 120s.

Also rename them to -full for less confusion.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40626>
2026-03-26 08:39:33 +00:00
Samuel Pitoiset
1f8ff31b81 radv/ci: move slow tests to radv-slow-skips.txt
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40626>
2026-03-26 08:39:33 +00:00
Marek Olšák
dfbadedc02 ac/nir/meta_cs_blit: use uint16 for coordinates to fix 64K blits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40565>
2026-03-25 09:39:20 +00:00
Samuel Pitoiset
c5619aec32 Revert "radv: remove adding a BO to the per-cmdbuf list when unnecessary"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This breaks Gamescope because WSI BOs aren't added to the global BO
list because this might affect implicit sync. Let's revert this commit
for now until I found a better solution.

This reverts commit 9f224289b0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40602>
2026-03-25 07:27:08 +00:00
Faith Ekstrand
3ea2e51c8b treewide: Enable lowering of primitive ID in a bunch of Vulkan drivers
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40512>
2026-03-25 03:11:56 +00:00
Georg Lehmann
17a9ee7152 aco/optimizer: apply dpp to v_dot before RA for gfx10.3
This is a bit unusual, as we otherwise only use the VOP2 codesize
optimization opcodes in the register allocator.

But unless we change the scheduler to not split v_mov_b32_dpp and
v_dot, we have no other choice.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40510>
2026-03-24 09:05:40 +00:00
Samuel Pitoiset
62f1268d78 radv/ci: remove skipping mesh shader tests for NAVI31
RADV_DEBUG=nomeshshader is still the default for NAVI31, so these tests
are already skipped.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40580>
2026-03-24 08:54:52 +01:00
Samuel Pitoiset
d9a0a6b1a3 radv/ci: stop skipping some memory related tests on POLARIS10
These no longer timeout. And it's a post-merge job, it shouldn't
matter if the job is slightly slower anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40580>
2026-03-24 08:54:52 +01:00
Samuel Pitoiset
b6e3658d8b radv/ci: stop skipping ASTC tests with ANGLE+STONEY
RADV supports ASTC emulation. Though it seems broken to some extent but
it's better to run the tests and mark them as expected failures anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40580>
2026-03-24 08:54:51 +01:00
Marek Olšák
dbf027534a ac/llvm: inline ac_build_gather_values_extended
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Marek Olšák
235e32d560 ac/llvm: remove almost duplicated ac_build_varying_gather_values
Reviewed-by: Pierre-Eric
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
2026-03-24 01:05:29 +00:00
Eric Engestrom
5f3953fdd4 radeonsi/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Eric Engestrom
145a1c9e2a radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40583>
2026-03-23 23:38:32 +00:00
Daniel Schürmann
218be90084 radv: call nir_opt_if late again
Totals from 1715 (1.22% of 140074) affected shaders:

Instrs: 1086964 -> 1079896 (-0.65%); split: -0.65%, +0.00%
CodeSize: 5600856 -> 5554620 (-0.83%); split: -0.84%, +0.02%
VGPRs: 95868 -> 95976 (+0.11%)
Latency: 4005981 -> 3992353 (-0.34%); split: -0.38%, +0.04%
InvThroughput: 682121 -> 682071 (-0.01%); split: -0.11%, +0.10%
VClause: 19117 -> 19093 (-0.13%); split: -0.15%, +0.02%
SClause: 17075 -> 17040 (-0.20%); split: -0.21%, +0.01%
Copies: 101031 -> 98193 (-2.81%); split: -2.87%, +0.07%
Branches: 24106 -> 24011 (-0.39%); split: -0.43%, +0.03%
PreSGPRs: 67254 -> 66797 (-0.68%); split: -0.70%, +0.02%
PreVGPRs: 71827 -> 71830 (+0.00%)
VALU: 571206 -> 570516 (-0.12%); split: -0.12%, +0.00%
SALU: 180525 -> 177146 (-1.87%); split: -1.90%, +0.03%
VMEM: 34030 -> 34010 (-0.06%)
SMEM: 27669 -> 27622 (-0.17%)
VOPD: 4485 -> 4481 (-0.09%); split: +0.04%, -0.13%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40453>
2026-03-23 21:24:40 +00:00
Samuel Pitoiset
23e34532bd radv: cleanup redundant radv_image_has_hiz_metadata() checks
All callers check that already.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40176>
2026-03-23 15:33:26 +00:00
Samuel Pitoiset
fbcc4565c1 radv: fix a perf issue when clearing depth/stencil images on GFX12
Clearing on graphics updates HiZ correctly and expanding it always
after the clear might hurt because it means HiZ will be disabled.

This probably helps performance with the full GFX12 HiZ WA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40176>
2026-03-23 15:33:26 +00:00
Samuel Pitoiset
cea75b3d95 radv: only consider HiZ as valid after clears with the depth aspect
If it's a stencil-only clear it shouldn't be marked as valid because
HiZ wasn't updated by the clear.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40176>
2026-03-23 15:33:25 +00:00
Samuel Pitoiset
8b993f46f5 radv: ignore the GFX12 HiZ WA for internal blits
To update HiZ properly during depth/stencil clears. There is a risk
but it's very minimal and it's also much better for performance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40176>
2026-03-23 15:33:25 +00:00
kingstom.chen
5a7f4c62d8 radv/rt: only run move_rt_instructions() for CPS shaders
move_rt_instructions() only makes sense for CPS recursive shaders, where
later rt_trace_ray calls can overwrite the current shader's RT system
values.

Running it on the function-call path can hoist load_hit_attrib_amd
above merged intersection writes, which corrupts any-hit
hitAttributeEXT. Move the pass into the existing CPS-only
non-intersection branch before nir_lower_shader_calls().

Fixes: c5d796c902 ("radv/rt: Use function call structure in NIR lowering")
Closes: #15074

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40531>
2026-03-23 11:24:07 +00:00
Emre Cecanpunar
c60e5df798 aco: drop optimizer peephole TODO comment
The remaining items are either handled elsewhere or unlikely to be
implemented in the optimizer.

Signed-off-by: Emre Cecanpunar <emreleno@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40497>
2026-03-23 11:03:59 +00:00
Samuel Pitoiset
9f224289b0 radv: remove adding a BO to the per-cmdbuf list when unnecessary
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All BOs allocated from vkAllocateMemory are either local BOs or added
to the global BO list. Only BOs allocated internally should be added
to the per-cmdbuf list.

Verified this by doing a full CTS run with amdgpu.debug=0x1.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40466>
2026-03-23 09:50:41 +00:00
Samuel Pitoiset
fb195bd6bd radv/amdgpu: remove the virtual BOs tracking logic
All BOs allocated by applications are local BOs, so this can be
removed completely.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40466>
2026-03-23 09:50:41 +00:00