summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pick_status.json2
-rw-r--r--src/panfrost/midgard/midgard_ra.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 4c9b5e52777..6b35e99cc6f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -913,7 +913,7 @@
"description": "pan/mdg: Mask spills from texture write",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 6049efc3f8f..c545bed5e17 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -835,9 +835,17 @@ mir_spill_register(
midgard_instruction st;
+ /* Note: it's important to match the mask of the spill
+ * with the mask of the instruction whose destination
+ * we're spilling, or otherwise we'll read invalid
+ * components and can fail RA in a subsequent iteration
+ */
+
if (is_special_w) {
st = v_mov(spill_node, spill_slot);
st.no_spill |= (1 << spill_class);
+ st.mask = ins->mask;
+ st.dest_type = st.src_types[0] = ins->dest_type;
} else {
ins->dest = spill_index++;
ins->no_spill |= (1 << spill_class);