Module: Mesa
Branch: main
Commit: a855bdbf4796909e53b4ec9cc9a8ba3a847c9b2e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a855bdbf4796909e53b4ec9cc9a8ba3a847c9b2e

Author: Lionel Landwerlin <[email protected]>
Date:   Thu Dec  1 23:06:30 2022 +0200

intel/nir/rt: switch to workgroup_id_zero_base

RT don't use a base workgroup id so no reason of using workgroup_id.
Additionally the lowering introduced in b4dd3df227 requires something
provides base_workgroup_id which we don't have for RT as it's not
needed.

Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: b4dd3df227 ("intel/nir: Set has_base_workgroup_id for 
lower_compute_system_values")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7812
Reviewed-by: Mark Janes <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20115>

---

 src/intel/compiler/brw_nir_rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_nir_rt.c b/src/intel/compiler/brw_nir_rt.c
index 87c89a5c71b..574312c1a35 100644
--- a/src/intel/compiler/brw_nir_rt.c
+++ b/src/intel/compiler/brw_nir_rt.c
@@ -444,7 +444,7 @@ brw_nir_create_raygen_trampoline(const struct brw_compiler 
*compiler,
    nir_ssa_def *local_shift =
       nir_u2u32(&b, load_trampoline_param(&b, local_group_size_log2, 3, 8));
 
-   nir_ssa_def *global_id = nir_load_workgroup_id(&b, 32);
+   nir_ssa_def *global_id = nir_load_workgroup_id_zero_base(&b);
    nir_ssa_def *simd_channel = nir_load_subgroup_invocation(&b);
    nir_ssa_def *local_x =
       nir_ubfe(&b, simd_channel, nir_imm_int(&b, 0),

Reply via email to