Structures

VkCommandBufferInheritanceRenderingInfo

Structure specifying command buffer inheritance info for dynamic render pass instances

The VkCommandBufferInheritanceRenderingInfo structure is defined as:

typedef struct VkCommandBufferInheritanceRenderingInfo {
    VkStructureType sType;
    const void* pNext;
    VkRenderingFlags flags;
    uint32_t viewMask;
    uint32_t colorAttachmentCount;
    const VkFormat* pColorAttachmentFormats;
    VkFormat depthAttachmentFormat;
    VkFormat stencilAttachmentFormat;
    VkSampleCountFlagBits rasterizationSamples;
} VkCommandBufferInheritanceRenderingInfo;

or the equivalent

typedef VkCommandBufferInheritanceRenderingInfo VkCommandBufferInheritanceRenderingInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure
  • flags is a bitmask of VkRenderingFlagBits used by the render pass instance.
  • viewMask is the view mask used for rendering.
  • colorAttachmentCount is the number of color attachments specified in the render pass instance.
  • pColorAttachmentFormats is a pointer to an array of VkFormat values defining the format of color attachments.
  • depthAttachmentFormat is a VkFormat value defining the format of the depth attachment.
  • stencilAttachmentFormat is a VkFormat value defining the format of the stencil attachment.
  • rasterizationSamples is a VkSampleCountFlagBits specifying the number of samples used in rasterization.

If the pNext chain of VkCommandBufferInheritanceInfo includes a VkCommandBufferInheritanceRenderingInfo structure, then that structure controls parameters of dynamic render pass instances that the VkCommandBuffer can be executed within. If VkCommandBufferInheritanceInfo::renderPass is not VK_NULL_HANDLE, or VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not specified in VkCommandBufferBeginInfo::flags, parameters of this structure are ignored.

If colorAttachmentCount is 0 and the variableMultisampleRate feature is enabled, rasterizationSamples is ignored.

If depthAttachmentFormat, stencilAttachmentFormat, or any element of pColorAttachmentFormats is VK_FORMAT_UNDEFINED, it indicates that the corresponding attachment is unused within the render pass and writes to those attachments are discarded.

Valid Usage

VUID-VkCommandBufferInheritanceRenderingInfo-colorAttachmentCount-06004

If colorAttachmentCount is not 0, rasterizationSamplesmust be a valid VkSampleCountFlagBits value

VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-06540

If depthAttachmentFormat is not VK_FORMAT_UNDEFINED, it must be a format that includes a depth component

VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-06007

If depthAttachmentFormat is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

VUID-VkCommandBufferInheritanceRenderingInfo-pColorAttachmentFormats-06492

If any element of pColorAttachmentFormats is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT , or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV if the linearColorAttachment feature is enabled

VUID-VkCommandBufferInheritanceRenderingInfo-stencilAttachmentFormat-06541

If stencilAttachmentFormat is not VK_FORMAT_UNDEFINED, it must be a format that includes a stencil aspect

VUID-VkCommandBufferInheritanceRenderingInfo-stencilAttachmentFormat-06199

If stencilAttachmentFormat is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT

VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-06200

If depthAttachmentFormat is not VK_FORMAT_UNDEFINED and stencilAttachmentFormat is not VK_FORMAT_UNDEFINED, depthAttachmentFormat must equal stencilAttachmentFormat

VUID-VkCommandBufferInheritanceRenderingInfo-multiview-06008

If the multiview feature is not enabled, viewMask must be 0

VUID-VkCommandBufferInheritanceRenderingInfo-viewMask-06009

The index of the most significant bit in viewMask must be less than maxMultiviewViewCount

Valid Usage (Implicit)

VUID-VkCommandBufferInheritanceRenderingInfo-sType-sType

sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO

VUID-VkCommandBufferInheritanceRenderingInfo-pColorAttachmentFormats-parameter

If colorAttachmentCount is not 0, pColorAttachmentFormats must be a valid pointer to an array of colorAttachmentCount valid VkFormat values

VUID-VkCommandBufferInheritanceRenderingInfo-rasterizationSamples-parameter

If rasterizationSamples is not 0, rasterizationSamples must be a valid VkSampleCountFlagBits value