mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
glsl2: Flatten expression that appear as the parameters of ir_call as well.
This commit is contained in:
parent
94da2abfd4
commit
562c3d0cb1
1 changed files with 12 additions and 5 deletions
|
|
@ -165,11 +165,18 @@ ir_expression_flattening_visitor::visit_leave(ir_swizzle *ir)
|
|||
ir_visitor_status
|
||||
ir_expression_flattening_visitor::visit_enter(ir_call *ir)
|
||||
{
|
||||
/* FINISHME: Why not process the call parameters? (Same behavior as original
|
||||
* FINISHME: code.)
|
||||
*/
|
||||
(void) ir;
|
||||
return visit_continue_with_parent;
|
||||
/* Reminder: iterating ir_call iterates its parameters. */
|
||||
foreach_iter(exec_list_iterator, iter, *ir) {
|
||||
ir_rvalue *ir = (ir_rvalue *)iter.get();
|
||||
ir_rvalue *new_ir = operand_to_temp(ir);
|
||||
|
||||
if (new_ir != ir) {
|
||||
ir->insert_before(new_ir);
|
||||
ir->remove();
|
||||
}
|
||||
}
|
||||
|
||||
return visit_continue;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue