summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_schedule.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-13 15:59:41 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-14 14:58:34 -0700
commit6c84a2665c619ca8dd0c4c64617b87ae1e5565e3 (patch)
treea3c74d745213cee45e8e32aa1dfb9c2af85777a4 /src/panfrost/midgard/midgard_schedule.c
parent2a9031ea448f56d483bf411f2fac46437e9dee47 (diff)
pan/midgard: Allocate spill_slot once
Multiple spill moves share a single spill slot. Issue found in Krita. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_schedule.c')
-rw-r--r--src/panfrost/midgard/midgard_schedule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index ce97287d199..ab96a4b8fff 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -781,13 +781,15 @@ static void mir_spill_register(
* implicitly. For special writes, spill to a work register */
if (!is_special || is_special_w) {
+ if (is_special_w)
+ spill_slot = spill_index++;
+
mir_foreach_instr_global_safe(ctx, ins) {
if (ins->ssa_args.dest != spill_node) continue;
midgard_instruction st;
if (is_special_w) {
- spill_slot = spill_index++;
st = v_mov(spill_node, blank_alu_src, spill_slot);
st.no_spill = true;
} else {