aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-09-27 15:43:18 -0400
committerAlyssa Rosenzweig <[email protected]>2019-09-30 08:40:13 -0400
commit5a9a48b81a2521cef24e016229e3fbbcc00322eb (patch)
tree183d40717695cb93f3cc99838fe3b30a6aba9830 /src/panfrost
parent6284f3ec257159aecb9493a71e9d311af3b28b0f (diff)
pan/midgard: Add predicate->exclude
A bit of a kludge but allows setting an implicit dependency of synthetic conditional moves on the actual condition, fixing code generated like: vmul.feq r0, .. sadd.imov r31, .., r0 vadd.fcsel [...] The imov runs simultaneous with feq so it gets garbage results, but it's too late to add an actual dependency practically speaking, since the new synthetic imov doesn't have a node associated. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/midgard/midgard_schedule.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index 86a77149c78..4c72844679c 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -827,6 +827,9 @@ struct midgard_predicate {
uint8_t *constants;
unsigned constant_count;
bool blend_constant;
+
+ /* Exclude this destination (if not ~0) */
+ unsigned exclude;
};
/* For an instruction that can fit, adjust it to fit and update the constants
@@ -893,6 +896,9 @@ mir_choose_instruction(
if (tag != ~0 && instructions[i]->type != tag)
continue;
+ if (predicate->exclude != ~0 && instructions[i]->dest == predicate->exclude)
+ continue;
+
/* Simulate in-order scheduling */
if ((signed) i < best_index)
continue;
@@ -930,7 +936,8 @@ mir_choose_bundle(
struct midgard_predicate predicate = {
.tag = ~0,
- .destructive = false
+ .destructive = false,
+ .exclude = ~0
};
midgard_instruction *chosen = mir_choose_instruction(instructions, worklist, count, &predicate);
@@ -950,7 +957,8 @@ mir_schedule_texture(
{
struct midgard_predicate predicate = {
.tag = TAG_TEXTURE_4,
- .destructive = true
+ .destructive = true,
+ .exclude = ~0
};
midgard_instruction *ins =
@@ -974,7 +982,8 @@ mir_schedule_ldst(
{
struct midgard_predicate predicate = {
.tag = TAG_LOAD_STORE_4,
- .destructive = true
+ .destructive = true,
+ .exclude = ~0
};
midgard_instruction *ins =
@@ -1003,7 +1012,8 @@ mir_schedule_alu(
struct midgard_predicate predicate = {
.tag = TAG_ALU_4,
- .destructive = true
+ .destructive = true,
+ .exclude = ~0
};
midgard_instruction *ins =