Function Prototype

vkCmdNextSubpass

Transition to the next subpass of a render pass
primary
inside
graphics
action / state / synchronization

To transition to the next subpass in the render pass instance after recording the commands for a subpass, call:

void vkCmdNextSubpass(
    VkCommandBuffer commandBuffer,
    VkSubpassContents contents);
  • commandBuffer is the command buffer in which to record the command.
  • contents specifies how the commands in the next subpass will be provided, in the same fashion as the corresponding parameter of vkCmdBeginRenderPass.

The subpass index for a render pass begins at zero when vkCmdBeginRenderPass is recorded, and increments each time vkCmdNextSubpass is recorded.

After transitioning to the next subpass, the application can record the commands for that subpass.

Valid Usage

VUID-vkCmdNextSubpass-None-00909

The current subpass index must be less than the number of subpasses in the render pass minus one

VUID-vkCmdNextSubpass-None-02349

This command must not be recorded when transform feedback is active

Valid Usage (Implicit)

VUID-vkCmdNextSubpass-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support graphics operations

VUID-vkCmdNextSubpass-renderpass

This command must only be called inside of a render pass instance

VUID-vkCmdNextSubpass-videocoding

This command must only be called outside of a video coding scope

VUID-vkCmdNextSubpass-bufferlevel

commandBuffer must be a primary VkCommandBuffer

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized ::