aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_ra.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-12-03 10:51:38 -0500
committerTomeu Vizoso <[email protected]>2019-12-16 09:10:33 +0000
commite7721d877551df89449c294f0683baedcf99d016 (patch)
tree85493a38979b9198d195f3d97ce129a83ed950ca /src/panfrost/midgard/midgard_ra.c
parent3448b2641a475fce9220ade229570e342882f637 (diff)
pan/midgard: Set r1.w magic
I'm honestly unsure what this is for, but it's needed on MFBD systems for unknown reasons, at least when MRT is actually in use and then sometimes without MRT (it fixes a blend shader issue on T760?) Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Visoso <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_ra.c')
-rw-r--r--src/panfrost/midgard/midgard_ra.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 749df2efb67..c5c77790e7c 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -524,7 +524,7 @@ allocate_registers(compiler_context *ctx, bool *spilled)
assert(check_read_class(l->class, ins->type, ins->src[2]));
}
- /* Mark writeout to r0, render target to r1.z */
+ /* Mark writeout to r0, render target to r1.z, unknown to r1.w */
mir_foreach_instr_global(ctx, ins) {
if (!(ins->compact_branch && ins->writeout)) continue;
@@ -533,6 +533,9 @@ allocate_registers(compiler_context *ctx, bool *spilled)
if (ins->src[1] < ctx->temp_count)
l->solutions[ins->src[1]] = (16 * 1) + COMPONENT_Z * 4;
+
+ if (ins->src[2] < ctx->temp_count)
+ l->solutions[ins->src[2]] = (16 * 1) + COMPONENT_W * 4;
}
mir_compute_interference(ctx, l);