zink: check last_finished before timeline waiting

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11686>
This commit is contained in:
Mike Blumenkrantz 2021-05-26 08:19:35 -04:00 committed by Marge Bot
parent fd633c2444
commit 25ad69968b

View file

@ -1499,6 +1499,10 @@ bool
zink_screen_timeline_wait(struct zink_screen *screen, uint32_t batch_id, uint64_t timeout)
{
VkSemaphoreWaitInfo wi = {0};
if (zink_screen_check_last_finished(screen, batch_id))
return true;
wi.sType = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO;
wi.semaphoreCount = 1;
/* handle batch_id overflow */