intel/nir/rt: switch to workgroup_id_zero_base
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 1 Dec 2022 21:06:30 +0000 (23:06 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Dec 2022 05:25:22 +0000 (05:25 +0000)
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 <lionel.g.landwerlin@intel.com>
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 <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20115>

src/intel/compiler/brw_nir_rt.c

index 87c89a5c71baf8950b0874f8f9676a3c5dce8fbd..574312c1a358a399239b69d788ec5d158a894aa1 100644 (file)
@@ -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),