Mesa (glsl2): ir_constant_expression: Assert that both operands share a base type.
Ian Romanick
idr at kemper.freedesktop.org
Tue Jul 6 23:13:31 UTC 2010
Module: Mesa
Branch: glsl2
Commit: 6fc983b9bb5555e2906d2680bc3cbd11c43b63f6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6fc983b9bb5555e2906d2680bc3cbd11c43b63f6
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Jul 6 02:39:57 2010 -0700
ir_constant_expression: Assert that both operands share a base type.
---
src/glsl/ir_constant_expression.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 6d6ee09..610d947 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);
More information about the mesa-commit
mailing list