aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2016-04-08 15:57:40 -0400
committerJason Ekstrand <[email protected]>2016-04-28 15:52:17 -0700
commit06cf73a7ba4e54cd535493ae3bdaf1694e604532 (patch)
treec9fdd96ec419f304a923fda0e222dee0491cabb3 /src
parent15264133d7f3b2c63839ae20f45243b62d9f8edd (diff)
nir/lower_load_const: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_load_const_to_scalar.c18
1 files changed, 6 insertions, 12 deletions
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