[Mesa-dev] [PATCH v3 07/10] st/glsl_to_tgsi: don't optimize mul+add to mad if expression is precise
Karol Herbst
karolherbst at gmail.com
Fri Jun 16 19:08:20 UTC 2017
Signed-off-by: Karol Herbst <karolherbst at gmail.com>
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 6cc5a39510..6ac267be94 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))
--
2.13.1
More information about the mesa-dev
mailing list