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 <alyssa.rosenzweig@collabora.com>
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;
}
}
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);