mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 15:10:10 +01:00
glsl: Implement type inferencing of matrix types.
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
This commit is contained in:
parent
73f6f9b9be
commit
cf2dc1624f
1 changed files with 6 additions and 4 deletions
|
|
@ -380,10 +380,12 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
|
|||
} else if (op1->type->is_scalar()) {
|
||||
this->type = op0->type;
|
||||
} else {
|
||||
/* FINISHME: matrix types */
|
||||
assert(!op0->type->is_matrix() && !op1->type->is_matrix());
|
||||
assert(op0->type == op1->type);
|
||||
this->type = op0->type;
|
||||
if (this->operation == ir_binop_mul) {
|
||||
this->type = glsl_type::get_mul_type(op0->type, op1->type);
|
||||
} else {
|
||||
assert(op0->type == op1->type);
|
||||
this->type = op0->type;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue