mesa/src/amd
Natalie Vock 976efbe12a radv/rt: Fix shared ray query stack on top of application LDS
Since the stack pointer may wrap around the stack size in overflow
cases, traversal logic calculates the real stack pointer with
nir_umod_imm(b, stack, args->stack_entries * args->stack_stride).

For ray queries, "stack" was initialized to
"stack_base + local_invocation_idx * 4". This was completely broken, as
the umod would later delete the stack base completely and overwrite the
start of LDS, which belongs to the apps' shared memory.

Instead, add the stack base as a constant offset in the load/store_stack
callback. (This should also save 1 VALU per ray query)
Also, delete radv_ray_traversal_args::stack_base since it's unused now.

Cc: mesa-stable
(cherry picked from commit b046eaf36d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
2026-03-17 18:59:17 +01:00
..
addrlib amd: rename most GFX115x definitions for released chips 2025-12-03 13:29:07 +00:00
ci glsl: relax precision matching on unused uniforms ES 2026-03-11 23:21:09 +01:00
common ac: set the correct number of Z planes for ALLOW_EXPCLEAR 2026-03-11 23:21:09 +01:00
compiler aco: perform dce for blocks skipped for process_block() 2026-03-11 23:21:08 +01:00
drm-shim amd/drm-shim: add vega20 2026-01-08 09:30:54 +00:00
gmlib meson: Relax -Wmaybe-uninitialized errors 2025-09-16 06:16:20 +00:00
lanczoslib meson: Relax -Wmaybe-uninitialized errors 2025-09-16 06:16:20 +00:00
llvm amd: add and use ac_cu_info::has_vtx_format_alpha_adjust_bug 2025-12-22 07:34:48 +00:00
registers amd: Rename GFX1103_R1/R2 to PHOENIX/2 2024-11-20 02:14:40 +00:00
vpelib amd/vpelib: add FL capabilitie and lut container size 2025-09-22 10:37:22 +00:00
vulkan radv/rt: Fix shared ray query stack on top of application LDS 2026-03-17 18:59:17 +01:00
meson.build radv/tests: require drm-shim and use it instead of RADV_FORCE_FAMILY 2025-11-19 07:11:05 +00:00