diff options
Diffstat (limited to 'src/glsl/opt_constant_propagation.cpp')
-rw-r--r-- | src/glsl/opt_constant_propagation.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.cpp index a2d1b0f7582..18f5da68907 100644 --- a/src/glsl/opt_constant_propagation.cpp +++ b/src/glsl/opt_constant_propagation.cpp @@ -281,10 +281,10 @@ ir_visitor_status ir_constant_propagation_visitor::visit_enter(ir_call *ir) { /* Do constant propagation on call parameters, but skip any out params */ - exec_list_iterator sig_param_iter = ir->callee->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { - ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); - ir_rvalue *param = (ir_rvalue *)iter.get(); + foreach_two_lists(formal_node, &ir->callee->parameters, + actual_node, &ir->actual_parameters) { + ir_variable *sig_param = (ir_variable *) formal_node; + ir_rvalue *param = (ir_rvalue *) actual_node; if (sig_param->data.mode != ir_var_function_out && sig_param->data.mode != ir_var_function_inout) { ir_rvalue *new_param = param; @@ -294,7 +294,6 @@ ir_constant_propagation_visitor::visit_enter(ir_call *ir) else param->accept(this); } - sig_param_iter.next(); } /* Since we're unlinked, we don't (necssarily) know the side effects of |