erupt/generated/extensions/
ext_astc_decode_mode.rs

1// DO NOT EDIT: @generated by erupt's generator
2///<s>Vulkan Manual Page</s> · Constant
3#[doc(alias = "VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION")]
4pub const EXT_ASTC_DECODE_MODE_SPEC_VERSION: u32 = 1;
5///<s>Vulkan Manual Page</s> · Constant
6#[doc(alias = "VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME")]
7pub const EXT_ASTC_DECODE_MODE_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!(
8    "VK_EXT_astc_decode_mode"
9);
10///Provided by [`crate::extensions::ext_astc_decode_mode`]
11impl crate::vk1_0::StructureType {
12    pub const IMAGE_VIEW_ASTC_DECODE_MODE_EXT: Self = Self(1000067000);
13    pub const PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT: Self = Self(1000067001);
14}
15impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceASTCDecodeFeaturesEXT>
16for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
17impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'_>>
18for crate::vk1_0::DeviceCreateInfoBuilder<'a> {}
19impl<'a> crate::ExtendableFrom<'a, ImageViewASTCDecodeModeEXT>
20for crate::vk1_0::ImageViewCreateInfoBuilder<'a> {}
21impl<'a> crate::ExtendableFrom<'a, ImageViewASTCDecodeModeEXTBuilder<'_>>
22for crate::vk1_0::ImageViewCreateInfoBuilder<'a> {}
23impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceASTCDecodeFeaturesEXT>
24for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
25impl<'a> crate::ExtendableFrom<'a, PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'_>>
26for crate::vk1_1::PhysicalDeviceFeatures2Builder<'a> {}
27///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkImageViewASTCDecodeModeEXT.html) · Structure
28#[doc(alias = "VkImageViewASTCDecodeModeEXT")]
29#[derive(Copy, Clone)]
30#[repr(C)]
31pub struct ImageViewASTCDecodeModeEXT {
32    pub s_type: crate::vk1_0::StructureType,
33    pub p_next: *const std::ffi::c_void,
34    pub decode_mode: crate::vk1_0::Format,
35}
36impl ImageViewASTCDecodeModeEXT {
37    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::IMAGE_VIEW_ASTC_DECODE_MODE_EXT;
38}
39impl Default for ImageViewASTCDecodeModeEXT {
40    fn default() -> Self {
41        Self {
42            s_type: Self::STRUCTURE_TYPE,
43            p_next: std::ptr::null(),
44            decode_mode: Default::default(),
45        }
46    }
47}
48impl std::fmt::Debug for ImageViewASTCDecodeModeEXT {
49    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
50        f.debug_struct("ImageViewASTCDecodeModeEXT")
51            .field("s_type", &self.s_type)
52            .field("p_next", &self.p_next)
53            .field("decode_mode", &self.decode_mode)
54            .finish()
55    }
56}
57impl ImageViewASTCDecodeModeEXT {
58    #[inline]
59    pub fn into_builder<'a>(self) -> ImageViewASTCDecodeModeEXTBuilder<'a> {
60        ImageViewASTCDecodeModeEXTBuilder(self, std::marker::PhantomData)
61    }
62}
63#[derive(Copy, Clone)]
64///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkImageViewASTCDecodeModeEXT.html) · Builder of [`ImageViewASTCDecodeModeEXT`]
65#[repr(transparent)]
66pub struct ImageViewASTCDecodeModeEXTBuilder<'a>(
67    ImageViewASTCDecodeModeEXT,
68    std::marker::PhantomData<&'a ()>,
69);
70impl<'a> ImageViewASTCDecodeModeEXTBuilder<'a> {
71    #[inline]
72    pub fn new() -> ImageViewASTCDecodeModeEXTBuilder<'a> {
73        ImageViewASTCDecodeModeEXTBuilder(Default::default(), std::marker::PhantomData)
74    }
75    #[inline]
76    #[must_use]
77    pub fn decode_mode(mut self, decode_mode: crate::vk1_0::Format) -> Self {
78        self.0.decode_mode = decode_mode as _;
79        self
80    }
81    #[inline]
82    /// Discards all lifetime information.
83    /// Use the `Deref` and `DerefMut` implementations if possible.
84    pub fn build_dangling(self) -> ImageViewASTCDecodeModeEXT {
85        self.0
86    }
87}
88impl<'a> std::default::Default for ImageViewASTCDecodeModeEXTBuilder<'a> {
89    fn default() -> ImageViewASTCDecodeModeEXTBuilder<'a> {
90        Self::new()
91    }
92}
93impl<'a> std::fmt::Debug for ImageViewASTCDecodeModeEXTBuilder<'a> {
94    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
95        std::fmt::Debug::fmt(&self.0, f)
96    }
97}
98impl<'a> std::ops::Deref for ImageViewASTCDecodeModeEXTBuilder<'a> {
99    type Target = ImageViewASTCDecodeModeEXT;
100    fn deref(&self) -> &Self::Target {
101        &self.0
102    }
103}
104impl<'a> std::ops::DerefMut for ImageViewASTCDecodeModeEXTBuilder<'a> {
105    fn deref_mut(&mut self) -> &mut Self::Target {
106        &mut self.0
107    }
108}
109///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceASTCDecodeFeaturesEXT.html) · Structure
110#[doc(alias = "VkPhysicalDeviceASTCDecodeFeaturesEXT")]
111#[derive(Copy, Clone)]
112#[repr(C)]
113pub struct PhysicalDeviceASTCDecodeFeaturesEXT {
114    pub s_type: crate::vk1_0::StructureType,
115    pub p_next: *mut std::ffi::c_void,
116    pub decode_mode_shared_exponent: crate::vk1_0::Bool32,
117}
118impl PhysicalDeviceASTCDecodeFeaturesEXT {
119    pub const STRUCTURE_TYPE: crate::vk1_0::StructureType = crate::vk1_0::StructureType::PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT;
120}
121impl Default for PhysicalDeviceASTCDecodeFeaturesEXT {
122    fn default() -> Self {
123        Self {
124            s_type: Self::STRUCTURE_TYPE,
125            p_next: std::ptr::null_mut(),
126            decode_mode_shared_exponent: Default::default(),
127        }
128    }
129}
130impl std::fmt::Debug for PhysicalDeviceASTCDecodeFeaturesEXT {
131    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
132        f.debug_struct("PhysicalDeviceASTCDecodeFeaturesEXT")
133            .field("s_type", &self.s_type)
134            .field("p_next", &self.p_next)
135            .field(
136                "decode_mode_shared_exponent",
137                &(self.decode_mode_shared_exponent != 0),
138            )
139            .finish()
140    }
141}
142impl PhysicalDeviceASTCDecodeFeaturesEXT {
143    #[inline]
144    pub fn into_builder<'a>(self) -> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
145        PhysicalDeviceASTCDecodeFeaturesEXTBuilder(self, std::marker::PhantomData)
146    }
147}
148#[derive(Copy, Clone)]
149///[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceASTCDecodeFeaturesEXT.html) · Builder of [`PhysicalDeviceASTCDecodeFeaturesEXT`]
150#[repr(transparent)]
151pub struct PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a>(
152    PhysicalDeviceASTCDecodeFeaturesEXT,
153    std::marker::PhantomData<&'a ()>,
154);
155impl<'a> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
156    #[inline]
157    pub fn new() -> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
158        PhysicalDeviceASTCDecodeFeaturesEXTBuilder(
159            Default::default(),
160            std::marker::PhantomData,
161        )
162    }
163    #[inline]
164    #[must_use]
165    pub fn decode_mode_shared_exponent(
166        mut self,
167        decode_mode_shared_exponent: bool,
168    ) -> Self {
169        self.0.decode_mode_shared_exponent = decode_mode_shared_exponent as _;
170        self
171    }
172    #[inline]
173    /// Discards all lifetime information.
174    /// Use the `Deref` and `DerefMut` implementations if possible.
175    pub fn build_dangling(self) -> PhysicalDeviceASTCDecodeFeaturesEXT {
176        self.0
177    }
178}
179impl<'a> std::default::Default for PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
180    fn default() -> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
181        Self::new()
182    }
183}
184impl<'a> std::fmt::Debug for PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
185    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
186        std::fmt::Debug::fmt(&self.0, f)
187    }
188}
189impl<'a> std::ops::Deref for PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
190    type Target = PhysicalDeviceASTCDecodeFeaturesEXT;
191    fn deref(&self) -> &Self::Target {
192        &self.0
193    }
194}
195impl<'a> std::ops::DerefMut for PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> {
196    fn deref_mut(&mut self) -> &mut Self::Target {
197        &mut self.0
198    }
199}