VkRenderingInputAttachmentIndexInfoKHR
The VkRenderingInputAttachmentIndexInfoKHR
structure is defined as:
typedef struct VkRenderingInputAttachmentIndexInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t colorAttachmentCount;
const uint32_t* pColorAttachmentInputIndices;
const uint32_t* pDepthInputAttachmentIndex;
const uint32_t* pStencilInputAttachmentIndex;
} VkRenderingInputAttachmentIndexInfoKHR;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.colorAttachmentCount
is the number of elements inpColorAttachmentInputIndices
.pColorAttachmentInputIndices
is a pointer to an array ofcolorAttachmentCount
uint32_t
values defining indices for color attachments to be used as input attachments.pDepthInputAttachmentIndex
is eitherNULL
, or a pointer to auint32_t
value defining the index for the depth attachment to be used as an input attachment.pStencilInputAttachmentIndex
is eitherNULL
, or a pointer to auint32_t
value 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:
colorAttachmentCount
set to VkPipelineRenderingCreateInfo::colorAttachmentCount
.pColorAttachmentInputIndices
set toNULL
.pDepthInputAttachmentIndex
set toNULL
.pStencilInputAttachmentIndex
set 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:
colorAttachmentCount
set to VkCommandBufferInheritanceRenderingInfo::colorAttachmentCount
.pColorAttachmentInputIndices
set toNULL
.pDepthInputAttachmentIndex
set toNULL
.pStencilInputAttachmentIndex
set toNULL
.
Valid Usage
VUID-VkRenderingInputAttachmentIndexInfoKHR-dynamicRenderingLocalRead-09519
If the dynamicRenderingLocalRead
feature is not enabled, and
pColorAttachmentInputIndices
is not NULL
, each element must be
VK_ATTACHMENT_UNUSED
VUID-VkRenderingInputAttachmentIndexInfoKHR-dynamicRenderingLocalRead-09520
If the dynamicRenderingLocalRead
feature is not enabled,
pDepthInputAttachmentIndex
must be a valid pointer to a value of
VK_ATTACHMENT_UNUSED
VUID-VkRenderingInputAttachmentIndexInfoKHR-dynamicRenderingLocalRead-09521
If the dynamicRenderingLocalRead
feature is not enabled,
pStencilInputAttachmentIndex
must be a valid pointer to a value
of VK_ATTACHMENT_UNUSED
VUID-VkRenderingInputAttachmentIndexInfoKHR-pColorAttachmentInputIndices-09522
Elements of pColorAttachmentInputIndices
that are not
VK_ATTACHMENT_UNUSED
must each be unique
VUID-VkRenderingInputAttachmentIndexInfoKHR-pColorAttachmentInputIndices-09523
Elements of pColorAttachmentInputIndices
that are not
VK_ATTACHMENT_UNUSED
must not take the same value as the content
of pDepthInputAttachmentIndex
VUID-VkRenderingInputAttachmentIndexInfoKHR-pColorAttachmentInputIndices-09524
Elements of pColorAttachmentInputIndices
that are not
VK_ATTACHMENT_UNUSED
must not take the same value as the content
of pStencilInputAttachmentIndex
VUID-VkRenderingInputAttachmentIndexInfoKHR-colorAttachmentCount-09525
colorAttachmentCount
must be less than or equal to
maxColorAttachments
Valid Usage (Implicit)
VUID-VkRenderingInputAttachmentIndexInfoKHR-sType-sType
sType
must be VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR
VUID-VkRenderingInputAttachmentIndexInfoKHR-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-VkRenderingInputAttachmentIndexInfoKHR-pDepthInputAttachmentIndex-parameter
If pDepthInputAttachmentIndex
is not NULL
, pDepthInputAttachmentIndex
must be a valid pointer to a valid uint32_t
value
VUID-VkRenderingInputAttachmentIndexInfoKHR-pStencilInputAttachmentIndex-parameter
If pStencilInputAttachmentIndex
is not NULL
, pStencilInputAttachmentIndex
must be a valid pointer to a valid uint32_t
value