From: Alyssa Rosenzweig Date: Fri, 27 Sep 2019 12:19:51 +0000 (-0400) Subject: pan/midgard: Implement predicate->unit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6f92288e85a38ae88e6c73a298891cdde667c8b8;p=mesa.git pan/midgard: Implement predicate->unit This allows ALUs to select for each unit of the bundle separately. Signed-off-by: Alyssa Rosenzweig --- 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;