summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_constant_propagation.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_constant_propagation.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_constant_propagation.cpp')
-rw-r--r--src/glsl/opt_constant_propagation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.cpp
index 6fe16a93f02..a2d1b0f7582 100644
--- a/src/glsl/opt_constant_propagation.cpp
+++ b/src/glsl/opt_constant_propagation.cpp
@@ -398,8 +398,8 @@ ir_constant_propagation_visitor::kill(ir_variable *var, unsigned write_mask)
return;
/* Remove any entries currently in the ACP for this kill. */
- foreach_iter(exec_list_iterator, iter, *this->acp) {
- acp_entry *entry = (acp_entry *)iter.get();
+ foreach_list_safe(n, this->acp) {
+ acp_entry *entry = (acp_entry *) n;
if (entry->var == var) {
entry->write_mask &= ~write_mask;