vkCmdSetRenderingInputAttachmentIndices(3)

# vkCmdSetRenderingInputAttachmentIndices(3) Manual Page

## Name

vkCmdSetRenderingInputAttachmentIndices - Set input attachment index mappings for a command buffer

## C Specification

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

    // Provided by VK_VERSION_1_4
    void vkCmdSetRenderingInputAttachmentIndices(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingInputAttachmentIndexInfo*  pInputAttachmentIndexInfo);

    // Provided by VK_KHR_dynamic_rendering_local_read
    // Equivalent to vkCmdSetRenderingInputAttachmentIndices
    void vkCmdSetRenderingInputAttachmentIndicesKHR(
        VkCommandBuffer                             commandBuffer,
        const VkRenderingInputAttachmentIndexInfo*  pInputAttachmentIndexInfo);

## Parameters

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pInputAttachmentIndexInfo` is a VkRenderingInputAttachmentIndexInfo structure indicating the new mappings.

## Description

This command sets the input attachment index mappings for subsequent drawing commands, and must match the mappings provided to the bound pipeline, if one is bound, which can be set by chaining VkRenderingInputAttachmentIndexInfo 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-vkCmdSetRenderingInputAttachmentIndices-dynamicRenderingLocalRead-09516
  `dynamicRenderingLocalRead` must be enabled

- VUID-vkCmdSetRenderingInputAttachmentIndices-pInputAttachmentIndexInfo-09517
  `pInputAttachmentIndexInfo->colorAttachmentCount` must be equal to the value of VkRenderingInfo::`colorAttachmentCount` used to begin the current render pass instance

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-09518
  The current render pass instance must have been started or resumed by vkCmdBeginRendering in this `commandBuffer`

Valid Usage (Implicit)

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetRenderingInputAttachmentIndices-pInputAttachmentIndexInfo-parameter
  `pInputAttachmentIndexInfo` must be a valid pointer to a valid VkRenderingInputAttachmentIndexInfo structure

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetRenderingInputAttachmentIndices-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetRenderingInputAttachmentIndices-renderpass
  This command must only be called inside of a render pass instance

- VUID-vkCmdSetRenderingInputAttachmentIndices-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

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Inside | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetRenderingInputAttachmentIndices is not affected by conditional rendering

## See Also

VK_KHR_dynamic_rendering_local_read, VK_VERSION_1_4, VkCommandBuffer, VkRenderingInputAttachmentIndexInfo

## Document Notes

For more information, see the Vulkan Specification.

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0