freedreno/ir3: fix fallout from new block iterators
authorRob Clark <robclark@freedesktop.org>
Mon, 9 May 2016 17:51:18 +0000 (13:51 -0400)
committerRob Clark <robclark@freedesktop.org>
Mon, 9 May 2016 17:52:29 +0000 (13:52 -0400)
Since this is potentially modifying the block structure of the shader,
it needs the _safe() version of the iterator.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_nir_lower_if_else.c

index 262f4907cab48a927b5a9245255613b013234260..6e1395c90014f11b2a98a17e1cf46bdd3412799d 100644 (file)
@@ -304,7 +304,7 @@ lower_if_else_impl(nir_function_impl *impl)
        nir_builder_init(&b, impl);
 
        bool progress = false;
-       nir_foreach_block(block, impl) {
+       nir_foreach_block_safe(block, impl) {
                progress |= lower_if_else_block(block, &b, mem_ctx);
        }