diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-09-27 08:19:51 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-09-30 08:40:13 -0400 |
commit | 6f92288e85a38ae88e6c73a298891cdde667c8b8 (patch) | |
tree | 4f1a90bc58e55cb02efc53dcea96171605200d4f /src/panfrost/midgard/midgard_schedule.c | |
parent | 5a9a48b81a2521cef24e016229e3fbbcc00322eb (diff) |
pan/midgard: Implement predicate->unit
This allows ALUs to select for each unit of the bundle separately.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_schedule.c')
-rw-r--r-- | src/panfrost/midgard/midgard_schedule.c | 9 |
1 files changed, 9 insertions, 0 deletions
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; |