Populating submission information for presentation
Submitting a command buffer requires an instance of the VkSubmitInfo
structure, which allows specifying semaphores for waiting (to start processing) and signaling (once the command buffer finishes executing). Those semaphores are optional and usually not needed. But when submitting a command buffer for presenting images onto the screen, those semaphores allow Vulkan to synchronize the execution of the buffer with the presentation engine.
In this recipe, you will learn how to submit a command buffer for processing by the GPU after it has been recorded.
Getting ready
The VulkanCore::Swapchain
class in the repository provides a utility function to fill the VkSubmitInfo
structure for you since the semaphores used to synchronize the execution with the presentation engine are stored in the swapchain. If no semaphores are needed in the structure, the waitForImageAvailable
and the signalImagePresented
parameters should be set to false...