From 31bf9f4593cb2eda5efdea31243b3953d8b843d2 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 21 Oct 2020 11:26:27 +0100 Subject: [PATCH] Don't mark commands as submitted if we didn't have a queue yet --- renderdoc/driver/vulkan/vk_core.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index c6a006383..e20fa6196 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -274,10 +274,13 @@ void WrappedVulkan::SubmitCmds(VkSemaphore *unwrappedWaitSemaphores, NULL, // signal semaphores }; - // we might have work to do (e.g. debug manager creation command buffer) but - // no queue, if the device is destroyed immediately. In this case we can just - // skip the submit - if(m_Queue != VK_NULL_HANDLE) + // we might have work to do (e.g. debug manager creation command buffer) but no queue, if the + // device is destroyed immediately. In this case we can just skip the submit. We don't mark these + // command buffers as submitted in case we're capturing an early frame - we can't lose these so we + // just defer them until later. + if(m_Queue == VK_NULL_HANDLE) + return; + { VkResult vkr = ObjDisp(m_Queue)->QueueSubmit(Unwrap(m_Queue), 1, &submitInfo, VK_NULL_HANDLE); RDCASSERTEQUAL(vkr, VK_SUCCESS);