From f2eced966028e91213ddd7a4287fa63db3505859 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Tue, 7 Jul 2020 10:11:53 +1200 Subject: [PATCH] pan/mdg: Use the writeout tag for tilebuffer wait loops Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/midgard_schedule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 7f3c3ba68ea..56c324ce3fe 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -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; -- 2.30.2