From 71b513a1e98f0e69a2bcc22bf063d7d389c7281f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 12 Aug 2025 14:07:39 -0700 Subject: [PATCH] brw: Lower certain subgroup size modes in brw_preprocess_nir This allows us to lower known subgroup size cases earlier, giving us some earlier optimization opportunities. We would need to know the actual SIMD width to handle certain cases, but we can just pass 0 here, which will lead to get_subgroup_size returning 0 - the same as leaving this unset. We can come back to that later during the per-SIMD-width postprocessing. Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index e1a39a9ca9e..3ff83240a4c 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1480,6 +1480,7 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir, OPT(nir_lower_compute_system_values, &lower_csv_options); const nir_lower_subgroups_options subgroups_options = { + .subgroup_size = brw_nir_api_subgroup_size(nir, 0), .ballot_bit_size = 32, .ballot_components = 1, .lower_to_scalar = true,