mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 00:30:13 +01:00
glsl: Correctly validate fma()'s types.
lrp() can take a scalar as a third argument, and fma() cannot. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
d56bbd0441
commit
a3b51a22f7
1 changed files with 6 additions and 0 deletions
|
|
@ -531,6 +531,12 @@ ir_validate::visit_leave(ir_expression *ir)
|
|||
break;
|
||||
|
||||
case ir_triop_fma:
|
||||
assert(ir->type->base_type == GLSL_TYPE_FLOAT);
|
||||
assert(ir->type == ir->operands[0]->type);
|
||||
assert(ir->type == ir->operands[1]->type);
|
||||
assert(ir->type == ir->operands[2]->type);
|
||||
break;
|
||||
|
||||
case ir_triop_lrp:
|
||||
assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT);
|
||||
assert(ir->operands[0]->type == ir->operands[1]->type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue