From 516dfb34e10ae178b9754ce7fe22b7e88193440f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 16 Nov 2017 10:44:41 -0800 Subject: vulkan/wsi: Add a helper for AcquireNextImage Unfortunately, due to the fact that AcquireNextImage does not take a queue, the ANV trick for triggering the fence won't work in general. We leave dealing with the fence up to the caller for now. Reviewed-by: Dave Airlie Reviewed-by: Chad Versace --- src/vulkan/wsi/wsi_common.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/vulkan/wsi/wsi_common.c') diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 69cb71dfdbc..50680a6fd75 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -539,6 +539,20 @@ wsi_common_get_images(VkSwapchainKHR _swapchain, return vk_outarray_status(&images); } +VkResult +wsi_common_acquire_next_image(const struct wsi_device *wsi, + VkDevice device, + VkSwapchainKHR _swapchain, + uint64_t timeout, + VkSemaphore semaphore, + uint32_t *pImageIndex) +{ + WSI_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain); + + return swapchain->acquire_next_image(swapchain, timeout, + semaphore, pImageIndex); +} + VkResult wsi_common_queue_present(const struct wsi_device *wsi, VkDevice device, -- cgit v1.2.3