components() includes matrix columns, so if this code encountered a
matrix, it would ask for something like a vec9 or vec16. This is
clearly not what you want.
Earlier code now prevents this from seeing matrices, but we should still
use vector_elements, for clarity.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
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()),
+ MAX2(expr->operands[0]->type->vector_elements,
+ expr->operands[1]->type->vector_elements),
1);
assert(new_type != glsl_type::error_type);
expr->type = new_type;