From 6fc983b9bb5555e2906d2680bc3cbd11c43b63f6 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 6 Jul 2010 02:39:57 -0700 Subject: [PATCH] ir_constant_expression: Assert that both operands share a base type. --- src/glsl/ir_constant_expression.cpp | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.30.2