[Mesa-dev] [PATCH 2/3] anv/wsi: Set the fence to signaled in AcquireNextImageKHR
Jason Ekstrand
jason at jlekstrand.net
Thu Nov 3 00:15:51 UTC 2016
---
src/intel/vulkan/anv_wsi.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 064581d..72f79f1 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -323,13 +323,19 @@ 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. */
+ fence->ready = true;
+
+ return result;
}
VkResult anv_QueuePresentKHR(
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list