When a GPU hang occurs, the syncobj will eventually timeout,
if this is a wait, just set ready, so things will continue.
This matches 965 behaviour better.
Fixes:
c282a082bef0 ("crocus/query: poll the syncobj in the no wait situation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13188>
}
assert(READ_ONCE(q->map->snapshots_landed));
#else
- if (crocus_wait_syncobj(ctx->screen, q->syncobj, wait ? INT64_MAX : 0))
+ if (crocus_wait_syncobj(ctx->screen, q->syncobj, wait ? INT64_MAX : 0)) {
+ /* if we've waited and timedout, just set the query to ready to avoid infinite loop */
+ if (wait)
+ q->ready = true;
return false;
+ }
#endif
calculate_result_on_cpu(devinfo, q);
}