diff options
Diffstat (limited to 'src/glsl/opt_dead_code_local.cpp')
-rw-r--r-- | src/glsl/opt_dead_code_local.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/glsl/opt_dead_code_local.cpp b/src/glsl/opt_dead_code_local.cpp index 66522b9c766..e7d46edbe3e 100644 --- a/src/glsl/opt_dead_code_local.cpp +++ b/src/glsl/opt_dead_code_local.cpp @@ -70,8 +70,8 @@ public: void kill_channels(ir_variable *const var, int used) { - foreach_iter(exec_list_iterator, iter, *this->assignments) { - assignment_entry *entry = (assignment_entry *)iter.get(); + foreach_list_safe(n, this->assignments) { + assignment_entry *entry = (assignment_entry *) n; if (entry->lhs == var) { if (var->type->is_scalar() || var->type->is_vector()) { @@ -119,8 +119,8 @@ public: /* For the purpose of dead code elimination, emitting a vertex counts as * "reading" all of the currently assigned output variables. */ - foreach_iter(exec_list_iterator, iter, *this->assignments) { - assignment_entry *entry = (assignment_entry *)iter.get(); + foreach_list_safe(n, this->assignments) { + assignment_entry *entry = (assignment_entry *) n; if (entry->lhs->data.mode == ir_var_shader_out) { if (debug) printf("kill %s\n", entry->lhs->name); @@ -196,8 +196,8 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) printf("looking for %s.0x%01x to remove\n", var->name, ir->write_mask); - foreach_iter(exec_list_iterator, iter, *assignments) { - assignment_entry *entry = (assignment_entry *)iter.get(); + foreach_list_safe(n, assignments) { + assignment_entry *entry = (assignment_entry *) n; if (entry->lhs != var) continue; @@ -258,8 +258,8 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) */ if (debug) printf("looking for %s to remove\n", var->name); - foreach_iter(exec_list_iterator, iter, *assignments) { - assignment_entry *entry = (assignment_entry *)iter.get(); + foreach_list_safe(n, assignments) { + assignment_entry *entry = (assignment_entry *) n; if (entry->lhs == var) { if (debug) |