mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 04:10:09 +01:00
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:
parent
9697f8088f
commit
7db75927ca
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue