nir/gather_info: fixup for new foreach_block()
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 13 Apr 2016 23:26:39 +0000 (16:26 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 5 May 2016 23:19:41 +0000 (16:19 -0700)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/nir/nir_gather_info.c

index 180ceccff2a6863a66a6e2bca60b548cc85808aa..d45b1a2fec04a0d4b603401a2e6fe6fcc8eda5d6 100644 (file)
@@ -68,8 +68,8 @@ gather_tex_info(nir_tex_instr *instr, nir_shader *shader)
       shader->info.uses_texture_gather = true;
 }
 
-static bool
-gather_info_block(nir_block *block, void *shader)
+static void
+gather_info_block(nir_block *block, nir_shader *shader)
 {
    nir_foreach_instr(instr, block) {
       switch (instr->type) {
@@ -86,8 +86,6 @@ gather_info_block(nir_block *block, void *shader)
          break;
       }
    }
-
-   return true;
 }
 
 /**
@@ -157,5 +155,7 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
       }
    }
 
-   nir_foreach_block_call(entrypoint, gather_info_block, shader);
+   nir_foreach_block(block, entrypoint) {
+      gather_info_block(block, shader);
+   }
 }