[Mesa-dev] [PATCH 40/47] nir/split_var_copies: fixup for new foreach_block()

Connor Abbott cwabbott0 at gmail.com
Wed Apr 13 04:35:19 UTC 2016


Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
 src/compiler/nir/nir_split_var_copies.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/compiler/nir/nir_split_var_copies.c b/src/compiler/nir/nir_split_var_copies.c
index 6fdaefa..09c37c0 100644
--- a/src/compiler/nir/nir_split_var_copies.c
+++ b/src/compiler/nir/nir_split_var_copies.c
@@ -205,10 +205,8 @@ split_var_copy_instr(nir_intrinsic_instr *old_copy,
 }
 
 static bool
-split_var_copies_block(nir_block *block, void *void_state)
+split_var_copies_block(nir_block *block, struct split_var_copies_state *state)
 {
-   struct split_var_copies_state *state = void_state;
-
    nir_foreach_instr_safe(block, instr) {
       if (instr->type != nir_instr_type_intrinsic)
          continue;
@@ -259,7 +257,9 @@ split_var_copies_impl(nir_function_impl *impl)
    state.dead_ctx = ralloc_context(NULL);
    state.progress = false;
 
-   nir_foreach_block(impl, split_var_copies_block, &state);
+   nir_foreach_block(impl, block) {
+      split_var_copies_block(block, &state);
+   }
 
    ralloc_free(state.dead_ctx);
 
-- 
2.5.0



More information about the mesa-dev mailing list