Signed-off-by: Connor Abbott <cwabbo...@gmail.com> --- src/compiler/nir/nir_lower_locals_to_regs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/compiler/nir/nir_lower_locals_to_regs.c b/src/compiler/nir/nir_lower_locals_to_regs.c index 0438802..270e9fe 100644 --- a/src/compiler/nir/nir_lower_locals_to_regs.c +++ b/src/compiler/nir/nir_lower_locals_to_regs.c @@ -200,10 +200,9 @@ get_deref_reg_src(nir_deref_var *deref, nir_instr *instr, } static bool -lower_locals_to_regs_block(nir_block *block, void *void_state) +lower_locals_to_regs_block(nir_block *block, + struct locals_to_regs_state *state) { - struct locals_to_regs_state *state = void_state; - nir_foreach_instr_safe(block, instr) { if (instr->type != nir_instr_type_intrinsic) continue; @@ -357,7 +356,9 @@ nir_lower_locals_to_regs_impl(nir_function_impl *impl) nir_metadata_require(impl, nir_metadata_dominance); - nir_foreach_block(impl, lower_locals_to_regs_block, &state); + nir_foreach_block(impl, block) { + lower_locals_to_regs_block(block, &state); + } nir_array_foreach(&state.derefs_array, nir_deref_var *, deref_ptr) { nir_deref_var *deref = *deref_ptr; -- 2.5.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev