pan/midgard: Extend mir_special_index to writeout
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 30 Aug 2019 17:45:08 +0000 (10:45 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 30 Aug 2019 22:50:26 +0000 (15:50 -0700)
The branch has the writeout specified in its source list, making this
special even if it's not explicitly part of r0.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/mir.c

index ff552397bf8c3cc51a48d2712300c12e1ed25849..9ecd2b7bab1e1c75aab4c9f5de6f55dc12741d56 100644 (file)
@@ -318,8 +318,9 @@ mir_special_index(compiler_context *ctx, unsigned idx)
         mir_foreach_instr_global(ctx, ins) {
                 bool is_ldst = ins->type == TAG_LOAD_STORE_4;
                 bool is_tex = ins->type == TAG_TEXTURE_4;
+                bool is_writeout = ins->compact_branch && ins->writeout;
 
-                if (!(is_ldst || is_tex))
+                if (!(is_ldst || is_tex || is_writeout))
                         continue;
 
                 if (mir_has_arg(ins, idx))