summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-01-12 09:16:26 +1300
committerEric Anholt <[email protected]>2015-01-15 22:19:25 +1300
commit8f2fb68026d11feedb5d94cf17e719affe7b9423 (patch)
tree3b9d7707ebbcec5538e5b8004473ec8a0eb0b338
parent5d5707707fb10712ba130c2dafb50e8fc92a2bcc (diff)
vc4: Don't swap the raddr on instructions doing unpacks.
It would mean different unpacking behavior, since only the A file does unpack (with PM==0).
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu.c b/src/gallium/drivers/vc4/vc4_qpu.c
index 434e664fa83..f67e3f8b768 100644
--- a/src/gallium/drivers/vc4/vc4_qpu.c
+++ b/src/gallium/drivers/vc4/vc4_qpu.c
@@ -337,6 +337,11 @@ try_swap_ra_file(uint64_t *merge, uint64_t *a, uint64_t *b)
return false;
}
+ if (!(*merge & QPU_PM) &&
+ QPU_GET_FIELD(*merge, QPU_UNPACK) != QPU_UNPACK_NOP) {
+ return false;
+ }
+
if (raddr_b_b != QPU_R_NOP &&
raddr_b_b != raddr_a_a)
return false;