nir/lower_subgroups: relax ballot_type_to_uint

we can generate 32-bit scalar inverse_ballots from the boolean reduce lowering
which will blow up when trying to lower the resulting inverse_ballot with the
common lowering. but the assert can be quieted just fine.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28993>
This commit is contained in:
Alyssa Rosenzweig
2024-05-06 22:08:48 -04:00
committed by Marge Bot
parent b9a0c8dc6d
commit fb187c9c89
+5
View File
@@ -66,6 +66,11 @@ static nir_def *
ballot_type_to_uint(nir_builder *b, nir_def *value,
const nir_lower_subgroups_options *options)
{
/* Allow internal generated ballots to pass through */
if (value->num_components == options->ballot_components &&
value->bit_size == options->ballot_bit_size)
return value;
/* Only the new-style SPIR-V subgroup instructions take a ballot result as
* an argument, so we only use this on uvec4 types.
*/