vc4: Ignore WADDRs from the other half of the instruction when merging.
authorEric Anholt <eric@anholt.net>
Mon, 25 Aug 2014 00:43:02 +0000 (17:43 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 25 Aug 2014 05:13:25 +0000 (22:13 -0700)
This allows setting the opposite-side WADDR to NOP (a non-zero value) in
qpu_* helpers, so that we don't need to qpu_inst() merge them with NOPs
all the time just to get the waddr set.

src/gallium/drivers/vc4/vc4_qpu.c

index d74dee5689ea1cf3d42defe376476dcea28a52a9..35c65dc2eb32a3fda96875f3e5e620532c51eb29 100644 (file)
@@ -192,7 +192,8 @@ qpu_m_alu2(enum qpu_op_mul op,
 uint64_t
 qpu_inst(uint64_t add, uint64_t mul)
 {
-        uint64_t merge = add | mul;
+        uint64_t merge = ((add & ~QPU_WADDR_MUL_MASK) |
+                          (mul & ~QPU_WADDR_ADD_MASK));
 
         /* If either one has no signal field, then use the other's signal field.
          * (since QPU_SIG_NONE != 0).