Ending a render pass
When all commands from all subpasses are already recorded, we need to end (stop or finish) a render pass.
How to do it...
- Take the handle of a command buffer and store it in a variable of type
VkCommandBuffer
namedcommand_buffer
. Make sure the command buffer is in a recording state and that the operation of beginning a render pass was already recorded in it. - Call
vkCmdEndRenderPass( command_buffer )
for which provide thecommand_buffer
variable.
How it works...
To end a render pass, we need to call a single function:
vkCmdEndRenderPass( command_buffer );
Recording this function in a command buffer performs multiple operations. Execution and memory dependencies are introduced (like the ones in memory barriers) and image layout transitions are performed--images are transitioned from layouts specified for the last subpass to the value of a final layout (refer to the Specifying attachment descriptions recipe). Also multisample resolving is performed on color attachments for which...