nir/lower_bit_size: Preserve float controls when lowering alu ops

fp_math_ctrl should be preserved when recreating alu operations.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15455
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41511>
This commit is contained in:
Mary Guillemard 2026-05-12 17:11:48 +02:00 committed by Marge Bot
parent 9a247643eb
commit dd97257209

View file

@ -88,6 +88,7 @@ lower_alu_instr(nir_builder *bld, nir_alu_instr *alu, unsigned bit_size)
unsigned dst_bit_size = alu->def.bit_size;
bld->cursor = nir_before_instr(&alu->instr);
bld->fp_math_ctrl = alu->fp_math_ctrl;
/* Convert each source to the requested bit-size */
nir_def *srcs[NIR_MAX_VEC_COMPONENTS] = { NULL };