nir/lower_to_source_mods: fixup for new foreeach_block()
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 8 Apr 2016 20:18:55 +0000 (16:18 -0400)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 28 Apr 2016 22:52:17 +0000 (15:52 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_to_source_mods.c

index 369570ed684f9124f8a1112c7919ad70af250fea..b641908eb457b4a1ee927b969fd91aa8e0ab21cc 100644 (file)
@@ -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)
@@ -181,17 +181,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_call(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(block, function->impl) {
+            nir_lower_to_source_mods_block(block);
+         }
+      }
    }
 }