diff options
author | Jason Ekstrand <[email protected]> | 2017-08-03 14:18:19 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-08-28 18:35:25 -0700 |
commit | 738e5e3c1d261d4f262c2ae25ccca8cb67075d72 (patch) | |
tree | 2220167dc87e84a0976471ffa28a6f0c81abb43d /src | |
parent | f992bb205c174e0a8e6574258598f5268dd0e0cb (diff) |
anv/wsi: Use QueueSubmit to trigger the fence in AcquireNextImage
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_wsi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index 9369f26a8fa..00edb220b2b 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/intel/vulkan/anv_wsi.c @@ -364,22 +364,25 @@ VkResult anv_GetSwapchainImagesKHR( } VkResult anv_AcquireNextImageKHR( - VkDevice device, + VkDevice _device, VkSwapchainKHR _swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence _fence, uint32_t* pImageIndex) { + ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain); ANV_FROM_HANDLE(anv_fence, fence, _fence); VkResult result = swapchain->acquire_next_image(swapchain, timeout, semaphore, pImageIndex); - /* Thanks to implicit sync, the image is ready immediately. */ + /* Thanks to implicit sync, the image is ready immediately. However, we + * should wait for the current GPU state to finish. + */ if (fence) - fence->state = ANV_FENCE_STATE_SIGNALED; + anv_QueueSubmit(anv_queue_to_handle(&device->queue), 0, NULL, _fence); return result; } |