1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
#[doc = "<s>Vulkan Manual Page</s> · Constant"] #[doc(alias = "VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION")] pub const KHR_INCREMENTAL_PRESENT_SPEC_VERSION: u32 = 1; #[doc = "<s>Vulkan Manual Page</s> · Constant"] #[doc(alias = "VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME")] pub const KHR_INCREMENTAL_PRESENT_EXTENSION_NAME: *const std::os::raw::c_char = crate::cstr!("VK_KHR_incremental_present"); #[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPresentRegionsKHR.html) · Structure"] #[doc(alias = "VkPresentRegionsKHR")] #[derive(Copy, Clone)] #[repr(C)] pub struct PresentRegionsKHR { pub s_type: crate::vk1_0::StructureType, pub p_next: *const std::ffi::c_void, pub swapchain_count: u32, pub p_regions: *const crate::extensions::khr_incremental_present::PresentRegionKHR, } impl Default for PresentRegionsKHR { fn default() -> Self { Self { s_type: crate::vk1_0::StructureType::PRESENT_REGIONS_KHR, p_next: std::ptr::null(), swapchain_count: Default::default(), p_regions: std::ptr::null(), } } } impl std::fmt::Debug for PresentRegionsKHR { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.debug_struct("PresentRegionsKHR") .field("s_type", &self.s_type) .field("p_next", &self.p_next) .field("swapchain_count", &self.swapchain_count) .field("p_regions", &self.p_regions) .finish() } } impl PresentRegionsKHR { #[inline] pub fn into_builder<'a>(self) -> PresentRegionsKHRBuilder<'a> { PresentRegionsKHRBuilder(self, std::marker::PhantomData) } } #[derive(Copy, Clone)] #[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPresentRegionsKHR.html) · Builder of [`PresentRegionsKHR`]"] #[repr(transparent)] pub struct PresentRegionsKHRBuilder<'a>(PresentRegionsKHR, std::marker::PhantomData<&'a ()>); impl<'a> PresentRegionsKHRBuilder<'a> { #[inline] pub fn new() -> PresentRegionsKHRBuilder<'a> { PresentRegionsKHRBuilder(Default::default(), std::marker::PhantomData) } #[inline] pub fn regions( mut self, regions: &'a [crate::extensions::khr_incremental_present::PresentRegionKHRBuilder], ) -> Self { self.0.p_regions = regions.as_ptr() as _; self.0.swapchain_count = regions.len() as _; self } #[inline] #[doc = "Discards all lifetime information. Use the `Deref` and `DerefMut` implementations if possible."] pub fn build(self) -> PresentRegionsKHR { self.0 } } impl<'a> std::default::Default for PresentRegionsKHRBuilder<'a> { fn default() -> PresentRegionsKHRBuilder<'a> { Self::new() } } impl<'a> std::fmt::Debug for PresentRegionsKHRBuilder<'a> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { std::fmt::Debug::fmt(&self.0, f) } } impl<'a> std::ops::Deref for PresentRegionsKHRBuilder<'a> { type Target = PresentRegionsKHR; fn deref(&self) -> &Self::Target { &self.0 } } impl<'a> std::ops::DerefMut for PresentRegionsKHRBuilder<'a> { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } #[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPresentRegionKHR.html) · Structure"] #[doc(alias = "VkPresentRegionKHR")] #[derive(Copy, Clone)] #[repr(C)] pub struct PresentRegionKHR { pub rectangle_count: u32, pub p_rectangles: *const crate::extensions::khr_incremental_present::RectLayerKHR, } impl Default for PresentRegionKHR { fn default() -> Self { Self { rectangle_count: Default::default(), p_rectangles: std::ptr::null(), } } } impl std::fmt::Debug for PresentRegionKHR { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.debug_struct("PresentRegionKHR") .field("rectangle_count", &self.rectangle_count) .field("p_rectangles", &self.p_rectangles) .finish() } } impl PresentRegionKHR { #[inline] pub fn into_builder<'a>(self) -> PresentRegionKHRBuilder<'a> { PresentRegionKHRBuilder(self, std::marker::PhantomData) } } #[derive(Copy, Clone)] #[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPresentRegionKHR.html) · Builder of [`PresentRegionKHR`]"] #[repr(transparent)] pub struct PresentRegionKHRBuilder<'a>(PresentRegionKHR, std::marker::PhantomData<&'a ()>); impl<'a> PresentRegionKHRBuilder<'a> { #[inline] pub fn new() -> PresentRegionKHRBuilder<'a> { PresentRegionKHRBuilder(Default::default(), std::marker::PhantomData) } #[inline] pub fn rectangles( mut self, rectangles: &'a [crate::extensions::khr_incremental_present::RectLayerKHRBuilder], ) -> Self { self.0.p_rectangles = rectangles.as_ptr() as _; self.0.rectangle_count = rectangles.len() as _; self } #[inline] #[doc = "Discards all lifetime information. Use the `Deref` and `DerefMut` implementations if possible."] pub fn build(self) -> PresentRegionKHR { self.0 } } impl<'a> std::default::Default for PresentRegionKHRBuilder<'a> { fn default() -> PresentRegionKHRBuilder<'a> { Self::new() } } impl<'a> std::fmt::Debug for PresentRegionKHRBuilder<'a> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { std::fmt::Debug::fmt(&self.0, f) } } impl<'a> std::ops::Deref for PresentRegionKHRBuilder<'a> { type Target = PresentRegionKHR; fn deref(&self) -> &Self::Target { &self.0 } } impl<'a> std::ops::DerefMut for PresentRegionKHRBuilder<'a> { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } #[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRectLayerKHR.html) · Structure"] #[doc(alias = "VkRectLayerKHR")] #[derive(Copy, Clone)] #[repr(C)] pub struct RectLayerKHR { pub offset: crate::vk1_0::Offset2D, pub extent: crate::vk1_0::Extent2D, pub layer: u32, } impl Default for RectLayerKHR { fn default() -> Self { Self { offset: Default::default(), extent: Default::default(), layer: Default::default(), } } } impl std::fmt::Debug for RectLayerKHR { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.debug_struct("RectLayerKHR") .field("offset", &self.offset) .field("extent", &self.extent) .field("layer", &self.layer) .finish() } } impl RectLayerKHR { #[inline] pub fn into_builder<'a>(self) -> RectLayerKHRBuilder<'a> { RectLayerKHRBuilder(self, std::marker::PhantomData) } } #[derive(Copy, Clone)] #[doc = "[Vulkan Manual Page](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRectLayerKHR.html) · Builder of [`RectLayerKHR`]"] #[repr(transparent)] pub struct RectLayerKHRBuilder<'a>(RectLayerKHR, std::marker::PhantomData<&'a ()>); impl<'a> RectLayerKHRBuilder<'a> { #[inline] pub fn new() -> RectLayerKHRBuilder<'a> { RectLayerKHRBuilder(Default::default(), std::marker::PhantomData) } #[inline] pub fn offset(mut self, offset: crate::vk1_0::Offset2D) -> Self { self.0.offset = offset as _; self } #[inline] pub fn extent(mut self, extent: crate::vk1_0::Extent2D) -> Self { self.0.extent = extent as _; self } #[inline] pub fn layer(mut self, layer: u32) -> Self { self.0.layer = layer as _; self } #[inline] #[doc = "Discards all lifetime information. Use the `Deref` and `DerefMut` implementations if possible."] pub fn build(self) -> RectLayerKHR { self.0 } } impl<'a> std::default::Default for RectLayerKHRBuilder<'a> { fn default() -> RectLayerKHRBuilder<'a> { Self::new() } } impl<'a> std::fmt::Debug for RectLayerKHRBuilder<'a> { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { std::fmt::Debug::fmt(&self.0, f) } } impl<'a> std::ops::Deref for RectLayerKHRBuilder<'a> { type Target = RectLayerKHR; fn deref(&self) -> &Self::Target { &self.0 } } impl<'a> std::ops::DerefMut for RectLayerKHRBuilder<'a> { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } }