nir_ssa_def *sysval;
switch (intrinsic->intrinsic) {
+ case nir_intrinsic_load_local_group_size:
+ case nir_intrinsic_load_work_group_id:
+ /* Convert this to 32-bit if it's not */
+ if (intrinsic->dest.ssa.bit_size == 64) {
+ intrinsic->dest.ssa.bit_size = 32;
+ sysval = nir_u2u64(b, &intrinsic->dest.ssa);
+ nir_ssa_def_rewrite_uses_after(&intrinsic->dest.ssa,
+ nir_src_for_ssa(sysval),
+ sysval->parent_instr);
+ }
+ continue;
+
case nir_intrinsic_load_local_invocation_index:
case nir_intrinsic_load_local_invocation_id: {
/* First time we are using those, so let's calculate them. */
continue;
}
+ if (intrinsic->dest.ssa.bit_size == 64)
+ sysval = nir_u2u64(b, sysval);
+
nir_ssa_def_rewrite_uses(&intrinsic->dest.ssa, nir_src_for_ssa(sysval));
nir_instr_remove(&intrinsic->instr);