vkCmdBeginRendering
To begin a render pass instance, call:
void vkCmdBeginRenderingKHR(
VkCommandBuffer commandBuffer,
const VkRenderingInfo* pRenderingInfo);
commandBuffer
is the command buffer in which to record the command.pRenderingInfo
is a pointer to a VkRenderingInfo structure specifying details of the render pass instance to begin.
After beginning a render pass instance, the command buffer is ready to record draw commands.
If pRenderingInfo→flags
includes VK_RENDERING_RESUMING_BIT
then
this render pass is resumed from a render pass instance that has been
suspended earlier in submission order.
Valid Usage
VUID-vkCmdBeginRendering-dynamicRendering-06446
The dynamicRendering
feature must
be enabled
VUID-vkCmdBeginRendering-commandBuffer-06068
If commandBuffer
is a secondary command buffer,
and the nestedCommandBuffer
feature is not enabled,
pRenderingInfo→flags
must not include
VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT
VUID-vkCmdBeginRendering-pRenderingInfo-09588
If pRenderingInfo→pDepthAttachment
is not NULL
and
pRenderingInfo→pDepthAttachment→imageView
is not
VK_NULL_HANDLE, pRenderingInfo→pDepthAttachment→imageView
must be in the layout specified by
pRenderingInfo→pDepthAttachment→imageLayout
VUID-vkCmdBeginRendering-pRenderingInfo-09589
If pRenderingInfo→pDepthAttachment
is not NULL
,
pRenderingInfo→pDepthAttachment→imageView
is not
VK_NULL_HANDLE,
pRenderingInfo→pDepthAttachment→imageResolveMode
is not
VK_RESOLVE_MODE_NONE
, and
pRenderingInfo→pDepthAttachment→resolveImageView
is not
VK_NULL_HANDLE,
pRenderingInfo→pDepthAttachment→resolveImageView
must be in the
layout specified by
pRenderingInfo→pDepthAttachment→resolveImageLayout
VUID-vkCmdBeginRendering-pRenderingInfo-09590
If pRenderingInfo→pStencilAttachment
is not NULL
and
pRenderingInfo→pStencilAttachment→imageView
is not
VK_NULL_HANDLE,
pRenderingInfo→pStencilAttachment→imageView
must be in the
layout specified by
pRenderingInfo→pStencilAttachment→imageLayout
VUID-vkCmdBeginRendering-pRenderingInfo-09591
If pRenderingInfo→pStencilAttachment
is not NULL
,
pRenderingInfo→pStencilAttachment→imageView
is not
VK_NULL_HANDLE,
pRenderingInfo→pStencilAttachment→imageResolveMode
is not
VK_RESOLVE_MODE_NONE
, and
pRenderingInfo→pStencilAttachment→resolveImageView
is not
VK_NULL_HANDLE,
pRenderingInfo→pStencilAttachment→resolveImageView
must be in
the layout specified by
pRenderingInfo→pStencilAttachment→resolveImageLayout
VUID-vkCmdBeginRendering-pRenderingInfo-09592
For any element of pRenderingInfo→pColorAttachments
, if
imageView
is not VK_NULL_HANDLE, that image view must be in
the layout specified by imageLayout
VUID-vkCmdBeginRendering-pRenderingInfo-09593
For any element of pRenderingInfo→pColorAttachments
, if
either imageResolveMode
is
VK_RESOLVE_MODE_EXTERNAL_FORMAT_DOWNSAMPLE_ANDROID
, or
imageView
is not VK_NULL_HANDLE and resolveMode
is not
VK_RESOLVE_MODE_NONE
, and resolveImageView
is not
VK_NULL_HANDLE, resolveImageView
must be in the layout
specified by resolveImageLayout
Valid Usage (Implicit)
VUID-vkCmdBeginRendering-commandBuffer-parameter
commandBuffer
must be a valid VkCommandBuffer handle
VUID-vkCmdBeginRendering-pRenderingInfo-parameter
pRenderingInfo
must be a valid pointer to a valid VkRenderingInfo structure
VUID-vkCmdBeginRendering-commandBuffer-recording
commandBuffer
must be in the recording state
VUID-vkCmdBeginRendering-commandBuffer-cmdpool
The VkCommandPool
that commandBuffer
was allocated from must support graphics operations
VUID-vkCmdBeginRendering-renderpass
This command must only be called outside of a render pass instance
VUID-vkCmdBeginRendering-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
thatcommandBuffer
was allocated from must be externally synchronized ::