mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
nir/opt_uniform_subgroup: fix ballot_bit_count components
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:
parent
02679a51fd
commit
cc6eec79c2
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ ballot_bit_count(nir_builder *b, nir_def *ballot)
|
||||||
{
|
{
|
||||||
return ballot->num_components == 1
|
return ballot->num_components == 1
|
||||||
? nir_bit_count(b, ballot)
|
? 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 *
|
static nir_def *
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue