summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_constant_expression.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-07-06 02:39:57 -0700
committerIan Romanick <[email protected]>2010-07-06 16:03:33 -0700
commit6fc983b9bb5555e2906d2680bc3cbd11c43b63f6 (patch)
tree6f4a04bd8664483329604745e1e0e26f7e144aaf /src/glsl/ir_constant_expression.cpp
parent6bc432e14e12c280bc53e57338bf86fbf8d26885 (diff)
ir_constant_expression: Assert that both operands share a base type.
Diffstat (limited to 'src/glsl/ir_constant_expression.cpp')
-rw-r--r--src/glsl/ir_constant_expression.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 6d6ee093d79..610d9479a94 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -141,6 +141,9 @@ ir_constant_visitor::visit(ir_expression *ir)
return;
}
+ if (op[1] != NULL)
+ assert(op[0]->type->base_type == op[1]->type->base_type);
+
switch (ir->operation) {
case ir_unop_logic_not:
assert(op[0]->type->base_type == GLSL_TYPE_BOOL);