diff --git a/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp index b39534224..25886d5c3 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp @@ -1484,9 +1484,31 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(SerialiserType &ser, VkQueue queue, ReplayQueueSubmit(queue, submitInfo, basename); } - // account for the outer loop thinking we've added one event and incrementing, - // since we've done all the handling ourselves this will be off by one. - m_RootEventID--; + if(submitCount == 0) + { + AddEvent(); + + // we're adding multiple events, need to increment ourselves + m_RootEventID++; + + ObjDisp(queue)->QueueSubmit(Unwrap(queue), 0, NULL, VK_NULL_HANDLE); + + ActionDescription action; + action.customName = "=> vkQueueSubmit(): No Submit"; + action.flags |= ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary; + AddEvent(); + + m_RootEvents.back().chunkIndex = APIEvent::NoChunk; + m_Events.back().chunkIndex = APIEvent::NoChunk; + + AddAction(action); + } + else + { + // account for the outer loop thinking we've added one event and incrementing, + // since we've done all the handling ourselves this will be off by one. + m_RootEventID--; + } } return true; @@ -1655,9 +1677,31 @@ bool WrappedVulkan::Serialise_vkQueueSubmit2(SerialiserType &ser, VkQueue queue, ReplayQueueSubmit(queue, pSubmits[sub], basename); } - // account for the outer loop thinking we've added one event and incrementing, - // since we've done all the handling ourselves this will be off by one. - m_RootEventID--; + if(submitCount == 0) + { + AddEvent(); + + // we're adding multiple events, need to increment ourselves + m_RootEventID++; + + ObjDisp(queue)->QueueSubmit2(Unwrap(queue), 0, NULL, VK_NULL_HANDLE); + + ActionDescription action; + action.customName = "=> vkQueueSubmit2(): No Submit"; + action.flags |= ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary; + AddEvent(); + + m_RootEvents.back().chunkIndex = APIEvent::NoChunk; + m_Events.back().chunkIndex = APIEvent::NoChunk; + + AddAction(action); + } + else + { + // account for the outer loop thinking we've added one event and incrementing, + // since we've done all the handling ourselves this will be off by one. + m_RootEventID--; + } } return true;