diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index d087579f36d..45a0617a840 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -198,6 +198,9 @@ typedef struct midgard_block { * simple bit fields, but for us, liveness is a vector idea. */ uint16_t *live_in; uint16_t *live_out; + + /* Indicates this is a fixed-function fragment epilogue block */ + bool epilogue; } midgard_block; typedef struct midgard_bundle { diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index a118f34fd9a..943435c39ba 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -2217,6 +2217,7 @@ emit_fragment_epilogue(compiler_context *ctx, unsigned rt) } EMIT(alu_br_compact_cond, midgard_jmp_writeout_op_writeout, TAG_ALU_4, ~0, midgard_condition_always); + ctx->current_block->epilogue = true; schedule_barrier(ctx); } diff --git a/src/panfrost/midgard/midgard_liveness.c b/src/panfrost/midgard/midgard_liveness.c index 08f8a07bcee..8627e01fa74 100644 --- a/src/panfrost/midgard/midgard_liveness.c +++ b/src/panfrost/midgard/midgard_liveness.c @@ -153,7 +153,7 @@ mir_compute_liveness(compiler_context *ctx) /* If we made progress, we need to process the predecessors */ - if (progress || (blk == exit)) { + if (progress || (blk == exit) || blk->epilogue) { mir_foreach_predecessor(blk, pred) _mesa_set_add(work_list, pred); }