pan/midgard: Fix liveness analysis with multiple epilogues

Epilogues are special fixed-function blocks, so they need special
handling for liveness analysis to work completely. This in turns fixes
RA issues for many shaders using MRT.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Visoso <tomeu.vizoso@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-12-03 10:37:01 -05:00
committed by Tomeu Vizoso
parent 60396340f5
commit 3448b2641a
3 changed files with 5 additions and 1 deletions
+3
View File
@@ -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 {
+1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}