From 73382c8126356c0344b7323d7555d8e4ba7af7db Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Mon, 18 May 2026 22:13:06 -0700 Subject: [PATCH] brw/rt: Update committed hit leaf type properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Iván Briano Part-of: --- src/intel/compiler/brw/brw_nir_rt_builder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw/brw_nir_rt_builder.h b/src/intel/compiler/brw/brw_nir_rt_builder.h index 6422dc1c2c5..e4521e99f1b 100644 --- a/src/intel/compiler/brw/brw_nir_rt_builder.h +++ b/src/intel/compiler/brw/brw_nir_rt_builder.h @@ -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: