[Mesa-dev] [PATCH 18/47] nir/lower_to_source_mods: fixup for new foreeach_block()

Connor Abbott cwabbott0 at gmail.com
Wed Apr 13 04:34:57 UTC 2016


Signed-off-by: Connor Abbott <cwabbott0 at gmail.com>
---
 src/compiler/nir/nir_lower_to_source_mods.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/compiler/nir/nir_lower_to_source_mods.c b/src/compiler/nir/nir_lower_to_source_mods.c
index 6c4e1f0..eafab4e 100644
--- a/src/compiler/nir/nir_lower_to_source_mods.c
+++ b/src/compiler/nir/nir_lower_to_source_mods.c
@@ -34,7 +34,7 @@
  */
 
 static bool
-nir_lower_to_source_mods_block(nir_block *block, void *state)
+nir_lower_to_source_mods_block(nir_block *block)
 {
    nir_foreach_instr(block, instr) {
       if (instr->type != nir_instr_type_alu)
@@ -180,17 +180,14 @@ nir_lower_to_source_mods_block(nir_block *block, void *state)
    return true;
 }
 
-static void
-nir_lower_to_source_mods_impl(nir_function_impl *impl)
-{
-   nir_foreach_block(impl, nir_lower_to_source_mods_block, NULL);
-}
-
 void
 nir_lower_to_source_mods(nir_shader *shader)
 {
    nir_foreach_function(shader, function) {
-      if (function->impl)
-         nir_lower_to_source_mods_impl(function->impl);
+      if (function->impl) {
+         nir_foreach_block(function->impl, block) {
+            nir_lower_to_source_mods_block(block);
+         }
+      }
    }
 }
-- 
2.5.0



More information about the mesa-dev mailing list