Using u2u is always correct for integers, including signed integers,
because we're doing a down-cast. It's wrong for floats, though.
Fixes:
f95665cfebbd ("nir/lower_bit_size: Add support for lowering subgroup ops")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25894>
(cherry picked from commit
5979e74177eb3013ca7e78867295e9a015e6c8ed)
"description": "nir/lower_bit_size: Fix subgroup lowering for floats",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "f95665cfebbd943ca3795c026e3dabf4af3f262c",
"notes": null
if (intrin->intrinsic != nir_intrinsic_vote_feq &&
intrin->intrinsic != nir_intrinsic_vote_ieq)
- res = nir_u2uN(b, res, old_bit_size);
+ res = nir_convert_to_bit_size(b, res, type, old_bit_size);
nir_def_rewrite_uses(&intrin->def, res);
break;