radv: Skip already signalled fences.

If the user created a fence with VK_FENCE_CREATE_SIGNALED_BIT set, we
shouldn't fail to wait for a fence if it was not submitted since that is
not necessary.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Gustaw Smolarczyk 2016-10-06 01:09:54 +02:00 committed by Dave Airlie
parent f4e499ec79
commit 24815bd7b3

View file

@ -1119,12 +1119,12 @@ VkResult radv_WaitForFences(
RADV_FROM_HANDLE(radv_fence, fence, pFences[i]);
bool expired = false;
if (!fence->submitted)
return VK_TIMEOUT;
if (fence->signalled)
continue;
if (!fence->submitted)
return VK_TIMEOUT;
expired = device->ws->fence_wait(device->ws, fence->fence, true, timeout);
if (!expired)
return VK_TIMEOUT;