vc4: Don't swap the raddr on instructions doing unpacks.
authorEric Anholt <eric@anholt.net>
Sun, 11 Jan 2015 20:16:26 +0000 (09:16 +1300)
committerEric Anholt <eric@anholt.net>
Thu, 15 Jan 2015 09:19:25 +0000 (22:19 +1300)
It would mean different unpacking behavior, since only the A file does
unpack (with PM==0).

src/gallium/drivers/vc4/vc4_qpu.c

index 434e664fa83d3108abb5ad8d340d28cbfc87d0ad..f67e3f8b768a84b69b8b512dbcf82ab6ef406e1b 100644 (file)
@@ -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;