[Mesa-dev] [PATCH 09/47] nir/lower_gs_intrinsics: fixup for new foreach_block()

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


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

diff --git a/src/compiler/nir/nir_lower_gs_intrinsics.c b/src/compiler/nir/nir_lower_gs_intrinsics.c
index 14abfe3..68eec5d 100644
--- a/src/compiler/nir/nir_lower_gs_intrinsics.c
+++ b/src/compiler/nir/nir_lower_gs_intrinsics.c
@@ -131,10 +131,8 @@ rewrite_end_primitive(nir_intrinsic_instr *intrin, struct state *state)
 }
 
 static bool
-rewrite_intrinsics(nir_block *block, void *closure)
+rewrite_intrinsics(nir_block *block, struct state *state)
 {
-   struct state *state = closure;
-
    nir_foreach_instr_safe(block, instr) {
       if (instr->type != nir_instr_type_intrinsic)
          continue;
@@ -206,7 +204,9 @@ nir_lower_gs_intrinsics(nir_shader *shader)
          nir_builder_init(&b, function->impl);
          state.builder = &b;
 
-         nir_foreach_block(function->impl, rewrite_intrinsics, &state);
+         nir_foreach_block(function->impl, block) {
+            rewrite_intrinsics(block, &state);
+         }
 
          /* This only works because we have a single main() function. */
          append_set_vertex_count(function->impl->end_block, &state);
-- 
2.5.0



More information about the mesa-dev mailing list