ir_constant_expression: Assert that both operands share a base type.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 6 Jul 2010 09:39:57 +0000 (02:39 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 6 Jul 2010 23:03:33 +0000 (16:03 -0700)
src/glsl/ir_constant_expression.cpp

index 6d6ee093d791a3fd683e471dabaea5d6758a489b..610d9479a941438891da9b511c60d18aa6efd663 100644 (file)
@@ -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);