[Mesa-dev] [PATCH 2/3] anv/wsi: Set the fence to signaled in AcquireNextImageKHR
Chad Versace
chadversary at chromium.org
Thu Nov 3 17:43:30 UTC 2016
On Wed 02 Nov 2016, Jason Ekstrand wrote:
> ---
> 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;
> }
Looks good (at least until explicit sync arrives).
Reviewed-by: Chad Versace <chadversary at chromium.org>
By the way, I believe the semaphore needs similar treatment. I failed to
find on master where it gets signaled.
More information about the mesa-dev
mailing list