@@ -179,6 +179,7 @@ VkResult VulkanExampleBase::createInstance()
179179 return result;
180180}
181181
182+ // @todo: Only used by few examples, can be removed when new sync is fully in place
182183void VulkanExampleBase::renderFrame ()
183184{
184185 VulkanExampleBase::prepareFrame ();
@@ -800,17 +801,19 @@ void VulkanExampleBase::prepareFrame()
800801 }
801802}
802803
803- void VulkanExampleBase::submitFrame ()
804+ void VulkanExampleBase::submitFrame (bool skipQueueSubmit )
804805{
805806 if (useNewSync) {
806- submitInfo.commandBufferCount = 1 ;
807807 // @todo: make this an argument
808- submitInfo.pCommandBuffers = &drawCmdBuffers[currentBuffer];
809- submitInfo.pWaitSemaphores = &presentCompleteSemaphores[currentBuffer];
810- submitInfo.waitSemaphoreCount = 1 ;
811- submitInfo.pSignalSemaphores = &renderCompleteSemaphores[currentImageIndex];
812- submitInfo.signalSemaphoreCount = 1 ;
813- VK_CHECK_RESULT (vkQueueSubmit (queue, 1 , &submitInfo, waitFences[currentBuffer]));
808+ if (!skipQueueSubmit) {
809+ submitInfo.commandBufferCount = 1 ;
810+ submitInfo.pCommandBuffers = &drawCmdBuffers[currentBuffer];
811+ submitInfo.pWaitSemaphores = &presentCompleteSemaphores[currentBuffer];
812+ submitInfo.waitSemaphoreCount = 1 ;
813+ submitInfo.pSignalSemaphores = &renderCompleteSemaphores[currentImageIndex];
814+ submitInfo.signalSemaphoreCount = 1 ;
815+ VK_CHECK_RESULT (vkQueueSubmit (queue, 1 , &submitInfo, waitFences[currentBuffer]));
816+ }
814817
815818 VkPresentInfoKHR presentInfo{ VK_STRUCTURE_TYPE_PRESENT_INFO_KHR };
816819 presentInfo.waitSemaphoreCount = 1 ;
@@ -1208,6 +1211,7 @@ bool VulkanExampleBase::initVulkan()
12081211 // Set up submit info structure
12091212 // Semaphores will stay the same during application lifetime
12101213 // Command buffer submission info is set by each example
1214+ // @todo: Rework when new sync is fully in place, feels odd building/setting this up in multiple places
12111215 submitInfo = vks::initializers::submitInfo ();
12121216 submitInfo.pWaitDstStageMask = &submitPipelineStages;
12131217 submitInfo.waitSemaphoreCount = 1 ;
0 commit comments