From 4ad9e2e17a8019b383d3664ca39ae3227aa3776d Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 23 Jun 2017 20:30:26 +0200 Subject: st/glsl_to_tgsi: don't optimize mul+add to mad if expression is precise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Karol Herbst Reviewed-by: Nicolai Hähnle --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') 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)) -- cgit v1.2.3