From: Connor Abbott Date: Fri, 8 Apr 2016 19:57:40 +0000 (-0400) Subject: nir/lower_load_const: fixup for new foreach_block() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06cf73a7ba4e54cd535493ae3bdaf1694e604532;p=mesa.git nir/lower_load_const: fixup for new foreach_block() Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/nir/nir_lower_load_const_to_scalar.c b/src/compiler/nir/nir_lower_load_const_to_scalar.c index 44242320b72..06cdd5abd55 100644 --- a/src/compiler/nir/nir_lower_load_const_to_scalar.c +++ b/src/compiler/nir/nir_lower_load_const_to_scalar.c @@ -67,21 +67,15 @@ lower_load_const_instr_scalar(nir_load_const_instr *lower) nir_instr_remove(&lower->instr); } -static bool -lower_load_const_to_scalar_block(nir_block *block, void *data) -{ - nir_foreach_instr_safe(block, instr) { - if (instr->type == nir_instr_type_load_const) - lower_load_const_instr_scalar(nir_instr_as_load_const(instr)); - } - - return true; -} - static void nir_lower_load_const_to_scalar_impl(nir_function_impl *impl) { - nir_foreach_block_call(impl, lower_load_const_to_scalar_block, NULL); + nir_foreach_block(block, impl) { + nir_foreach_instr_safe(block, instr) { + if (instr->type == nir_instr_type_load_const) + lower_load_const_instr_scalar(nir_instr_as_load_const(instr)); + } + } } void