summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-11-09 01:21:30 +0000
committerDave Airlie <airlied@redhat.com>2016-11-09 19:49:26 +0000
commitfb50245ac1e1eb60b2451d9d6dd05388cb89634a (patch)
tree33a1dc862ea0410634d78ceaea8e5fbeaff5a6ef
parent3c9af7578fcd62fc55e0443733f56b2aaa50ba9c (diff)
radv: fix GetFenceStatus for signaled fences
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>
-rw-r--r--src/amd/vulkan/radv_device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 376a8c2cd61..9f05ae4dee2 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -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;