Mesa (master): vc4: Also deal with VPM reads at thread end.

Eric Anholt anholt at kemper.freedesktop.org
Mon Dec 1 19:21:47 UTC 2014


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

Author: Eric Anholt <eric at anholt.net>
Date:   Sun Nov 30 15:13:40 2014 -0800

vc4: Also deal with VPM reads at thread end.

Prevents a regression with QPU scheduling, which happens to put the no-op
reads for unused VPM contents end up at the end of the program.

---

 src/gallium/drivers/vc4/vc4_qpu_emit.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index 1d12d11..3d7bdb4 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -596,11 +596,15 @@ vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c)
 
         serialize_insts(c);
 
-        /* thread end can't have VPM write */
+        /* thread end can't have VPM write or read */
         if (QPU_GET_FIELD(c->qpu_insts[c->qpu_inst_count - 1],
                           QPU_WADDR_ADD) == QPU_W_VPM ||
             QPU_GET_FIELD(c->qpu_insts[c->qpu_inst_count - 1],
-                          QPU_WADDR_MUL) == QPU_W_VPM) {
+                          QPU_WADDR_MUL) == QPU_W_VPM ||
+            QPU_GET_FIELD(c->qpu_insts[c->qpu_inst_count - 1],
+                          QPU_RADDR_A) == QPU_R_VPM ||
+            QPU_GET_FIELD(c->qpu_insts[c->qpu_inst_count - 1],
+                          QPU_RADDR_B) == QPU_R_VPM) {
                 serialize_one_inst(c, qpu_NOP());
         }
 




More information about the mesa-commit mailing list