Enum
VkImageUsageFlagBits
Bitmask specifying intended usage of an image
Bits which can be set in
- VkImageViewUsageCreateInfo::
usage - VkImageStencilUsageCreateInfo::
stencilUsage - VkImageCreateInfo::
usage
specify intended usage of an image, and 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,
// Provided by extensions
VK_IMAGE_USAGE_HOST_TRANSFER_BIT = 0x00400000,
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00000400,
VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800,
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000,
VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR,
VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200,
VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100,
VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = VK_IMAGE_USAGE_HOST_TRANSFER_BIT,
VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000,
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000,
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000,
VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000,
VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000,
VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000,
VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000,
VK_IMAGE_USAGE_RESERVED_24_BIT_COREAVI = 0x01000000,
VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARM = 0x00800000,
VK_IMAGE_USAGE_RESERVED_28_BIT_EXT = 0x10000000,
VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOM = 0x08000000,
VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000,
VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000,
VK_IMAGE_USAGE_RESERVED_29_BIT_KHR = 0x20000000,
VK_IMAGE_USAGE_RESERVED_30_BIT_KHR = 0x40000000,
VK_IMAGE_USAGE_RESERVED_16_BIT_HUAWEI = 0x00010000,
VK_IMAGE_USAGE_RESERVED_27_BIT_HUAWEI = 0x00020000,
} VkImageUsageFlagBits;
pub struct ImageUsageFlagBits(u32);
impl ImageUsageFlagBits {
pub const TRANSFER_SRC: Self = 0x00000001;
pub const TRANSFER_DST: Self = 0x00000002;
pub const SAMPLED: Self = 0x00000004;
pub const STORAGE: Self = 0x00000008;
pub const COLOR_ATTACHMENT: Self = 0x00000010;
pub const DEPTH_STENCIL_ATTACHMENT: Self = 0x00000020;
pub const TRANSIENT_ATTACHMENT: Self = 0x00000040;
pub const INPUT_ATTACHMENT: Self = 0x00000080;
pub const HOST_TRANSFER: Self = 0x00400000;
pub const VIDEO_DECODE_DST_KHR: Self = 0x00000400;
pub const VIDEO_DECODE_SRC_KHR: Self = 0x00000800;
pub const VIDEO_DECODE_DPB_KHR: Self = 0x00001000;
pub const SHADING_RATE_IMAGE_NV: Self = Self::FRAGMENT_SHADING_RATE_ATTACHMENT_KHR;
pub const FRAGMENT_DENSITY_MAP_EXT: Self = 0x00000200;
pub const FRAGMENT_SHADING_RATE_ATTACHMENT_KHR: Self = 0x00000100;
pub const HOST_TRANSFER_EXT: Self = Self::HOST_TRANSFER;
pub const VIDEO_ENCODE_DST_KHR: Self = 0x00002000;
pub const VIDEO_ENCODE_SRC_KHR: Self = 0x00004000;
pub const VIDEO_ENCODE_DPB_KHR: Self = 0x00008000;
pub const ATTACHMENT_FEEDBACK_LOOP_EXT: Self = 0x00080000;
pub const INVOCATION_MASK_HUAWEI: Self = 0x00040000;
pub const SAMPLE_WEIGHT_QCOM: Self = 0x00100000;
pub const SAMPLE_BLOCK_MATCH_QCOM: Self = 0x00200000;
pub const RESERVED_24_COREAVI: Self = 0x01000000;
pub const TENSOR_ALIASING_ARM: Self = 0x00800000;
pub const RESERVED_28_EXT: Self = 0x10000000;
pub const TILE_MEMORY_QCOM: Self = 0x08000000;
pub const VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_KHR: Self = 0x02000000;
pub const VIDEO_ENCODE_EMPHASIS_MAP_KHR: Self = 0x04000000;
pub const RESERVED_29_KHR: Self = 0x20000000;
pub const RESERVED_30_KHR: Self = 0x40000000;
pub const RESERVED_16_HUAWEI: Self = 0x00010000;
pub const RESERVED_27_HUAWEI: Self = 0x00020000;
}
VK_IMAGE_USAGE_TRANSFER_SRC_BITspecifies that the image can be used as the source of a transfer command.VK_IMAGE_USAGE_TRANSFER_DST_BITspecifies that the image can be used as the destination of a transfer command.VK_IMAGE_USAGE_SAMPLED_BITspecifies that the image can be used to create aVkImageViewsuitable for occupying aVkDescriptorSetslot either of typeVK_DESCRIPTOR_TYPE_SAMPLED_IMAGEorVK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a shader.VK_IMAGE_USAGE_STORAGE_BITspecifies that the image can be used to create aVkImageViewsuitable for occupying aVkDescriptorSetslot of typeVK_DESCRIPTOR_TYPE_STORAGE_IMAGE.VK_IMAGE_USAGE_COLOR_ATTACHMENT_BITspecifies that the image can be used to create aVkImageViewsuitable for use as a color or resolve attachment in aVkFramebuffer.VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITspecifies that the image can be used to create aVkImageViewsuitable for use as a depth/stencil or depth/stencil resolve attachment in aVkFramebuffer.VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BITspecifies that implementations may support using memory allocations with theVK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BITto back an image with this usage. This bit can be set for any image that can be used to create aVkImageViewsuitable for use as a color, resolve, depth/stencil, or input attachment.VK_IMAGE_USAGE_INPUT_ATTACHMENT_BITspecifies that the image can be used to create aVkImageViewsuitable for occupyingVkDescriptorSetslot of typeVK_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_FRAGMENT_DENSITY_MAP_BIT_EXTspecifies that the image can be used to create aVkImageViewsuitable for use as a fragment density map image.VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHRspecifies that the image can be used to create aVkImageViewsuitable for use as a fragment shading rate attachment or shading rate imageVK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHRspecifies that the image can be used as a decode output picture in a video decode operation.VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHRis reserved for future use.VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHRspecifies that the image can be used as an output reconstructed picture or an input reference picture in a video decode operation.VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHRis reserved for future use.VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHRspecifies that the image can be used as an encode input picture in a video encode operation.VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHRspecifies that the image can be used as an output reconstructed picture or an input reference picture in a video encode operation.VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXTspecifies that the image can be used as a color or depth/stencil attachment with feedback loop enabled.VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOMspecifies that the image can be used in weight image sampling operations.VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOMspecifies that the image can be used in block matching operations.VK_IMAGE_USAGE_TILE_MEMORY_BIT_QCOMspecifies that the image can be bound toVkDeviceMemoryallocated from a VkMemoryHeap with theVK_MEMORY_HEAP_TILE_MEMORY_BIT_QCOMproperty.VK_IMAGE_USAGE_HOST_TRANSFER_BITspecifies that the image can be used with host copy commands and host layout transitions.VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHRspecifies that the image can be used as a quantization delta map in a video encode operation.VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHRspecifies that the image can be used as an emphasis map in a video encode operation.VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXTspecifies that the image can be used with host copy commands and host layout transitions.VK_IMAGE_USAGE_TENSOR_ALIASING_BIT_ARMspecifies that the image can be transitioned to theVK_IMAGE_LAYOUT_TENSOR_ALIASING_ARMlayout. See Memory Aliasing for a complete set of rules for tensor/image aliasing.
Parent
VK_VERSION_1_0Type
Enum