C Specification

To begin a render pass instance, call:

// Provided by VK_KHR_dynamic_rendering
void vkCmdBeginRenderingKHR(
    VkCommandBuffer                             commandBuffer,
    const VkRenderingInfoKHR*                   pRenderingInfo);

Parameters

  • commandBuffer is the command buffer in which to record the command.

  • pRenderingInfo is a pointer to a VkRenderingInfoKHR structure specifying details of the render pass instance to begin.

Description

After beginning a render pass instance, the command buffer is ready to record draw commands.

If pRenderingInfo->flags includes VK_RENDERING_RESUMING_BIT_KHR then this render pass is resumed from a render pass instance that has been suspended earlier in submission order.

Valid Usage
  • VUID-vkCmdBeginRenderingKHR-dynamicRendering-06446
    The dynamicRendering feature must be enabled

  • VUID-vkCmdBeginRenderingKHR-commandBuffer-06068
    If commandBuffer is a secondary command buffer, pRenderingInfo->flags must not include VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR

Valid Usage (Implicit)
  • VUID-vkCmdBeginRenderingKHR-commandBuffer-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdBeginRenderingKHR-pRenderingInfo-parameter
    pRenderingInfo must be a valid pointer to a valid VkRenderingInfoKHR structure

  • VUID-vkCmdBeginRenderingKHR-commandBuffer-recording
    commandBuffer must be in the recording state

  • VUID-vkCmdBeginRenderingKHR-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support graphics operations

  • VUID-vkCmdBeginRenderingKHR-renderpass
    This command must only be called outside of a render pass instance

Host Synchronization
  • Host access to commandBuffer must be externally synchronized

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

Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types

Primary
Secondary

Outside

Graphics

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0