mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
intel/nir: Make ffma peephole optimization preserve fp_fast_math flags
float_controls2 may have marked these as needing to preserve NaN or other values. If so, our newly contracted ffma needs to as well. Fixes dEQP-VK.spirv_assembly.instruction.compute.float_controls2.*.input_args.mat_det_testedWithout_NotNan* when nir_opt_algebraic is run after this pass. Cc: mesa-stable Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36750>
This commit is contained in:
parent
25cb6dfbf7
commit
1b0808adf3
1 changed files with 1 additions and 0 deletions
|
|
@ -224,6 +224,7 @@ intel_nir_opt_peephole_ffma_instr(nir_builder *b,
|
||||||
mul_src[0] = nir_fneg(b, mul_src[0]);
|
mul_src[0] = nir_fneg(b, mul_src[0]);
|
||||||
|
|
||||||
nir_alu_instr *ffma = nir_alu_instr_create(b->shader, nir_op_ffma);
|
nir_alu_instr *ffma = nir_alu_instr_create(b->shader, nir_op_ffma);
|
||||||
|
ffma->fp_fast_math = mul->fp_fast_math | add->fp_fast_math;
|
||||||
|
|
||||||
for (unsigned i = 0; i < 2; i++) {
|
for (unsigned i = 0; i < 2; i++) {
|
||||||
ffma->src[i].src = nir_src_for_ssa(mul_src[i]);
|
ffma->src[i].src = nir_src_for_ssa(mul_src[i]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue