From 6f92288e85a38ae88e6c73a298891cdde667c8b8 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 27 Sep 2019 08:19:51 -0400 Subject: [PATCH] pan/midgard: Implement predicate->unit This allows ALUs to select for each unit of the bundle separately. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_schedule.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 4c72844679c..eae73868e2a 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -885,6 +885,9 @@ mir_choose_instruction( { /* Parse the predicate */ unsigned tag = predicate->tag; + bool alu = tag == TAG_ALU_4; + unsigned unit = predicate->unit; + bool branch = alu && (unit == ALU_ENAB_BR_COMPACT); /* Iterate to find the best instruction satisfying the predicate */ unsigned i; @@ -899,6 +902,12 @@ mir_choose_instruction( if (predicate->exclude != ~0 && instructions[i]->dest == predicate->exclude) continue; + if (alu && !branch && !(alu_opcode_props[instructions[i]->alu.op].props & unit)) + continue; + + if (branch && !instructions[i]->compact_branch) + continue; + /* Simulate in-order scheduling */ if ((signed) i < best_index) continue; -- 2.30.2