Function Prototype

vkCmdSetRenderingInputAttachmentIndicesKHR

Set input attachment index mappings for a command buffer
primary / secondary
inside
graphics
state

To set the input attachment index mappings during dynamic rendering, call:

void vkCmdSetRenderingInputAttachmentIndicesKHR(
    VkCommandBuffer commandBuffer,
    const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo);

This command sets the input attachment index mappings for subsequent drawing commands, and must match the mappings provided to the currently bound pipeline, if one is bound, which can be set by chaining VkRenderingInputAttachmentIndexInfoKHR to VkGraphicsPipelineCreateInfo.

Until this command is called, mappings in the command buffer state are treated as each color attachment specified in vkCmdBeginRendering mapping to subpass inputs with a InputAttachmentIndex equal to its index in VkRenderingInfo::pColorAttachments, and depth/stencil attachments mapping to input attachments without these decorations. This state is reset whenever vkCmdBeginRendering is called.

Valid Usage

VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-pInputAttachmentIndexInfo-09517

pInputAttachmentIndexInfo→colorAttachmentCount must be equal to the value of VkRenderingInfo::colorAttachmentCount used to begin the current render pass instance

VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-commandBuffer-09518

The current render pass instance must have been started or resumed by vkCmdBeginRendering in this commandBuffer

Valid Usage (Implicit)

VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support graphics operations

VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-renderpass

This command must only be called inside of a render pass instance

VUID-vkCmdSetRenderingInputAttachmentIndicesKHR-videocoding

This command must only be called outside of a video coding scope

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized ::