[Mesa-dev] [PATCH] radv: fix GetFenceStatus for signaled fences

Dave Airlie airlied at gmail.com
Wed Nov 9 01:22:39 UTC 2016


From: Dave Airlie <airlied at redhat.com>

if a fence is created pre-signaled we should return that
in GetFenceStatus even if it hasn't been submitted.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/amd/vulkan/radv_device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index fdb6db9..214af5f 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1202,6 +1202,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;
 
-- 
2.7.4



More information about the mesa-dev mailing list