summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2016-04-08 16:16:56 -0400
committerJason Ekstrand <[email protected]>2016-04-28 15:52:17 -0700
commitc81ca60b41db4632237dc5facfe4e37e500a840a (patch)
tree970800efd51d85245791d4b426dc861ce44d0b50 /src/compiler/nir
parent7e909972e3cb1df501293e6f8364da317cd7244e (diff)
nir/lower_io: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_lower_io.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index 7679c02f601..e0ba9347bfe 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -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);