# VkAttachmentReference(3) Manual Page

## Name

VkAttachmentReference - Structure specifying an attachment reference

## C Specification

The `VkAttachmentReference` structure is defined as:

    typedef struct VkAttachmentReference {
        uint32_t         attachment;
        VkImageLayout    layout;
    } VkAttachmentReference;

## Members

- `attachment` is either an integer value identifying an attachment at the corresponding index in VkRenderPassCreateInfo::`pAttachments`, or `VK_ATTACHMENT_UNUSED` to signify that this attachment is not used.

- `layout` is a VkImageLayout value specifying the layout the attachment uses during the subpass.

## Description

Valid Usage

- If `attachment` is not `VK_ATTACHMENT_UNUSED`, `layout` must not be `VK_IMAGE_LAYOUT_UNDEFINED`, `VK_IMAGE_LAYOUT_PREINITIALIZED`, `VK_IMAGE_LAYOUT_PRESENT_SRC_KHR`, `VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR`, `VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR`, `VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR`, or `VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR`

Valid Usage (Implicit)

- `layout` must be a valid VkImageLayout value

## See Also

VkImageLayout, VkRenderPassFragmentDensityMapCreateInfoEXT, VkSubpassDescription

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.