Mesa (master): vc4: Ignore WADDRs from the other half of the instruction when merging.

Eric Anholt anholt at kemper.freedesktop.org
Mon Aug 25 05:51:53 UTC 2014


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

Author: Eric Anholt <eric at anholt.net>
Date:   Sun Aug 24 17:43:02 2014 -0700

vc4: Ignore WADDRs from the other half of the instruction when merging.

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 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_qpu.c b/src/gallium/drivers/vc4/vc4_qpu.c
index d74dee5..35c65dc 100644
--- a/src/gallium/drivers/vc4/vc4_qpu.c
+++ b/src/gallium/drivers/vc4/vc4_qpu.c
@@ -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).




More information about the mesa-commit mailing list