[Vulkan] Fix primary queue mutex locking in texture_cache.cc

This commit is contained in:
Triang3l 2021-03-04 18:14:07 +03:00 committed by GitHub
parent 87442b106c
commit 5ae6c7eaf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -961,7 +961,7 @@ void TextureCache::FlushPendingCommands(VkCommandBuffer command_buffer,
vkQueueSubmit(device_queue_, 1, &submit_info, completion_fence);
CheckResult(status, "vkQueueSubmit");
} else {
std::lock_guard<std::mutex>(device_->primary_queue_mutex());
std::lock_guard<std::mutex> lock(device_->primary_queue_mutex());
auto status = vkQueueSubmit(device_->primary_queue(), 1, &submit_info,
completion_fence);
@ -1344,7 +1344,7 @@ void TextureCache::WritebackTexture(Texture* texture) {
// Submit the command buffer.
// Submit commands and wait.
{
std::lock_guard<std::mutex>(device_->primary_queue_mutex());
std::lock_guard<std::mutex> lock(device_->primary_queue_mutex());
VkSubmitInfo submit_info = {
VK_STRUCTURE_TYPE_SUBMIT_INFO,
nullptr,