aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_constant_expression.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-03-04 09:37:48 +0100
committermarha <marha@users.sourceforge.net>2013-03-04 09:37:48 +0100
commited474047e06f28fe740130f3bb13d3a40f4833a9 (patch)
tree35a48f61c00ebb1f0579159c25dbbd1bfe812849 /mesalib/src/glsl/ir_constant_expression.cpp
parent3c0e16af61a9e0b6f9edab1d403adfaa85456599 (diff)
parentd4d629b77742e60caac3d120ff40e9f386380af2 (diff)
downloadvcxsrv-ed474047e06f28fe740130f3bb13d3a40f4833a9.tar.gz
vcxsrv-ed474047e06f28fe740130f3bb13d3a40f4833a9.tar.bz2
vcxsrv-ed474047e06f28fe740130f3bb13d3a40f4833a9.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig libX11 mesalib pixman xserver xkeyboard-config git update 4 Mar 2013 Conflicts: libX11/src/xkb/XKBGAlloc.c libX11/src/xkb/XKBMisc.c
Diffstat (limited to 'mesalib/src/glsl/ir_constant_expression.cpp')
-rw-r--r--mesalib/src/glsl/ir_constant_expression.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp
index 86b863f31..c2d0dc46c 100644
--- a/mesalib/src/glsl/ir_constant_expression.cpp
+++ b/mesalib/src/glsl/ir_constant_expression.cpp
@@ -1248,6 +1248,19 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
}
break;
+ case ir_triop_lrp: {
+ assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(op[1]->type->base_type == GLSL_TYPE_FLOAT);
+ assert(op[2]->type->base_type == GLSL_TYPE_FLOAT);
+
+ unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1;
+ for (unsigned c = 0, c2 = 0; c < components; c2 += c2_inc, c++) {
+ data.f[c] = op[0]->value.f[c] * (1.0f - op[2]->value.f[c2]) +
+ (op[1]->value.f[c] * op[2]->value.f[c2]);
+ }
+ break;
+ }
+
case ir_quadop_vector:
for (unsigned c = 0; c < this->type->vector_elements; c++) {
switch (this->type->base_type) {