summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_alu_to_scalar.c
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2016-04-08 15:39:24 -0400
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-28 15:52:17 -0700
commite36fbcfc3ffb5d152c4f65d41ad5c5bce53a995a (patch)
treeee9b9c66438b70ac6148acebff13b3a8c933216b /src/compiler/nir/nir_lower_alu_to_scalar.c
parent4179a56f424effdbf7bac78ce942a649b61af736 (diff)
downloadexternal_mesa3d-e36fbcfc3ffb5d152c4f65d41ad5c5bce53a995a.zip
external_mesa3d-e36fbcfc3ffb5d152c4f65d41ad5c5bce53a995a.tar.gz
external_mesa3d-e36fbcfc3ffb5d152c4f65d41ad5c5bce53a995a.tar.bz2
nir/lower_alu_to_scalar: fixup for new foreach_block()
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/compiler/nir/nir_lower_alu_to_scalar.c')
-rw-r--r--src/compiler/nir/nir_lower_alu_to_scalar.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c
index 5892276..a5fc734 100644
--- a/src/compiler/nir/nir_lower_alu_to_scalar.c
+++ b/src/compiler/nir/nir_lower_alu_to_scalar.c
@@ -240,24 +240,18 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b)
nir_instr_remove(&instr->instr);
}
-static bool
-lower_alu_to_scalar_block(nir_block *block, void *builder)
-{
- nir_foreach_instr_safe(block, instr) {
- if (instr->type == nir_instr_type_alu)
- lower_alu_instr_scalar(nir_instr_as_alu(instr), builder);
- }
-
- return true;
-}
-
static void
nir_lower_alu_to_scalar_impl(nir_function_impl *impl)
{
nir_builder builder;
nir_builder_init(&builder, impl);
- nir_foreach_block_call(impl, lower_alu_to_scalar_block, &builder);
+ nir_foreach_block(block, impl) {
+ nir_foreach_instr_safe(block, instr) {
+ if (instr->type == nir_instr_type_alu)
+ lower_alu_instr_scalar(nir_instr_as_alu(instr), &builder);
+ }
+ }
}
void