Mesa (staging/18.2): v3d: Avoid spilling that breaks the r5 usage after a ldvary.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 8 09:20:59 UTC 2018


Module: Mesa
Branch: staging/18.2
Commit: 71aa72d69542aefe37b2739cf33005c5fbf58015
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=71aa72d69542aefe37b2739cf33005c5fbf58015

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Aug  2 11:12:37 2018 -0700

v3d: Avoid spilling that breaks the r5 usage after a ldvary.

Fixes bad rendering when forcing 2 spills in glxgears.

Cc: "18.2" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 50a8713d4f90a6c70a23f9f5871420371df283a7)

---

 src/broadcom/compiler/vir_register_allocate.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/broadcom/compiler/vir_register_allocate.c b/src/broadcom/compiler/vir_register_allocate.c
index d0a9f4e30d..61d273575d 100644
--- a/src/broadcom/compiler/vir_register_allocate.c
+++ b/src/broadcom/compiler/vir_register_allocate.c
@@ -94,6 +94,15 @@ v3d_choose_spill_node(struct v3d_compile *c, struct ra_graph *g,
                                 }
                         }
 
+                        /* Refuse to spill a ldvary's dst, because that means
+                         * that ldvary's r5 would end up being used across a
+                         * thrsw.
+                         */
+                        if (inst->qpu.sig.ldvary) {
+                                assert(inst->dst.file == QFILE_TEMP);
+                                BITSET_CLEAR(c->spillable, inst->dst.index);
+                        }
+
                         if (inst->is_last_thrsw)
                                 started_last_seg = true;
 




More information about the mesa-commit mailing list