radv: fix GetFenceStatus for signaled fences
authorDave Airlie <airlied@redhat.com>
Wed, 9 Nov 2016 01:21:30 +0000 (01:21 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 9 Nov 2016 19:49:26 +0000 (19:49 +0000)
if a fence is created pre-signaled we should return that
in GetFenceStatus even if it hasn't been submitted.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_device.c

index 376a8c2cd615108a2ebbd39ac7756e245be0cde2..9f05ae4dee2aa12f500e88d91e606f064488336a 100644 (file)
@@ -1186,6 +1186,8 @@ VkResult radv_GetFenceStatus(VkDevice _device, VkFence _fence)
        RADV_FROM_HANDLE(radv_device, device, _device);
        RADV_FROM_HANDLE(radv_fence, fence, _fence);
 
+       if (fence->signalled)
+               return VK_SUCCESS;
        if (!fence->submitted)
                return VK_NOT_READY;