aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-29 08:21:31 +0200
committermarha <marha@users.sourceforge.net>2011-09-29 08:21:31 +0200
commitbee9191042416cbfb848615189ca1e2a0069f022 (patch)
tree8f7b2d550ca61d7a6ff10d1fb513fff371268ee0 /mesalib/src/glsl
parent18a8f9f6839dfd899814a76a971e720c1e622236 (diff)
downloadvcxsrv-bee9191042416cbfb848615189ca1e2a0069f022.tar.gz
vcxsrv-bee9191042416cbfb848615189ca1e2a0069f022.tar.bz2
vcxsrv-bee9191042416cbfb848615189ca1e2a0069f022.zip
xwininfo libXft mesa git update 29 sep 2011
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;