1 // Copyright (c) 2020 The vulkano developers 2 // Licensed under the Apache License, Version 2.0 3 // <LICENSE-APACHE or 4 // https://www.apache.org/licenses/LICENSE-2.0> or the MIT 5 // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, 6 // at your option. All files in the project carrying such 7 // notice may not be copied, modified, or distributed except 8 // according to those terms. 9 10 use crate::macros::vulkan_bitflags_enum; 11 12 vulkan_bitflags_enum! { 13 #[non_exhaustive] 14 15 /// A set of [`ImageAspect`] values. 16 ImageAspects, 17 18 /// An individual data type within an image. 19 /// 20 /// Most images have only the [`Color`] aspect, but some may have others. 21 /// 22 /// [`Color`]: ImageAspect::Color 23 ImageAspect, 24 25 = ImageAspectFlags(u32); 26 27 /// The single aspect of images with a color [format], or the combined aspect of all planes of 28 /// images with a multi-planar format. 29 /// 30 /// [format]: crate::format::Format 31 COLOR, Color = COLOR, 32 33 /// The single aspect of images with a depth [format], or one of the two aspects of images 34 /// with a combined depth/stencil format. 35 /// 36 /// [format]: crate::format::Format 37 DEPTH, Depth = DEPTH, 38 39 /// The single aspect of images with a stencil [format], or one of the two aspects of images 40 /// with a combined depth/stencil format. 41 /// 42 /// [format]: crate::format::Format 43 STENCIL, Stencil = STENCIL, 44 45 /// An aspect used with sparse memory on some implementations, to hold implementation-defined 46 /// metadata of an image. 47 METADATA, Metadata = METADATA, 48 49 /// The first plane of an image with a multi-planar [format], holding the green color component. 50 /// 51 /// [format]: crate::format::Format 52 PLANE_0, Plane0 = PLANE_0 { 53 api_version: V1_1, 54 device_extensions: [khr_sampler_ycbcr_conversion], 55 }, 56 57 /// The second plane of an image with a multi-planar [format], holding the blue color component 58 /// if the format has three planes, and a combination of blue and red if the format has two 59 /// planes. 60 /// 61 /// [format]: crate::format::Format 62 PLANE_1, Plane1 = PLANE_1 { 63 api_version: V1_1, 64 device_extensions: [khr_sampler_ycbcr_conversion], 65 }, 66 67 /// The third plane of an image with a multi-planar [format], holding the red color component. 68 PLANE_2, Plane2 = PLANE_2 { 69 api_version: V1_1, 70 device_extensions: [khr_sampler_ycbcr_conversion], 71 }, 72 73 /// The first memory plane of images created through the [`ext_image_drm_format_modifier`] 74 /// extension. 75 /// 76 /// [`ext_image_drm_format_modifier`]: crate::device::DeviceExtensions::ext_image_drm_format_modifier 77 MEMORY_PLANE_0, MemoryPlane0 = MEMORY_PLANE_0_EXT { 78 device_extensions: [ext_image_drm_format_modifier], 79 }, 80 81 /// The second memory plane of images created through the [`ext_image_drm_format_modifier`] 82 /// extension. 83 /// 84 /// [`ext_image_drm_format_modifier`]: crate::device::DeviceExtensions::ext_image_drm_format_modifier 85 MEMORY_PLANE_1, MemoryPlane1 = MEMORY_PLANE_1_EXT { 86 device_extensions: [ext_image_drm_format_modifier], 87 }, 88 89 /// The third memory plane of images created through the [`ext_image_drm_format_modifier`] 90 /// extension. 91 /// 92 /// [`ext_image_drm_format_modifier`]: crate::device::DeviceExtensions::ext_image_drm_format_modifier 93 MEMORY_PLANE_2, MemoryPlane2 = MEMORY_PLANE_2_EXT { 94 device_extensions: [ext_image_drm_format_modifier], 95 }, 96 } 97