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