diff --git a/.pick_status.json b/.pick_status.json index 8523b07a156..18de5953882 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2114,7 +2114,7 @@ "description": "zink: add a second fence disambiguation case", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_fence.c b/src/gallium/drivers/zink/zink_fence.c index 33ea9d7d90e..86bc56cf119 100644 --- a/src/gallium/drivers/zink/zink_fence.c +++ b/src/gallium/drivers/zink/zink_fence.c @@ -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);