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> (cherry picked from commit fb2ae7736f90be7bc3cce3611cff461a5d14693d)
This commit is contained in:
parent
cd582fa016
commit
0738409dc7
2 changed files with 7 additions and 2 deletions
|
|
@ -2114,7 +2114,7 @@
|
||||||
"description": "zink: add a second fence disambiguation case",
|
"description": "zink: add a second fence disambiguation case",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,12 @@ zink_fence_finish(struct zink_screen *screen, struct pipe_context *pctx, struct
|
||||||
if (submit_diff > 1)
|
if (submit_diff > 1)
|
||||||
return true;
|
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 true;
|
||||||
|
|
||||||
return fence_wait(screen, fence, timeout_ns);
|
return fence_wait(screen, fence, timeout_ns);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue