aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_constant_expression.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-09-02 18:57:19 +0200
committermarha <marha@users.sourceforge.net>2014-09-02 18:57:19 +0200
commit166caebfaa2b217332a345ffb02c5b9e52f65a3d (patch)
tree2de6bdc3d44a72fda18c5d070d3902d57a0e5d4a /mesalib/src/glsl/ir_constant_expression.cpp
parentdea8f13d8104872dec9243abe06f3d9e4c807ccd (diff)
parent4aef26e36bc9aba4cd67c158e17f5fb93c9e018c (diff)
downloadvcxsrv-166caebfaa2b217332a345ffb02c5b9e52f65a3d.tar.gz
vcxsrv-166caebfaa2b217332a345ffb02c5b9e52f65a3d.tar.bz2
vcxsrv-166caebfaa2b217332a345ffb02c5b9e52f65a3d.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/ir_constant_expression.cpp')
-rwxr-xr-xmesalib/src/glsl/ir_constant_expression.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp
index eff2bc173..4593a13d1 100755
--- a/mesalib/src/glsl/ir_constant_expression.cpp
+++ b/mesalib/src/glsl/ir_constant_expression.cpp
@@ -1462,6 +1462,12 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
}
break;
+ case ir_unop_saturate:
+ for (unsigned c = 0; c < components; c++) {
+ data.f[c] = CLAMP(op[0]->value.f[c], 0.0f, 1.0f);
+ }
+ break;
+
case ir_triop_bitfield_extract: {
int offset = op[1]->value.i[0];
int bits = op[2]->value.i[0];