# VkImageUsageFlagBits(3) Manual Page

## Name

VkImageUsageFlagBits - Bitmask specifying intended usage of an image

## C Specification

Bits which can be set in VkImageCreateInfo::`usage`, specifying intended usage of an image, are:

    typedef enum VkImageUsageFlagBits {
        VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001,
        VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002,
        VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004,
        VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008,
        VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010,
        VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020,
        VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040,
        VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080,
        VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = 0x00000100,
        VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200,
        VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF
    } VkImageUsageFlagBits;

## Description

- `VK_IMAGE_USAGE_TRANSFER_SRC_BIT` specifies that the image can be used as the source of a transfer command.

- `VK_IMAGE_USAGE_TRANSFER_DST_BIT` specifies that the image can be used as the destination of a transfer command.

- `VK_IMAGE_USAGE_SAMPLED_BIT` specifies that the image can be used to create a `VkImageView` suitable for occupying a `VkDescriptorSet` slot either of type `VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE` or `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER`, and be sampled by a shader.

- `VK_IMAGE_USAGE_STORAGE_BIT` specifies that the image can be used to create a `VkImageView` suitable for occupying a `VkDescriptorSet` slot of type `VK_DESCRIPTOR_TYPE_STORAGE_IMAGE`.

- `VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT` specifies that the image can be used to create a `VkImageView` suitable for use as a color or resolve attachment in a `VkFramebuffer`.

- `VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT` specifies that the image can be used to create a `VkImageView` suitable for use as a depth/stencil or depth/stencil resolve attachment in a `VkFramebuffer`.

- `VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT` specifies that the memory bound to this image will have been allocated with the `VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT` (see https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#memory for more detail). This bit can be set for any image that can be used to create a `VkImageView` suitable for use as a color, resolve, depth/stencil, or input attachment.

- `VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT` specifies that the image can be used to create a `VkImageView` suitable for occupying `VkDescriptorSet` slot of type `VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT`; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer.

- `VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV` specifies that the image can be used to create a `VkImageView` suitable for use as a shading rate image.

- `VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT` specifies that the image can be used to create a `VkImageView` suitable for use as a fragment density map image.

## See Also

VkImageUsageFlags

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