VkRenderPassCreateInfo(3)
C Specification
TheVkRenderPassCreateInfo structure is defined as:
| This functionality is superseded byVulkan Version 1.2. SeeLegacy Functionality for more information. |
// Provided by VK_VERSION_1_0typedef struct VkRenderPassCreateInfo { VkStructureType sType; const void* pNext; VkRenderPassCreateFlags flags; uint32_t attachmentCount; const VkAttachmentDescription* pAttachments; uint32_t subpassCount; const VkSubpassDescription* pSubpasses; uint32_t dependencyCount; const VkSubpassDependency* pDependencies;} VkRenderPassCreateInfo;Members
sTypeis aVkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending thisstructure.flagsis a bitmask ofVkRenderPassCreateFlagBitsattachmentCountis the number of attachments used by this renderpass.pAttachmentsis a pointer to an array ofattachmentCountVkAttachmentDescription structures describing the attachments usedby the render pass.subpassCountis the number of subpasses to create.pSubpassesis a pointer to an array ofsubpassCountVkSubpassDescription structures describing each subpass.dependencyCountis the number of memory dependencies between pairsof subpasses.pDependenciesis a pointer to an array ofdependencyCountVkSubpassDependency structures describing dependencies betweenpairs of subpasses.
Description
Care should be taken to avoid a data race here; if any subpasses accessattachments with overlapping memory locations, and one of those accesses isa write, a subpass dependency needs to be included between them. |
VUID-VkRenderPassCreateInfo-attachment-00834
If theattachmentmember of any element ofpInputAttachments,pColorAttachments,pResolveAttachmentsorpDepthStencilAttachment, or anyelement ofpPreserveAttachmentsin any element ofpSubpassesis notVK_ATTACHMENT_UNUSED, then itmust be less thanattachmentCountVUID-VkRenderPassCreateInfo-fragmentDensityMapAttachment-06471
If the pNext chain includes aVkRenderPassFragmentDensityMapCreateInfoEXT structure and thefragmentDensityMapAttachmentmember is notVK_ATTACHMENT_UNUSED, thenattachmentmust be less thanattachmentCountVUID-VkRenderPassCreateInfo-fragmentDensityMapLayered-10828
If thefragmentDensityMapLayeredfeature is not enabled,flagsmust not containVK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVEVUID-VkRenderPassCreateInfo-pAttachments-00836
For any member ofpAttachmentswith aloadOpequal toVK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachmentmust not specify alayoutequal toVK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL orVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALVUID-VkRenderPassCreateInfo-pAttachments-02511
For any member ofpAttachmentswith astencilLoadOpequal toVK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachmentmust not specify alayoutequal toVK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL orVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALVUID-VkRenderPassCreateInfo-pAttachments-01566
For any member ofpAttachmentswith aloadOpequal toVK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachmentmust not specify alayoutequal toVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALVUID-VkRenderPassCreateInfo-pAttachments-01567
For any member ofpAttachmentswith astencilLoadOpequal toVK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachmentmust not specify alayoutequal toVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMALVUID-VkRenderPassCreateInfo-pNext-01926
If thepNextchain includes aVkRenderPassInputAttachmentAspectCreateInfo structure, thesubpassmember of each element of itspAspectReferencesmembermust be less thansubpassCountVUID-VkRenderPassCreateInfo-pNext-01927
If thepNextchain includes aVkRenderPassInputAttachmentAspectCreateInfo structure, theinputAttachmentIndexmember of each element of itspAspectReferencesmembermust be less than the value ofinputAttachmentCountin the element ofpSubpassesidentifiedby itssubpassmemberVUID-VkRenderPassCreateInfo-pNext-01963
If thepNextchain includes aVkRenderPassInputAttachmentAspectCreateInfo structure, for anyelement of thepInputAttachmentsmember of any element ofpSubpasseswhere theattachmentmember is notVK_ATTACHMENT_UNUSED, theaspectMaskmember of thecorresponding element ofVkRenderPassInputAttachmentAspectCreateInfo::pAspectReferencesmust only include aspects that are present in images of the formatspecified by the element ofpAttachmentsatattachmentVUID-VkRenderPassCreateInfo-pNext-01928
If thepNextchain includes aVkRenderPassMultiviewCreateInfo structure, and itssubpassCountmember is not zero, that membermust be equal to thevalue ofsubpassCountVUID-VkRenderPassCreateInfo-pNext-01929
If thepNextchain includes aVkRenderPassMultiviewCreateInfo structure, if itsdependencyCountmember is not zero, itmust be equal todependencyCountVUID-VkRenderPassCreateInfo-pNext-01930
If thepNextchain includes aVkRenderPassMultiviewCreateInfo structure, for each non-zeroelement ofpViewOffsets, thesrcSubpassanddstSubpassmembers ofpDependenciesat the same indexmust not be equalVUID-VkRenderPassCreateInfo-pNext-02512
If thepNextchain includes aVkRenderPassMultiviewCreateInfo structure, for each element ofpDependencieswith adependencyFlagsmember that does notincludeVK_DEPENDENCY_VIEW_LOCAL_BIT, the corresponding element ofthepViewOffsetsmember of thatVkRenderPassMultiviewCreateInfo instancemust be0VUID-VkRenderPassCreateInfo-pNext-02513
If thepNextchain includes aVkRenderPassMultiviewCreateInfo structure, elements of itspViewMasksmembermust either all be0, or all not be0VUID-VkRenderPassCreateInfo-pNext-02514
If thepNextchain includes aVkRenderPassMultiviewCreateInfo structure, and each element of itspViewMasksmember is0, thedependencyFlagsmember of eachelement ofpDependenciesmust not includeVK_DEPENDENCY_VIEW_LOCAL_BITVUID-VkRenderPassCreateInfo-pNext-02515
If thepNextchain includes aVkRenderPassMultiviewCreateInfo structure, and each element of itspViewMasksmember is0, itscorrelationMaskCountmembermust be0VUID-VkRenderPassCreateInfo-pDependencies-00837
For each element ofpDependencies, if thesrcSubpassis notVK_SUBPASS_EXTERNAL, all stage flags included in thesrcStageMaskmember of that dependencymust beVK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supportedby thepipeline identified bythepipelineBindPointmember of the source subpassVUID-VkRenderPassCreateInfo-pDependencies-00838
For each element ofpDependencies, if thedstSubpassis notVK_SUBPASS_EXTERNAL, all stage flags included in thedstStageMaskmember of that dependencymust beVK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supportedby thepipeline identified bythepipelineBindPointmember of the destination subpassVUID-VkRenderPassCreateInfo-pDependencies-06866
For each element ofpDependencies, if itssrcSubpassis notVK_SUBPASS_EXTERNAL, itmust be less thansubpassCountVUID-VkRenderPassCreateInfo-pDependencies-06867
For each element ofpDependencies, if itsdstSubpassis notVK_SUBPASS_EXTERNAL, itmust be less thansubpassCountVUID-VkRenderPassCreateInfo-pResolveAttachments-10647
If any element ofpResolveAttachmentsof any element ofpSubpassesreferences an attachment description with a format ofVK_FORMAT_UNDEFINED,VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOMmust not be includedinVkRenderPassTileShadingCreateInfoQCOM::flagsVUID-VkRenderPassCreateInfo-fragmentDensityMapAttachment-10648
IfVkRenderPassFragmentDensityMapCreateInfoEXT::fragmentDensityMapAttachmentis notVK_ATTACHMENT_UNUSED,VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOMmust not be includedinVkRenderPassTileShadingCreateInfoQCOM::flagsVUID-VkRenderPassCreateInfo-None-10915
If any subpass preserves an attachment, theremust be a subpassdependency from a prior subpass which uses or preserves that attachment
VUID-VkRenderPassCreateInfo-sType-sType
sTypemust beVK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFOVUID-VkRenderPassCreateInfo-pNext-pNext
EachpNextmember of any structure (including this one) in thepNextchainmust be eitherNULLor a pointer to a valid instance ofVkRenderPassFragmentDensityMapCreateInfoEXT,VkRenderPassInputAttachmentAspectCreateInfo,VkRenderPassMultiviewCreateInfo,VkRenderPassTileShadingCreateInfoQCOM, orVkTileMemorySizeInfoQCOMVUID-VkRenderPassCreateInfo-sType-unique
ThesTypevalue of each structure in thepNextchainmust be uniqueVUID-VkRenderPassCreateInfo-flags-parameter
flagsmust be a valid combination ofVkRenderPassCreateFlagBits valuesVUID-VkRenderPassCreateInfo-pAttachments-parameter
IfattachmentCountis not0,pAttachmentsmust be a valid pointer to an array ofattachmentCountvalidVkAttachmentDescription structuresVUID-VkRenderPassCreateInfo-pSubpasses-parameter
pSubpassesmust be a valid pointer to an array ofsubpassCountvalidVkSubpassDescription structuresVUID-VkRenderPassCreateInfo-pDependencies-parameter
IfdependencyCountis not0,pDependenciesmust be a valid pointer to an array ofdependencyCountvalidVkSubpassDependency structuresVUID-VkRenderPassCreateInfo-subpassCount-arraylength
subpassCountmust be greater than0
Document Notes
For more information, see theVulkan Specification.
This page is extracted from the Vulkan Specification.Fixes and changes should be made to the Specification, not directly.