C Specification

The VkPipelineRenderingCreateInfoKHR structure is defined as:

// Provided by VK_KHR_dynamic_rendering
typedef struct VkPipelineRenderingCreateInfoKHR {
VkStructureType    sType;
const void*        pNext;
uint32_t           colorAttachmentCount;
const VkFormat*    pColorAttachmentFormats;
VkFormat           depthAttachmentFormat;
VkFormat           stencilAttachmentFormat;
} VkPipelineRenderingCreateInfoKHR;

Members

• sType is the type of this structure.

• pNext is NULL or a pointer to a structure extending this structure.

• viewMask is the viewMask used for rendering.

• colorAttachmentCount is the number of entries in pColorAttachmentFormats

• pColorAttachmentFormats is a pointer to an array of VkFormat values defining the format of color attachments used in this pipeline.

• depthAttachmentFormat is a VkFormat value defining the format of the depth attachment used in this pipeline.

• stencilAttachmentFormat is a VkFormat value defining the format of the stencil attachment used in this pipeline.

Description

When a pipeline is created without a VkRenderPass, if this structure is present in the pNext chain of VkGraphicsPipelineCreateInfo, it specifies the view mask and format of attachments used for rendering. If this structure is not specified, and the pipeline does not include a VkRenderPass, viewMask and colorAttachmentCount are 0, and depthAttachmentFormat and stencilAttachmentFormat are VK_FORMAT_UNDEFINED. If a graphics pipeline is created with a valid VkRenderPass, parameters of this structure are 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. Valid formats indicate that an attachment can be used - but it is still valid to set the attachment to NULL when beginning rendering.

Valid Usage
• VUID-VkPipelineRenderingCreateInfoKHR-pColorAttachmentFormats-06495
If any element of pColorAttachmentFormats is not VK_FORMAT_UNDEFINED, it must be a format with potential format features that includes either VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV

• VUID-VkPipelineRenderingCreateInfoKHR-depthAttachmentFormat-06065
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-VkPipelineRenderingCreateInfoKHR-stencilAttachmentFormat-06164
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-VkPipelineRenderingCreateInfoKHR-depthAttachmentFormat-06165
If depthAttachmentFormat is not VK_FORMAT_UNDEFINED and stencilAttachmentFormat is not VK_FORMAT_UNDEFINED, depthAttachmentFormat must equal stencilAttachmentFormat

• VUID-VkPipelineRenderingCreateInfoKHR-multiview-06066
If the multiview feature is not enabled, viewMask must be 0

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

Valid Usage (Implicit)
• VUID-VkPipelineRenderingCreateInfoKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR

• VUID-VkPipelineRenderingCreateInfoKHR-pColorAttachmentFormats-parameter
If colorAttachmentCount is not 0, pColorAttachmentFormats must be a valid pointer to an array of colorAttachmentCount valid VkFormat values

• VUID-VkPipelineRenderingCreateInfoKHR-depthAttachmentFormat-parameter
depthAttachmentFormat must be a valid VkFormat value

• VUID-VkPipelineRenderingCreateInfoKHR-stencilAttachmentFormat-parameter
stencilAttachmentFormat must be a valid VkFormat value