VkRenderingInputAttachmentIndexInfo
The VkRenderingInputAttachmentIndexInfo structure is defined as:
typedef struct VkRenderingInputAttachmentIndexInfo {
VkStructureType sType;
const void* pNext;
uint32_t colorAttachmentCount;
const uint32_t* pColorAttachmentInputIndices;
const uint32_t* pDepthInputAttachmentIndex;
const uint32_t* pStencilInputAttachmentIndex;
} VkRenderingInputAttachmentIndexInfo;
or the equivalent
typedef VkRenderingInputAttachmentIndexInfo VkRenderingInputAttachmentIndexInfoKHR;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.colorAttachmentCountis the number of elements inpColorAttachmentInputIndices.pColorAttachmentInputIndicesis a pointer to an array ofcolorAttachmentCountuint32_tvalues defining indices for color attachments to be used as input attachments.pDepthInputAttachmentIndexis eitherNULL, or a pointer to auint32_tvalue defining the index for the depth attachment to be used as an input attachment.pStencilInputAttachmentIndexis eitherNULL, or a pointer to auint32_tvalue defining the index for the stencil attachment to be used as an input attachment.
This structure allows applications to remap attachments to different input attachment indices.
Each element of pColorAttachmentInputIndices set to a value of
VK_ATTACHMENT_UNUSED indicates that the corresponding attachment will
not be used as an input attachment in this pipeline.
Any other value in each of those elements will map the corresponding
attachment to a InputAttachmentIndex value defined in shader code.
If pColorAttachmentInputIndices is NULL, it is equivalent to setting
each element to its index within the array.
If pDepthInputAttachmentIndex or pStencilInputAttachmentIndex
are set to NULL, they map to input attachments without a
InputAttachmentIndex decoration.
If they point to a value of VK_ATTACHMENT_UNUSED, it indicates that
the corresponding attachment will not be used as an input attachment in this
pipeline.
If they point to any other value it maps the corresponding attachment to a
InputAttachmentIndex value defined in shader code.
This structure can be included in the pNext chain of a
VkGraphicsPipelineCreateInfo structure to set this state for a
pipeline.
If this structure is not included in the pNext chain of
VkGraphicsPipelineCreateInfo, it is equivalent to specifying this
structure with the following properties:
colorAttachmentCountset to VkPipelineRenderingCreateInfo::colorAttachmentCount.pColorAttachmentInputIndicesset toNULL.pDepthInputAttachmentIndexset toNULL.pStencilInputAttachmentIndexset toNULL.
This structure can be included in the pNext chain of a
VkCommandBufferInheritanceInfo structure to specify inherited state
from the primary command buffer.
If this structure is not included in the pNext chain of
VkCommandBufferInheritanceInfo, it is equivalent to specifying this
structure with the following properties:
colorAttachmentCountset to VkCommandBufferInheritanceRenderingInfo::colorAttachmentCount.pColorAttachmentInputIndicesset toNULL.pDepthInputAttachmentIndexset toNULL.pStencilInputAttachmentIndexset toNULL.
Valid Usage
VUID-VkRenderingInputAttachmentIndexInfo-dynamicRenderingLocalRead-09519
If the dynamicRenderingLocalRead feature is not enabled, and
pColorAttachmentInputIndices is not NULL, each element must be
VK_ATTACHMENT_UNUSED
VUID-VkRenderingInputAttachmentIndexInfo-dynamicRenderingLocalRead-09520
If the dynamicRenderingLocalRead feature is not enabled,
pDepthInputAttachmentIndex must be a valid pointer to a value of
VK_ATTACHMENT_UNUSED
VUID-VkRenderingInputAttachmentIndexInfo-dynamicRenderingLocalRead-09521
If the dynamicRenderingLocalRead feature is not enabled,
pStencilInputAttachmentIndex must be a valid pointer to a value
of VK_ATTACHMENT_UNUSED
VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-09522
Elements of pColorAttachmentInputIndices that are not
VK_ATTACHMENT_UNUSED must each be unique
VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-09523
Elements of pColorAttachmentInputIndices that are not
VK_ATTACHMENT_UNUSED must not take the same value as the content
of pDepthInputAttachmentIndex
VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-09524
Elements of pColorAttachmentInputIndices that are not
VK_ATTACHMENT_UNUSED must not take the same value as the content
of pStencilInputAttachmentIndex
VUID-VkRenderingInputAttachmentIndexInfo-colorAttachmentCount-09525
colorAttachmentCount must be less than or equal to
maxColorAttachments
Valid Usage (Implicit)
VUID-VkRenderingInputAttachmentIndexInfo-sType-sType
sType must be VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO
VUID-VkRenderingInputAttachmentIndexInfo-pColorAttachmentInputIndices-parameter
If colorAttachmentCount is not 0, and pColorAttachmentInputIndices is not NULL, pColorAttachmentInputIndices must be a valid pointer to an array of colorAttachmentCount uint32_t values
VUID-VkRenderingInputAttachmentIndexInfo-pDepthInputAttachmentIndex-parameter
If pDepthInputAttachmentIndex is not NULL, pDepthInputAttachmentIndex must be a valid pointer to a valid uint32_t value
VUID-VkRenderingInputAttachmentIndexInfo-pStencilInputAttachmentIndex-parameter
If pStencilInputAttachmentIndex is not NULL, pStencilInputAttachmentIndex must be a valid pointer to a valid uint32_t value