Mesa (main): broadcom/compiler: check that sig packing is valid when pipelining ldvary

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 3 11:07:51 UTC 2021


Module: Mesa
Branch: main
Commit: a794bdf95313f7b9a69b142712a1e198b5447e36
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a794bdf95313f7b9a69b142712a1e198b5447e36

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Wed Nov  3 11:14:19 2021 +0100

broadcom/compiler: check that sig packing is valid when pipelining ldvary

Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13641>

---

 src/broadcom/compiler/qpu_schedule.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c
index de03edd8780..f65ee8bf8ec 100644
--- a/src/broadcom/compiler/qpu_schedule.c
+++ b/src/broadcom/compiler/qpu_schedule.c
@@ -2034,6 +2034,12 @@ fixup_pipelined_ldvary(struct v3d_compile *c,
         if (v3d_qpu_sig_writes_address(c->devinfo, &prev->qpu.sig))
                 return false;
 
+        uint32_t sig;
+        struct v3d_qpu_sig new_sig = prev->qpu.sig;
+        new_sig.ldvary = true;
+        if (!v3d_qpu_sig_pack(c->devinfo, &new_sig, &sig))
+                return false;
+
         /* The previous instruction cannot use flags since ldvary uses the
          * 'cond' instruction field to store the destination.
          */



More information about the mesa-commit mailing list