VkRenderPassCreateInfo
The VkRenderPassCreateInfo structure is defined as:
typedef 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;
pub struct RenderPassCreateInfo {
s_type: vk::StructureType,
p_next: *const c_void,
flags: vk::RenderPassCreateFlags,
attachment_count: u32,
p_attachments: *const vk::AttachmentDescription,
subpass_count: u32,
p_subpasses: *const vk::SubpassDescription,
dependency_count: u32,
p_dependencies: *const vk::SubpassDependency,
}
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.flagsis a bitmask of VkRenderPassCreateFlagBitsattachmentCountis the number of attachments used by this render pass.pAttachmentsis a pointer to an array ofattachmentCount
VkAttachmentDescription structures describing the attachments used by the render pass.subpassCountis the number of subpasses to create.pSubpassesis a pointer to an array ofsubpassCount
VkSubpassDescription structures describing each subpass.dependencyCountis the number of memory dependencies between pairs of subpasses.pDependenciesis a pointer to an array ofdependencyCount
VkSubpassDependency structures describing dependencies between pairs of subpasses.
Valid Usage
VUID-VkRenderPassCreateInfo-attachment-00834
If the attachment member of any element of
pInputAttachments, pColorAttachments,
pResolveAttachments or pDepthStencilAttachment, or any
element of pPreserveAttachments in any element of pSubpasses
is not VK_ATTACHMENT_UNUSED, then it must be less than
attachmentCount
VUID-VkRenderPassCreateInfo-fragmentDensityMapAttachment-06471
If the pNext chain includes a
VkRenderPassFragmentDensityMapCreateInfoEXT structure and the
fragmentDensityMapAttachment member is not
VK_ATTACHMENT_UNUSED, then attachment must be less than
attachmentCount
VUID-VkRenderPassCreateInfo-fragmentDensityMapLayered-10828
If the fragmentDensityMapLayered feature is not enabled, flagsmust not contain
VK_RENDER_PASS_CREATE_PER_LAYER_FRAGMENT_DENSITY_BIT_VALVE
VUID-VkRenderPassCreateInfo-pAttachments-00836
For any member of pAttachments with a loadOp equal to
VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
must not specify a layout equal to
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
VUID-VkRenderPassCreateInfo-pAttachments-02511
For any member of pAttachments with a stencilLoadOp equal to
VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
must not specify a layout equal to
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or
VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
VUID-VkRenderPassCreateInfo-pAttachments-01566
For any member of pAttachments with a loadOp equal to
VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
must not specify a layout equal to
VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
VUID-VkRenderPassCreateInfo-pAttachments-01567
For any member of pAttachments with a stencilLoadOp equal to
VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment
must not specify a layout equal to
VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
VUID-VkRenderPassCreateInfo-pNext-01926
If the pNext chain includes a
VkRenderPassInputAttachmentAspectCreateInfo structure, the
subpass member of each element of its pAspectReferences
member must be less than subpassCount
VUID-VkRenderPassCreateInfo-pNext-01927
If the pNext chain includes a
VkRenderPassInputAttachmentAspectCreateInfo structure, the
inputAttachmentIndex member of each element of its
pAspectReferences member must be less than the value of
inputAttachmentCount in the element of pSubpasses identified
by its subpass member
VUID-VkRenderPassCreateInfo-pNext-01963
If the pNext chain includes a
VkRenderPassInputAttachmentAspectCreateInfo structure, for any
element of the pInputAttachments member of any element of
pSubpasses where the attachment member is not
VK_ATTACHMENT_UNUSED, the aspectMask member of the
corresponding element of
VkRenderPassInputAttachmentAspectCreateInfo::pAspectReferencesmust only include aspects that are present in images of the format
specified by the element of pAttachments at attachment
VUID-VkRenderPassCreateInfo-pNext-01928
If the pNext chain includes a
VkRenderPassMultiviewCreateInfo structure, and its
subpassCount member is not zero, that member must be equal to the
value of subpassCount
VUID-VkRenderPassCreateInfo-pNext-01929
If the pNext chain includes a
VkRenderPassMultiviewCreateInfo structure, if its
dependencyCount member is not zero, it must be equal to
dependencyCount
VUID-VkRenderPassCreateInfo-pNext-01930
If the pNext chain includes a
VkRenderPassMultiviewCreateInfo structure, for each non-zero
element of pViewOffsets, the srcSubpass and dstSubpass
members of pDependencies at the same index must not be equal
VUID-VkRenderPassCreateInfo-pNext-02512
If the pNext chain includes a
VkRenderPassMultiviewCreateInfo structure, for each element of
pDependencies with a dependencyFlags member that does not
include VK_DEPENDENCY_VIEW_LOCAL_BIT, the corresponding element of
the pViewOffsets member of that
VkRenderPassMultiviewCreateInfo instance must be 0
VUID-VkRenderPassCreateInfo-pNext-02513
If the pNext chain includes a
VkRenderPassMultiviewCreateInfo structure, elements of its
pViewMasks member must either all be 0, or all not be 0
VUID-VkRenderPassCreateInfo-pNext-02514
If the pNext chain includes a
VkRenderPassMultiviewCreateInfo structure, and each element of its
pViewMasks member is 0, the dependencyFlags member of each
element of pDependencies must not include
VK_DEPENDENCY_VIEW_LOCAL_BIT
VUID-VkRenderPassCreateInfo-pNext-02515
If the pNext chain includes a
VkRenderPassMultiviewCreateInfo structure, and each element of its
pViewMasks member is 0, its correlationMaskCount member
must be 0
VUID-VkRenderPassCreateInfo-pDependencies-00837
For each element of pDependencies, if the srcSubpass is not
VK_SUBPASS_EXTERNAL, all stage flags included in the
srcStageMask member of that dependency must be
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supported
by the pipeline identified by
the pipelineBindPoint member of the source subpass
VUID-VkRenderPassCreateInfo-pDependencies-00838
For each element of pDependencies, if the dstSubpass is not
VK_SUBPASS_EXTERNAL, all stage flags included in the
dstStageMask member of that dependency must be
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or a pipeline stage supported
by the pipeline identified by
the pipelineBindPoint member of the destination subpass
VUID-VkRenderPassCreateInfo-pDependencies-06866
For each element of pDependencies, if its srcSubpass is not
VK_SUBPASS_EXTERNAL, it must be less than subpassCount
VUID-VkRenderPassCreateInfo-pDependencies-06867
For each element of pDependencies, if its dstSubpass is not
VK_SUBPASS_EXTERNAL, it must be less than subpassCount
VUID-VkRenderPassCreateInfo-pResolveAttachments-10647
If any element of pResolveAttachments of any element of
pSubpasses references an attachment description with a format of
VK_FORMAT_UNDEFINED,
VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included
in VkRenderPassTileShadingCreateInfoQCOM::flags
VUID-VkRenderPassCreateInfo-fragmentDensityMapAttachment-10648
If
VkRenderPassFragmentDensityMapCreateInfoEXT::fragmentDensityMapAttachment
is not VK_ATTACHMENT_UNUSED,
VK_TILE_SHADING_RENDER_PASS_ENABLE_BIT_QCOM must not be included
in VkRenderPassTileShadingCreateInfoQCOM::flags
VUID-VkRenderPassCreateInfo-None-10915
If any subpass preserves an attachment, there must be a subpass dependency from a prior subpass which uses or preserves that attachment
Valid Usage (Implicit)
VUID-VkRenderPassCreateInfo-sType-sType
sType must be VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
VUID-VkRenderPassCreateInfo-pNext-pNext
Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkRenderPassFragmentDensityMapCreateInfoEXT, VkRenderPassInputAttachmentAspectCreateInfo, VkRenderPassMultiviewCreateInfo, VkRenderPassTileShadingCreateInfoQCOM, or VkTileMemorySizeInfoQCOM
VUID-VkRenderPassCreateInfo-sType-unique
The sType value of each structure in the pNext chain must be unique
VUID-VkRenderPassCreateInfo-flags-parameter
flags must be a valid combination of VkRenderPassCreateFlagBits values
VUID-VkRenderPassCreateInfo-pAttachments-parameter
If attachmentCount is not 0, pAttachments must be a valid pointer to an array of attachmentCount valid VkAttachmentDescription structures
VUID-VkRenderPassCreateInfo-pSubpasses-parameter
pSubpasses must be a valid pointer to an array of subpassCount valid VkSubpassDescription structures
VUID-VkRenderPassCreateInfo-pDependencies-parameter
If dependencyCount is not 0, pDependencies must be a valid pointer to an array of dependencyCount valid VkSubpassDependency structures
VUID-VkRenderPassCreateInfo-subpassCount-arraylength
subpassCount must be greater than 0