We know how to prepare work and submit it to queues. We also know how to create semaphores. In this sample recipe, we will see how to use semaphores to synchronize two command buffers. More specifically, we will learn how to postpone the processing of a command buffer until the processing of another command buffer is finished.
Synchronizing two command buffers
Getting ready
In this recipe we will use the WaitSemaphoreInfo structure introduced in the Submitting command buffers to a queue recipe. For reference, here is its definition:
struct WaitSemaphoreInfo { VkSemaphore Semaphore; VkPipelineStageFlags WaitingStage; };