diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-30 11:06:33 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-30 15:50:27 -0700 |
commit | 5e06d90c4510eb3a8c42b0e0d1a3ebfd19830069 (patch) | |
tree | 1406088199d313270341df01d0bda43d188247be /src/panfrost/midgard/midgard_schedule.c | |
parent | 116b17d2d191892aeccf8fd5044a20f5a2d0c64f (diff) |
pan/midgard: Handle fragment writeout in RA
Rather than using a pile of hacks and awkward constructs in MIR to
ensure the writeout parameter gets written into r0, let's add a
dedicated shadow register class for writeout (interfering with work
register r0) so we can express the writeout condition succintly and
directly.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_schedule.c')
-rw-r--r-- | src/panfrost/midgard/midgard_schedule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 7b687766491..6693a1b725b 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -160,7 +160,7 @@ midgard_has_hazard( */ static bool -can_writeout_fragment(compiler_context *ctx, midgard_instruction **bundle, unsigned count, unsigned node_count) +can_writeout_fragment(compiler_context *ctx, midgard_instruction **bundle, unsigned count, unsigned node_count, unsigned r0) { /* First scan for which components of r0 are written out. Initially * none are written */ @@ -176,7 +176,7 @@ can_writeout_fragment(compiler_context *ctx, midgard_instruction **bundle, unsig for (unsigned i = 0; i < count; ++i) { midgard_instruction *ins = bundle[i]; - if (ins->dest != SSA_FIXED_REGISTER(0)) + if (ins->dest != r0) continue; /* Record written out mask */ @@ -516,7 +516,7 @@ schedule_bundle(compiler_context *ctx, midgard_block *block, midgard_instruction /* All of r0 has to be written out along with * the branch writeout */ - if (ains->writeout && !can_writeout_fragment(ctx, scheduled, index, ctx->temp_count)) { + if (ains->writeout && !can_writeout_fragment(ctx, scheduled, index, ctx->temp_count, ains->src[0])) { /* We only work on full moves * at the beginning. We could * probably do better */ |