From e648e551c157e6482af9b21e16b78d17899b9acc Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 9 Dec 2025 15:37:49 +0100 Subject: [PATCH] nir/opt_uniform_subgroup: wire up mbcnt_amd path Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/nir/nir_opt_uniform_subgroup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_opt_uniform_subgroup.c b/src/compiler/nir/nir_opt_uniform_subgroup.c index 3384045bf80..f763385c3e3 100644 --- a/src/compiler/nir/nir_opt_uniform_subgroup.c +++ b/src/compiler/nir/nir_opt_uniform_subgroup.c @@ -21,7 +21,6 @@ ballot_bit_count(nir_builder *b, nir_def *ballot) static nir_def * count_active_invocations(nir_builder *b, nir_def *value, bool inclusive, - bool has_mbcnt_amd, const nir_lower_subgroups_options *options) { /* For the non-inclusive case, the two paths are functionally the same. @@ -39,7 +38,7 @@ count_active_invocations(nir_builder *b, nir_def *value, bool inclusive, * When those conditions are met, the inclusive count is the exclusive * count plus one. */ - if (has_mbcnt_amd) { + if (options->lower_ballot_bit_count_to_mbcnt_amd) { return nir_mbcnt_amd(b, value, nir_imm_int(b, (int)inclusive)); } else { nir_def *mask = @@ -116,7 +115,7 @@ opt_uniform_subgroup_instr(nir_builder *b, nir_intrinsic_instr *intrin, void *_s } else { count = count_active_invocations(b, ballot, intrin->intrinsic == nir_intrinsic_inclusive_scan, - false, options); + options); } const unsigned bit_size = intrin->src[0].ssa->bit_size;