From a8eafb0b74ace2564bb02c060529f2404bd67251 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 27 Aug 2019 12:20:06 -0700 Subject: pan/midgard: Ensure fragment writeout is in the final block This ensures the block only has exactly one branch, which makes scheduling happy. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/panfrost/midgard/compiler.h') diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index e6b90e4aa48..7747764791f 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -427,8 +427,9 @@ mir_exit_block(struct compiler_context *ctx) midgard_block *last = list_last_entry(&ctx->blocks, struct midgard_block, link); - /* The last block must be empty (the exit block) */ - assert(list_empty(&last->instructions)); + /* The last block must be empty logically but contains branch writeout + * for fragment shaders */ + assert(last->nr_successors == 0); return last; -- cgit v1.2.3