VKIMAGEUSAGEFLAGBITS(3)

NAME
VkImageUsageFlagBits - Bitmask specifying intended usage of an image

C SPECIFICATION

The intended usage of an image is specified by the bitmask VkImageCreateInfo::usage. Bits which can be set include:

    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,
    } VkImageUsageFlagBits;

DESCRIPTION

These bits have the following meanings:

    • VK_IMAGE_USAGE_TRANSFER_SRC_BIT indicates that the image can be used as the source of a transfer command.

    • VK_IMAGE_USAGE_TRANSFER_DST_BIT indicates that the image can be used as the destination of a transfer command.

    • VK_IMAGE_USAGE_SAMPLED_BIT indicates 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 indicates 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 indicates 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 indicates that the image can be used to create a VkImageView suitable for use as a depth/stencil attachment in a VkFramebuffer.

    • VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT indicates that the memory bound to this image will have been allocated with the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT (see ??? 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 indicates 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.

SEE ALSO

VkImageUsageFlags

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkImageUsageFlagBits

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

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.