summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_structure_splitting.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-11-22 02:10:15 -0800
committerKenneth Graunke <[email protected]>2014-01-13 11:38:19 -0800
commit838a6871bbcd8cd0493bb39b188129f7d49de47e (patch)
tree78a442fbc3ee72f5e13d2130d8aee34cfd9b97b7 /src/glsl/opt_structure_splitting.cpp
parent5f7e778fa1b1e969a1b15e3650dec49b0026ed08 (diff)
glsl: Convert piles of foreach_iter to foreach_list_safe.
In these cases, we edit the list (or at least might be), so we use the foreach_list_safe variant. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/opt_structure_splitting.cpp')
-rw-r--r--src/glsl/opt_structure_splitting.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index b668dc21c04..1ec537b132b 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -315,8 +315,8 @@ do_structure_splitting(exec_list *instructions)
visit_list_elements(&refs, instructions);
/* Trim out variables we can't split. */
- foreach_iter(exec_list_iterator, iter, refs.variable_list) {
- variable_entry *entry = (variable_entry *)iter.get();
+ foreach_list_safe(n, &refs.variable_list) {
+ variable_entry *entry = (variable_entry *) n;
if (debug) {
printf("structure %s@%p: decl %d, whole_access %d\n",
@@ -337,8 +337,8 @@ do_structure_splitting(exec_list *instructions)
/* Replace the decls of the structures to be split with their split
* components.
*/
- foreach_iter(exec_list_iterator, iter, refs.variable_list) {
- variable_entry *entry = (variable_entry *)iter.get();
+ foreach_list_safe(n, &refs.variable_list) {
+ variable_entry *entry = (variable_entry *) n;
const struct glsl_type *type = entry->var->type;
entry->mem_ctx = ralloc_parent(entry->var);