brw/rt: Update committed hit leaf type properly
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

We want extract the leaf type from potential hit and assign it
to commited hit.

Instead of that, we were simply assigning leaf type 0x7 to commited hit.

This patch mask out leaf type with nir_iand_imm and also update the
incorrect field comment.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41667>
This commit is contained in:
Sagar Ghuge 2026-05-18 22:13:06 -07:00 committed by Marge Bot
parent 2c64e12462
commit 73382c8126

View file

@ -696,9 +696,9 @@ brw_nir_rt_generate_hit_addr(nir_builder *b, nir_def *stack_addr, nir_def *t_val
nir_imm_float(b, 0.0f),
nir_imm_float(b, 0.0f),
nir_ior_imm(b,
nir_ior_imm(b, nir_channel(b, potential_hit_dwords_0_3, 3), 0x000e0000),
nir_iand_imm(b, nir_channel(b, potential_hit_dwords_0_3, 3), 0x000e0000) /* leaf type */,
(0x1 << 16) /* valid */ |
(BRW_RT_BVH_LEVEL_OBJECT << 24) /* leaf_type */));
(BRW_RT_BVH_LEVEL_OBJECT << 24) /* BVH level */));
brw_nir_rt_store(b, committed_addr, 16, committed_hit_dwords_0_3, 0xf /* write_mask */);
/* Set: