Eliminate double lock of Vulkan queue mutex

This commit is contained in:
Dan Weatherford 2016-11-06 17:40:40 -06:00
parent 02a0d11326
commit c1db89b4dd
1 changed files with 2 additions and 8 deletions

View File

@ -396,14 +396,8 @@ void VulkanCommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
submit_info.signalSemaphoreCount = 1;
submit_info.pSignalSemaphores = &swap_sem;
if (queue_mutex_) {
std::lock_guard<std::mutex> lock(*queue_mutex_);
status = vkQueueSubmit(queue_, 1, &submit_info, current_batch_fence_);
CheckResult(status, "vkQueueSubmit");
} else {
status = vkQueueSubmit(queue_, 1, &submit_info, current_batch_fence_);
CheckResult(status, "vkQueueSubmit");
}
status = vkQueueSubmit(queue_, 1, &submit_info, current_batch_fence_);
CheckResult(status, "vkQueueSubmit");
if (device_->is_renderdoc_attached() && capturing_) {
device_->EndRenderDocFrameCapture();