From: Kenneth Graunke Date: Tue, 6 Jul 2010 09:39:57 +0000 (-0700) Subject: ir_constant_expression: Assert that both operands share a base type. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6fc983b9bb5555e2906d2680bc3cbd11c43b63f6;p=mesa.git ir_constant_expression: Assert that both operands share a base type. --- 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);