Mesa (staging/20.1): pan/mdg: Mask spills from texture write
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 3 18:32:10 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: 1a7ee493c2fe6c561588f2f6f0d64c1e01091f67
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a7ee493c2fe6c561588f2f6f0d64c1e01091f67
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Fri Jul 31 10:31:50 2020 -0400
pan/mdg: Mask spills from texture write
This prevents RA failures the results of reading multiple textures that
require less than 4 channels, as seen in a number of GL 3 WebRender shaders.
Closes: #3342
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reported-by: Icecream95 <ixn at keemail.me>
Tested-by: Icecream95 <ixn at keemail.me>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6144>
(cherry picked from commit b4de9e035ac0afe64ebfd58cd0eb04c1a671afce)
---
.pick_status.json | 2 +-
src/panfrost/midgard/midgard_ra.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 40aac16ca65..36403877e36 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -103,7 +103,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);
More information about the mesa-commit
mailing list