nir/lower_subgroups: don't use get_max_subgroup_size for lowering boolean rotates

The lowering won't work with an unknown subgroup size, and we correctly
assert that at the top of the function.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37178>
This commit is contained in:
Georg Lehmann
2025-09-03 09:53:56 +02:00
committed by Marge Bot
parent 516c766c71
commit d14897b2f7
+2 -3
View File
@@ -502,9 +502,8 @@ lower_boolean_shuffle(nir_builder *b, nir_intrinsic_instr *intrin,
case nir_intrinsic_rotate: {
nir_def *delta = nir_as_uniform(b, intrin->src[1].ssa);
uint32_t cluster_size = nir_intrinsic_cluster_size(intrin);
unsigned subgroup_size = get_max_subgroup_size(options);
cluster_size = cluster_size ? cluster_size : subgroup_size;
cluster_size = MIN2(cluster_size, subgroup_size);
cluster_size = cluster_size ? cluster_size : options->subgroup_size;
cluster_size = MIN2(cluster_size, options->subgroup_size);
if (cluster_size == 1) {
return intrin->src[0].ssa;
} else if (cluster_size == 2) {