[Vulkan] Workaround for rapid fence reuse causing a memory leak

This commit is contained in:
DrChat 2018-05-18 09:59:26 -05:00
parent 5e19cc6945
commit f591f2dace
1 changed files with 1 additions and 1 deletions

View File

@ -539,9 +539,9 @@ void VulkanCommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
}
}
vkWaitForFences(*device_, 1, &current_batch_fence_, VK_TRUE, -1);
if (cache_clear_requested_) {
cache_clear_requested_ = false;
vkWaitForFences(*device_, 1, &current_batch_fence_, VK_TRUE, -1);
buffer_cache_->ClearCache();
pipeline_cache_->ClearCache();