Function Prototype

vkCmdEndRendering

End a dynamic render pass instance

To end a render pass instance, call:

void vkCmdEndRendering(
    VkCommandBuffer                   commandBuffer);
void vkCmdEndRenderingKHR(
    VkCommandBuffer                   commandBuffer);
  • commandBuffer is the command buffer in which to record the command.

If the value of pRenderingInfo→flags used to begin this render pass instance included VK_RENDERING_SUSPENDING_BIT, then this render pass is suspended and will be resumed later in submission order.

There is no implicit ordering between separate render passes, even in the same command buffer, and even when the attachments match. Some applications rely on the continuation of rasterization order between multiple render passes with attachments defined in the same way, in order to perform non-rendering operations (such as copies or compute operations) between draw calls, but this has never been required by the specification. There is also no explicit barrier currently in the API that provides the guarantee that applications rely on without additional performance penalties.New applications should avoid relying on this ordering until an appropriate barrier is added to the API.Implementations where applications are performing this splitting are encouraged to continue supporting this guarantee until a suitable barrier is added to the API.Existing applications relying on this ordering should expect that it will continue working on platforms where it currently does. Once a new extension adds support for a new barrier, developers are encouraged to adapt their applications to use this when available.

Valid Usage

VUID-vkCmdEndRendering-None-06161

The current render pass instance must have been begun with vkCmdBeginRendering

VUID-vkCmdEndRendering-commandBuffer-06162

The current render pass instance must have been begun in commandBuffer

VUID-vkCmdEndRendering-None-06781

This command must not be recorded when transform feedback is active

VUID-vkCmdEndRendering-None-06999

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

VUID-vkCmdEndRendering-None-10645

This command must not be recorded when per-tile execution model is enabled

Valid Usage (Implicit)

VUID-vkCmdEndRendering-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

VUID-vkCmdEndRendering-renderpass

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

VUID-vkCmdEndRendering-suspended

This command must not be called between suspended render pass instances

VUID-vkCmdEndRendering-videocoding

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

Host Synchronization

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