diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-09-28 09:48:43 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-09-30 08:40:13 -0400 |
commit | 57bac68fffe4d7dcb5cf573ca9ad4cd262d3a5e1 (patch) | |
tree | 80d483a6eb0f552a7cae041a2454dec87a2c49d8 /src/panfrost | |
parent | e9edae3ecb1030f4b9a9e58f7962c5ab4abaf440 (diff) |
pan/midgard: Extend choose_instruction for scalar units
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/midgard_schedule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 64359729cc0..dfc02f1c337 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -393,6 +393,7 @@ mir_choose_instruction( bool alu = tag == TAG_ALU_4; unsigned unit = predicate->unit; bool branch = alu && (unit == ALU_ENAB_BR_COMPACT); + bool scalar = (unit != ~0) && (unit & UNITS_SCALAR); /* Iterate to find the best instruction satisfying the predicate */ unsigned i; @@ -427,6 +428,9 @@ mir_choose_instruction( if (branch && !instructions[i]->compact_branch) continue; + if (alu && scalar && !mir_is_scalar(instructions[i])) + continue; + if (alu && !mir_adjust_constants(instructions[i], predicate, false)) continue; |