VKIMAGEUSAGEFLAGS(3)

NAME
VkImageUsageFlags - Image object usage flags.

C SPECIFICATION

    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;

    typedef VkFlags VkImageUsageFlags;

CONSTANTS

VK_IMAGE_USAGE_TRANSFER_SRC_BIT
    The image can be used as the source operand of transfer operations (vkCmdCopyImage, vkCmdBlitImage, vkCmdCopyImageToBuffer, vkCmdResolveImage).

VK_IMAGE_USAGE_TRANSFER_DST_BIT
    The image can be used as the destination operand of transfer operations (vkCmdCopyImage, vkCmdBlitImage, vkCmdCopyBufferToImage, vkCmdClearColorImage, vkCmdClearDepthStencilImage, vkCmdResolveImage).

VK_IMAGE_USAGE_SAMPLED_BIT
    The image supports filtered and/or unfiltered sampling via sampled image and combined image sampler descriptors.

VK_IMAGE_USAGE_STORAGE_BIT
    The image supports loads, stores, and atomic operations via storage image descriptors.

VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
    The image can be used as a framebuffer color attachment. A framebuffer can only use an attachment view as a color attachment if the view’s image was created with this usage flag.

VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
    The image can be used as a framebuffer depth/stencil attachment. A framebuffer can only use an attachment view as a depth/stencil attachment if the view’s image was created with this usage flag.

VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
    The contents of images created with this usage flag are only maintained within a render pass.

VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
    The image can be used as a framebuffer input attachment.

DESCRIPTION

These flags are used in the VkImageCreateInfo structure passed as parameter to vkCreateImage to define the intended use of the created image. Trying to use the image for any other purpose than those requested at creation time may result in undefined behavior.

VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT and VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT are exclusive. No image can be created with both of these flags being set.

VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT can only be used together with either the VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, the VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT flags.

SEE ALSO

VkImageCreateInfo, vkCreateImage

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.