renderer_vulkan: add locks to avoid scheduler flushes from CPU

This commit is contained in:
Liam 2023-10-17 10:00:25 -04:00
parent 2244b613cf
commit d9dde7e6f3
4 changed files with 23 additions and 10 deletions

View file

@ -86,7 +86,10 @@ public:
uncommitted_operations.emplace_back(std::move(func));
}
pending_operations.emplace_back(std::move(uncommitted_operations));
QueueFence(new_fence);
{
std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex};
QueueFence(new_fence);
}
if (!delay_fence) {
func();
}