aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-29 16:21:42 +0200
committermarha <marha@users.sourceforge.net>2011-09-29 16:21:42 +0200
commit4a9e1f51655e03da1507dabce7c4c3960e7ca607 (patch)
tree0298f6e38550e2f888eab0146ce7a51a49faaa10 /mesalib/src/glsl
parent0e68f72b7b0ab957a0d3c9415f68e3c4f484b0b3 (diff)
parentbee9191042416cbfb848615189ca1e2a0069f022 (diff)
downloadvcxsrv-4a9e1f51655e03da1507dabce7c4c3960e7ca607.tar.gz
vcxsrv-4a9e1f51655e03da1507dabce7c4c3960e7ca607.tar.bz2
vcxsrv-4a9e1f51655e03da1507dabce7c4c3960e7ca607.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/ir_constant_expression.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp
index f0299a2c4..b3fe6cf96 100644
--- a/mesalib/src/glsl/ir_constant_expression.cpp
+++ b/mesalib/src/glsl/ir_constant_expression.cpp
@@ -69,7 +69,9 @@ ir_expression::constant_expression_value()
}
if (op[1] != NULL)
- assert(op[0]->type->base_type == op[1]->type->base_type);
+ assert(op[0]->type->base_type == op[1]->type->base_type ||
+ this->operation == ir_binop_lshift ||
+ this->operation == ir_binop_rshift);
bool op0_scalar = op[0]->type->is_scalar();
bool op1_scalar = op[1] != NULL && op[1]->type->is_scalar();
@@ -1371,6 +1373,8 @@ ir_call::constant_expression_value()
data.f[m*i+j] += op[0]->value.f[i+n*j];
}
}
+ } else if (strcmp(callee, "trunc") == 0) {
+ expr = new(mem_ctx) ir_expression(ir_unop_trunc, op[0]);
} else {
/* Unsupported builtin - some are not allowed in constant expressions. */
return NULL;