pan/midgard: Use upper ALU tags for MFBD writeout
[mesa.git] / src / panfrost / midgard / midgard_schedule.c
index 46e1f7a4a3525428080dd6a6f0d7d619ab28d1e2..05a0c74cbf84c390e04d14abe94b6023d12f8eed 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "compiler.h"
 #include "midgard_ops.h"
+#include "midgard_quirks.h"
 #include "util/u_memory.h"
 
 /* Scheduling for Midgard is complicated, to say the least. ALU instructions
@@ -1051,6 +1052,11 @@ mir_schedule_alu(
 
         /* Size ALU instruction for tag */
         bundle.tag = (TAG_ALU_4) + (bytes_emitted / 16) - 1;
+
+        /* MRT capable GPUs use a special writeout procedure */
+        if (writeout && !(ctx->quirks & MIDGARD_NO_UPPER_ALU))
+                bundle.tag += 4;
+
         bundle.padding = padding;
         bundle.control |= bundle.tag;