Mesa (master): v3d: Fix detection of the last ldtmu before a new TMU op.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 26 19:44:09 UTC 2019


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

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Apr 25 12:29:55 2019 -0700

v3d: Fix detection of the last ldtmu before a new TMU op.

We were looking at the start instruction, instead of scanning through the
list of following instructions to find any more ldtmus.

---

 src/broadcom/compiler/vir_register_allocate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c
index 32b9a8abe8e..1b58bb9c420 100644
--- a/src/broadcom/compiler/vir_register_allocate.c
+++ b/src/broadcom/compiler/vir_register_allocate.c
@@ -36,11 +36,11 @@
 static bool
 is_last_ldtmu(struct qinst *inst, struct qblock *block)
 {
-        list_for_each_entry_from(struct qinst, scan_inst, inst,
+        list_for_each_entry_from(struct qinst, scan_inst, inst->link.next,
                                  &block->instructions, link) {
-                if (inst->qpu.sig.ldtmu)
+                if (scan_inst->qpu.sig.ldtmu)
                         return false;
-                if (v3d_qpu_writes_tmu(&inst->qpu))
+                if (v3d_qpu_writes_tmu(&scan_inst->qpu))
                         return true;
         }
 




More information about the mesa-commit mailing list