Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
case nir_intrinsic_load_num_work_groups:
info->cs.uses_grid_size = true;
break;
+ case nir_intrinsic_load_work_group_id: {
+ unsigned mask = nir_ssa_def_components_read(&instr->dest.ssa);
+ while (mask) {
+ unsigned i = u_bit_scan(&mask);
+ info->cs.uses_block_id[i] = true;
+ }
+ break;
+ }
case nir_intrinsic_load_sample_id:
info->ps.force_persample = true;
break;
} ps;
struct {
bool uses_grid_size;
+ bool uses_block_id[3];
} cs;
};