brw/rt: Use BLAS(Object) level to get the ray address

Intersection shader works on custom procedural geometries which are
present only in BLAS (Object) level not in the TLAS (World) level.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41739>
This commit is contained in:
Sagar Ghuge 2026-05-21 14:42:47 -07:00 committed by Marge Bot
parent 7395ae7494
commit 04fe65e2bb

View file

@ -220,7 +220,7 @@ brw_nir_lower_intersection_shader(nir_shader *intersection,
nir_store_var(b, commit, nir_imm_true(b), 0x1);
nir_def *ray_addr =
brw_nir_rt_mem_ray_addr(b, brw_nir_rt_stack_addr(b), BRW_RT_BVH_LEVEL_WORLD);
brw_nir_rt_mem_ray_addr(b, brw_nir_rt_stack_addr(b), BRW_RT_BVH_LEVEL_OBJECT);
nir_store_global(b, hit_t, nir_iadd_imm(b, ray_addr, 16 + 12));
if (devinfo->ver >= 30) {