summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_algebraic.cpp
diff options
context:
space:
mode:
authorAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2014-12-08 13:31:29 +0200
committerAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2014-12-08 20:14:17 +0200
commit4ea8c8d56ca8d6b4af36e7750186821b4973355a (patch)
tree304f9da4a03bddaa872f28f3b6d759d48041008a /src/glsl/opt_algebraic.cpp
parent39f7b72428d1a55357a24cd26c43880595602090 (diff)
downloadexternal_mesa3d-4ea8c8d56ca8d6b4af36e7750186821b4973355a.zip
external_mesa3d-4ea8c8d56ca8d6b4af36e7750186821b4973355a.tar.gz
external_mesa3d-4ea8c8d56ca8d6b4af36e7750186821b4973355a.tar.bz2
glsl: Don't optimize min/max into saturate when EmitNoSat is set
v3: Fix multi-line comment format (Ian) Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Diffstat (limited to 'src/glsl/opt_algebraic.cpp')
-rw-r--r--src/glsl/opt_algebraic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index c4f883b..c6f4a9c 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/glsl/opt_algebraic.cpp
@@ -689,7 +689,7 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
case ir_binop_min:
case ir_binop_max:
- if (ir->type->base_type != GLSL_TYPE_FLOAT)
+ if (ir->type->base_type != GLSL_TYPE_FLOAT || options->EmitNoSat)
break;
/* Replace min(max) operations and its commutative combinations with