diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-07-09 21:09:02 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-07-09 21:09:02 +0000 |
commit | 473dc96b5bfcd9b8163bba1931980c767d4e8a86 (patch) | |
tree | 792db8214c0e02c8c286cc22b67ad99ff928095f /dist/Mesa/src/glsl/opt_constant_folding.cpp | |
parent | 90414e9e8766ee4a4f0ba93d8206de27cf984ce6 (diff) |
Merge Mesa 10.2.3
tested by matthieu@ kettenis@ mpi@ brett@ and myself across a
diverse range of hardware
Diffstat (limited to 'dist/Mesa/src/glsl/opt_constant_folding.cpp')
-rw-r--r-- | dist/Mesa/src/glsl/opt_constant_folding.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/dist/Mesa/src/glsl/opt_constant_folding.cpp b/dist/Mesa/src/glsl/opt_constant_folding.cpp index 072fefe9a..d0e575460 100644 --- a/dist/Mesa/src/glsl/opt_constant_folding.cpp +++ b/dist/Mesa/src/glsl/opt_constant_folding.cpp @@ -122,13 +122,13 @@ ir_visitor_status ir_constant_folding_visitor::visit_enter(ir_call *ir) { /* Attempt to constant fold parameters */ - exec_list_iterator sig_iter = ir->callee->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param_rval = (ir_rvalue *)iter.get(); - ir_variable *sig_param = (ir_variable *)sig_iter.get(); + foreach_two_lists(formal_node, &ir->callee->parameters, + actual_node, &ir->actual_parameters) { + ir_rvalue *param_rval = (ir_rvalue *) actual_node; + ir_variable *sig_param = (ir_variable *) formal_node; - if (sig_param->mode == ir_var_function_in - || sig_param->mode == ir_var_const_in) { + if (sig_param->data.mode == ir_var_function_in + || sig_param->data.mode == ir_var_const_in) { ir_rvalue *new_param = param_rval; handle_rvalue(&new_param); @@ -136,7 +136,6 @@ ir_constant_folding_visitor::visit_enter(ir_call *ir) param_rval->replace_with(new_param); } } - sig_iter.next(); } /* Next, see if the call can be replaced with an assignment of a constant */ |