From b4b2e111f882fe036a0c829e28f7bc5719143cf4 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 15 Aug 2019 08:23:48 -0700 Subject: [PATCH] pan/midgard: Link exit block The exit block has been 'dangling' in the successors graph, so let's ensure it's linked in. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index f08f60fc328..12af84d17d6 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -2575,7 +2575,15 @@ midgard_compile_shader_nir(struct midgard_screen *screen, nir_shader *nir, midga ctx->func = func; emit_cf_list(ctx, &func->impl->body); - emit_block(ctx, func->impl->end_block); + + /* Emit empty exit block with successor */ + + struct midgard_block *semi_end = ctx->current_block; + + struct midgard_block *end = + emit_block(ctx, func->impl->end_block); + + midgard_block_add_successor(semi_end, end); break; /* TODO: Multi-function shaders */ } -- 2.30.2