Signed-off-by: Connor Abbott <[email protected]>
---
 src/compiler/nir/nir_lower_alu_to_scalar.c | 18 ++++++------------
 1 file 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 e8ba640..f8e94c5 100644
--- a/src/compiler/nir/nir_lower_alu_to_scalar.c
+++ b/src/compiler/nir/nir_lower_alu_to_scalar.c
@@ -237,24 +237,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(impl, lower_alu_to_scalar_block, &builder);
+   nir_foreach_block(impl, block) {
+      nir_foreach_instr_safe(block, instr) {
+         if (instr->type == nir_instr_type_alu)
+            lower_alu_instr_scalar(nir_instr_as_alu(instr), &builder);
+      }
+   }
 }
 
 void
-- 
2.5.0

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to