Mesa (master): vc4: Don't swap the raddr on instructions doing unpacks.

Eric Anholt anholt at kemper.freedesktop.org
Thu Jan 15 09:25:08 UTC 2015


Module: Mesa
Branch: master
Commit: 8f2fb68026d11feedb5d94cf17e719affe7b9423
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f2fb68026d11feedb5d94cf17e719affe7b9423

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 12 09:16:26 2015 +1300

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).

---

 src/gallium/drivers/vc4/vc4_qpu.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_qpu.c b/src/gallium/drivers/vc4/vc4_qpu.c
index 434e664..f67e3f8 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;




More information about the mesa-commit mailing list