summaryrefslogtreecommitdiff
path: root/src/amd/vulkan/radv_wsi.c
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2016-10-25 20:31:41 +0200
committerDave Airlie <airlied@redhat.com>2016-10-26 12:25:35 +1000
commit0a153f4ee472f8f17575bbfe05f1c96fb5ecf1ea (patch)
treead97fd431fb7e0a785d328392cf81cbac4fe36c4 /src/amd/vulkan/radv_wsi.c
parentf2770fb3d5e7a4a456f8f14726f72a1e37496419 (diff)
radv: mark the fence as submitted and signalled in vkAcquireNextImageKHR
This stops the debug layers from complaining when fences are used to throttle image acquisition. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/amd/vulkan/radv_wsi.c')
-rw-r--r--src/amd/vulkan/radv_wsi.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c
index 948be63c2c..a946bd4a8c 100644
--- a/src/amd/vulkan/radv_wsi.c
+++ b/src/amd/vulkan/radv_wsi.c
@@ -318,13 +318,21 @@ VkResult radv_AcquireNextImageKHR(
VkSwapchainKHR _swapchain,
uint64_t timeout,
VkSemaphore semaphore,
- VkFence fence,
+ VkFence _fence,
uint32_t* pImageIndex)
{
RADV_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain);
+ RADV_FROM_HANDLE(radv_fence, fence, _fence);
- return swapchain->acquire_next_image(swapchain, timeout, semaphore,
- pImageIndex);
+ VkResult result = swapchain->acquire_next_image(swapchain, timeout, semaphore,
+ pImageIndex);
+
+ if (fence && result == VK_SUCCESS) {
+ fence->submitted = true;
+ fence->signalled = true;
+ }
+
+ return result;
}
VkResult radv_QueuePresentKHR(