pan/midgard: Report read mask for branch arguments
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 15 Oct 2019 18:54:07 +0000 (14:54 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 16 Oct 2019 01:41:11 +0000 (21:41 -0400)
Conditionals in particular read values.

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

index ff5e1d1d8722a8c1c1342b5f5add73731ced2d1e..33337d723b68cde503ea86c7463918e295f306a4 100644 (file)
@@ -396,6 +396,10 @@ mir_mask_of_read_components(midgard_instruction *ins, unsigned node)
                 if (ins->compact_branch && ins->writeout && (i == 0))
                         return 0xF;
 
+                /* Conditional branches read one component (TODO: multi branch??) */
+                if (ins->compact_branch && !ins->prepacked_branch && ins->branch.conditional && (i == 0))
+                        return 0x1;
+
                 /* ALU ops act componentwise so we need to pay attention to
                  * their mask. Texture/ldst does not so we don't clamp source
                  * readmasks based on the writemask */