mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13: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> (cherry picked from commitcc6eec79c2) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40979>
This commit is contained in:
parent
fc45812f74
commit
28a32fe54b
2 changed files with 2 additions and 2 deletions
|
|
@ -4364,7 +4364,7 @@
|
|||
"description": "nir/opt_uniform_subgroup: fix ballot_bit_count components",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ae66bd1c007af48f609147979cef550d04be05ed",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue