nir/opt_uniform_subgroup: fix ballot_bit_count components
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

ballot_bit_count_reduce expects the ballot to have 4 components causing
validation failures on targets where 1 < ballot_components < 4. Fix this
by padding the ballot to 4 components.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: ae66bd1c00 ("nir/opt_uniform_subgroup: use ballot_bit_count")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40792>
This commit is contained in:
Job Noorman 2026-04-04 10:06:18 +02:00 committed by Marge Bot
parent 02679a51fd
commit cc6eec79c2

View file

@ -107,7 +107,7 @@ ballot_bit_count(nir_builder *b, nir_def *ballot)
{
return ballot->num_components == 1
? nir_bit_count(b, ballot)
: nir_ballot_bit_count_reduce(b, ballot);
: nir_ballot_bit_count_reduce(b, nir_pad_vec4(b, ballot));
}
static nir_def *