summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-11-02 14:45:37 -0700
committerJason Ekstrand <[email protected]>2016-11-09 18:17:21 -0800
commit73701be667ae408772bf20cb504b70d1775d4a4b (patch)
treeea966da362b0f5696cb96a2f0852bbad5f5e3316 /src/intel
parent71397042fea36a2a14b530b75829ad13f969fd00 (diff)
anv/wsi: Set the fence to signaled in AcquireNextImageKHR
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]> Cc: "13.0" <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_wsi.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 064581d5d38..61d5db07979 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -323,13 +323,20 @@ VkResult anv_AcquireNextImageKHR(
VkSwapchainKHR _swapchain,
uint64_t timeout,
VkSemaphore semaphore,
- VkFence fence,
+ VkFence _fence,
uint32_t* pImageIndex)
{
ANV_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain);
+ ANV_FROM_HANDLE(anv_fence, fence, _fence);
- return swapchain->acquire_next_image(swapchain, timeout, semaphore,
- pImageIndex);
+ VkResult result = swapchain->acquire_next_image(swapchain, timeout,
+ semaphore, pImageIndex);
+
+ /* Thanks to implicit sync, the image is ready immediately. */
+ if (fence)
+ fence->ready = true;
+
+ return result;
}
VkResult anv_QueuePresentKHR(