diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-01-02 12:27:59 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2020-01-02 15:20:55 -0500 |
commit | 5bc62af2a08c96f2e90740bbd1503d26efa2b669 (patch) | |
tree | 8bfa19823b71fac4bc60d08ddbe8be3f8565cbfa /src/panfrost/midgard/midgard_liveness.c | |
parent | db879b034a131694a819da16ddcb680cd81597a8 (diff) |
pan/midgard: Generate MRT writeout loops
They need a very particular form; the naive way we did before is not
sufficient in practice, it doesn't look like. So let's follow the rough
structure of the blob's writeout since this is fixed code anyway.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_liveness.c')
-rw-r--r-- | src/panfrost/midgard/midgard_liveness.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_liveness.c b/src/panfrost/midgard/midgard_liveness.c index 8627e01fa74..b1b2f311ffa 100644 --- a/src/panfrost/midgard/midgard_liveness.c +++ b/src/panfrost/midgard/midgard_liveness.c @@ -153,14 +153,20 @@ mir_compute_liveness(compiler_context *ctx) /* If we made progress, we need to process the predecessors */ - if (progress || (blk == exit) || blk->epilogue) { + if (progress || !blk->visited) { mir_foreach_predecessor(blk, pred) _mesa_set_add(work_list, pred); } + + blk->visited = true; } while((cur = _mesa_set_next_entry(work_list, NULL)) != NULL); /* Liveness is now valid */ ctx->metadata |= MIDGARD_METADATA_LIVENESS; + + mir_foreach_block(ctx, block) { + block->visited = false; + } } /* Once liveness data is no longer valid, call this */ |