Function Prototype

vkCmdEndRenderPass2

End the current render pass

To record a command to end a render pass instance after recording the commands for the last subpass, call:

void vkCmdEndRenderPass2KHR(
    VkCommandBuffer commandBuffer,
    const VkSubpassEndInfo*        pSubpassEndInfo);
  • commandBuffer is the command buffer in which to end the current render pass instance.
  • pSubpassEndInfo is a pointer to a VkSubpassEndInfo structure containing information about how the last subpass will be ended.

vkCmdEndRenderPass2 is semantically identical to vkCmdEndRenderPass, except that it is extensible.

Valid Usage

VUID-vkCmdEndRenderPass2-None-03103

The current subpass index must be equal to the number of subpasses in the render pass minus one

VUID-vkCmdEndRenderPass2-None-02352

This command must not be recorded when transform feedback is active

VUID-vkCmdEndRenderPass2-None-06171

The current render pass instance must not have been begun with vkCmdBeginRendering

VUID-vkCmdEndRenderPass2-None-07005

If vkCmdBeginQuery* was called within a subpass of the render pass, the corresponding vkCmdEndQuery* must have been called subsequently within the same subpass

Valid Usage (Implicit)

VUID-vkCmdEndRenderPass2-pSubpassEndInfo-parameter

pSubpassEndInfo must be a valid pointer to a valid VkSubpassEndInfo structure

VUID-vkCmdEndRenderPass2-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support graphics operations

VUID-vkCmdEndRenderPass2-renderpass

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

VUID-vkCmdEndRenderPass2-videocoding

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

VUID-vkCmdEndRenderPass2-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 ::