Mesa (main): pan/va: Unit test barrier handling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 21 22:41:34 UTC 2022


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon Jun 20 16:49:27 2022 -0400

pan/va: Unit test barrier handling

Add a unit test for the quirk discovered in the previos commit, because this
will cause flakes (instead of fails) if we get it wrong. Better have a
deterministic fail mode.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>

---

 src/panfrost/bifrost/valhall/test/test-insert-flow.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/panfrost/bifrost/valhall/test/test-insert-flow.cpp b/src/panfrost/bifrost/valhall/test/test-insert-flow.cpp
index 57b547d7c9b..410fe4ec1b6 100644
--- a/src/panfrost/bifrost/valhall/test/test-insert-flow.cpp
+++ b/src/panfrost/bifrost/valhall/test/test-insert-flow.cpp
@@ -248,3 +248,16 @@ TEST_F(InsertFlow, DiamondCFG) {
          flow(END);
    });
 }
+
+TEST_F(InsertFlow, BarrierBug) {
+   CASE(KERNEL, {
+         bi_instr *I = bi_store_i32(b, bi_register(0), bi_register(2), bi_register(4), BI_SEG_NONE, 0);
+         I->slot = 2;
+
+         bi_fadd_f32_to(b, bi_register(10), bi_register(10), bi_register(10));
+         flow(WAIT2);
+         bi_barrier(b);
+         flow(WAIT);
+         flow(END);
+   });
+}



More information about the mesa-commit mailing list