summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-20 12:07:31 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-21 08:40:53 -0700
commitbe81711c0a5785d987f5b60e0e00b07dbaae184a (patch)
tree2e5e4fa389ad42c09ff32889a81d04f1cda299c0
parent3752f7671569dfb24818b84a3e16ba3dade683bd (diff)
panfrost: Fix scoreboarding with dependency on job #0
Subtle issue masked by how we emitted SET_VALUE jobs, but this case can and does occur, so let's fix it. Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r--src/gallium/drivers/panfrost/pan_scoreboard.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/panfrost/pan_scoreboard.c b/src/gallium/drivers/panfrost/pan_scoreboard.c
index 692f5425444..0873dd1fbe1 100644
--- a/src/gallium/drivers/panfrost/pan_scoreboard.c
+++ b/src/gallium/drivers/panfrost/pan_scoreboard.c
@@ -414,12 +414,12 @@ panfrost_scoreboard_link_batch(struct panfrost_job *batch)
if (dep_1) {
assert(!dependents[dep_1 - 1]);
- dependents[dep_1 - 1] = i;
+ dependents[dep_1 - 1] = i + 1;
}
if (dep_2) {
assert(!dependents[dep_2 - 1]);
- dependents[dep_2 - 1] = i;
+ dependents[dep_2 - 1] = i + 1;
}
}
@@ -461,9 +461,11 @@ panfrost_scoreboard_link_batch(struct panfrost_job *batch)
tail = n;
/* Grab the dependent, if there is one */
- unsigned node_m = dependents[node_n];
+ unsigned node_m_1 = dependents[node_n];
+
+ if (node_m_1) {
+ unsigned node_m = node_m_1 - 1;
- if (node_m) {
struct mali_job_descriptor_header *m =
DESCRIPTOR_FOR_NODE(node_m);