I was trying to continue the hash table loop, not the inner loop. This
tended to work out, because we would have *just* freed the job struct.
Fixes some valgrind failures in fbo-depthtex.
Fixes: f597ac396640 ("vc4: Implement job shuffling")
struct vc4_job *job = entry->data;
struct vc4_bo **referenced_bos = job->bo_pointers.base;
+ bool found = false;
for (int i = 0; i < cl_offset(&job->bo_handles) / 4; i++) {
if (referenced_bos[i] == rsc->bo) {
- vc4_job_submit(vc4, job);
- continue;
+ found = true;
+ break;
}
}
+ if (found) {
+ vc4_job_submit(vc4, job);
+ continue;
+ }
/* Also check for the Z/color buffers, since the references to
* those are only added immediately before submit.