diff options
| author | Michael Lentine <mlentine@google.com> | 2016-05-24 09:49:25 -0500 |
|---|---|---|
| committer | Michael Lentine <mlentine@google.com> | 2016-05-24 10:28:10 -0500 |
| commit | 67af5a545ff2e1f01686c540c0d9fd0829074c9d (patch) | |
| tree | 7d4db892409f7f60180c155df322b88a956997d0 /layers/core_validation.cpp | |
| parent | d76bc8d4251b296a865d83d894e06afe4f3ef44f (diff) | |
| download | usermoji-67af5a545ff2e1f01686c540c0d9fd0829074c9d.tar.xz | |
Clear priorFences on reset.
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index e8c4cc38..baa8e233 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -4218,6 +4218,12 @@ static bool decrementResources(layer_data *my_data, uint32_t fenceCount, const V queue_pair->second.lastFences.erase(last_fence_data); } } + for (auto& fence_data : my_data->fenceMap) { + auto prior_fence_data = + std::find(fence_data.second.priorFences.begin(), fence_data.second.priorFences.end(), fence_pair.first); + if (prior_fence_data != fence_data.second.priorFences.end()) + fence_data.second.priorFences.erase(prior_fence_data); + } } return skip_call; } @@ -5371,6 +5377,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, if (fence_item != dev_data->fenceMap.end()) { fence_item->second.needsSignaled = true; fence_item->second.queues.clear(); + fence_item->second.priorFences.clear(); if (fence_item->second.in_use.load()) { skipCall |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT, |
