glsl: Guard against error_type in the tree rebalancer.

This helped me track down the bug fixed in the previous commit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Kenneth Graunke 2014-07-15 16:35:55 -07:00
parent 9697f8088f
commit 7db75927ca

View file

@ -271,11 +271,13 @@ update_types(ir_instruction *ir, void *)
if (!expr)
return;
expr->type =
const glsl_type *const new_type =
glsl_type::get_instance(expr->type->base_type,
MAX2(expr->operands[0]->type->components(),
expr->operands[1]->type->components()),
1);
assert(new_type != glsl_type::error_type);
expr->type = new_type;
}
void