summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_wsi.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-11-16 10:44:41 -0800
committerJason Ekstrand <[email protected]>2017-12-04 10:04:19 -0800
commit516dfb34e10ae178b9754ce7fe22b7e88193440f (patch)
tree141cbefa2cf7a2741503324028567602ce46bd11 /src/amd/vulkan/radv_wsi.c
parent8ff49951c30bf47f29d8ed7c9ea7ab655417391b (diff)
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 <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_wsi.c')
-rw-r--r--src/amd/vulkan/radv_wsi.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c
index d00e0281689..d864a9f613f 100644
--- a/src/amd/vulkan/radv_wsi.c
+++ b/src/amd/vulkan/radv_wsi.c
@@ -206,18 +206,23 @@ VkResult radv_GetSwapchainImagesKHR(
}
VkResult radv_AcquireNextImageKHR(
- VkDevice device,
- VkSwapchainKHR _swapchain,
+ VkDevice _device,
+ VkSwapchainKHR swapchain,
uint64_t timeout,
VkSemaphore semaphore,
VkFence _fence,
uint32_t* pImageIndex)
{
- RADV_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain);
+ RADV_FROM_HANDLE(radv_device, device, _device);
+ struct radv_physical_device *pdevice = device->physical_device;
RADV_FROM_HANDLE(radv_fence, fence, _fence);
- VkResult result = swapchain->acquire_next_image(swapchain, timeout, semaphore,
- pImageIndex);
+ VkResult result = wsi_common_acquire_next_image(&pdevice->wsi_device,
+ _device,
+ swapchain,
+ timeout,
+ semaphore,
+ pImageIndex);
if (fence && (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR)) {
fence->submitted = true;