Structures

VkPipelineRenderingCreateInfo

Structure specifying attachment formats

The VkPipelineRenderingCreateInfo structure is defined as:

typedef struct VkPipelineRenderingCreateInfo {
    VkStructureType sType;
    const void* pNext;
    uint32_t viewMask;
    uint32_t colorAttachmentCount;
    const VkFormat* pColorAttachmentFormats;
    VkFormat depthAttachmentFormat;
    VkFormat stencilAttachmentFormat;
} VkPipelineRenderingCreateInfo;

or the equivalent

typedef VkPipelineRenderingCreateInfo VkPipelineRenderingCreateInfoKHR;
  • sType is a VkStructureType value identifying 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.

When a pipeline is created without a VkRenderPass, if the pNext chain of VkGraphicsPipelineCreateInfo includes this structure, 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.

If the render pass is going to be used with an external format resolve attachment, a VkExternalFormatANDROID structure must also be included in the pNext chain of VkGraphicsPipelineCreateInfo, defining the external format of the resolve attachment that will be used.

Valid Usage

Valid Usage (Implicit)

VUID-VkPipelineRenderingCreateInfo-sType-sType

sType must be VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO