nir/lower_io: fixup for new foreach_block()
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 8 Apr 2016 20:16:56 +0000 (16:16 -0400)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Apr 2016 22:52:17 +0000 (15:52 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_io.c

index 7679c02f6012ca66db4cbc85ce27b4c10548ea7d..e0ba9347bfe3b6abed4a06896cf5638b92fc257f 100644 (file)
@@ -211,10 +211,9 @@ atomic_op(nir_intrinsic_op opcode)
 }
 
 static bool
-nir_lower_io_block(nir_block *block, void *void_state)
+nir_lower_io_block(nir_block *block,
+                   struct lower_io_state *state)
 {
-   struct lower_io_state *state = void_state;
-
    nir_builder *b = &state->builder;
 
    nir_foreach_instr_safe(block, instr) {
@@ -403,7 +402,9 @@ nir_lower_io_impl(nir_function_impl *impl,
    state.modes = modes;
    state.type_size = type_size;
 
-   nir_foreach_block_call(impl, nir_lower_io_block, &state);
+   nir_foreach_block(block, impl) {
+      nir_lower_io_block(block, &state);
+   }
 
    nir_metadata_preserve(impl, nir_metadata_block_index |
                                nir_metadata_dominance);