mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-18 02:30:28 +01:00
zink: add a second fence disambiguation case
this is the case where: * a batch A is submitted * a no-op flush occurs * the frontend gets the fence from already-flushed batch A * zink recycles batch A * the frontend waits on fence A fixes #10598 cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27623>
This commit is contained in:
parent
6a688e65a0
commit
fb2ae7736f
1 changed files with 6 additions and 1 deletions
|
|
@ -185,7 +185,12 @@ zink_fence_finish(struct zink_screen *screen, struct pipe_context *pctx, struct
|
|||
if (submit_diff > 1)
|
||||
return true;
|
||||
|
||||
if (fence->submitted && zink_screen_check_last_finished(screen, fence->batch_id))
|
||||
/* - if fence is submitted, batch_id is nonzero and can be checked
|
||||
* - if fence is not submitted here, it must be reset; batch_id will be 0 and submitted is false
|
||||
* in either case, the fence has finished
|
||||
*/
|
||||
if ((fence->submitted && zink_screen_check_last_finished(screen, fence->batch_id)) ||
|
||||
(!fence->submitted && submit_diff))
|
||||
return true;
|
||||
|
||||
return fence_wait(screen, fence, timeout_ns);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue