glsl: translate fma as fma_weak

Our glsl compiler only supports OpenGL GLSL and there ffma is not
guaranteed to be fused.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
This commit is contained in:
Karol Herbst 2026-04-20 04:12:16 +02:00 committed by Marge Bot
parent 5160d6f806
commit ac679a8504

View file

@ -2569,7 +2569,7 @@ nir_visitor::visit(ir_expression *ir)
case ir_binop_ldexp: result = nir_ldexp(&b, srcs[0], srcs[1]); break;
case ir_triop_fma:
result = nir_ffma_old(&b, srcs[0], srcs[1], srcs[2]);
result = nir_ffma_weak(&b, srcs[0], srcs[1], srcs[2]);
break;
case ir_triop_lrp:
result = nir_flrp(&b, srcs[0], srcs[1], srcs[2]);