VkRenderingAttachmentLocationInfo(3)

# VkRenderingAttachmentLocationInfo(3) Manual Page

## Name

VkRenderingAttachmentLocationInfo - Structure specifying attachment locations

## C Specification

The `VkRenderingAttachmentLocationInfo` structure is defined as:

    // Provided by VK_VERSION_1_4
    typedef struct VkRenderingAttachmentLocationInfo {
        VkStructureType    sType;
        const void*        pNext;
        uint32_t           colorAttachmentCount;
        const uint32_t*    pColorAttachmentLocations;
    } VkRenderingAttachmentLocationInfo;

    // Provided by VK_KHR_dynamic_rendering_local_read
    // Equivalent to VkRenderingAttachmentLocationInfo
    typedef VkRenderingAttachmentLocationInfo VkRenderingAttachmentLocationInfoKHR;

## Members

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `colorAttachmentCount` is the number of elements in `pColorAttachmentLocations`.

- `pColorAttachmentLocations` is a pointer to an array of `colorAttachmentCount` `uint32_t` values defining remapped locations for color attachments.

## Description

This structure allows applications to remap the locations of color attachments to different fragment shader output locations.

Each element of `pColorAttachmentLocations` set to VK_ATTACHMENT_UNUSED will be inaccessible to this pipeline as a color attachment; no location will map to it. Each element of `pColorAttachmentLocations` set to any other value will map the specified location value to the color attachment specified in the render pass at the corresponding index in the `pColorAttachmentLocations` array. Any writes to a fragment output location that is not mapped to an attachment must be discarded.

If `pColorAttachmentLocations` is `NULL`, it is equivalent to setting each element to its index within the array.

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`.

- `pColorAttachmentLocations` set to `NULL`.

This structure can be included in the `pNext` chain of a VkCommandBufferInheritanceInfo structure to specify inherited state from the primary command buffer. If VkCommandBufferInheritanceInfo::`renderPass` is not VK_NULL_HANDLE, or VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not specified in VkCommandBufferBeginInfo::`flags`, members of this structure are ignored. 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`.

- `pColorAttachmentLocations` set to `NULL`.

Valid Usage

- VUID-VkRenderingAttachmentLocationInfo-dynamicRenderingLocalRead-09512
  If the `dynamicRenderingLocalRead` feature is not enabled, and `pColorAttachmentLocations` is not `NULL`, each element must be the value of its index within the array

- VUID-VkRenderingAttachmentLocationInfo-pColorAttachmentLocations-09513
  Elements of `pColorAttachmentLocations` that are not VK_ATTACHMENT_UNUSED must each be unique

- VUID-VkRenderingAttachmentLocationInfo-colorAttachmentCount-09514
  `colorAttachmentCount` must be less than or equal to `maxColorAttachments`

- VUID-VkRenderingAttachmentLocationInfo-pColorAttachmentLocations-09515
  Each element of `pColorAttachmentLocations` must be less than `maxColorAttachments`

Valid Usage (Implicit)

- VUID-VkRenderingAttachmentLocationInfo-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO

Structure Chaining

Extends the structures

  - VkCommandBufferInheritanceInfo

  - VkGraphicsPipelineCreateInfo

## See Also

VK_KHR_dynamic_rendering_local_read, VK_VERSION_1_4, VkStructureType, vkCmdSetRenderingAttachmentLocations, vkCmdSetRenderingAttachmentLocations

## 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