Progressing to the next subpass
Commands that are recorded inside a render pass are divided into subpasses. When a set of commands from a given subpass is already recorded and we want to record commands for another subpass, we need to switch (or progress) to the next subpass.
How to do it...
- Take the handle of a command buffer that's being recorded and store it in a variable of type
VkCommandBuffer
namedcommand_buffer
. Make sure the operation of beginning a render pass was already recorded in thecommand_buffer
. - Specify how subpass commands are recorded: directly or through a secondary command buffer. Store the appropriate value in a variable of type
VkSubpassContents
namedsubpass_contents
(refer to the Beginning a render pass recipe). - Call
vkCmdNextSubpass( command_buffer, subpass_contents )
. For the call, provide thecommand_buffer
andsubpass_contents
variables.
How it works...
Progressing to the next subpass switches from the current to the next subpass in the same render pass. During this...