aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-09-21 13:36:19 +1200
committerChris Forbes <chrisforbes@google.com>2016-09-22 11:47:21 +1200
commitc5326ca8d03d2d1f62202917a2ef4c575d449b80 (patch)
treea61255b7734e4a905eea56be637f785dddb631dc /layers/core_validation.cpp
parentd88cf6a4b4e7af75cbce644d6ebdba62a20f5803 (diff)
downloadusermoji-c5326ca8d03d2d1f62202917a2ef4c575d449b80.tar.xz
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 <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp11
1 files changed, 8 insertions, 3 deletions
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)