aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/bifrost/bi_ra.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-27 14:40:30 -0400
committerMarge Bot <[email protected]>2020-03-31 01:12:26 +0000
commit375a7d0f32ff7ea94da9c975aa1a852d848e254b (patch)
treef3e440785960783fad57456ee1219ffe0392f46e /src/panfrost/bifrost/bi_ra.c
parentaa77d8128e93e2ea637c7fcacb88f628ecdb1239 (diff)
pan/bi: Ignore swizzle in unwritten component
Otherwise we can trip the assert for no good reason. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
Diffstat (limited to 'src/panfrost/bifrost/bi_ra.c')
-rw-r--r--src/panfrost/bifrost/bi_ra.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bi_ra.c b/src/panfrost/bifrost/bi_ra.c
index f7feec222bd..6533d66b7df 100644
--- a/src/panfrost/bifrost/bi_ra.c
+++ b/src/panfrost/bifrost/bi_ra.c
@@ -128,6 +128,10 @@ bi_adjust_src_ra(bi_instruction *ins, struct lcra_state *l, unsigned src)
unsigned components = bi_get_component_count(ins, src);
for (unsigned i = 0; i < components; ++i) {
+ /* If we're not writing the component, who cares? */
+ if (!bi_writes_component(ins, i))
+ continue;
+
unsigned off = ins->swizzle[src][i] / comps_per_reg;
off *= 4; /* 32-bit registers */