pan/mdg: Use the writeout tag for tilebuffer wait loops
authorIcecream95 <ixn@keemail.me>
Mon, 6 Jul 2020 22:11:53 +0000 (10:11 +1200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 13 Jul 2020 13:35:10 +0000 (13:35 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755>

src/panfrost/midgard/midgard_schedule.c

index 7f3c3ba68ea0ac17b0c5c480dee102be604a17f0..56c324ce3feee5a3481e2fb42e6bc7ae6f78ba7d 100644 (file)
@@ -1331,8 +1331,11 @@ mir_schedule_alu(
         /* Size ALU instruction for tag */
         bundle.tag = (TAG_ALU_4) + (bytes_emitted / 16) - 1;
 
+        bool tilebuf_wait = branch && branch->compact_branch &&
+           branch->branch.target_type == TARGET_TILEBUF_WAIT;
+
         /* MRT capable GPUs use a special writeout procedure */
-        if (writeout && !(ctx->quirks & MIDGARD_NO_UPPER_ALU))
+        if ((writeout || tilebuf_wait) && !(ctx->quirks & MIDGARD_NO_UPPER_ALU))
                 bundle.tag += 4;
 
         bundle.padding = padding;