From c5326ca8d03d2d1f62202917a2ef4c575d449b80 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 21 Sep 2016 13:36:19 +1200 Subject: layers: Fix tracking of WSI fence retirement Previously we'd note that the fence wasn't submitted to a queue, and so never call RetireWorkOnQueue, which is the only thing that marked the fence as retired. In the WSI fence case, we still aren't doing any tracking of completion of the WSI operation (we should! image ownership is easily fouled up!) but we can at least retire the fence. Fixes #954. Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 6fe036c8..bd399bbe 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5215,8 +5215,13 @@ static bool RetireFence(layer_data *dev_data, VkFence fence) { getQueueNode(dev_data, pFence->signaler.first), pFence->signaler.second); } - - return false; + else { + /* Fence signaller is the WSI. We're not tracking what the WSI op + * actually /was/ in CV yet, but we need to mark the fence as retired. + */ + pFence->state = FENCE_RETIRED; + return false; + } } VKAPI_ATTR VkResult VKAPI_CALL @@ -5265,7 +5270,7 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus(VkDevice device, VkFence fence) { VkResult result = dev_data->device_dispatch_table->GetFenceStatus(device, fence); lock.lock(); if (result == VK_SUCCESS) { - skip_call |= RetireFence(fence); + skip_call |= RetireFence(dev_data, fence); } lock.unlock(); if (skip_call) -- cgit v1.2.3