summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-10-15 14:54:07 -0400
committerAlyssa Rosenzweig <[email protected]>2019-10-15 21:41:11 -0400
commita6867fb3fd9188eda49cb9f68e2b6da774b8a0c8 (patch)
tree80584c87d53e660b969f08cd3004868d9456d72f
parentfd235484fef7d9164f98cc907d10cf680881a9c6 (diff)
pan/midgard: Report read mask for branch arguments
Conditionals in particular read values. Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r--src/panfrost/midgard/mir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/panfrost/midgard/mir.c b/src/panfrost/midgard/mir.c
index ff5e1d1d872..33337d723b6 100644
--- a/src/panfrost/midgard/mir.c
+++ b/src/panfrost/midgard/mir.c
@@ -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 */