From: Karol Herbst Date: Fri, 23 Jun 2017 18:30:26 +0000 (+0200) Subject: st/glsl_to_tgsi: don't optimize mul+add to mad if expression is precise X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ad9e2e17a8019b383d3664ca39ae3227aa3776d;p=mesa.git st/glsl_to_tgsi: don't optimize mul+add to mad if expression is precise Signed-off-by: Karol Herbst Reviewed-by: Nicolai Hähnle --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index c8f40c147d8..baa835924bc 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1557,7 +1557,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) /* Quick peephole: Emit MAD(a, b, c) instead of ADD(MUL(a, b), c) */ - if (ir->operation == ir_binop_add) { + if (!this->precise && ir->operation == ir_binop_add) { if (try_emit_mad(ir, 1)) return; if (try_emit_mad(ir, 0))