diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-11-02 14:45:37 -0700 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-23 13:55:52 +0000 |
commit | 64c818d6a6586c8be9992018ffac5aedf390a8d7 (patch) | |
tree | 4ad15b76918098cbf1c910ff774e76f666a4fb0e /src/intel | |
parent | 1ba7f6ce38a6af237bec60a623ad716d5d35bce0 (diff) | |
download | external_mesa3d-64c818d6a6586c8be9992018ffac5aedf390a8d7.zip external_mesa3d-64c818d6a6586c8be9992018ffac5aedf390a8d7.tar.gz external_mesa3d-64c818d6a6586c8be9992018ffac5aedf390a8d7.tar.bz2 |
anv/wsi: Set the fence to signaled in AcquireNextImageKHR
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 73701be667ae408772bf20cb504b70d1775d4a4b)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_wsi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index 064581d..61d5db0 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( |