mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 19:00:23 +01:00
nir/lower_bit_size: Fix subgroup lowering for floats
Using u2u is always correct for integers, including signed integers, because we're doing a down-cast. It's wrong for floats, though. Fixes:f95665cfeb("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 commit5979e74177)
This commit is contained in:
parent
0144e4d0b3
commit
8a7498e13f
2 changed files with 2 additions and 2 deletions
|
|
@ -984,7 +984,7 @@
|
|||
"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
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ lower_intrinsic_instr(nir_builder *b, nir_intrinsic_instr *intrin,
|
|||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue