1 use crate::vk::aliases::*;
2 use crate::vk::bitflags::*;
3 use crate::vk::constants::*;
4 use crate::vk::enums::*;
5 use crate::vk::native::*;
6 use crate::vk::platform_types::*;
7 use crate::vk::{ptr_chain_iter, Handle};
8 use std::fmt;
9 use std::os::raw::*;
10 #[deprecated = "This define is deprecated. VK_MAKE_API_VERSION should be used instead."]
11 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_MAKE_VERSION.html>"]
make_version(major: u32, minor: u32, patch: u32) -> u3212 pub const fn make_version(major: u32, minor: u32, patch: u32) -> u32 {
13     ((major) << 22) | ((minor) << 12) | (patch)
14 }
15 #[deprecated = "This define is deprecated. VK_API_VERSION_MAJOR should be used instead."]
16 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_VERSION_MAJOR.html>"]
version_major(version: u32) -> u3217 pub const fn version_major(version: u32) -> u32 {
18     (version) >> 22
19 }
20 #[deprecated = "This define is deprecated. VK_API_VERSION_MINOR should be used instead."]
21 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_VERSION_MINOR.html>"]
version_minor(version: u32) -> u3222 pub const fn version_minor(version: u32) -> u32 {
23     ((version) >> 12) & 0x3ffu32
24 }
25 #[deprecated = "This define is deprecated. VK_API_VERSION_PATCH should be used instead."]
26 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_VERSION_PATCH.html>"]
version_patch(version: u32) -> u3227 pub const fn version_patch(version: u32) -> u32 {
28     (version) & 0xfffu32
29 }
30 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_MAKE_API_VERSION.html>"]
make_api_version(variant: u32, major: u32, minor: u32, patch: u32) -> u3231 pub const fn make_api_version(variant: u32, major: u32, minor: u32, patch: u32) -> u32 {
32     ((variant) << 29) | ((major) << 22) | ((minor) << 12) | (patch)
33 }
34 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_API_VERSION_VARIANT.html>"]
api_version_variant(version: u32) -> u3235 pub const fn api_version_variant(version: u32) -> u32 {
36     (version) >> 29
37 }
38 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_API_VERSION_MAJOR.html>"]
api_version_major(version: u32) -> u3239 pub const fn api_version_major(version: u32) -> u32 {
40     ((version) >> 22) & 0x7fu32
41 }
42 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_API_VERSION_MINOR.html>"]
api_version_minor(version: u32) -> u3243 pub const fn api_version_minor(version: u32) -> u32 {
44     ((version) >> 12) & 0x3ffu32
45 }
46 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_API_VERSION_PATCH.html>"]
api_version_patch(version: u32) -> u3247 pub const fn api_version_patch(version: u32) -> u32 {
48     (version) & 0xfffu32
49 }
50 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_API_VERSION_1_0.html>"]
51 pub const API_VERSION_1_0: u32 = make_api_version(0, 1, 0, 0);
52 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_API_VERSION_1_1.html>"]
53 pub const API_VERSION_1_1: u32 = make_api_version(0, 1, 1, 0);
54 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_API_VERSION_1_2.html>"]
55 pub const API_VERSION_1_2: u32 = make_api_version(0, 1, 2, 0);
56 pub const HEADER_VERSION: u32 = 191u32;
57 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_HEADER_VERSION_COMPLETE.html>"]
58 pub const HEADER_VERSION_COMPLETE: u32 = make_api_version(0, 1, 2, HEADER_VERSION);
59 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSampleMask.html>"]
60 pub type SampleMask = u32;
61 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBool32.html>"]
62 pub type Bool32 = u32;
63 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFlags.html>"]
64 pub type Flags = u32;
65 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFlags64.html>"]
66 pub type Flags64 = u64;
67 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceSize.html>"]
68 pub type DeviceSize = u64;
69 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceAddress.html>"]
70 pub type DeviceAddress = u64;
71 #[repr(transparent)]
72 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
73 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryPoolCreateFlags.html>"]
74 pub struct QueryPoolCreateFlags(pub(crate) Flags);
75 vk_bitflags_wrapped!(QueryPoolCreateFlags, 0b0, Flags);
76 #[repr(transparent)]
77 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
78 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDepthStencilStateCreateFlags.html>"]
79 pub struct PipelineDepthStencilStateCreateFlags(pub(crate) Flags);
80 vk_bitflags_wrapped!(PipelineDepthStencilStateCreateFlags, 0b0, Flags);
81 #[repr(transparent)]
82 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
83 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDynamicStateCreateFlags.html>"]
84 pub struct PipelineDynamicStateCreateFlags(pub(crate) Flags);
85 vk_bitflags_wrapped!(PipelineDynamicStateCreateFlags, 0b0, Flags);
86 #[repr(transparent)]
87 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
88 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendStateCreateFlags.html>"]
89 pub struct PipelineColorBlendStateCreateFlags(pub(crate) Flags);
90 vk_bitflags_wrapped!(PipelineColorBlendStateCreateFlags, 0b0, Flags);
91 #[repr(transparent)]
92 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
93 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineMultisampleStateCreateFlags.html>"]
94 pub struct PipelineMultisampleStateCreateFlags(pub(crate) Flags);
95 vk_bitflags_wrapped!(PipelineMultisampleStateCreateFlags, 0b0, Flags);
96 #[repr(transparent)]
97 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
98 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateCreateFlags.html>"]
99 pub struct PipelineRasterizationStateCreateFlags(pub(crate) Flags);
100 vk_bitflags_wrapped!(PipelineRasterizationStateCreateFlags, 0b0, Flags);
101 #[repr(transparent)]
102 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
103 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportStateCreateFlags.html>"]
104 pub struct PipelineViewportStateCreateFlags(pub(crate) Flags);
105 vk_bitflags_wrapped!(PipelineViewportStateCreateFlags, 0b0, Flags);
106 #[repr(transparent)]
107 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
108 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineTessellationStateCreateFlags.html>"]
109 pub struct PipelineTessellationStateCreateFlags(pub(crate) Flags);
110 vk_bitflags_wrapped!(PipelineTessellationStateCreateFlags, 0b0, Flags);
111 #[repr(transparent)]
112 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
113 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineInputAssemblyStateCreateFlags.html>"]
114 pub struct PipelineInputAssemblyStateCreateFlags(pub(crate) Flags);
115 vk_bitflags_wrapped!(PipelineInputAssemblyStateCreateFlags, 0b0, Flags);
116 #[repr(transparent)]
117 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
118 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineVertexInputStateCreateFlags.html>"]
119 pub struct PipelineVertexInputStateCreateFlags(pub(crate) Flags);
120 vk_bitflags_wrapped!(PipelineVertexInputStateCreateFlags, 0b0, Flags);
121 #[repr(transparent)]
122 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
123 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferViewCreateFlags.html>"]
124 pub struct BufferViewCreateFlags(pub(crate) Flags);
125 vk_bitflags_wrapped!(BufferViewCreateFlags, 0b0, Flags);
126 #[repr(transparent)]
127 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
128 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstanceCreateFlags.html>"]
129 pub struct InstanceCreateFlags(pub(crate) Flags);
130 vk_bitflags_wrapped!(InstanceCreateFlags, 0b0, Flags);
131 #[repr(transparent)]
132 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
133 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceCreateFlags.html>"]
134 pub struct DeviceCreateFlags(pub(crate) Flags);
135 vk_bitflags_wrapped!(DeviceCreateFlags, 0b0, Flags);
136 #[repr(transparent)]
137 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
138 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryMapFlags.html>"]
139 pub struct MemoryMapFlags(pub(crate) Flags);
140 vk_bitflags_wrapped!(MemoryMapFlags, 0b0, Flags);
141 #[repr(transparent)]
142 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
143 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolResetFlags.html>"]
144 pub struct DescriptorPoolResetFlags(pub(crate) Flags);
145 vk_bitflags_wrapped!(DescriptorPoolResetFlags, 0b0, Flags);
146 #[repr(transparent)]
147 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
148 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorUpdateTemplateCreateFlags.html>"]
149 pub struct DescriptorUpdateTemplateCreateFlags(pub(crate) Flags);
150 vk_bitflags_wrapped!(DescriptorUpdateTemplateCreateFlags, 0b0, Flags);
151 #[repr(transparent)]
152 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
153 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureMotionInfoFlagsNV.html>"]
154 pub struct AccelerationStructureMotionInfoFlagsNV(pub(crate) Flags);
155 vk_bitflags_wrapped!(AccelerationStructureMotionInfoFlagsNV, 0b0, Flags);
156 #[repr(transparent)]
157 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
158 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureMotionInstanceFlagsNV.html>"]
159 pub struct AccelerationStructureMotionInstanceFlagsNV(pub(crate) Flags);
160 vk_bitflags_wrapped!(AccelerationStructureMotionInstanceFlagsNV, 0b0, Flags);
161 #[repr(transparent)]
162 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
163 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayModeCreateFlagsKHR.html>"]
164 pub struct DisplayModeCreateFlagsKHR(pub(crate) Flags);
165 vk_bitflags_wrapped!(DisplayModeCreateFlagsKHR, 0b0, Flags);
166 #[repr(transparent)]
167 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
168 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplaySurfaceCreateFlagsKHR.html>"]
169 pub struct DisplaySurfaceCreateFlagsKHR(pub(crate) Flags);
170 vk_bitflags_wrapped!(DisplaySurfaceCreateFlagsKHR, 0b0, Flags);
171 #[repr(transparent)]
172 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
173 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAndroidSurfaceCreateFlagsKHR.html>"]
174 pub struct AndroidSurfaceCreateFlagsKHR(pub(crate) Flags);
175 vk_bitflags_wrapped!(AndroidSurfaceCreateFlagsKHR, 0b0, Flags);
176 #[repr(transparent)]
177 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
178 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViSurfaceCreateFlagsNN.html>"]
179 pub struct ViSurfaceCreateFlagsNN(pub(crate) Flags);
180 vk_bitflags_wrapped!(ViSurfaceCreateFlagsNN, 0b0, Flags);
181 #[repr(transparent)]
182 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
183 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWaylandSurfaceCreateFlagsKHR.html>"]
184 pub struct WaylandSurfaceCreateFlagsKHR(pub(crate) Flags);
185 vk_bitflags_wrapped!(WaylandSurfaceCreateFlagsKHR, 0b0, Flags);
186 #[repr(transparent)]
187 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
188 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWin32SurfaceCreateFlagsKHR.html>"]
189 pub struct Win32SurfaceCreateFlagsKHR(pub(crate) Flags);
190 vk_bitflags_wrapped!(Win32SurfaceCreateFlagsKHR, 0b0, Flags);
191 #[repr(transparent)]
192 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
193 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkXlibSurfaceCreateFlagsKHR.html>"]
194 pub struct XlibSurfaceCreateFlagsKHR(pub(crate) Flags);
195 vk_bitflags_wrapped!(XlibSurfaceCreateFlagsKHR, 0b0, Flags);
196 #[repr(transparent)]
197 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
198 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkXcbSurfaceCreateFlagsKHR.html>"]
199 pub struct XcbSurfaceCreateFlagsKHR(pub(crate) Flags);
200 vk_bitflags_wrapped!(XcbSurfaceCreateFlagsKHR, 0b0, Flags);
201 #[repr(transparent)]
202 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
203 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDirectFBSurfaceCreateFlagsEXT.html>"]
204 pub struct DirectFBSurfaceCreateFlagsEXT(pub(crate) Flags);
205 vk_bitflags_wrapped!(DirectFBSurfaceCreateFlagsEXT, 0b0, Flags);
206 #[repr(transparent)]
207 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
208 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIOSSurfaceCreateFlagsMVK.html>"]
209 pub struct IOSSurfaceCreateFlagsMVK(pub(crate) Flags);
210 vk_bitflags_wrapped!(IOSSurfaceCreateFlagsMVK, 0b0, Flags);
211 #[repr(transparent)]
212 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
213 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMacOSSurfaceCreateFlagsMVK.html>"]
214 pub struct MacOSSurfaceCreateFlagsMVK(pub(crate) Flags);
215 vk_bitflags_wrapped!(MacOSSurfaceCreateFlagsMVK, 0b0, Flags);
216 #[repr(transparent)]
217 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
218 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMetalSurfaceCreateFlagsEXT.html>"]
219 pub struct MetalSurfaceCreateFlagsEXT(pub(crate) Flags);
220 vk_bitflags_wrapped!(MetalSurfaceCreateFlagsEXT, 0b0, Flags);
221 #[repr(transparent)]
222 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
223 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImagePipeSurfaceCreateFlagsFUCHSIA.html>"]
224 pub struct ImagePipeSurfaceCreateFlagsFUCHSIA(pub(crate) Flags);
225 vk_bitflags_wrapped!(ImagePipeSurfaceCreateFlagsFUCHSIA, 0b0, Flags);
226 #[repr(transparent)]
227 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
228 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStreamDescriptorSurfaceCreateFlagsGGP.html>"]
229 pub struct StreamDescriptorSurfaceCreateFlagsGGP(pub(crate) Flags);
230 vk_bitflags_wrapped!(StreamDescriptorSurfaceCreateFlagsGGP, 0b0, Flags);
231 #[repr(transparent)]
232 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
233 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkHeadlessSurfaceCreateFlagsEXT.html>"]
234 pub struct HeadlessSurfaceCreateFlagsEXT(pub(crate) Flags);
235 vk_bitflags_wrapped!(HeadlessSurfaceCreateFlagsEXT, 0b0, Flags);
236 #[repr(transparent)]
237 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
238 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkScreenSurfaceCreateFlagsQNX.html>"]
239 pub struct ScreenSurfaceCreateFlagsQNX(pub(crate) Flags);
240 vk_bitflags_wrapped!(ScreenSurfaceCreateFlagsQNX, 0b0, Flags);
241 #[repr(transparent)]
242 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
243 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandPoolTrimFlags.html>"]
244 pub struct CommandPoolTrimFlags(pub(crate) Flags);
245 vk_bitflags_wrapped!(CommandPoolTrimFlags, 0b0, Flags);
246 #[repr(transparent)]
247 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
248 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportSwizzleStateCreateFlagsNV.html>"]
249 pub struct PipelineViewportSwizzleStateCreateFlagsNV(pub(crate) Flags);
250 vk_bitflags_wrapped!(PipelineViewportSwizzleStateCreateFlagsNV, 0b0, Flags);
251 #[repr(transparent)]
252 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
253 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDiscardRectangleStateCreateFlagsEXT.html>"]
254 pub struct PipelineDiscardRectangleStateCreateFlagsEXT(pub(crate) Flags);
255 vk_bitflags_wrapped!(PipelineDiscardRectangleStateCreateFlagsEXT, 0b0, Flags);
256 #[repr(transparent)]
257 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
258 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageToColorStateCreateFlagsNV.html>"]
259 pub struct PipelineCoverageToColorStateCreateFlagsNV(pub(crate) Flags);
260 vk_bitflags_wrapped!(PipelineCoverageToColorStateCreateFlagsNV, 0b0, Flags);
261 #[repr(transparent)]
262 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
263 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageModulationStateCreateFlagsNV.html>"]
264 pub struct PipelineCoverageModulationStateCreateFlagsNV(pub(crate) Flags);
265 vk_bitflags_wrapped!(PipelineCoverageModulationStateCreateFlagsNV, 0b0, Flags);
266 #[repr(transparent)]
267 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
268 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCoverageReductionStateCreateFlagsNV.html>"]
269 pub struct PipelineCoverageReductionStateCreateFlagsNV(pub(crate) Flags);
270 vk_bitflags_wrapped!(PipelineCoverageReductionStateCreateFlagsNV, 0b0, Flags);
271 #[repr(transparent)]
272 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
273 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCacheCreateFlagsEXT.html>"]
274 pub struct ValidationCacheCreateFlagsEXT(pub(crate) Flags);
275 vk_bitflags_wrapped!(ValidationCacheCreateFlagsEXT, 0b0, Flags);
276 #[repr(transparent)]
277 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
278 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerCreateFlagsEXT.html>"]
279 pub struct DebugUtilsMessengerCreateFlagsEXT(pub(crate) Flags);
280 vk_bitflags_wrapped!(DebugUtilsMessengerCreateFlagsEXT, 0b0, Flags);
281 #[repr(transparent)]
282 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
283 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerCallbackDataFlagsEXT.html>"]
284 pub struct DebugUtilsMessengerCallbackDataFlagsEXT(pub(crate) Flags);
285 vk_bitflags_wrapped!(DebugUtilsMessengerCallbackDataFlagsEXT, 0b0, Flags);
286 #[repr(transparent)]
287 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
288 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportFlagsEXT.html>"]
289 pub struct DeviceMemoryReportFlagsEXT(pub(crate) Flags);
290 vk_bitflags_wrapped!(DeviceMemoryReportFlagsEXT, 0b0, Flags);
291 #[repr(transparent)]
292 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
293 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationConservativeStateCreateFlagsEXT.html>"]
294 pub struct PipelineRasterizationConservativeStateCreateFlagsEXT(pub(crate) Flags);
295 vk_bitflags_wrapped!(
296     PipelineRasterizationConservativeStateCreateFlagsEXT,
297     0b0,
298     Flags
299 );
300 #[repr(transparent)]
301 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
302 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateStreamCreateFlagsEXT.html>"]
303 pub struct PipelineRasterizationStateStreamCreateFlagsEXT(pub(crate) Flags);
304 vk_bitflags_wrapped!(PipelineRasterizationStateStreamCreateFlagsEXT, 0b0, Flags);
305 #[repr(transparent)]
306 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
307 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationDepthClipStateCreateFlagsEXT.html>"]
308 pub struct PipelineRasterizationDepthClipStateCreateFlagsEXT(pub(crate) Flags);
309 vk_bitflags_wrapped!(
310     PipelineRasterizationDepthClipStateCreateFlagsEXT,
311     0b0,
312     Flags
313 );
314 #[repr(transparent)]
315 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
316 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVideoBeginCodingFlagsKHR.html>"]
317 pub struct VideoBeginCodingFlagsKHR(pub(crate) Flags);
318 vk_bitflags_wrapped!(VideoBeginCodingFlagsKHR, 0b0, Flags);
319 #[repr(transparent)]
320 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
321 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVideoEndCodingFlagsKHR.html>"]
322 pub struct VideoEndCodingFlagsKHR(pub(crate) Flags);
323 vk_bitflags_wrapped!(VideoEndCodingFlagsKHR, 0b0, Flags);
324 #[repr(transparent)]
325 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
326 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVideoDecodeH264CreateFlagsEXT.html>"]
327 pub struct VideoDecodeH264CreateFlagsEXT(pub(crate) Flags);
328 vk_bitflags_wrapped!(VideoDecodeH264CreateFlagsEXT, 0b0, Flags);
329 #[repr(transparent)]
330 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
331 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVideoDecodeH265CreateFlagsEXT.html>"]
332 pub struct VideoDecodeH265CreateFlagsEXT(pub(crate) Flags);
333 vk_bitflags_wrapped!(VideoDecodeH265CreateFlagsEXT, 0b0, Flags);
334 define_handle!(
335     Instance,
336     INSTANCE,
337     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstance.html>"
338 );
339 define_handle ! (PhysicalDevice , PHYSICAL_DEVICE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDevice.html>") ;
340 define_handle!(
341     Device,
342     DEVICE,
343     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDevice.html>"
344 );
345 define_handle!(
346     Queue,
347     QUEUE,
348     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueue.html>"
349 );
350 define_handle ! (CommandBuffer , COMMAND_BUFFER , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandBuffer.html>") ;
351 handle_nondispatchable ! (DeviceMemory , DEVICE_MEMORY , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemory.html>") ;
352 handle_nondispatchable ! (CommandPool , COMMAND_POOL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandPool.html>") ;
353 handle_nondispatchable!(
354     Buffer,
355     BUFFER,
356     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBuffer.html>"
357 );
358 handle_nondispatchable!(
359     BufferView,
360     BUFFER_VIEW,
361     doc =
362         "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferView.html>"
363 );
364 handle_nondispatchable!(
365     Image,
366     IMAGE,
367     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImage.html>"
368 );
369 handle_nondispatchable!(
370     ImageView,
371     IMAGE_VIEW,
372     doc =
373         "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageView.html>"
374 );
375 handle_nondispatchable ! (ShaderModule , SHADER_MODULE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderModule.html>") ;
376 handle_nondispatchable!(
377     Pipeline,
378     PIPELINE,
379     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipeline.html>"
380 );
381 handle_nondispatchable ! (PipelineLayout , PIPELINE_LAYOUT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineLayout.html>") ;
382 handle_nondispatchable!(
383     Sampler,
384     SAMPLER,
385     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSampler.html>"
386 );
387 handle_nondispatchable ! (DescriptorSet , DESCRIPTOR_SET , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSet.html>") ;
388 handle_nondispatchable ! (DescriptorSetLayout , DESCRIPTOR_SET_LAYOUT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayout.html>") ;
389 handle_nondispatchable ! (DescriptorPool , DESCRIPTOR_POOL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPool.html>") ;
390 handle_nondispatchable!(
391     Fence,
392     FENCE,
393     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFence.html>"
394 );
395 handle_nondispatchable!(
396     Semaphore,
397     SEMAPHORE,
398     doc =
399         "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSemaphore.html>"
400 );
401 handle_nondispatchable!(
402     Event,
403     EVENT,
404     doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkEvent.html>"
405 );
406 handle_nondispatchable!(
407     QueryPool,
408     QUERY_POOL,
409     doc =
410         "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryPool.html>"
411 );
412 handle_nondispatchable ! (Framebuffer , FRAMEBUFFER , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFramebuffer.html>") ;
413 handle_nondispatchable!(
414     RenderPass,
415     RENDER_PASS,
416     doc =
417         "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRenderPass.html>"
418 );
419 handle_nondispatchable ! (PipelineCache , PIPELINE_CACHE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCache.html>") ;
420 handle_nondispatchable ! (IndirectCommandsLayoutNV , INDIRECT_COMMANDS_LAYOUT_NV , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIndirectCommandsLayoutNV.html>") ;
421 handle_nondispatchable ! (DescriptorUpdateTemplate , DESCRIPTOR_UPDATE_TEMPLATE , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorUpdateTemplate.html>") ;
422 handle_nondispatchable ! (SamplerYcbcrConversion , SAMPLER_YCBCR_CONVERSION , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerYcbcrConversion.html>") ;
423 handle_nondispatchable ! (ValidationCacheEXT , VALIDATION_CACHE_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCacheEXT.html>") ;
424 handle_nondispatchable ! (AccelerationStructureKHR , ACCELERATION_STRUCTURE_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureKHR.html>") ;
425 handle_nondispatchable ! (AccelerationStructureNV , ACCELERATION_STRUCTURE_NV , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureNV.html>") ;
426 handle_nondispatchable ! (PerformanceConfigurationINTEL , PERFORMANCE_CONFIGURATION_INTEL , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceConfigurationINTEL.html>") ;
427 handle_nondispatchable ! (DeferredOperationKHR , DEFERRED_OPERATION_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeferredOperationKHR.html>") ;
428 handle_nondispatchable ! (PrivateDataSlotEXT , PRIVATE_DATA_SLOT_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPrivateDataSlotEXT.html>") ;
429 handle_nondispatchable ! (CuModuleNVX , CU_MODULE_NVX , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCuModuleNVX.html>") ;
430 handle_nondispatchable ! (CuFunctionNVX , CU_FUNCTION_NVX , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCuFunctionNVX.html>") ;
431 handle_nondispatchable!(
432     DisplayKHR,
433     DISPLAY_KHR,
434     doc =
435         "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayKHR.html>"
436 );
437 handle_nondispatchable ! (DisplayModeKHR , DISPLAY_MODE_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayModeKHR.html>") ;
438 handle_nondispatchable!(
439     SurfaceKHR,
440     SURFACE_KHR,
441     doc =
442         "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSurfaceKHR.html>"
443 );
444 handle_nondispatchable ! (SwapchainKHR , SWAPCHAIN_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSwapchainKHR.html>") ;
445 handle_nondispatchable ! (DebugReportCallbackEXT , DEBUG_REPORT_CALLBACK_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugReportCallbackEXT.html>") ;
446 handle_nondispatchable ! (DebugUtilsMessengerEXT , DEBUG_UTILS_MESSENGER_EXT , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugUtilsMessengerEXT.html>") ;
447 handle_nondispatchable ! (VideoSessionKHR , VIDEO_SESSION_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVideoSessionKHR.html>") ;
448 handle_nondispatchable ! (VideoSessionParametersKHR , VIDEO_SESSION_PARAMETERS_KHR , doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVideoSessionParametersKHR.html>") ;
449 #[allow(non_camel_case_types)]
450 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkInternalAllocationNotification.html>"]
451 pub type PFN_vkInternalAllocationNotification = Option<
452     unsafe extern "system" fn(
453         p_user_data: *mut c_void,
454         size: usize,
455         allocation_type: InternalAllocationType,
456         allocation_scope: SystemAllocationScope,
457     ),
458 >;
459 #[allow(non_camel_case_types)]
460 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkInternalFreeNotification.html>"]
461 pub type PFN_vkInternalFreeNotification = Option<
462     unsafe extern "system" fn(
463         p_user_data: *mut c_void,
464         size: usize,
465         allocation_type: InternalAllocationType,
466         allocation_scope: SystemAllocationScope,
467     ),
468 >;
469 #[allow(non_camel_case_types)]
470 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkReallocationFunction.html>"]
471 pub type PFN_vkReallocationFunction = Option<
472     unsafe extern "system" fn(
473         p_user_data: *mut c_void,
474         p_original: *mut c_void,
475         size: usize,
476         alignment: usize,
477         allocation_scope: SystemAllocationScope,
478     ) -> *mut c_void,
479 >;
480 #[allow(non_camel_case_types)]
481 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkAllocationFunction.html>"]
482 pub type PFN_vkAllocationFunction = Option<
483     unsafe extern "system" fn(
484         p_user_data: *mut c_void,
485         size: usize,
486         alignment: usize,
487         allocation_scope: SystemAllocationScope,
488     ) -> *mut c_void,
489 >;
490 #[allow(non_camel_case_types)]
491 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkFreeFunction.html>"]
492 pub type PFN_vkFreeFunction =
493     Option<unsafe extern "system" fn(p_user_data: *mut c_void, p_memory: *mut c_void)>;
494 #[allow(non_camel_case_types)]
495 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkVoidFunction.html>"]
496 pub type PFN_vkVoidFunction = Option<unsafe extern "system" fn()>;
497 #[allow(non_camel_case_types)]
498 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDebugReportCallbackEXT.html>"]
499 pub type PFN_vkDebugReportCallbackEXT = Option<
500     unsafe extern "system" fn(
501         flags: DebugReportFlagsEXT,
502         object_type: DebugReportObjectTypeEXT,
503         object: u64,
504         location: usize,
505         message_code: i32,
506         p_layer_prefix: *const c_char,
507         p_message: *const c_char,
508         p_user_data: *mut c_void,
509     ) -> Bool32,
510 >;
511 #[allow(non_camel_case_types)]
512 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDebugUtilsMessengerCallbackEXT.html>"]
513 pub type PFN_vkDebugUtilsMessengerCallbackEXT = Option<
514     unsafe extern "system" fn(
515         message_severity: DebugUtilsMessageSeverityFlagsEXT,
516         message_types: DebugUtilsMessageTypeFlagsEXT,
517         p_callback_data: *const DebugUtilsMessengerCallbackDataEXT,
518         p_user_data: *mut c_void,
519     ) -> Bool32,
520 >;
521 #[allow(non_camel_case_types)]
522 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/PFN_vkDeviceMemoryReportCallbackEXT.html>"]
523 pub type PFN_vkDeviceMemoryReportCallbackEXT = Option<
524     unsafe extern "system" fn(
525         p_callback_data: *const DeviceMemoryReportCallbackDataEXT,
526         p_user_data: *mut c_void,
527     ),
528 >;
529 #[repr(C)]
530 #[derive(Copy, Clone, Debug)]
531 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBaseOutStructure.html>"]
532 pub struct BaseOutStructure {
533     pub s_type: StructureType,
534     pub p_next: *mut BaseOutStructure,
535 }
536 impl ::std::default::Default for BaseOutStructure {
default() -> BaseOutStructure537     fn default() -> BaseOutStructure {
538         BaseOutStructure {
539             s_type: unsafe { ::std::mem::zeroed() },
540             p_next: ::std::ptr::null_mut(),
541         }
542     }
543 }
544 #[repr(C)]
545 #[derive(Copy, Clone, Debug)]
546 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBaseInStructure.html>"]
547 pub struct BaseInStructure {
548     pub s_type: StructureType,
549     pub p_next: *const BaseInStructure,
550 }
551 impl ::std::default::Default for BaseInStructure {
default() -> BaseInStructure552     fn default() -> BaseInStructure {
553         BaseInStructure {
554             s_type: unsafe { ::std::mem::zeroed() },
555             p_next: ::std::ptr::null(),
556         }
557     }
558 }
559 #[repr(C)]
560 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
561 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkOffset2D.html>"]
562 pub struct Offset2D {
563     pub x: i32,
564     pub y: i32,
565 }
566 impl Offset2D {
builder<'a>() -> Offset2DBuilder<'a>567     pub fn builder<'a>() -> Offset2DBuilder<'a> {
568         Offset2DBuilder {
569             inner: Offset2D::default(),
570             marker: ::std::marker::PhantomData,
571         }
572     }
573 }
574 #[repr(transparent)]
575 pub struct Offset2DBuilder<'a> {
576     inner: Offset2D,
577     marker: ::std::marker::PhantomData<&'a ()>,
578 }
579 impl<'a> ::std::ops::Deref for Offset2DBuilder<'a> {
580     type Target = Offset2D;
deref(&self) -> &Self::Target581     fn deref(&self) -> &Self::Target {
582         &self.inner
583     }
584 }
585 impl<'a> ::std::ops::DerefMut for Offset2DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target586     fn deref_mut(&mut self) -> &mut Self::Target {
587         &mut self.inner
588     }
589 }
590 impl<'a> Offset2DBuilder<'a> {
x(mut self, x: i32) -> Self591     pub fn x(mut self, x: i32) -> Self {
592         self.inner.x = x;
593         self
594     }
y(mut self, y: i32) -> Self595     pub fn y(mut self, y: i32) -> Self {
596         self.inner.y = y;
597         self
598     }
599     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
600     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
601     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Offset2D602     pub fn build(self) -> Offset2D {
603         self.inner
604     }
605 }
606 #[repr(C)]
607 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
608 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkOffset3D.html>"]
609 pub struct Offset3D {
610     pub x: i32,
611     pub y: i32,
612     pub z: i32,
613 }
614 impl Offset3D {
builder<'a>() -> Offset3DBuilder<'a>615     pub fn builder<'a>() -> Offset3DBuilder<'a> {
616         Offset3DBuilder {
617             inner: Offset3D::default(),
618             marker: ::std::marker::PhantomData,
619         }
620     }
621 }
622 #[repr(transparent)]
623 pub struct Offset3DBuilder<'a> {
624     inner: Offset3D,
625     marker: ::std::marker::PhantomData<&'a ()>,
626 }
627 impl<'a> ::std::ops::Deref for Offset3DBuilder<'a> {
628     type Target = Offset3D;
deref(&self) -> &Self::Target629     fn deref(&self) -> &Self::Target {
630         &self.inner
631     }
632 }
633 impl<'a> ::std::ops::DerefMut for Offset3DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target634     fn deref_mut(&mut self) -> &mut Self::Target {
635         &mut self.inner
636     }
637 }
638 impl<'a> Offset3DBuilder<'a> {
x(mut self, x: i32) -> Self639     pub fn x(mut self, x: i32) -> Self {
640         self.inner.x = x;
641         self
642     }
y(mut self, y: i32) -> Self643     pub fn y(mut self, y: i32) -> Self {
644         self.inner.y = y;
645         self
646     }
z(mut self, z: i32) -> Self647     pub fn z(mut self, z: i32) -> Self {
648         self.inner.z = z;
649         self
650     }
651     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
652     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
653     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Offset3D654     pub fn build(self) -> Offset3D {
655         self.inner
656     }
657 }
658 #[repr(C)]
659 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
660 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtent2D.html>"]
661 pub struct Extent2D {
662     pub width: u32,
663     pub height: u32,
664 }
665 impl Extent2D {
builder<'a>() -> Extent2DBuilder<'a>666     pub fn builder<'a>() -> Extent2DBuilder<'a> {
667         Extent2DBuilder {
668             inner: Extent2D::default(),
669             marker: ::std::marker::PhantomData,
670         }
671     }
672 }
673 #[repr(transparent)]
674 pub struct Extent2DBuilder<'a> {
675     inner: Extent2D,
676     marker: ::std::marker::PhantomData<&'a ()>,
677 }
678 impl<'a> ::std::ops::Deref for Extent2DBuilder<'a> {
679     type Target = Extent2D;
deref(&self) -> &Self::Target680     fn deref(&self) -> &Self::Target {
681         &self.inner
682     }
683 }
684 impl<'a> ::std::ops::DerefMut for Extent2DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target685     fn deref_mut(&mut self) -> &mut Self::Target {
686         &mut self.inner
687     }
688 }
689 impl<'a> Extent2DBuilder<'a> {
width(mut self, width: u32) -> Self690     pub fn width(mut self, width: u32) -> Self {
691         self.inner.width = width;
692         self
693     }
height(mut self, height: u32) -> Self694     pub fn height(mut self, height: u32) -> Self {
695         self.inner.height = height;
696         self
697     }
698     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
699     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
700     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Extent2D701     pub fn build(self) -> Extent2D {
702         self.inner
703     }
704 }
705 #[repr(C)]
706 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
707 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtent3D.html>"]
708 pub struct Extent3D {
709     pub width: u32,
710     pub height: u32,
711     pub depth: u32,
712 }
713 impl Extent3D {
builder<'a>() -> Extent3DBuilder<'a>714     pub fn builder<'a>() -> Extent3DBuilder<'a> {
715         Extent3DBuilder {
716             inner: Extent3D::default(),
717             marker: ::std::marker::PhantomData,
718         }
719     }
720 }
721 #[repr(transparent)]
722 pub struct Extent3DBuilder<'a> {
723     inner: Extent3D,
724     marker: ::std::marker::PhantomData<&'a ()>,
725 }
726 impl<'a> ::std::ops::Deref for Extent3DBuilder<'a> {
727     type Target = Extent3D;
deref(&self) -> &Self::Target728     fn deref(&self) -> &Self::Target {
729         &self.inner
730     }
731 }
732 impl<'a> ::std::ops::DerefMut for Extent3DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target733     fn deref_mut(&mut self) -> &mut Self::Target {
734         &mut self.inner
735     }
736 }
737 impl<'a> Extent3DBuilder<'a> {
width(mut self, width: u32) -> Self738     pub fn width(mut self, width: u32) -> Self {
739         self.inner.width = width;
740         self
741     }
height(mut self, height: u32) -> Self742     pub fn height(mut self, height: u32) -> Self {
743         self.inner.height = height;
744         self
745     }
depth(mut self, depth: u32) -> Self746     pub fn depth(mut self, depth: u32) -> Self {
747         self.inner.depth = depth;
748         self
749     }
750     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
751     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
752     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Extent3D753     pub fn build(self) -> Extent3D {
754         self.inner
755     }
756 }
757 #[repr(C)]
758 #[derive(Copy, Clone, Default, Debug)]
759 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViewport.html>"]
760 pub struct Viewport {
761     pub x: f32,
762     pub y: f32,
763     pub width: f32,
764     pub height: f32,
765     pub min_depth: f32,
766     pub max_depth: f32,
767 }
768 impl Viewport {
builder<'a>() -> ViewportBuilder<'a>769     pub fn builder<'a>() -> ViewportBuilder<'a> {
770         ViewportBuilder {
771             inner: Viewport::default(),
772             marker: ::std::marker::PhantomData,
773         }
774     }
775 }
776 #[repr(transparent)]
777 pub struct ViewportBuilder<'a> {
778     inner: Viewport,
779     marker: ::std::marker::PhantomData<&'a ()>,
780 }
781 impl<'a> ::std::ops::Deref for ViewportBuilder<'a> {
782     type Target = Viewport;
deref(&self) -> &Self::Target783     fn deref(&self) -> &Self::Target {
784         &self.inner
785     }
786 }
787 impl<'a> ::std::ops::DerefMut for ViewportBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target788     fn deref_mut(&mut self) -> &mut Self::Target {
789         &mut self.inner
790     }
791 }
792 impl<'a> ViewportBuilder<'a> {
x(mut self, x: f32) -> Self793     pub fn x(mut self, x: f32) -> Self {
794         self.inner.x = x;
795         self
796     }
y(mut self, y: f32) -> Self797     pub fn y(mut self, y: f32) -> Self {
798         self.inner.y = y;
799         self
800     }
width(mut self, width: f32) -> Self801     pub fn width(mut self, width: f32) -> Self {
802         self.inner.width = width;
803         self
804     }
height(mut self, height: f32) -> Self805     pub fn height(mut self, height: f32) -> Self {
806         self.inner.height = height;
807         self
808     }
min_depth(mut self, min_depth: f32) -> Self809     pub fn min_depth(mut self, min_depth: f32) -> Self {
810         self.inner.min_depth = min_depth;
811         self
812     }
max_depth(mut self, max_depth: f32) -> Self813     pub fn max_depth(mut self, max_depth: f32) -> Self {
814         self.inner.max_depth = max_depth;
815         self
816     }
817     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
818     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
819     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Viewport820     pub fn build(self) -> Viewport {
821         self.inner
822     }
823 }
824 #[repr(C)]
825 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
826 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRect2D.html>"]
827 pub struct Rect2D {
828     pub offset: Offset2D,
829     pub extent: Extent2D,
830 }
831 impl Rect2D {
builder<'a>() -> Rect2DBuilder<'a>832     pub fn builder<'a>() -> Rect2DBuilder<'a> {
833         Rect2DBuilder {
834             inner: Rect2D::default(),
835             marker: ::std::marker::PhantomData,
836         }
837     }
838 }
839 #[repr(transparent)]
840 pub struct Rect2DBuilder<'a> {
841     inner: Rect2D,
842     marker: ::std::marker::PhantomData<&'a ()>,
843 }
844 impl<'a> ::std::ops::Deref for Rect2DBuilder<'a> {
845     type Target = Rect2D;
deref(&self) -> &Self::Target846     fn deref(&self) -> &Self::Target {
847         &self.inner
848     }
849 }
850 impl<'a> ::std::ops::DerefMut for Rect2DBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target851     fn deref_mut(&mut self) -> &mut Self::Target {
852         &mut self.inner
853     }
854 }
855 impl<'a> Rect2DBuilder<'a> {
offset(mut self, offset: Offset2D) -> Self856     pub fn offset(mut self, offset: Offset2D) -> Self {
857         self.inner.offset = offset;
858         self
859     }
extent(mut self, extent: Extent2D) -> Self860     pub fn extent(mut self, extent: Extent2D) -> Self {
861         self.inner.extent = extent;
862         self
863     }
864     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
865     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
866     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> Rect2D867     pub fn build(self) -> Rect2D {
868         self.inner
869     }
870 }
871 #[repr(C)]
872 #[derive(Copy, Clone, Default, Debug, PartialEq, Eq, Hash)]
873 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkClearRect.html>"]
874 pub struct ClearRect {
875     pub rect: Rect2D,
876     pub base_array_layer: u32,
877     pub layer_count: u32,
878 }
879 impl ClearRect {
builder<'a>() -> ClearRectBuilder<'a>880     pub fn builder<'a>() -> ClearRectBuilder<'a> {
881         ClearRectBuilder {
882             inner: ClearRect::default(),
883             marker: ::std::marker::PhantomData,
884         }
885     }
886 }
887 #[repr(transparent)]
888 pub struct ClearRectBuilder<'a> {
889     inner: ClearRect,
890     marker: ::std::marker::PhantomData<&'a ()>,
891 }
892 impl<'a> ::std::ops::Deref for ClearRectBuilder<'a> {
893     type Target = ClearRect;
deref(&self) -> &Self::Target894     fn deref(&self) -> &Self::Target {
895         &self.inner
896     }
897 }
898 impl<'a> ::std::ops::DerefMut for ClearRectBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target899     fn deref_mut(&mut self) -> &mut Self::Target {
900         &mut self.inner
901     }
902 }
903 impl<'a> ClearRectBuilder<'a> {
rect(mut self, rect: Rect2D) -> Self904     pub fn rect(mut self, rect: Rect2D) -> Self {
905         self.inner.rect = rect;
906         self
907     }
base_array_layer(mut self, base_array_layer: u32) -> Self908     pub fn base_array_layer(mut self, base_array_layer: u32) -> Self {
909         self.inner.base_array_layer = base_array_layer;
910         self
911     }
layer_count(mut self, layer_count: u32) -> Self912     pub fn layer_count(mut self, layer_count: u32) -> Self {
913         self.inner.layer_count = layer_count;
914         self
915     }
916     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
917     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
918     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ClearRect919     pub fn build(self) -> ClearRect {
920         self.inner
921     }
922 }
923 #[repr(C)]
924 #[derive(Copy, Clone, Default, Debug)]
925 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComponentMapping.html>"]
926 pub struct ComponentMapping {
927     pub r: ComponentSwizzle,
928     pub g: ComponentSwizzle,
929     pub b: ComponentSwizzle,
930     pub a: ComponentSwizzle,
931 }
932 impl ComponentMapping {
builder<'a>() -> ComponentMappingBuilder<'a>933     pub fn builder<'a>() -> ComponentMappingBuilder<'a> {
934         ComponentMappingBuilder {
935             inner: ComponentMapping::default(),
936             marker: ::std::marker::PhantomData,
937         }
938     }
939 }
940 #[repr(transparent)]
941 pub struct ComponentMappingBuilder<'a> {
942     inner: ComponentMapping,
943     marker: ::std::marker::PhantomData<&'a ()>,
944 }
945 impl<'a> ::std::ops::Deref for ComponentMappingBuilder<'a> {
946     type Target = ComponentMapping;
deref(&self) -> &Self::Target947     fn deref(&self) -> &Self::Target {
948         &self.inner
949     }
950 }
951 impl<'a> ::std::ops::DerefMut for ComponentMappingBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target952     fn deref_mut(&mut self) -> &mut Self::Target {
953         &mut self.inner
954     }
955 }
956 impl<'a> ComponentMappingBuilder<'a> {
r(mut self, r: ComponentSwizzle) -> Self957     pub fn r(mut self, r: ComponentSwizzle) -> Self {
958         self.inner.r = r;
959         self
960     }
g(mut self, g: ComponentSwizzle) -> Self961     pub fn g(mut self, g: ComponentSwizzle) -> Self {
962         self.inner.g = g;
963         self
964     }
b(mut self, b: ComponentSwizzle) -> Self965     pub fn b(mut self, b: ComponentSwizzle) -> Self {
966         self.inner.b = b;
967         self
968     }
a(mut self, a: ComponentSwizzle) -> Self969     pub fn a(mut self, a: ComponentSwizzle) -> Self {
970         self.inner.a = a;
971         self
972     }
973     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
974     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
975     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ComponentMapping976     pub fn build(self) -> ComponentMapping {
977         self.inner
978     }
979 }
980 #[repr(C)]
981 #[derive(Copy, Clone)]
982 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceProperties.html>"]
983 pub struct PhysicalDeviceProperties {
984     pub api_version: u32,
985     pub driver_version: u32,
986     pub vendor_id: u32,
987     pub device_id: u32,
988     pub device_type: PhysicalDeviceType,
989     pub device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE],
990     pub pipeline_cache_uuid: [u8; UUID_SIZE],
991     pub limits: PhysicalDeviceLimits,
992     pub sparse_properties: PhysicalDeviceSparseProperties,
993 }
994 impl fmt::Debug for PhysicalDeviceProperties {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result995     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
996         fmt.debug_struct("PhysicalDeviceProperties")
997             .field("api_version", &self.api_version)
998             .field("driver_version", &self.driver_version)
999             .field("vendor_id", &self.vendor_id)
1000             .field("device_id", &self.device_id)
1001             .field("device_type", &self.device_type)
1002             .field("device_name", &unsafe {
1003                 ::std::ffi::CStr::from_ptr(self.device_name.as_ptr() as *const c_char)
1004             })
1005             .field("pipeline_cache_uuid", &self.pipeline_cache_uuid)
1006             .field("limits", &self.limits)
1007             .field("sparse_properties", &self.sparse_properties)
1008             .finish()
1009     }
1010 }
1011 impl ::std::default::Default for PhysicalDeviceProperties {
default() -> PhysicalDeviceProperties1012     fn default() -> PhysicalDeviceProperties {
1013         PhysicalDeviceProperties {
1014             api_version: u32::default(),
1015             driver_version: u32::default(),
1016             vendor_id: u32::default(),
1017             device_id: u32::default(),
1018             device_type: PhysicalDeviceType::default(),
1019             device_name: unsafe { ::std::mem::zeroed() },
1020             pipeline_cache_uuid: unsafe { ::std::mem::zeroed() },
1021             limits: PhysicalDeviceLimits::default(),
1022             sparse_properties: PhysicalDeviceSparseProperties::default(),
1023         }
1024     }
1025 }
1026 impl PhysicalDeviceProperties {
builder<'a>() -> PhysicalDevicePropertiesBuilder<'a>1027     pub fn builder<'a>() -> PhysicalDevicePropertiesBuilder<'a> {
1028         PhysicalDevicePropertiesBuilder {
1029             inner: PhysicalDeviceProperties::default(),
1030             marker: ::std::marker::PhantomData,
1031         }
1032     }
1033 }
1034 #[repr(transparent)]
1035 pub struct PhysicalDevicePropertiesBuilder<'a> {
1036     inner: PhysicalDeviceProperties,
1037     marker: ::std::marker::PhantomData<&'a ()>,
1038 }
1039 impl<'a> ::std::ops::Deref for PhysicalDevicePropertiesBuilder<'a> {
1040     type Target = PhysicalDeviceProperties;
deref(&self) -> &Self::Target1041     fn deref(&self) -> &Self::Target {
1042         &self.inner
1043     }
1044 }
1045 impl<'a> ::std::ops::DerefMut for PhysicalDevicePropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1046     fn deref_mut(&mut self) -> &mut Self::Target {
1047         &mut self.inner
1048     }
1049 }
1050 impl<'a> PhysicalDevicePropertiesBuilder<'a> {
api_version(mut self, api_version: u32) -> Self1051     pub fn api_version(mut self, api_version: u32) -> Self {
1052         self.inner.api_version = api_version;
1053         self
1054     }
driver_version(mut self, driver_version: u32) -> Self1055     pub fn driver_version(mut self, driver_version: u32) -> Self {
1056         self.inner.driver_version = driver_version;
1057         self
1058     }
vendor_id(mut self, vendor_id: u32) -> Self1059     pub fn vendor_id(mut self, vendor_id: u32) -> Self {
1060         self.inner.vendor_id = vendor_id;
1061         self
1062     }
device_id(mut self, device_id: u32) -> Self1063     pub fn device_id(mut self, device_id: u32) -> Self {
1064         self.inner.device_id = device_id;
1065         self
1066     }
device_type(mut self, device_type: PhysicalDeviceType) -> Self1067     pub fn device_type(mut self, device_type: PhysicalDeviceType) -> Self {
1068         self.inner.device_type = device_type;
1069         self
1070     }
device_name(mut self, device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE]) -> Self1071     pub fn device_name(mut self, device_name: [c_char; MAX_PHYSICAL_DEVICE_NAME_SIZE]) -> Self {
1072         self.inner.device_name = device_name;
1073         self
1074     }
pipeline_cache_uuid(mut self, pipeline_cache_uuid: [u8; UUID_SIZE]) -> Self1075     pub fn pipeline_cache_uuid(mut self, pipeline_cache_uuid: [u8; UUID_SIZE]) -> Self {
1076         self.inner.pipeline_cache_uuid = pipeline_cache_uuid;
1077         self
1078     }
limits(mut self, limits: PhysicalDeviceLimits) -> Self1079     pub fn limits(mut self, limits: PhysicalDeviceLimits) -> Self {
1080         self.inner.limits = limits;
1081         self
1082     }
sparse_properties(mut self, sparse_properties: PhysicalDeviceSparseProperties) -> Self1083     pub fn sparse_properties(mut self, sparse_properties: PhysicalDeviceSparseProperties) -> Self {
1084         self.inner.sparse_properties = sparse_properties;
1085         self
1086     }
1087     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1088     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1089     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PhysicalDeviceProperties1090     pub fn build(self) -> PhysicalDeviceProperties {
1091         self.inner
1092     }
1093 }
1094 #[repr(C)]
1095 #[derive(Copy, Clone)]
1096 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkExtensionProperties.html>"]
1097 pub struct ExtensionProperties {
1098     pub extension_name: [c_char; MAX_EXTENSION_NAME_SIZE],
1099     pub spec_version: u32,
1100 }
1101 impl fmt::Debug for ExtensionProperties {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result1102     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1103         fmt.debug_struct("ExtensionProperties")
1104             .field("extension_name", &unsafe {
1105                 ::std::ffi::CStr::from_ptr(self.extension_name.as_ptr() as *const c_char)
1106             })
1107             .field("spec_version", &self.spec_version)
1108             .finish()
1109     }
1110 }
1111 impl ::std::default::Default for ExtensionProperties {
default() -> ExtensionProperties1112     fn default() -> ExtensionProperties {
1113         ExtensionProperties {
1114             extension_name: unsafe { ::std::mem::zeroed() },
1115             spec_version: u32::default(),
1116         }
1117     }
1118 }
1119 impl ExtensionProperties {
builder<'a>() -> ExtensionPropertiesBuilder<'a>1120     pub fn builder<'a>() -> ExtensionPropertiesBuilder<'a> {
1121         ExtensionPropertiesBuilder {
1122             inner: ExtensionProperties::default(),
1123             marker: ::std::marker::PhantomData,
1124         }
1125     }
1126 }
1127 #[repr(transparent)]
1128 pub struct ExtensionPropertiesBuilder<'a> {
1129     inner: ExtensionProperties,
1130     marker: ::std::marker::PhantomData<&'a ()>,
1131 }
1132 impl<'a> ::std::ops::Deref for ExtensionPropertiesBuilder<'a> {
1133     type Target = ExtensionProperties;
deref(&self) -> &Self::Target1134     fn deref(&self) -> &Self::Target {
1135         &self.inner
1136     }
1137 }
1138 impl<'a> ::std::ops::DerefMut for ExtensionPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1139     fn deref_mut(&mut self) -> &mut Self::Target {
1140         &mut self.inner
1141     }
1142 }
1143 impl<'a> ExtensionPropertiesBuilder<'a> {
extension_name(mut self, extension_name: [c_char; MAX_EXTENSION_NAME_SIZE]) -> Self1144     pub fn extension_name(mut self, extension_name: [c_char; MAX_EXTENSION_NAME_SIZE]) -> Self {
1145         self.inner.extension_name = extension_name;
1146         self
1147     }
spec_version(mut self, spec_version: u32) -> Self1148     pub fn spec_version(mut self, spec_version: u32) -> Self {
1149         self.inner.spec_version = spec_version;
1150         self
1151     }
1152     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1153     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1154     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ExtensionProperties1155     pub fn build(self) -> ExtensionProperties {
1156         self.inner
1157     }
1158 }
1159 #[repr(C)]
1160 #[derive(Copy, Clone)]
1161 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkLayerProperties.html>"]
1162 pub struct LayerProperties {
1163     pub layer_name: [c_char; MAX_EXTENSION_NAME_SIZE],
1164     pub spec_version: u32,
1165     pub implementation_version: u32,
1166     pub description: [c_char; MAX_DESCRIPTION_SIZE],
1167 }
1168 impl fmt::Debug for LayerProperties {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result1169     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1170         fmt.debug_struct("LayerProperties")
1171             .field("layer_name", &unsafe {
1172                 ::std::ffi::CStr::from_ptr(self.layer_name.as_ptr() as *const c_char)
1173             })
1174             .field("spec_version", &self.spec_version)
1175             .field("implementation_version", &self.implementation_version)
1176             .field("description", &unsafe {
1177                 ::std::ffi::CStr::from_ptr(self.description.as_ptr() as *const c_char)
1178             })
1179             .finish()
1180     }
1181 }
1182 impl ::std::default::Default for LayerProperties {
default() -> LayerProperties1183     fn default() -> LayerProperties {
1184         LayerProperties {
1185             layer_name: unsafe { ::std::mem::zeroed() },
1186             spec_version: u32::default(),
1187             implementation_version: u32::default(),
1188             description: unsafe { ::std::mem::zeroed() },
1189         }
1190     }
1191 }
1192 impl LayerProperties {
builder<'a>() -> LayerPropertiesBuilder<'a>1193     pub fn builder<'a>() -> LayerPropertiesBuilder<'a> {
1194         LayerPropertiesBuilder {
1195             inner: LayerProperties::default(),
1196             marker: ::std::marker::PhantomData,
1197         }
1198     }
1199 }
1200 #[repr(transparent)]
1201 pub struct LayerPropertiesBuilder<'a> {
1202     inner: LayerProperties,
1203     marker: ::std::marker::PhantomData<&'a ()>,
1204 }
1205 impl<'a> ::std::ops::Deref for LayerPropertiesBuilder<'a> {
1206     type Target = LayerProperties;
deref(&self) -> &Self::Target1207     fn deref(&self) -> &Self::Target {
1208         &self.inner
1209     }
1210 }
1211 impl<'a> ::std::ops::DerefMut for LayerPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1212     fn deref_mut(&mut self) -> &mut Self::Target {
1213         &mut self.inner
1214     }
1215 }
1216 impl<'a> LayerPropertiesBuilder<'a> {
layer_name(mut self, layer_name: [c_char; MAX_EXTENSION_NAME_SIZE]) -> Self1217     pub fn layer_name(mut self, layer_name: [c_char; MAX_EXTENSION_NAME_SIZE]) -> Self {
1218         self.inner.layer_name = layer_name;
1219         self
1220     }
spec_version(mut self, spec_version: u32) -> Self1221     pub fn spec_version(mut self, spec_version: u32) -> Self {
1222         self.inner.spec_version = spec_version;
1223         self
1224     }
implementation_version(mut self, implementation_version: u32) -> Self1225     pub fn implementation_version(mut self, implementation_version: u32) -> Self {
1226         self.inner.implementation_version = implementation_version;
1227         self
1228     }
description(mut self, description: [c_char; MAX_DESCRIPTION_SIZE]) -> Self1229     pub fn description(mut self, description: [c_char; MAX_DESCRIPTION_SIZE]) -> Self {
1230         self.inner.description = description;
1231         self
1232     }
1233     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1234     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1235     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> LayerProperties1236     pub fn build(self) -> LayerProperties {
1237         self.inner
1238     }
1239 }
1240 #[repr(C)]
1241 #[derive(Copy, Clone, Debug)]
1242 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkApplicationInfo.html>"]
1243 pub struct ApplicationInfo {
1244     pub s_type: StructureType,
1245     pub p_next: *const c_void,
1246     pub p_application_name: *const c_char,
1247     pub application_version: u32,
1248     pub p_engine_name: *const c_char,
1249     pub engine_version: u32,
1250     pub api_version: u32,
1251 }
1252 impl ::std::default::Default for ApplicationInfo {
default() -> ApplicationInfo1253     fn default() -> ApplicationInfo {
1254         ApplicationInfo {
1255             s_type: StructureType::APPLICATION_INFO,
1256             p_next: ::std::ptr::null(),
1257             p_application_name: ::std::ptr::null(),
1258             application_version: u32::default(),
1259             p_engine_name: ::std::ptr::null(),
1260             engine_version: u32::default(),
1261             api_version: u32::default(),
1262         }
1263     }
1264 }
1265 impl ApplicationInfo {
builder<'a>() -> ApplicationInfoBuilder<'a>1266     pub fn builder<'a>() -> ApplicationInfoBuilder<'a> {
1267         ApplicationInfoBuilder {
1268             inner: ApplicationInfo::default(),
1269             marker: ::std::marker::PhantomData,
1270         }
1271     }
1272 }
1273 #[repr(transparent)]
1274 pub struct ApplicationInfoBuilder<'a> {
1275     inner: ApplicationInfo,
1276     marker: ::std::marker::PhantomData<&'a ()>,
1277 }
1278 impl<'a> ::std::ops::Deref for ApplicationInfoBuilder<'a> {
1279     type Target = ApplicationInfo;
deref(&self) -> &Self::Target1280     fn deref(&self) -> &Self::Target {
1281         &self.inner
1282     }
1283 }
1284 impl<'a> ::std::ops::DerefMut for ApplicationInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1285     fn deref_mut(&mut self) -> &mut Self::Target {
1286         &mut self.inner
1287     }
1288 }
1289 impl<'a> ApplicationInfoBuilder<'a> {
application_name(mut self, application_name: &'a ::std::ffi::CStr) -> Self1290     pub fn application_name(mut self, application_name: &'a ::std::ffi::CStr) -> Self {
1291         self.inner.p_application_name = application_name.as_ptr();
1292         self
1293     }
application_version(mut self, application_version: u32) -> Self1294     pub fn application_version(mut self, application_version: u32) -> Self {
1295         self.inner.application_version = application_version;
1296         self
1297     }
engine_name(mut self, engine_name: &'a ::std::ffi::CStr) -> Self1298     pub fn engine_name(mut self, engine_name: &'a ::std::ffi::CStr) -> Self {
1299         self.inner.p_engine_name = engine_name.as_ptr();
1300         self
1301     }
engine_version(mut self, engine_version: u32) -> Self1302     pub fn engine_version(mut self, engine_version: u32) -> Self {
1303         self.inner.engine_version = engine_version;
1304         self
1305     }
api_version(mut self, api_version: u32) -> Self1306     pub fn api_version(mut self, api_version: u32) -> Self {
1307         self.inner.api_version = api_version;
1308         self
1309     }
1310     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1311     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1312     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ApplicationInfo1313     pub fn build(self) -> ApplicationInfo {
1314         self.inner
1315     }
1316 }
1317 #[repr(C)]
1318 #[derive(Copy, Clone)]
1319 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAllocationCallbacks.html>"]
1320 pub struct AllocationCallbacks {
1321     pub p_user_data: *mut c_void,
1322     pub pfn_allocation: PFN_vkAllocationFunction,
1323     pub pfn_reallocation: PFN_vkReallocationFunction,
1324     pub pfn_free: PFN_vkFreeFunction,
1325     pub pfn_internal_allocation: PFN_vkInternalAllocationNotification,
1326     pub pfn_internal_free: PFN_vkInternalFreeNotification,
1327 }
1328 impl fmt::Debug for AllocationCallbacks {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result1329     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1330         fmt.debug_struct("AllocationCallbacks")
1331             .field("p_user_data", &self.p_user_data)
1332             .field(
1333                 "pfn_allocation",
1334                 &(self.pfn_allocation.map(|x| x as *const ())),
1335             )
1336             .field(
1337                 "pfn_reallocation",
1338                 &(self.pfn_reallocation.map(|x| x as *const ())),
1339             )
1340             .field("pfn_free", &(self.pfn_free.map(|x| x as *const ())))
1341             .field(
1342                 "pfn_internal_allocation",
1343                 &(self.pfn_internal_allocation.map(|x| x as *const ())),
1344             )
1345             .field(
1346                 "pfn_internal_free",
1347                 &(self.pfn_internal_free.map(|x| x as *const ())),
1348             )
1349             .finish()
1350     }
1351 }
1352 impl ::std::default::Default for AllocationCallbacks {
default() -> AllocationCallbacks1353     fn default() -> AllocationCallbacks {
1354         AllocationCallbacks {
1355             p_user_data: ::std::ptr::null_mut(),
1356             pfn_allocation: PFN_vkAllocationFunction::default(),
1357             pfn_reallocation: PFN_vkReallocationFunction::default(),
1358             pfn_free: PFN_vkFreeFunction::default(),
1359             pfn_internal_allocation: PFN_vkInternalAllocationNotification::default(),
1360             pfn_internal_free: PFN_vkInternalFreeNotification::default(),
1361         }
1362     }
1363 }
1364 impl AllocationCallbacks {
builder<'a>() -> AllocationCallbacksBuilder<'a>1365     pub fn builder<'a>() -> AllocationCallbacksBuilder<'a> {
1366         AllocationCallbacksBuilder {
1367             inner: AllocationCallbacks::default(),
1368             marker: ::std::marker::PhantomData,
1369         }
1370     }
1371 }
1372 #[repr(transparent)]
1373 pub struct AllocationCallbacksBuilder<'a> {
1374     inner: AllocationCallbacks,
1375     marker: ::std::marker::PhantomData<&'a ()>,
1376 }
1377 impl<'a> ::std::ops::Deref for AllocationCallbacksBuilder<'a> {
1378     type Target = AllocationCallbacks;
deref(&self) -> &Self::Target1379     fn deref(&self) -> &Self::Target {
1380         &self.inner
1381     }
1382 }
1383 impl<'a> ::std::ops::DerefMut for AllocationCallbacksBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1384     fn deref_mut(&mut self) -> &mut Self::Target {
1385         &mut self.inner
1386     }
1387 }
1388 impl<'a> AllocationCallbacksBuilder<'a> {
user_data(mut self, user_data: *mut c_void) -> Self1389     pub fn user_data(mut self, user_data: *mut c_void) -> Self {
1390         self.inner.p_user_data = user_data;
1391         self
1392     }
pfn_allocation(mut self, pfn_allocation: PFN_vkAllocationFunction) -> Self1393     pub fn pfn_allocation(mut self, pfn_allocation: PFN_vkAllocationFunction) -> Self {
1394         self.inner.pfn_allocation = pfn_allocation;
1395         self
1396     }
pfn_reallocation(mut self, pfn_reallocation: PFN_vkReallocationFunction) -> Self1397     pub fn pfn_reallocation(mut self, pfn_reallocation: PFN_vkReallocationFunction) -> Self {
1398         self.inner.pfn_reallocation = pfn_reallocation;
1399         self
1400     }
pfn_free(mut self, pfn_free: PFN_vkFreeFunction) -> Self1401     pub fn pfn_free(mut self, pfn_free: PFN_vkFreeFunction) -> Self {
1402         self.inner.pfn_free = pfn_free;
1403         self
1404     }
pfn_internal_allocation( mut self, pfn_internal_allocation: PFN_vkInternalAllocationNotification, ) -> Self1405     pub fn pfn_internal_allocation(
1406         mut self,
1407         pfn_internal_allocation: PFN_vkInternalAllocationNotification,
1408     ) -> Self {
1409         self.inner.pfn_internal_allocation = pfn_internal_allocation;
1410         self
1411     }
pfn_internal_free(mut self, pfn_internal_free: PFN_vkInternalFreeNotification) -> Self1412     pub fn pfn_internal_free(mut self, pfn_internal_free: PFN_vkInternalFreeNotification) -> Self {
1413         self.inner.pfn_internal_free = pfn_internal_free;
1414         self
1415     }
1416     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1417     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1418     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> AllocationCallbacks1419     pub fn build(self) -> AllocationCallbacks {
1420         self.inner
1421     }
1422 }
1423 #[repr(C)]
1424 #[derive(Copy, Clone, Debug)]
1425 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceQueueCreateInfo.html>"]
1426 pub struct DeviceQueueCreateInfo {
1427     pub s_type: StructureType,
1428     pub p_next: *const c_void,
1429     pub flags: DeviceQueueCreateFlags,
1430     pub queue_family_index: u32,
1431     pub queue_count: u32,
1432     pub p_queue_priorities: *const f32,
1433 }
1434 impl ::std::default::Default for DeviceQueueCreateInfo {
default() -> DeviceQueueCreateInfo1435     fn default() -> DeviceQueueCreateInfo {
1436         DeviceQueueCreateInfo {
1437             s_type: StructureType::DEVICE_QUEUE_CREATE_INFO,
1438             p_next: ::std::ptr::null(),
1439             flags: DeviceQueueCreateFlags::default(),
1440             queue_family_index: u32::default(),
1441             queue_count: u32::default(),
1442             p_queue_priorities: ::std::ptr::null(),
1443         }
1444     }
1445 }
1446 impl DeviceQueueCreateInfo {
builder<'a>() -> DeviceQueueCreateInfoBuilder<'a>1447     pub fn builder<'a>() -> DeviceQueueCreateInfoBuilder<'a> {
1448         DeviceQueueCreateInfoBuilder {
1449             inner: DeviceQueueCreateInfo::default(),
1450             marker: ::std::marker::PhantomData,
1451         }
1452     }
1453 }
1454 #[repr(transparent)]
1455 pub struct DeviceQueueCreateInfoBuilder<'a> {
1456     inner: DeviceQueueCreateInfo,
1457     marker: ::std::marker::PhantomData<&'a ()>,
1458 }
1459 pub unsafe trait ExtendsDeviceQueueCreateInfo {}
1460 impl<'a> ::std::ops::Deref for DeviceQueueCreateInfoBuilder<'a> {
1461     type Target = DeviceQueueCreateInfo;
deref(&self) -> &Self::Target1462     fn deref(&self) -> &Self::Target {
1463         &self.inner
1464     }
1465 }
1466 impl<'a> ::std::ops::DerefMut for DeviceQueueCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1467     fn deref_mut(&mut self) -> &mut Self::Target {
1468         &mut self.inner
1469     }
1470 }
1471 impl<'a> DeviceQueueCreateInfoBuilder<'a> {
flags(mut self, flags: DeviceQueueCreateFlags) -> Self1472     pub fn flags(mut self, flags: DeviceQueueCreateFlags) -> Self {
1473         self.inner.flags = flags;
1474         self
1475     }
queue_family_index(mut self, queue_family_index: u32) -> Self1476     pub fn queue_family_index(mut self, queue_family_index: u32) -> Self {
1477         self.inner.queue_family_index = queue_family_index;
1478         self
1479     }
queue_priorities(mut self, queue_priorities: &'a [f32]) -> Self1480     pub fn queue_priorities(mut self, queue_priorities: &'a [f32]) -> Self {
1481         self.inner.queue_count = queue_priorities.len() as _;
1482         self.inner.p_queue_priorities = queue_priorities.as_ptr();
1483         self
1484     }
1485     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
1486     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
1487     #[doc = r" valid extension structs can be pushed into the chain."]
1488     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
1489     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDeviceQueueCreateInfo>(mut self, next: &'a mut T) -> Self1490     pub fn push_next<T: ExtendsDeviceQueueCreateInfo>(mut self, next: &'a mut T) -> Self {
1491         unsafe {
1492             let next_ptr = next as *mut T as *mut BaseOutStructure;
1493             let last_next = ptr_chain_iter(next).last().unwrap();
1494             (*last_next).p_next = self.inner.p_next as _;
1495             self.inner.p_next = next_ptr as _;
1496         }
1497         self
1498     }
1499     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1500     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1501     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DeviceQueueCreateInfo1502     pub fn build(self) -> DeviceQueueCreateInfo {
1503         self.inner
1504     }
1505 }
1506 #[repr(C)]
1507 #[derive(Copy, Clone, Debug)]
1508 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceCreateInfo.html>"]
1509 pub struct DeviceCreateInfo {
1510     pub s_type: StructureType,
1511     pub p_next: *const c_void,
1512     pub flags: DeviceCreateFlags,
1513     pub queue_create_info_count: u32,
1514     pub p_queue_create_infos: *const DeviceQueueCreateInfo,
1515     pub enabled_layer_count: u32,
1516     pub pp_enabled_layer_names: *const *const c_char,
1517     pub enabled_extension_count: u32,
1518     pub pp_enabled_extension_names: *const *const c_char,
1519     pub p_enabled_features: *const PhysicalDeviceFeatures,
1520 }
1521 impl ::std::default::Default for DeviceCreateInfo {
default() -> DeviceCreateInfo1522     fn default() -> DeviceCreateInfo {
1523         DeviceCreateInfo {
1524             s_type: StructureType::DEVICE_CREATE_INFO,
1525             p_next: ::std::ptr::null(),
1526             flags: DeviceCreateFlags::default(),
1527             queue_create_info_count: u32::default(),
1528             p_queue_create_infos: ::std::ptr::null(),
1529             enabled_layer_count: u32::default(),
1530             pp_enabled_layer_names: ::std::ptr::null(),
1531             enabled_extension_count: u32::default(),
1532             pp_enabled_extension_names: ::std::ptr::null(),
1533             p_enabled_features: ::std::ptr::null(),
1534         }
1535     }
1536 }
1537 impl DeviceCreateInfo {
builder<'a>() -> DeviceCreateInfoBuilder<'a>1538     pub fn builder<'a>() -> DeviceCreateInfoBuilder<'a> {
1539         DeviceCreateInfoBuilder {
1540             inner: DeviceCreateInfo::default(),
1541             marker: ::std::marker::PhantomData,
1542         }
1543     }
1544 }
1545 #[repr(transparent)]
1546 pub struct DeviceCreateInfoBuilder<'a> {
1547     inner: DeviceCreateInfo,
1548     marker: ::std::marker::PhantomData<&'a ()>,
1549 }
1550 pub unsafe trait ExtendsDeviceCreateInfo {}
1551 impl<'a> ::std::ops::Deref for DeviceCreateInfoBuilder<'a> {
1552     type Target = DeviceCreateInfo;
deref(&self) -> &Self::Target1553     fn deref(&self) -> &Self::Target {
1554         &self.inner
1555     }
1556 }
1557 impl<'a> ::std::ops::DerefMut for DeviceCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1558     fn deref_mut(&mut self) -> &mut Self::Target {
1559         &mut self.inner
1560     }
1561 }
1562 impl<'a> DeviceCreateInfoBuilder<'a> {
flags(mut self, flags: DeviceCreateFlags) -> Self1563     pub fn flags(mut self, flags: DeviceCreateFlags) -> Self {
1564         self.inner.flags = flags;
1565         self
1566     }
queue_create_infos(mut self, queue_create_infos: &'a [DeviceQueueCreateInfo]) -> Self1567     pub fn queue_create_infos(mut self, queue_create_infos: &'a [DeviceQueueCreateInfo]) -> Self {
1568         self.inner.queue_create_info_count = queue_create_infos.len() as _;
1569         self.inner.p_queue_create_infos = queue_create_infos.as_ptr();
1570         self
1571     }
enabled_layer_names(mut self, enabled_layer_names: &'a [*const c_char]) -> Self1572     pub fn enabled_layer_names(mut self, enabled_layer_names: &'a [*const c_char]) -> Self {
1573         self.inner.enabled_layer_count = enabled_layer_names.len() as _;
1574         self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr();
1575         self
1576     }
enabled_extension_names(mut self, enabled_extension_names: &'a [*const c_char]) -> Self1577     pub fn enabled_extension_names(mut self, enabled_extension_names: &'a [*const c_char]) -> Self {
1578         self.inner.enabled_extension_count = enabled_extension_names.len() as _;
1579         self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr();
1580         self
1581     }
enabled_features(mut self, enabled_features: &'a PhysicalDeviceFeatures) -> Self1582     pub fn enabled_features(mut self, enabled_features: &'a PhysicalDeviceFeatures) -> Self {
1583         self.inner.p_enabled_features = enabled_features;
1584         self
1585     }
1586     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
1587     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
1588     #[doc = r" valid extension structs can be pushed into the chain."]
1589     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
1590     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDeviceCreateInfo>(mut self, next: &'a mut T) -> Self1591     pub fn push_next<T: ExtendsDeviceCreateInfo>(mut self, next: &'a mut T) -> Self {
1592         unsafe {
1593             let next_ptr = next as *mut T as *mut BaseOutStructure;
1594             let last_next = ptr_chain_iter(next).last().unwrap();
1595             (*last_next).p_next = self.inner.p_next as _;
1596             self.inner.p_next = next_ptr as _;
1597         }
1598         self
1599     }
1600     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1601     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1602     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DeviceCreateInfo1603     pub fn build(self) -> DeviceCreateInfo {
1604         self.inner
1605     }
1606 }
1607 #[repr(C)]
1608 #[derive(Copy, Clone, Debug)]
1609 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInstanceCreateInfo.html>"]
1610 pub struct InstanceCreateInfo {
1611     pub s_type: StructureType,
1612     pub p_next: *const c_void,
1613     pub flags: InstanceCreateFlags,
1614     pub p_application_info: *const ApplicationInfo,
1615     pub enabled_layer_count: u32,
1616     pub pp_enabled_layer_names: *const *const c_char,
1617     pub enabled_extension_count: u32,
1618     pub pp_enabled_extension_names: *const *const c_char,
1619 }
1620 impl ::std::default::Default for InstanceCreateInfo {
default() -> InstanceCreateInfo1621     fn default() -> InstanceCreateInfo {
1622         InstanceCreateInfo {
1623             s_type: StructureType::INSTANCE_CREATE_INFO,
1624             p_next: ::std::ptr::null(),
1625             flags: InstanceCreateFlags::default(),
1626             p_application_info: ::std::ptr::null(),
1627             enabled_layer_count: u32::default(),
1628             pp_enabled_layer_names: ::std::ptr::null(),
1629             enabled_extension_count: u32::default(),
1630             pp_enabled_extension_names: ::std::ptr::null(),
1631         }
1632     }
1633 }
1634 impl InstanceCreateInfo {
builder<'a>() -> InstanceCreateInfoBuilder<'a>1635     pub fn builder<'a>() -> InstanceCreateInfoBuilder<'a> {
1636         InstanceCreateInfoBuilder {
1637             inner: InstanceCreateInfo::default(),
1638             marker: ::std::marker::PhantomData,
1639         }
1640     }
1641 }
1642 #[repr(transparent)]
1643 pub struct InstanceCreateInfoBuilder<'a> {
1644     inner: InstanceCreateInfo,
1645     marker: ::std::marker::PhantomData<&'a ()>,
1646 }
1647 pub unsafe trait ExtendsInstanceCreateInfo {}
1648 impl<'a> ::std::ops::Deref for InstanceCreateInfoBuilder<'a> {
1649     type Target = InstanceCreateInfo;
deref(&self) -> &Self::Target1650     fn deref(&self) -> &Self::Target {
1651         &self.inner
1652     }
1653 }
1654 impl<'a> ::std::ops::DerefMut for InstanceCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1655     fn deref_mut(&mut self) -> &mut Self::Target {
1656         &mut self.inner
1657     }
1658 }
1659 impl<'a> InstanceCreateInfoBuilder<'a> {
flags(mut self, flags: InstanceCreateFlags) -> Self1660     pub fn flags(mut self, flags: InstanceCreateFlags) -> Self {
1661         self.inner.flags = flags;
1662         self
1663     }
application_info(mut self, application_info: &'a ApplicationInfo) -> Self1664     pub fn application_info(mut self, application_info: &'a ApplicationInfo) -> Self {
1665         self.inner.p_application_info = application_info;
1666         self
1667     }
enabled_layer_names(mut self, enabled_layer_names: &'a [*const c_char]) -> Self1668     pub fn enabled_layer_names(mut self, enabled_layer_names: &'a [*const c_char]) -> Self {
1669         self.inner.enabled_layer_count = enabled_layer_names.len() as _;
1670         self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr();
1671         self
1672     }
enabled_extension_names(mut self, enabled_extension_names: &'a [*const c_char]) -> Self1673     pub fn enabled_extension_names(mut self, enabled_extension_names: &'a [*const c_char]) -> Self {
1674         self.inner.enabled_extension_count = enabled_extension_names.len() as _;
1675         self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr();
1676         self
1677     }
1678     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
1679     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
1680     #[doc = r" valid extension structs can be pushed into the chain."]
1681     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
1682     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsInstanceCreateInfo>(mut self, next: &'a mut T) -> Self1683     pub fn push_next<T: ExtendsInstanceCreateInfo>(mut self, next: &'a mut T) -> Self {
1684         unsafe {
1685             let next_ptr = next as *mut T as *mut BaseOutStructure;
1686             let last_next = ptr_chain_iter(next).last().unwrap();
1687             (*last_next).p_next = self.inner.p_next as _;
1688             self.inner.p_next = next_ptr as _;
1689         }
1690         self
1691     }
1692     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1693     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1694     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> InstanceCreateInfo1695     pub fn build(self) -> InstanceCreateInfo {
1696         self.inner
1697     }
1698 }
1699 #[repr(C)]
1700 #[derive(Copy, Clone, Default, Debug)]
1701 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueueFamilyProperties.html>"]
1702 pub struct QueueFamilyProperties {
1703     pub queue_flags: QueueFlags,
1704     pub queue_count: u32,
1705     pub timestamp_valid_bits: u32,
1706     pub min_image_transfer_granularity: Extent3D,
1707 }
1708 impl QueueFamilyProperties {
builder<'a>() -> QueueFamilyPropertiesBuilder<'a>1709     pub fn builder<'a>() -> QueueFamilyPropertiesBuilder<'a> {
1710         QueueFamilyPropertiesBuilder {
1711             inner: QueueFamilyProperties::default(),
1712             marker: ::std::marker::PhantomData,
1713         }
1714     }
1715 }
1716 #[repr(transparent)]
1717 pub struct QueueFamilyPropertiesBuilder<'a> {
1718     inner: QueueFamilyProperties,
1719     marker: ::std::marker::PhantomData<&'a ()>,
1720 }
1721 impl<'a> ::std::ops::Deref for QueueFamilyPropertiesBuilder<'a> {
1722     type Target = QueueFamilyProperties;
deref(&self) -> &Self::Target1723     fn deref(&self) -> &Self::Target {
1724         &self.inner
1725     }
1726 }
1727 impl<'a> ::std::ops::DerefMut for QueueFamilyPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1728     fn deref_mut(&mut self) -> &mut Self::Target {
1729         &mut self.inner
1730     }
1731 }
1732 impl<'a> QueueFamilyPropertiesBuilder<'a> {
queue_flags(mut self, queue_flags: QueueFlags) -> Self1733     pub fn queue_flags(mut self, queue_flags: QueueFlags) -> Self {
1734         self.inner.queue_flags = queue_flags;
1735         self
1736     }
queue_count(mut self, queue_count: u32) -> Self1737     pub fn queue_count(mut self, queue_count: u32) -> Self {
1738         self.inner.queue_count = queue_count;
1739         self
1740     }
timestamp_valid_bits(mut self, timestamp_valid_bits: u32) -> Self1741     pub fn timestamp_valid_bits(mut self, timestamp_valid_bits: u32) -> Self {
1742         self.inner.timestamp_valid_bits = timestamp_valid_bits;
1743         self
1744     }
min_image_transfer_granularity( mut self, min_image_transfer_granularity: Extent3D, ) -> Self1745     pub fn min_image_transfer_granularity(
1746         mut self,
1747         min_image_transfer_granularity: Extent3D,
1748     ) -> Self {
1749         self.inner.min_image_transfer_granularity = min_image_transfer_granularity;
1750         self
1751     }
1752     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1753     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1754     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> QueueFamilyProperties1755     pub fn build(self) -> QueueFamilyProperties {
1756         self.inner
1757     }
1758 }
1759 #[repr(C)]
1760 #[derive(Copy, Clone, Debug)]
1761 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceMemoryProperties.html>"]
1762 pub struct PhysicalDeviceMemoryProperties {
1763     pub memory_type_count: u32,
1764     pub memory_types: [MemoryType; MAX_MEMORY_TYPES],
1765     pub memory_heap_count: u32,
1766     pub memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS],
1767 }
1768 impl ::std::default::Default for PhysicalDeviceMemoryProperties {
default() -> PhysicalDeviceMemoryProperties1769     fn default() -> PhysicalDeviceMemoryProperties {
1770         PhysicalDeviceMemoryProperties {
1771             memory_type_count: u32::default(),
1772             memory_types: unsafe { ::std::mem::zeroed() },
1773             memory_heap_count: u32::default(),
1774             memory_heaps: unsafe { ::std::mem::zeroed() },
1775         }
1776     }
1777 }
1778 impl PhysicalDeviceMemoryProperties {
builder<'a>() -> PhysicalDeviceMemoryPropertiesBuilder<'a>1779     pub fn builder<'a>() -> PhysicalDeviceMemoryPropertiesBuilder<'a> {
1780         PhysicalDeviceMemoryPropertiesBuilder {
1781             inner: PhysicalDeviceMemoryProperties::default(),
1782             marker: ::std::marker::PhantomData,
1783         }
1784     }
1785 }
1786 #[repr(transparent)]
1787 pub struct PhysicalDeviceMemoryPropertiesBuilder<'a> {
1788     inner: PhysicalDeviceMemoryProperties,
1789     marker: ::std::marker::PhantomData<&'a ()>,
1790 }
1791 impl<'a> ::std::ops::Deref for PhysicalDeviceMemoryPropertiesBuilder<'a> {
1792     type Target = PhysicalDeviceMemoryProperties;
deref(&self) -> &Self::Target1793     fn deref(&self) -> &Self::Target {
1794         &self.inner
1795     }
1796 }
1797 impl<'a> ::std::ops::DerefMut for PhysicalDeviceMemoryPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1798     fn deref_mut(&mut self) -> &mut Self::Target {
1799         &mut self.inner
1800     }
1801 }
1802 impl<'a> PhysicalDeviceMemoryPropertiesBuilder<'a> {
memory_type_count(mut self, memory_type_count: u32) -> Self1803     pub fn memory_type_count(mut self, memory_type_count: u32) -> Self {
1804         self.inner.memory_type_count = memory_type_count;
1805         self
1806     }
memory_types(mut self, memory_types: [MemoryType; MAX_MEMORY_TYPES]) -> Self1807     pub fn memory_types(mut self, memory_types: [MemoryType; MAX_MEMORY_TYPES]) -> Self {
1808         self.inner.memory_types = memory_types;
1809         self
1810     }
memory_heap_count(mut self, memory_heap_count: u32) -> Self1811     pub fn memory_heap_count(mut self, memory_heap_count: u32) -> Self {
1812         self.inner.memory_heap_count = memory_heap_count;
1813         self
1814     }
memory_heaps(mut self, memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS]) -> Self1815     pub fn memory_heaps(mut self, memory_heaps: [MemoryHeap; MAX_MEMORY_HEAPS]) -> Self {
1816         self.inner.memory_heaps = memory_heaps;
1817         self
1818     }
1819     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1820     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1821     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PhysicalDeviceMemoryProperties1822     pub fn build(self) -> PhysicalDeviceMemoryProperties {
1823         self.inner
1824     }
1825 }
1826 #[repr(C)]
1827 #[derive(Copy, Clone, Debug)]
1828 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryAllocateInfo.html>"]
1829 pub struct MemoryAllocateInfo {
1830     pub s_type: StructureType,
1831     pub p_next: *const c_void,
1832     pub allocation_size: DeviceSize,
1833     pub memory_type_index: u32,
1834 }
1835 impl ::std::default::Default for MemoryAllocateInfo {
default() -> MemoryAllocateInfo1836     fn default() -> MemoryAllocateInfo {
1837         MemoryAllocateInfo {
1838             s_type: StructureType::MEMORY_ALLOCATE_INFO,
1839             p_next: ::std::ptr::null(),
1840             allocation_size: DeviceSize::default(),
1841             memory_type_index: u32::default(),
1842         }
1843     }
1844 }
1845 impl MemoryAllocateInfo {
builder<'a>() -> MemoryAllocateInfoBuilder<'a>1846     pub fn builder<'a>() -> MemoryAllocateInfoBuilder<'a> {
1847         MemoryAllocateInfoBuilder {
1848             inner: MemoryAllocateInfo::default(),
1849             marker: ::std::marker::PhantomData,
1850         }
1851     }
1852 }
1853 #[repr(transparent)]
1854 pub struct MemoryAllocateInfoBuilder<'a> {
1855     inner: MemoryAllocateInfo,
1856     marker: ::std::marker::PhantomData<&'a ()>,
1857 }
1858 pub unsafe trait ExtendsMemoryAllocateInfo {}
1859 impl<'a> ::std::ops::Deref for MemoryAllocateInfoBuilder<'a> {
1860     type Target = MemoryAllocateInfo;
deref(&self) -> &Self::Target1861     fn deref(&self) -> &Self::Target {
1862         &self.inner
1863     }
1864 }
1865 impl<'a> ::std::ops::DerefMut for MemoryAllocateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1866     fn deref_mut(&mut self) -> &mut Self::Target {
1867         &mut self.inner
1868     }
1869 }
1870 impl<'a> MemoryAllocateInfoBuilder<'a> {
allocation_size(mut self, allocation_size: DeviceSize) -> Self1871     pub fn allocation_size(mut self, allocation_size: DeviceSize) -> Self {
1872         self.inner.allocation_size = allocation_size;
1873         self
1874     }
memory_type_index(mut self, memory_type_index: u32) -> Self1875     pub fn memory_type_index(mut self, memory_type_index: u32) -> Self {
1876         self.inner.memory_type_index = memory_type_index;
1877         self
1878     }
1879     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
1880     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
1881     #[doc = r" valid extension structs can be pushed into the chain."]
1882     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
1883     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsMemoryAllocateInfo>(mut self, next: &'a mut T) -> Self1884     pub fn push_next<T: ExtendsMemoryAllocateInfo>(mut self, next: &'a mut T) -> Self {
1885         unsafe {
1886             let next_ptr = next as *mut T as *mut BaseOutStructure;
1887             let last_next = ptr_chain_iter(next).last().unwrap();
1888             (*last_next).p_next = self.inner.p_next as _;
1889             self.inner.p_next = next_ptr as _;
1890         }
1891         self
1892     }
1893     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1894     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1895     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryAllocateInfo1896     pub fn build(self) -> MemoryAllocateInfo {
1897         self.inner
1898     }
1899 }
1900 #[repr(C)]
1901 #[derive(Copy, Clone, Default, Debug)]
1902 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryRequirements.html>"]
1903 pub struct MemoryRequirements {
1904     pub size: DeviceSize,
1905     pub alignment: DeviceSize,
1906     pub memory_type_bits: u32,
1907 }
1908 impl MemoryRequirements {
builder<'a>() -> MemoryRequirementsBuilder<'a>1909     pub fn builder<'a>() -> MemoryRequirementsBuilder<'a> {
1910         MemoryRequirementsBuilder {
1911             inner: MemoryRequirements::default(),
1912             marker: ::std::marker::PhantomData,
1913         }
1914     }
1915 }
1916 #[repr(transparent)]
1917 pub struct MemoryRequirementsBuilder<'a> {
1918     inner: MemoryRequirements,
1919     marker: ::std::marker::PhantomData<&'a ()>,
1920 }
1921 impl<'a> ::std::ops::Deref for MemoryRequirementsBuilder<'a> {
1922     type Target = MemoryRequirements;
deref(&self) -> &Self::Target1923     fn deref(&self) -> &Self::Target {
1924         &self.inner
1925     }
1926 }
1927 impl<'a> ::std::ops::DerefMut for MemoryRequirementsBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1928     fn deref_mut(&mut self) -> &mut Self::Target {
1929         &mut self.inner
1930     }
1931 }
1932 impl<'a> MemoryRequirementsBuilder<'a> {
size(mut self, size: DeviceSize) -> Self1933     pub fn size(mut self, size: DeviceSize) -> Self {
1934         self.inner.size = size;
1935         self
1936     }
alignment(mut self, alignment: DeviceSize) -> Self1937     pub fn alignment(mut self, alignment: DeviceSize) -> Self {
1938         self.inner.alignment = alignment;
1939         self
1940     }
memory_type_bits(mut self, memory_type_bits: u32) -> Self1941     pub fn memory_type_bits(mut self, memory_type_bits: u32) -> Self {
1942         self.inner.memory_type_bits = memory_type_bits;
1943         self
1944     }
1945     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1946     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1947     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryRequirements1948     pub fn build(self) -> MemoryRequirements {
1949         self.inner
1950     }
1951 }
1952 #[repr(C)]
1953 #[derive(Copy, Clone, Default, Debug)]
1954 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageFormatProperties.html>"]
1955 pub struct SparseImageFormatProperties {
1956     pub aspect_mask: ImageAspectFlags,
1957     pub image_granularity: Extent3D,
1958     pub flags: SparseImageFormatFlags,
1959 }
1960 impl SparseImageFormatProperties {
builder<'a>() -> SparseImageFormatPropertiesBuilder<'a>1961     pub fn builder<'a>() -> SparseImageFormatPropertiesBuilder<'a> {
1962         SparseImageFormatPropertiesBuilder {
1963             inner: SparseImageFormatProperties::default(),
1964             marker: ::std::marker::PhantomData,
1965         }
1966     }
1967 }
1968 #[repr(transparent)]
1969 pub struct SparseImageFormatPropertiesBuilder<'a> {
1970     inner: SparseImageFormatProperties,
1971     marker: ::std::marker::PhantomData<&'a ()>,
1972 }
1973 impl<'a> ::std::ops::Deref for SparseImageFormatPropertiesBuilder<'a> {
1974     type Target = SparseImageFormatProperties;
deref(&self) -> &Self::Target1975     fn deref(&self) -> &Self::Target {
1976         &self.inner
1977     }
1978 }
1979 impl<'a> ::std::ops::DerefMut for SparseImageFormatPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target1980     fn deref_mut(&mut self) -> &mut Self::Target {
1981         &mut self.inner
1982     }
1983 }
1984 impl<'a> SparseImageFormatPropertiesBuilder<'a> {
aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self1985     pub fn aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self {
1986         self.inner.aspect_mask = aspect_mask;
1987         self
1988     }
image_granularity(mut self, image_granularity: Extent3D) -> Self1989     pub fn image_granularity(mut self, image_granularity: Extent3D) -> Self {
1990         self.inner.image_granularity = image_granularity;
1991         self
1992     }
flags(mut self, flags: SparseImageFormatFlags) -> Self1993     pub fn flags(mut self, flags: SparseImageFormatFlags) -> Self {
1994         self.inner.flags = flags;
1995         self
1996     }
1997     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
1998     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
1999     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageFormatProperties2000     pub fn build(self) -> SparseImageFormatProperties {
2001         self.inner
2002     }
2003 }
2004 #[repr(C)]
2005 #[derive(Copy, Clone, Default, Debug)]
2006 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryRequirements.html>"]
2007 pub struct SparseImageMemoryRequirements {
2008     pub format_properties: SparseImageFormatProperties,
2009     pub image_mip_tail_first_lod: u32,
2010     pub image_mip_tail_size: DeviceSize,
2011     pub image_mip_tail_offset: DeviceSize,
2012     pub image_mip_tail_stride: DeviceSize,
2013 }
2014 impl SparseImageMemoryRequirements {
builder<'a>() -> SparseImageMemoryRequirementsBuilder<'a>2015     pub fn builder<'a>() -> SparseImageMemoryRequirementsBuilder<'a> {
2016         SparseImageMemoryRequirementsBuilder {
2017             inner: SparseImageMemoryRequirements::default(),
2018             marker: ::std::marker::PhantomData,
2019         }
2020     }
2021 }
2022 #[repr(transparent)]
2023 pub struct SparseImageMemoryRequirementsBuilder<'a> {
2024     inner: SparseImageMemoryRequirements,
2025     marker: ::std::marker::PhantomData<&'a ()>,
2026 }
2027 impl<'a> ::std::ops::Deref for SparseImageMemoryRequirementsBuilder<'a> {
2028     type Target = SparseImageMemoryRequirements;
deref(&self) -> &Self::Target2029     fn deref(&self) -> &Self::Target {
2030         &self.inner
2031     }
2032 }
2033 impl<'a> ::std::ops::DerefMut for SparseImageMemoryRequirementsBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2034     fn deref_mut(&mut self) -> &mut Self::Target {
2035         &mut self.inner
2036     }
2037 }
2038 impl<'a> SparseImageMemoryRequirementsBuilder<'a> {
format_properties(mut self, format_properties: SparseImageFormatProperties) -> Self2039     pub fn format_properties(mut self, format_properties: SparseImageFormatProperties) -> Self {
2040         self.inner.format_properties = format_properties;
2041         self
2042     }
image_mip_tail_first_lod(mut self, image_mip_tail_first_lod: u32) -> Self2043     pub fn image_mip_tail_first_lod(mut self, image_mip_tail_first_lod: u32) -> Self {
2044         self.inner.image_mip_tail_first_lod = image_mip_tail_first_lod;
2045         self
2046     }
image_mip_tail_size(mut self, image_mip_tail_size: DeviceSize) -> Self2047     pub fn image_mip_tail_size(mut self, image_mip_tail_size: DeviceSize) -> Self {
2048         self.inner.image_mip_tail_size = image_mip_tail_size;
2049         self
2050     }
image_mip_tail_offset(mut self, image_mip_tail_offset: DeviceSize) -> Self2051     pub fn image_mip_tail_offset(mut self, image_mip_tail_offset: DeviceSize) -> Self {
2052         self.inner.image_mip_tail_offset = image_mip_tail_offset;
2053         self
2054     }
image_mip_tail_stride(mut self, image_mip_tail_stride: DeviceSize) -> Self2055     pub fn image_mip_tail_stride(mut self, image_mip_tail_stride: DeviceSize) -> Self {
2056         self.inner.image_mip_tail_stride = image_mip_tail_stride;
2057         self
2058     }
2059     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2060     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2061     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageMemoryRequirements2062     pub fn build(self) -> SparseImageMemoryRequirements {
2063         self.inner
2064     }
2065 }
2066 #[repr(C)]
2067 #[derive(Copy, Clone, Default, Debug)]
2068 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryType.html>"]
2069 pub struct MemoryType {
2070     pub property_flags: MemoryPropertyFlags,
2071     pub heap_index: u32,
2072 }
2073 impl MemoryType {
builder<'a>() -> MemoryTypeBuilder<'a>2074     pub fn builder<'a>() -> MemoryTypeBuilder<'a> {
2075         MemoryTypeBuilder {
2076             inner: MemoryType::default(),
2077             marker: ::std::marker::PhantomData,
2078         }
2079     }
2080 }
2081 #[repr(transparent)]
2082 pub struct MemoryTypeBuilder<'a> {
2083     inner: MemoryType,
2084     marker: ::std::marker::PhantomData<&'a ()>,
2085 }
2086 impl<'a> ::std::ops::Deref for MemoryTypeBuilder<'a> {
2087     type Target = MemoryType;
deref(&self) -> &Self::Target2088     fn deref(&self) -> &Self::Target {
2089         &self.inner
2090     }
2091 }
2092 impl<'a> ::std::ops::DerefMut for MemoryTypeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2093     fn deref_mut(&mut self) -> &mut Self::Target {
2094         &mut self.inner
2095     }
2096 }
2097 impl<'a> MemoryTypeBuilder<'a> {
property_flags(mut self, property_flags: MemoryPropertyFlags) -> Self2098     pub fn property_flags(mut self, property_flags: MemoryPropertyFlags) -> Self {
2099         self.inner.property_flags = property_flags;
2100         self
2101     }
heap_index(mut self, heap_index: u32) -> Self2102     pub fn heap_index(mut self, heap_index: u32) -> Self {
2103         self.inner.heap_index = heap_index;
2104         self
2105     }
2106     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2107     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2108     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryType2109     pub fn build(self) -> MemoryType {
2110         self.inner
2111     }
2112 }
2113 #[repr(C)]
2114 #[derive(Copy, Clone, Default, Debug)]
2115 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryHeap.html>"]
2116 pub struct MemoryHeap {
2117     pub size: DeviceSize,
2118     pub flags: MemoryHeapFlags,
2119 }
2120 impl MemoryHeap {
builder<'a>() -> MemoryHeapBuilder<'a>2121     pub fn builder<'a>() -> MemoryHeapBuilder<'a> {
2122         MemoryHeapBuilder {
2123             inner: MemoryHeap::default(),
2124             marker: ::std::marker::PhantomData,
2125         }
2126     }
2127 }
2128 #[repr(transparent)]
2129 pub struct MemoryHeapBuilder<'a> {
2130     inner: MemoryHeap,
2131     marker: ::std::marker::PhantomData<&'a ()>,
2132 }
2133 impl<'a> ::std::ops::Deref for MemoryHeapBuilder<'a> {
2134     type Target = MemoryHeap;
deref(&self) -> &Self::Target2135     fn deref(&self) -> &Self::Target {
2136         &self.inner
2137     }
2138 }
2139 impl<'a> ::std::ops::DerefMut for MemoryHeapBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2140     fn deref_mut(&mut self) -> &mut Self::Target {
2141         &mut self.inner
2142     }
2143 }
2144 impl<'a> MemoryHeapBuilder<'a> {
size(mut self, size: DeviceSize) -> Self2145     pub fn size(mut self, size: DeviceSize) -> Self {
2146         self.inner.size = size;
2147         self
2148     }
flags(mut self, flags: MemoryHeapFlags) -> Self2149     pub fn flags(mut self, flags: MemoryHeapFlags) -> Self {
2150         self.inner.flags = flags;
2151         self
2152     }
2153     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2154     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2155     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryHeap2156     pub fn build(self) -> MemoryHeap {
2157         self.inner
2158     }
2159 }
2160 #[repr(C)]
2161 #[derive(Copy, Clone, Debug)]
2162 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMappedMemoryRange.html>"]
2163 pub struct MappedMemoryRange {
2164     pub s_type: StructureType,
2165     pub p_next: *const c_void,
2166     pub memory: DeviceMemory,
2167     pub offset: DeviceSize,
2168     pub size: DeviceSize,
2169 }
2170 impl ::std::default::Default for MappedMemoryRange {
default() -> MappedMemoryRange2171     fn default() -> MappedMemoryRange {
2172         MappedMemoryRange {
2173             s_type: StructureType::MAPPED_MEMORY_RANGE,
2174             p_next: ::std::ptr::null(),
2175             memory: DeviceMemory::default(),
2176             offset: DeviceSize::default(),
2177             size: DeviceSize::default(),
2178         }
2179     }
2180 }
2181 impl MappedMemoryRange {
builder<'a>() -> MappedMemoryRangeBuilder<'a>2182     pub fn builder<'a>() -> MappedMemoryRangeBuilder<'a> {
2183         MappedMemoryRangeBuilder {
2184             inner: MappedMemoryRange::default(),
2185             marker: ::std::marker::PhantomData,
2186         }
2187     }
2188 }
2189 #[repr(transparent)]
2190 pub struct MappedMemoryRangeBuilder<'a> {
2191     inner: MappedMemoryRange,
2192     marker: ::std::marker::PhantomData<&'a ()>,
2193 }
2194 impl<'a> ::std::ops::Deref for MappedMemoryRangeBuilder<'a> {
2195     type Target = MappedMemoryRange;
deref(&self) -> &Self::Target2196     fn deref(&self) -> &Self::Target {
2197         &self.inner
2198     }
2199 }
2200 impl<'a> ::std::ops::DerefMut for MappedMemoryRangeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2201     fn deref_mut(&mut self) -> &mut Self::Target {
2202         &mut self.inner
2203     }
2204 }
2205 impl<'a> MappedMemoryRangeBuilder<'a> {
memory(mut self, memory: DeviceMemory) -> Self2206     pub fn memory(mut self, memory: DeviceMemory) -> Self {
2207         self.inner.memory = memory;
2208         self
2209     }
offset(mut self, offset: DeviceSize) -> Self2210     pub fn offset(mut self, offset: DeviceSize) -> Self {
2211         self.inner.offset = offset;
2212         self
2213     }
size(mut self, size: DeviceSize) -> Self2214     pub fn size(mut self, size: DeviceSize) -> Self {
2215         self.inner.size = size;
2216         self
2217     }
2218     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2219     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2220     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MappedMemoryRange2221     pub fn build(self) -> MappedMemoryRange {
2222         self.inner
2223     }
2224 }
2225 #[repr(C)]
2226 #[derive(Copy, Clone, Default, Debug)]
2227 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFormatProperties.html>"]
2228 pub struct FormatProperties {
2229     pub linear_tiling_features: FormatFeatureFlags,
2230     pub optimal_tiling_features: FormatFeatureFlags,
2231     pub buffer_features: FormatFeatureFlags,
2232 }
2233 impl FormatProperties {
builder<'a>() -> FormatPropertiesBuilder<'a>2234     pub fn builder<'a>() -> FormatPropertiesBuilder<'a> {
2235         FormatPropertiesBuilder {
2236             inner: FormatProperties::default(),
2237             marker: ::std::marker::PhantomData,
2238         }
2239     }
2240 }
2241 #[repr(transparent)]
2242 pub struct FormatPropertiesBuilder<'a> {
2243     inner: FormatProperties,
2244     marker: ::std::marker::PhantomData<&'a ()>,
2245 }
2246 impl<'a> ::std::ops::Deref for FormatPropertiesBuilder<'a> {
2247     type Target = FormatProperties;
deref(&self) -> &Self::Target2248     fn deref(&self) -> &Self::Target {
2249         &self.inner
2250     }
2251 }
2252 impl<'a> ::std::ops::DerefMut for FormatPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2253     fn deref_mut(&mut self) -> &mut Self::Target {
2254         &mut self.inner
2255     }
2256 }
2257 impl<'a> FormatPropertiesBuilder<'a> {
linear_tiling_features(mut self, linear_tiling_features: FormatFeatureFlags) -> Self2258     pub fn linear_tiling_features(mut self, linear_tiling_features: FormatFeatureFlags) -> Self {
2259         self.inner.linear_tiling_features = linear_tiling_features;
2260         self
2261     }
optimal_tiling_features(mut self, optimal_tiling_features: FormatFeatureFlags) -> Self2262     pub fn optimal_tiling_features(mut self, optimal_tiling_features: FormatFeatureFlags) -> Self {
2263         self.inner.optimal_tiling_features = optimal_tiling_features;
2264         self
2265     }
buffer_features(mut self, buffer_features: FormatFeatureFlags) -> Self2266     pub fn buffer_features(mut self, buffer_features: FormatFeatureFlags) -> Self {
2267         self.inner.buffer_features = buffer_features;
2268         self
2269     }
2270     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2271     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2272     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> FormatProperties2273     pub fn build(self) -> FormatProperties {
2274         self.inner
2275     }
2276 }
2277 #[repr(C)]
2278 #[derive(Copy, Clone, Default, Debug)]
2279 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageFormatProperties.html>"]
2280 pub struct ImageFormatProperties {
2281     pub max_extent: Extent3D,
2282     pub max_mip_levels: u32,
2283     pub max_array_layers: u32,
2284     pub sample_counts: SampleCountFlags,
2285     pub max_resource_size: DeviceSize,
2286 }
2287 impl ImageFormatProperties {
builder<'a>() -> ImageFormatPropertiesBuilder<'a>2288     pub fn builder<'a>() -> ImageFormatPropertiesBuilder<'a> {
2289         ImageFormatPropertiesBuilder {
2290             inner: ImageFormatProperties::default(),
2291             marker: ::std::marker::PhantomData,
2292         }
2293     }
2294 }
2295 #[repr(transparent)]
2296 pub struct ImageFormatPropertiesBuilder<'a> {
2297     inner: ImageFormatProperties,
2298     marker: ::std::marker::PhantomData<&'a ()>,
2299 }
2300 impl<'a> ::std::ops::Deref for ImageFormatPropertiesBuilder<'a> {
2301     type Target = ImageFormatProperties;
deref(&self) -> &Self::Target2302     fn deref(&self) -> &Self::Target {
2303         &self.inner
2304     }
2305 }
2306 impl<'a> ::std::ops::DerefMut for ImageFormatPropertiesBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2307     fn deref_mut(&mut self) -> &mut Self::Target {
2308         &mut self.inner
2309     }
2310 }
2311 impl<'a> ImageFormatPropertiesBuilder<'a> {
max_extent(mut self, max_extent: Extent3D) -> Self2312     pub fn max_extent(mut self, max_extent: Extent3D) -> Self {
2313         self.inner.max_extent = max_extent;
2314         self
2315     }
max_mip_levels(mut self, max_mip_levels: u32) -> Self2316     pub fn max_mip_levels(mut self, max_mip_levels: u32) -> Self {
2317         self.inner.max_mip_levels = max_mip_levels;
2318         self
2319     }
max_array_layers(mut self, max_array_layers: u32) -> Self2320     pub fn max_array_layers(mut self, max_array_layers: u32) -> Self {
2321         self.inner.max_array_layers = max_array_layers;
2322         self
2323     }
sample_counts(mut self, sample_counts: SampleCountFlags) -> Self2324     pub fn sample_counts(mut self, sample_counts: SampleCountFlags) -> Self {
2325         self.inner.sample_counts = sample_counts;
2326         self
2327     }
max_resource_size(mut self, max_resource_size: DeviceSize) -> Self2328     pub fn max_resource_size(mut self, max_resource_size: DeviceSize) -> Self {
2329         self.inner.max_resource_size = max_resource_size;
2330         self
2331     }
2332     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2333     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2334     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageFormatProperties2335     pub fn build(self) -> ImageFormatProperties {
2336         self.inner
2337     }
2338 }
2339 #[repr(C)]
2340 #[derive(Copy, Clone, Default, Debug)]
2341 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorBufferInfo.html>"]
2342 pub struct DescriptorBufferInfo {
2343     pub buffer: Buffer,
2344     pub offset: DeviceSize,
2345     pub range: DeviceSize,
2346 }
2347 impl DescriptorBufferInfo {
builder<'a>() -> DescriptorBufferInfoBuilder<'a>2348     pub fn builder<'a>() -> DescriptorBufferInfoBuilder<'a> {
2349         DescriptorBufferInfoBuilder {
2350             inner: DescriptorBufferInfo::default(),
2351             marker: ::std::marker::PhantomData,
2352         }
2353     }
2354 }
2355 #[repr(transparent)]
2356 pub struct DescriptorBufferInfoBuilder<'a> {
2357     inner: DescriptorBufferInfo,
2358     marker: ::std::marker::PhantomData<&'a ()>,
2359 }
2360 impl<'a> ::std::ops::Deref for DescriptorBufferInfoBuilder<'a> {
2361     type Target = DescriptorBufferInfo;
deref(&self) -> &Self::Target2362     fn deref(&self) -> &Self::Target {
2363         &self.inner
2364     }
2365 }
2366 impl<'a> ::std::ops::DerefMut for DescriptorBufferInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2367     fn deref_mut(&mut self) -> &mut Self::Target {
2368         &mut self.inner
2369     }
2370 }
2371 impl<'a> DescriptorBufferInfoBuilder<'a> {
buffer(mut self, buffer: Buffer) -> Self2372     pub fn buffer(mut self, buffer: Buffer) -> Self {
2373         self.inner.buffer = buffer;
2374         self
2375     }
offset(mut self, offset: DeviceSize) -> Self2376     pub fn offset(mut self, offset: DeviceSize) -> Self {
2377         self.inner.offset = offset;
2378         self
2379     }
range(mut self, range: DeviceSize) -> Self2380     pub fn range(mut self, range: DeviceSize) -> Self {
2381         self.inner.range = range;
2382         self
2383     }
2384     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2385     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2386     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorBufferInfo2387     pub fn build(self) -> DescriptorBufferInfo {
2388         self.inner
2389     }
2390 }
2391 #[repr(C)]
2392 #[derive(Copy, Clone, Default, Debug)]
2393 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorImageInfo.html>"]
2394 pub struct DescriptorImageInfo {
2395     pub sampler: Sampler,
2396     pub image_view: ImageView,
2397     pub image_layout: ImageLayout,
2398 }
2399 impl DescriptorImageInfo {
builder<'a>() -> DescriptorImageInfoBuilder<'a>2400     pub fn builder<'a>() -> DescriptorImageInfoBuilder<'a> {
2401         DescriptorImageInfoBuilder {
2402             inner: DescriptorImageInfo::default(),
2403             marker: ::std::marker::PhantomData,
2404         }
2405     }
2406 }
2407 #[repr(transparent)]
2408 pub struct DescriptorImageInfoBuilder<'a> {
2409     inner: DescriptorImageInfo,
2410     marker: ::std::marker::PhantomData<&'a ()>,
2411 }
2412 impl<'a> ::std::ops::Deref for DescriptorImageInfoBuilder<'a> {
2413     type Target = DescriptorImageInfo;
deref(&self) -> &Self::Target2414     fn deref(&self) -> &Self::Target {
2415         &self.inner
2416     }
2417 }
2418 impl<'a> ::std::ops::DerefMut for DescriptorImageInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2419     fn deref_mut(&mut self) -> &mut Self::Target {
2420         &mut self.inner
2421     }
2422 }
2423 impl<'a> DescriptorImageInfoBuilder<'a> {
sampler(mut self, sampler: Sampler) -> Self2424     pub fn sampler(mut self, sampler: Sampler) -> Self {
2425         self.inner.sampler = sampler;
2426         self
2427     }
image_view(mut self, image_view: ImageView) -> Self2428     pub fn image_view(mut self, image_view: ImageView) -> Self {
2429         self.inner.image_view = image_view;
2430         self
2431     }
image_layout(mut self, image_layout: ImageLayout) -> Self2432     pub fn image_layout(mut self, image_layout: ImageLayout) -> Self {
2433         self.inner.image_layout = image_layout;
2434         self
2435     }
2436     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2437     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2438     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorImageInfo2439     pub fn build(self) -> DescriptorImageInfo {
2440         self.inner
2441     }
2442 }
2443 #[repr(C)]
2444 #[derive(Copy, Clone, Debug)]
2445 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkWriteDescriptorSet.html>"]
2446 pub struct WriteDescriptorSet {
2447     pub s_type: StructureType,
2448     pub p_next: *const c_void,
2449     pub dst_set: DescriptorSet,
2450     pub dst_binding: u32,
2451     pub dst_array_element: u32,
2452     pub descriptor_count: u32,
2453     pub descriptor_type: DescriptorType,
2454     pub p_image_info: *const DescriptorImageInfo,
2455     pub p_buffer_info: *const DescriptorBufferInfo,
2456     pub p_texel_buffer_view: *const BufferView,
2457 }
2458 impl ::std::default::Default for WriteDescriptorSet {
default() -> WriteDescriptorSet2459     fn default() -> WriteDescriptorSet {
2460         WriteDescriptorSet {
2461             s_type: StructureType::WRITE_DESCRIPTOR_SET,
2462             p_next: ::std::ptr::null(),
2463             dst_set: DescriptorSet::default(),
2464             dst_binding: u32::default(),
2465             dst_array_element: u32::default(),
2466             descriptor_count: u32::default(),
2467             descriptor_type: DescriptorType::default(),
2468             p_image_info: ::std::ptr::null(),
2469             p_buffer_info: ::std::ptr::null(),
2470             p_texel_buffer_view: ::std::ptr::null(),
2471         }
2472     }
2473 }
2474 impl WriteDescriptorSet {
builder<'a>() -> WriteDescriptorSetBuilder<'a>2475     pub fn builder<'a>() -> WriteDescriptorSetBuilder<'a> {
2476         WriteDescriptorSetBuilder {
2477             inner: WriteDescriptorSet::default(),
2478             marker: ::std::marker::PhantomData,
2479         }
2480     }
2481 }
2482 #[repr(transparent)]
2483 pub struct WriteDescriptorSetBuilder<'a> {
2484     inner: WriteDescriptorSet,
2485     marker: ::std::marker::PhantomData<&'a ()>,
2486 }
2487 pub unsafe trait ExtendsWriteDescriptorSet {}
2488 impl<'a> ::std::ops::Deref for WriteDescriptorSetBuilder<'a> {
2489     type Target = WriteDescriptorSet;
deref(&self) -> &Self::Target2490     fn deref(&self) -> &Self::Target {
2491         &self.inner
2492     }
2493 }
2494 impl<'a> ::std::ops::DerefMut for WriteDescriptorSetBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2495     fn deref_mut(&mut self) -> &mut Self::Target {
2496         &mut self.inner
2497     }
2498 }
2499 impl<'a> WriteDescriptorSetBuilder<'a> {
dst_set(mut self, dst_set: DescriptorSet) -> Self2500     pub fn dst_set(mut self, dst_set: DescriptorSet) -> Self {
2501         self.inner.dst_set = dst_set;
2502         self
2503     }
dst_binding(mut self, dst_binding: u32) -> Self2504     pub fn dst_binding(mut self, dst_binding: u32) -> Self {
2505         self.inner.dst_binding = dst_binding;
2506         self
2507     }
dst_array_element(mut self, dst_array_element: u32) -> Self2508     pub fn dst_array_element(mut self, dst_array_element: u32) -> Self {
2509         self.inner.dst_array_element = dst_array_element;
2510         self
2511     }
descriptor_type(mut self, descriptor_type: DescriptorType) -> Self2512     pub fn descriptor_type(mut self, descriptor_type: DescriptorType) -> Self {
2513         self.inner.descriptor_type = descriptor_type;
2514         self
2515     }
image_info(mut self, image_info: &'a [DescriptorImageInfo]) -> Self2516     pub fn image_info(mut self, image_info: &'a [DescriptorImageInfo]) -> Self {
2517         self.inner.descriptor_count = image_info.len() as _;
2518         self.inner.p_image_info = image_info.as_ptr();
2519         self
2520     }
buffer_info(mut self, buffer_info: &'a [DescriptorBufferInfo]) -> Self2521     pub fn buffer_info(mut self, buffer_info: &'a [DescriptorBufferInfo]) -> Self {
2522         self.inner.descriptor_count = buffer_info.len() as _;
2523         self.inner.p_buffer_info = buffer_info.as_ptr();
2524         self
2525     }
texel_buffer_view(mut self, texel_buffer_view: &'a [BufferView]) -> Self2526     pub fn texel_buffer_view(mut self, texel_buffer_view: &'a [BufferView]) -> Self {
2527         self.inner.descriptor_count = texel_buffer_view.len() as _;
2528         self.inner.p_texel_buffer_view = texel_buffer_view.as_ptr();
2529         self
2530     }
2531     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
2532     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
2533     #[doc = r" valid extension structs can be pushed into the chain."]
2534     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
2535     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsWriteDescriptorSet>(mut self, next: &'a mut T) -> Self2536     pub fn push_next<T: ExtendsWriteDescriptorSet>(mut self, next: &'a mut T) -> Self {
2537         unsafe {
2538             let next_ptr = next as *mut T as *mut BaseOutStructure;
2539             let last_next = ptr_chain_iter(next).last().unwrap();
2540             (*last_next).p_next = self.inner.p_next as _;
2541             self.inner.p_next = next_ptr as _;
2542         }
2543         self
2544     }
2545     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2546     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2547     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> WriteDescriptorSet2548     pub fn build(self) -> WriteDescriptorSet {
2549         self.inner
2550     }
2551 }
2552 #[repr(C)]
2553 #[derive(Copy, Clone, Debug)]
2554 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCopyDescriptorSet.html>"]
2555 pub struct CopyDescriptorSet {
2556     pub s_type: StructureType,
2557     pub p_next: *const c_void,
2558     pub src_set: DescriptorSet,
2559     pub src_binding: u32,
2560     pub src_array_element: u32,
2561     pub dst_set: DescriptorSet,
2562     pub dst_binding: u32,
2563     pub dst_array_element: u32,
2564     pub descriptor_count: u32,
2565 }
2566 impl ::std::default::Default for CopyDescriptorSet {
default() -> CopyDescriptorSet2567     fn default() -> CopyDescriptorSet {
2568         CopyDescriptorSet {
2569             s_type: StructureType::COPY_DESCRIPTOR_SET,
2570             p_next: ::std::ptr::null(),
2571             src_set: DescriptorSet::default(),
2572             src_binding: u32::default(),
2573             src_array_element: u32::default(),
2574             dst_set: DescriptorSet::default(),
2575             dst_binding: u32::default(),
2576             dst_array_element: u32::default(),
2577             descriptor_count: u32::default(),
2578         }
2579     }
2580 }
2581 impl CopyDescriptorSet {
builder<'a>() -> CopyDescriptorSetBuilder<'a>2582     pub fn builder<'a>() -> CopyDescriptorSetBuilder<'a> {
2583         CopyDescriptorSetBuilder {
2584             inner: CopyDescriptorSet::default(),
2585             marker: ::std::marker::PhantomData,
2586         }
2587     }
2588 }
2589 #[repr(transparent)]
2590 pub struct CopyDescriptorSetBuilder<'a> {
2591     inner: CopyDescriptorSet,
2592     marker: ::std::marker::PhantomData<&'a ()>,
2593 }
2594 impl<'a> ::std::ops::Deref for CopyDescriptorSetBuilder<'a> {
2595     type Target = CopyDescriptorSet;
deref(&self) -> &Self::Target2596     fn deref(&self) -> &Self::Target {
2597         &self.inner
2598     }
2599 }
2600 impl<'a> ::std::ops::DerefMut for CopyDescriptorSetBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2601     fn deref_mut(&mut self) -> &mut Self::Target {
2602         &mut self.inner
2603     }
2604 }
2605 impl<'a> CopyDescriptorSetBuilder<'a> {
src_set(mut self, src_set: DescriptorSet) -> Self2606     pub fn src_set(mut self, src_set: DescriptorSet) -> Self {
2607         self.inner.src_set = src_set;
2608         self
2609     }
src_binding(mut self, src_binding: u32) -> Self2610     pub fn src_binding(mut self, src_binding: u32) -> Self {
2611         self.inner.src_binding = src_binding;
2612         self
2613     }
src_array_element(mut self, src_array_element: u32) -> Self2614     pub fn src_array_element(mut self, src_array_element: u32) -> Self {
2615         self.inner.src_array_element = src_array_element;
2616         self
2617     }
dst_set(mut self, dst_set: DescriptorSet) -> Self2618     pub fn dst_set(mut self, dst_set: DescriptorSet) -> Self {
2619         self.inner.dst_set = dst_set;
2620         self
2621     }
dst_binding(mut self, dst_binding: u32) -> Self2622     pub fn dst_binding(mut self, dst_binding: u32) -> Self {
2623         self.inner.dst_binding = dst_binding;
2624         self
2625     }
dst_array_element(mut self, dst_array_element: u32) -> Self2626     pub fn dst_array_element(mut self, dst_array_element: u32) -> Self {
2627         self.inner.dst_array_element = dst_array_element;
2628         self
2629     }
descriptor_count(mut self, descriptor_count: u32) -> Self2630     pub fn descriptor_count(mut self, descriptor_count: u32) -> Self {
2631         self.inner.descriptor_count = descriptor_count;
2632         self
2633     }
2634     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2635     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2636     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> CopyDescriptorSet2637     pub fn build(self) -> CopyDescriptorSet {
2638         self.inner
2639     }
2640 }
2641 #[repr(C)]
2642 #[derive(Copy, Clone, Debug)]
2643 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferCreateInfo.html>"]
2644 pub struct BufferCreateInfo {
2645     pub s_type: StructureType,
2646     pub p_next: *const c_void,
2647     pub flags: BufferCreateFlags,
2648     pub size: DeviceSize,
2649     pub usage: BufferUsageFlags,
2650     pub sharing_mode: SharingMode,
2651     pub queue_family_index_count: u32,
2652     pub p_queue_family_indices: *const u32,
2653 }
2654 impl ::std::default::Default for BufferCreateInfo {
default() -> BufferCreateInfo2655     fn default() -> BufferCreateInfo {
2656         BufferCreateInfo {
2657             s_type: StructureType::BUFFER_CREATE_INFO,
2658             p_next: ::std::ptr::null(),
2659             flags: BufferCreateFlags::default(),
2660             size: DeviceSize::default(),
2661             usage: BufferUsageFlags::default(),
2662             sharing_mode: SharingMode::default(),
2663             queue_family_index_count: u32::default(),
2664             p_queue_family_indices: ::std::ptr::null(),
2665         }
2666     }
2667 }
2668 impl BufferCreateInfo {
builder<'a>() -> BufferCreateInfoBuilder<'a>2669     pub fn builder<'a>() -> BufferCreateInfoBuilder<'a> {
2670         BufferCreateInfoBuilder {
2671             inner: BufferCreateInfo::default(),
2672             marker: ::std::marker::PhantomData,
2673         }
2674     }
2675 }
2676 #[repr(transparent)]
2677 pub struct BufferCreateInfoBuilder<'a> {
2678     inner: BufferCreateInfo,
2679     marker: ::std::marker::PhantomData<&'a ()>,
2680 }
2681 pub unsafe trait ExtendsBufferCreateInfo {}
2682 impl<'a> ::std::ops::Deref for BufferCreateInfoBuilder<'a> {
2683     type Target = BufferCreateInfo;
deref(&self) -> &Self::Target2684     fn deref(&self) -> &Self::Target {
2685         &self.inner
2686     }
2687 }
2688 impl<'a> ::std::ops::DerefMut for BufferCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2689     fn deref_mut(&mut self) -> &mut Self::Target {
2690         &mut self.inner
2691     }
2692 }
2693 impl<'a> BufferCreateInfoBuilder<'a> {
flags(mut self, flags: BufferCreateFlags) -> Self2694     pub fn flags(mut self, flags: BufferCreateFlags) -> Self {
2695         self.inner.flags = flags;
2696         self
2697     }
size(mut self, size: DeviceSize) -> Self2698     pub fn size(mut self, size: DeviceSize) -> Self {
2699         self.inner.size = size;
2700         self
2701     }
usage(mut self, usage: BufferUsageFlags) -> Self2702     pub fn usage(mut self, usage: BufferUsageFlags) -> Self {
2703         self.inner.usage = usage;
2704         self
2705     }
sharing_mode(mut self, sharing_mode: SharingMode) -> Self2706     pub fn sharing_mode(mut self, sharing_mode: SharingMode) -> Self {
2707         self.inner.sharing_mode = sharing_mode;
2708         self
2709     }
queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self2710     pub fn queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self {
2711         self.inner.queue_family_index_count = queue_family_indices.len() as _;
2712         self.inner.p_queue_family_indices = queue_family_indices.as_ptr();
2713         self
2714     }
2715     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
2716     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
2717     #[doc = r" valid extension structs can be pushed into the chain."]
2718     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
2719     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsBufferCreateInfo>(mut self, next: &'a mut T) -> Self2720     pub fn push_next<T: ExtendsBufferCreateInfo>(mut self, next: &'a mut T) -> Self {
2721         unsafe {
2722             let next_ptr = next as *mut T as *mut BaseOutStructure;
2723             let last_next = ptr_chain_iter(next).last().unwrap();
2724             (*last_next).p_next = self.inner.p_next as _;
2725             self.inner.p_next = next_ptr as _;
2726         }
2727         self
2728     }
2729     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2730     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2731     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferCreateInfo2732     pub fn build(self) -> BufferCreateInfo {
2733         self.inner
2734     }
2735 }
2736 #[repr(C)]
2737 #[derive(Copy, Clone, Debug)]
2738 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferViewCreateInfo.html>"]
2739 pub struct BufferViewCreateInfo {
2740     pub s_type: StructureType,
2741     pub p_next: *const c_void,
2742     pub flags: BufferViewCreateFlags,
2743     pub buffer: Buffer,
2744     pub format: Format,
2745     pub offset: DeviceSize,
2746     pub range: DeviceSize,
2747 }
2748 impl ::std::default::Default for BufferViewCreateInfo {
default() -> BufferViewCreateInfo2749     fn default() -> BufferViewCreateInfo {
2750         BufferViewCreateInfo {
2751             s_type: StructureType::BUFFER_VIEW_CREATE_INFO,
2752             p_next: ::std::ptr::null(),
2753             flags: BufferViewCreateFlags::default(),
2754             buffer: Buffer::default(),
2755             format: Format::default(),
2756             offset: DeviceSize::default(),
2757             range: DeviceSize::default(),
2758         }
2759     }
2760 }
2761 impl BufferViewCreateInfo {
builder<'a>() -> BufferViewCreateInfoBuilder<'a>2762     pub fn builder<'a>() -> BufferViewCreateInfoBuilder<'a> {
2763         BufferViewCreateInfoBuilder {
2764             inner: BufferViewCreateInfo::default(),
2765             marker: ::std::marker::PhantomData,
2766         }
2767     }
2768 }
2769 #[repr(transparent)]
2770 pub struct BufferViewCreateInfoBuilder<'a> {
2771     inner: BufferViewCreateInfo,
2772     marker: ::std::marker::PhantomData<&'a ()>,
2773 }
2774 impl<'a> ::std::ops::Deref for BufferViewCreateInfoBuilder<'a> {
2775     type Target = BufferViewCreateInfo;
deref(&self) -> &Self::Target2776     fn deref(&self) -> &Self::Target {
2777         &self.inner
2778     }
2779 }
2780 impl<'a> ::std::ops::DerefMut for BufferViewCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2781     fn deref_mut(&mut self) -> &mut Self::Target {
2782         &mut self.inner
2783     }
2784 }
2785 impl<'a> BufferViewCreateInfoBuilder<'a> {
flags(mut self, flags: BufferViewCreateFlags) -> Self2786     pub fn flags(mut self, flags: BufferViewCreateFlags) -> Self {
2787         self.inner.flags = flags;
2788         self
2789     }
buffer(mut self, buffer: Buffer) -> Self2790     pub fn buffer(mut self, buffer: Buffer) -> Self {
2791         self.inner.buffer = buffer;
2792         self
2793     }
format(mut self, format: Format) -> Self2794     pub fn format(mut self, format: Format) -> Self {
2795         self.inner.format = format;
2796         self
2797     }
offset(mut self, offset: DeviceSize) -> Self2798     pub fn offset(mut self, offset: DeviceSize) -> Self {
2799         self.inner.offset = offset;
2800         self
2801     }
range(mut self, range: DeviceSize) -> Self2802     pub fn range(mut self, range: DeviceSize) -> Self {
2803         self.inner.range = range;
2804         self
2805     }
2806     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2807     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2808     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferViewCreateInfo2809     pub fn build(self) -> BufferViewCreateInfo {
2810         self.inner
2811     }
2812 }
2813 #[repr(C)]
2814 #[derive(Copy, Clone, Default, Debug)]
2815 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresource.html>"]
2816 pub struct ImageSubresource {
2817     pub aspect_mask: ImageAspectFlags,
2818     pub mip_level: u32,
2819     pub array_layer: u32,
2820 }
2821 impl ImageSubresource {
builder<'a>() -> ImageSubresourceBuilder<'a>2822     pub fn builder<'a>() -> ImageSubresourceBuilder<'a> {
2823         ImageSubresourceBuilder {
2824             inner: ImageSubresource::default(),
2825             marker: ::std::marker::PhantomData,
2826         }
2827     }
2828 }
2829 #[repr(transparent)]
2830 pub struct ImageSubresourceBuilder<'a> {
2831     inner: ImageSubresource,
2832     marker: ::std::marker::PhantomData<&'a ()>,
2833 }
2834 impl<'a> ::std::ops::Deref for ImageSubresourceBuilder<'a> {
2835     type Target = ImageSubresource;
deref(&self) -> &Self::Target2836     fn deref(&self) -> &Self::Target {
2837         &self.inner
2838     }
2839 }
2840 impl<'a> ::std::ops::DerefMut for ImageSubresourceBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2841     fn deref_mut(&mut self) -> &mut Self::Target {
2842         &mut self.inner
2843     }
2844 }
2845 impl<'a> ImageSubresourceBuilder<'a> {
aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self2846     pub fn aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self {
2847         self.inner.aspect_mask = aspect_mask;
2848         self
2849     }
mip_level(mut self, mip_level: u32) -> Self2850     pub fn mip_level(mut self, mip_level: u32) -> Self {
2851         self.inner.mip_level = mip_level;
2852         self
2853     }
array_layer(mut self, array_layer: u32) -> Self2854     pub fn array_layer(mut self, array_layer: u32) -> Self {
2855         self.inner.array_layer = array_layer;
2856         self
2857     }
2858     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2859     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2860     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageSubresource2861     pub fn build(self) -> ImageSubresource {
2862         self.inner
2863     }
2864 }
2865 #[repr(C)]
2866 #[derive(Copy, Clone, Default, Debug)]
2867 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresourceLayers.html>"]
2868 pub struct ImageSubresourceLayers {
2869     pub aspect_mask: ImageAspectFlags,
2870     pub mip_level: u32,
2871     pub base_array_layer: u32,
2872     pub layer_count: u32,
2873 }
2874 impl ImageSubresourceLayers {
builder<'a>() -> ImageSubresourceLayersBuilder<'a>2875     pub fn builder<'a>() -> ImageSubresourceLayersBuilder<'a> {
2876         ImageSubresourceLayersBuilder {
2877             inner: ImageSubresourceLayers::default(),
2878             marker: ::std::marker::PhantomData,
2879         }
2880     }
2881 }
2882 #[repr(transparent)]
2883 pub struct ImageSubresourceLayersBuilder<'a> {
2884     inner: ImageSubresourceLayers,
2885     marker: ::std::marker::PhantomData<&'a ()>,
2886 }
2887 impl<'a> ::std::ops::Deref for ImageSubresourceLayersBuilder<'a> {
2888     type Target = ImageSubresourceLayers;
deref(&self) -> &Self::Target2889     fn deref(&self) -> &Self::Target {
2890         &self.inner
2891     }
2892 }
2893 impl<'a> ::std::ops::DerefMut for ImageSubresourceLayersBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2894     fn deref_mut(&mut self) -> &mut Self::Target {
2895         &mut self.inner
2896     }
2897 }
2898 impl<'a> ImageSubresourceLayersBuilder<'a> {
aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self2899     pub fn aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self {
2900         self.inner.aspect_mask = aspect_mask;
2901         self
2902     }
mip_level(mut self, mip_level: u32) -> Self2903     pub fn mip_level(mut self, mip_level: u32) -> Self {
2904         self.inner.mip_level = mip_level;
2905         self
2906     }
base_array_layer(mut self, base_array_layer: u32) -> Self2907     pub fn base_array_layer(mut self, base_array_layer: u32) -> Self {
2908         self.inner.base_array_layer = base_array_layer;
2909         self
2910     }
layer_count(mut self, layer_count: u32) -> Self2911     pub fn layer_count(mut self, layer_count: u32) -> Self {
2912         self.inner.layer_count = layer_count;
2913         self
2914     }
2915     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2916     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2917     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageSubresourceLayers2918     pub fn build(self) -> ImageSubresourceLayers {
2919         self.inner
2920     }
2921 }
2922 #[repr(C)]
2923 #[derive(Copy, Clone, Default, Debug)]
2924 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageSubresourceRange.html>"]
2925 pub struct ImageSubresourceRange {
2926     pub aspect_mask: ImageAspectFlags,
2927     pub base_mip_level: u32,
2928     pub level_count: u32,
2929     pub base_array_layer: u32,
2930     pub layer_count: u32,
2931 }
2932 impl ImageSubresourceRange {
builder<'a>() -> ImageSubresourceRangeBuilder<'a>2933     pub fn builder<'a>() -> ImageSubresourceRangeBuilder<'a> {
2934         ImageSubresourceRangeBuilder {
2935             inner: ImageSubresourceRange::default(),
2936             marker: ::std::marker::PhantomData,
2937         }
2938     }
2939 }
2940 #[repr(transparent)]
2941 pub struct ImageSubresourceRangeBuilder<'a> {
2942     inner: ImageSubresourceRange,
2943     marker: ::std::marker::PhantomData<&'a ()>,
2944 }
2945 impl<'a> ::std::ops::Deref for ImageSubresourceRangeBuilder<'a> {
2946     type Target = ImageSubresourceRange;
deref(&self) -> &Self::Target2947     fn deref(&self) -> &Self::Target {
2948         &self.inner
2949     }
2950 }
2951 impl<'a> ::std::ops::DerefMut for ImageSubresourceRangeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target2952     fn deref_mut(&mut self) -> &mut Self::Target {
2953         &mut self.inner
2954     }
2955 }
2956 impl<'a> ImageSubresourceRangeBuilder<'a> {
aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self2957     pub fn aspect_mask(mut self, aspect_mask: ImageAspectFlags) -> Self {
2958         self.inner.aspect_mask = aspect_mask;
2959         self
2960     }
base_mip_level(mut self, base_mip_level: u32) -> Self2961     pub fn base_mip_level(mut self, base_mip_level: u32) -> Self {
2962         self.inner.base_mip_level = base_mip_level;
2963         self
2964     }
level_count(mut self, level_count: u32) -> Self2965     pub fn level_count(mut self, level_count: u32) -> Self {
2966         self.inner.level_count = level_count;
2967         self
2968     }
base_array_layer(mut self, base_array_layer: u32) -> Self2969     pub fn base_array_layer(mut self, base_array_layer: u32) -> Self {
2970         self.inner.base_array_layer = base_array_layer;
2971         self
2972     }
layer_count(mut self, layer_count: u32) -> Self2973     pub fn layer_count(mut self, layer_count: u32) -> Self {
2974         self.inner.layer_count = layer_count;
2975         self
2976     }
2977     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
2978     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
2979     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageSubresourceRange2980     pub fn build(self) -> ImageSubresourceRange {
2981         self.inner
2982     }
2983 }
2984 #[repr(C)]
2985 #[derive(Copy, Clone, Debug)]
2986 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryBarrier.html>"]
2987 pub struct MemoryBarrier {
2988     pub s_type: StructureType,
2989     pub p_next: *const c_void,
2990     pub src_access_mask: AccessFlags,
2991     pub dst_access_mask: AccessFlags,
2992 }
2993 impl ::std::default::Default for MemoryBarrier {
default() -> MemoryBarrier2994     fn default() -> MemoryBarrier {
2995         MemoryBarrier {
2996             s_type: StructureType::MEMORY_BARRIER,
2997             p_next: ::std::ptr::null(),
2998             src_access_mask: AccessFlags::default(),
2999             dst_access_mask: AccessFlags::default(),
3000         }
3001     }
3002 }
3003 impl MemoryBarrier {
builder<'a>() -> MemoryBarrierBuilder<'a>3004     pub fn builder<'a>() -> MemoryBarrierBuilder<'a> {
3005         MemoryBarrierBuilder {
3006             inner: MemoryBarrier::default(),
3007             marker: ::std::marker::PhantomData,
3008         }
3009     }
3010 }
3011 #[repr(transparent)]
3012 pub struct MemoryBarrierBuilder<'a> {
3013     inner: MemoryBarrier,
3014     marker: ::std::marker::PhantomData<&'a ()>,
3015 }
3016 impl<'a> ::std::ops::Deref for MemoryBarrierBuilder<'a> {
3017     type Target = MemoryBarrier;
deref(&self) -> &Self::Target3018     fn deref(&self) -> &Self::Target {
3019         &self.inner
3020     }
3021 }
3022 impl<'a> ::std::ops::DerefMut for MemoryBarrierBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3023     fn deref_mut(&mut self) -> &mut Self::Target {
3024         &mut self.inner
3025     }
3026 }
3027 impl<'a> MemoryBarrierBuilder<'a> {
src_access_mask(mut self, src_access_mask: AccessFlags) -> Self3028     pub fn src_access_mask(mut self, src_access_mask: AccessFlags) -> Self {
3029         self.inner.src_access_mask = src_access_mask;
3030         self
3031     }
dst_access_mask(mut self, dst_access_mask: AccessFlags) -> Self3032     pub fn dst_access_mask(mut self, dst_access_mask: AccessFlags) -> Self {
3033         self.inner.dst_access_mask = dst_access_mask;
3034         self
3035     }
3036     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3037     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3038     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> MemoryBarrier3039     pub fn build(self) -> MemoryBarrier {
3040         self.inner
3041     }
3042 }
3043 #[repr(C)]
3044 #[derive(Copy, Clone, Debug)]
3045 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferMemoryBarrier.html>"]
3046 pub struct BufferMemoryBarrier {
3047     pub s_type: StructureType,
3048     pub p_next: *const c_void,
3049     pub src_access_mask: AccessFlags,
3050     pub dst_access_mask: AccessFlags,
3051     pub src_queue_family_index: u32,
3052     pub dst_queue_family_index: u32,
3053     pub buffer: Buffer,
3054     pub offset: DeviceSize,
3055     pub size: DeviceSize,
3056 }
3057 impl ::std::default::Default for BufferMemoryBarrier {
default() -> BufferMemoryBarrier3058     fn default() -> BufferMemoryBarrier {
3059         BufferMemoryBarrier {
3060             s_type: StructureType::BUFFER_MEMORY_BARRIER,
3061             p_next: ::std::ptr::null(),
3062             src_access_mask: AccessFlags::default(),
3063             dst_access_mask: AccessFlags::default(),
3064             src_queue_family_index: u32::default(),
3065             dst_queue_family_index: u32::default(),
3066             buffer: Buffer::default(),
3067             offset: DeviceSize::default(),
3068             size: DeviceSize::default(),
3069         }
3070     }
3071 }
3072 impl BufferMemoryBarrier {
builder<'a>() -> BufferMemoryBarrierBuilder<'a>3073     pub fn builder<'a>() -> BufferMemoryBarrierBuilder<'a> {
3074         BufferMemoryBarrierBuilder {
3075             inner: BufferMemoryBarrier::default(),
3076             marker: ::std::marker::PhantomData,
3077         }
3078     }
3079 }
3080 #[repr(transparent)]
3081 pub struct BufferMemoryBarrierBuilder<'a> {
3082     inner: BufferMemoryBarrier,
3083     marker: ::std::marker::PhantomData<&'a ()>,
3084 }
3085 impl<'a> ::std::ops::Deref for BufferMemoryBarrierBuilder<'a> {
3086     type Target = BufferMemoryBarrier;
deref(&self) -> &Self::Target3087     fn deref(&self) -> &Self::Target {
3088         &self.inner
3089     }
3090 }
3091 impl<'a> ::std::ops::DerefMut for BufferMemoryBarrierBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3092     fn deref_mut(&mut self) -> &mut Self::Target {
3093         &mut self.inner
3094     }
3095 }
3096 impl<'a> BufferMemoryBarrierBuilder<'a> {
src_access_mask(mut self, src_access_mask: AccessFlags) -> Self3097     pub fn src_access_mask(mut self, src_access_mask: AccessFlags) -> Self {
3098         self.inner.src_access_mask = src_access_mask;
3099         self
3100     }
dst_access_mask(mut self, dst_access_mask: AccessFlags) -> Self3101     pub fn dst_access_mask(mut self, dst_access_mask: AccessFlags) -> Self {
3102         self.inner.dst_access_mask = dst_access_mask;
3103         self
3104     }
src_queue_family_index(mut self, src_queue_family_index: u32) -> Self3105     pub fn src_queue_family_index(mut self, src_queue_family_index: u32) -> Self {
3106         self.inner.src_queue_family_index = src_queue_family_index;
3107         self
3108     }
dst_queue_family_index(mut self, dst_queue_family_index: u32) -> Self3109     pub fn dst_queue_family_index(mut self, dst_queue_family_index: u32) -> Self {
3110         self.inner.dst_queue_family_index = dst_queue_family_index;
3111         self
3112     }
buffer(mut self, buffer: Buffer) -> Self3113     pub fn buffer(mut self, buffer: Buffer) -> Self {
3114         self.inner.buffer = buffer;
3115         self
3116     }
offset(mut self, offset: DeviceSize) -> Self3117     pub fn offset(mut self, offset: DeviceSize) -> Self {
3118         self.inner.offset = offset;
3119         self
3120     }
size(mut self, size: DeviceSize) -> Self3121     pub fn size(mut self, size: DeviceSize) -> Self {
3122         self.inner.size = size;
3123         self
3124     }
3125     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3126     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3127     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferMemoryBarrier3128     pub fn build(self) -> BufferMemoryBarrier {
3129         self.inner
3130     }
3131 }
3132 #[repr(C)]
3133 #[derive(Copy, Clone, Debug)]
3134 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageMemoryBarrier.html>"]
3135 pub struct ImageMemoryBarrier {
3136     pub s_type: StructureType,
3137     pub p_next: *const c_void,
3138     pub src_access_mask: AccessFlags,
3139     pub dst_access_mask: AccessFlags,
3140     pub old_layout: ImageLayout,
3141     pub new_layout: ImageLayout,
3142     pub src_queue_family_index: u32,
3143     pub dst_queue_family_index: u32,
3144     pub image: Image,
3145     pub subresource_range: ImageSubresourceRange,
3146 }
3147 impl ::std::default::Default for ImageMemoryBarrier {
default() -> ImageMemoryBarrier3148     fn default() -> ImageMemoryBarrier {
3149         ImageMemoryBarrier {
3150             s_type: StructureType::IMAGE_MEMORY_BARRIER,
3151             p_next: ::std::ptr::null(),
3152             src_access_mask: AccessFlags::default(),
3153             dst_access_mask: AccessFlags::default(),
3154             old_layout: ImageLayout::default(),
3155             new_layout: ImageLayout::default(),
3156             src_queue_family_index: u32::default(),
3157             dst_queue_family_index: u32::default(),
3158             image: Image::default(),
3159             subresource_range: ImageSubresourceRange::default(),
3160         }
3161     }
3162 }
3163 impl ImageMemoryBarrier {
builder<'a>() -> ImageMemoryBarrierBuilder<'a>3164     pub fn builder<'a>() -> ImageMemoryBarrierBuilder<'a> {
3165         ImageMemoryBarrierBuilder {
3166             inner: ImageMemoryBarrier::default(),
3167             marker: ::std::marker::PhantomData,
3168         }
3169     }
3170 }
3171 #[repr(transparent)]
3172 pub struct ImageMemoryBarrierBuilder<'a> {
3173     inner: ImageMemoryBarrier,
3174     marker: ::std::marker::PhantomData<&'a ()>,
3175 }
3176 pub unsafe trait ExtendsImageMemoryBarrier {}
3177 impl<'a> ::std::ops::Deref for ImageMemoryBarrierBuilder<'a> {
3178     type Target = ImageMemoryBarrier;
deref(&self) -> &Self::Target3179     fn deref(&self) -> &Self::Target {
3180         &self.inner
3181     }
3182 }
3183 impl<'a> ::std::ops::DerefMut for ImageMemoryBarrierBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3184     fn deref_mut(&mut self) -> &mut Self::Target {
3185         &mut self.inner
3186     }
3187 }
3188 impl<'a> ImageMemoryBarrierBuilder<'a> {
src_access_mask(mut self, src_access_mask: AccessFlags) -> Self3189     pub fn src_access_mask(mut self, src_access_mask: AccessFlags) -> Self {
3190         self.inner.src_access_mask = src_access_mask;
3191         self
3192     }
dst_access_mask(mut self, dst_access_mask: AccessFlags) -> Self3193     pub fn dst_access_mask(mut self, dst_access_mask: AccessFlags) -> Self {
3194         self.inner.dst_access_mask = dst_access_mask;
3195         self
3196     }
old_layout(mut self, old_layout: ImageLayout) -> Self3197     pub fn old_layout(mut self, old_layout: ImageLayout) -> Self {
3198         self.inner.old_layout = old_layout;
3199         self
3200     }
new_layout(mut self, new_layout: ImageLayout) -> Self3201     pub fn new_layout(mut self, new_layout: ImageLayout) -> Self {
3202         self.inner.new_layout = new_layout;
3203         self
3204     }
src_queue_family_index(mut self, src_queue_family_index: u32) -> Self3205     pub fn src_queue_family_index(mut self, src_queue_family_index: u32) -> Self {
3206         self.inner.src_queue_family_index = src_queue_family_index;
3207         self
3208     }
dst_queue_family_index(mut self, dst_queue_family_index: u32) -> Self3209     pub fn dst_queue_family_index(mut self, dst_queue_family_index: u32) -> Self {
3210         self.inner.dst_queue_family_index = dst_queue_family_index;
3211         self
3212     }
image(mut self, image: Image) -> Self3213     pub fn image(mut self, image: Image) -> Self {
3214         self.inner.image = image;
3215         self
3216     }
subresource_range(mut self, subresource_range: ImageSubresourceRange) -> Self3217     pub fn subresource_range(mut self, subresource_range: ImageSubresourceRange) -> Self {
3218         self.inner.subresource_range = subresource_range;
3219         self
3220     }
3221     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
3222     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
3223     #[doc = r" valid extension structs can be pushed into the chain."]
3224     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
3225     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsImageMemoryBarrier>(mut self, next: &'a mut T) -> Self3226     pub fn push_next<T: ExtendsImageMemoryBarrier>(mut self, next: &'a mut T) -> Self {
3227         unsafe {
3228             let next_ptr = next as *mut T as *mut BaseOutStructure;
3229             let last_next = ptr_chain_iter(next).last().unwrap();
3230             (*last_next).p_next = self.inner.p_next as _;
3231             self.inner.p_next = next_ptr as _;
3232         }
3233         self
3234     }
3235     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3236     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3237     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageMemoryBarrier3238     pub fn build(self) -> ImageMemoryBarrier {
3239         self.inner
3240     }
3241 }
3242 #[repr(C)]
3243 #[derive(Copy, Clone, Debug)]
3244 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageCreateInfo.html>"]
3245 pub struct ImageCreateInfo {
3246     pub s_type: StructureType,
3247     pub p_next: *const c_void,
3248     pub flags: ImageCreateFlags,
3249     pub image_type: ImageType,
3250     pub format: Format,
3251     pub extent: Extent3D,
3252     pub mip_levels: u32,
3253     pub array_layers: u32,
3254     pub samples: SampleCountFlags,
3255     pub tiling: ImageTiling,
3256     pub usage: ImageUsageFlags,
3257     pub sharing_mode: SharingMode,
3258     pub queue_family_index_count: u32,
3259     pub p_queue_family_indices: *const u32,
3260     pub initial_layout: ImageLayout,
3261 }
3262 impl ::std::default::Default for ImageCreateInfo {
default() -> ImageCreateInfo3263     fn default() -> ImageCreateInfo {
3264         ImageCreateInfo {
3265             s_type: StructureType::IMAGE_CREATE_INFO,
3266             p_next: ::std::ptr::null(),
3267             flags: ImageCreateFlags::default(),
3268             image_type: ImageType::default(),
3269             format: Format::default(),
3270             extent: Extent3D::default(),
3271             mip_levels: u32::default(),
3272             array_layers: u32::default(),
3273             samples: SampleCountFlags::default(),
3274             tiling: ImageTiling::default(),
3275             usage: ImageUsageFlags::default(),
3276             sharing_mode: SharingMode::default(),
3277             queue_family_index_count: u32::default(),
3278             p_queue_family_indices: ::std::ptr::null(),
3279             initial_layout: ImageLayout::default(),
3280         }
3281     }
3282 }
3283 impl ImageCreateInfo {
builder<'a>() -> ImageCreateInfoBuilder<'a>3284     pub fn builder<'a>() -> ImageCreateInfoBuilder<'a> {
3285         ImageCreateInfoBuilder {
3286             inner: ImageCreateInfo::default(),
3287             marker: ::std::marker::PhantomData,
3288         }
3289     }
3290 }
3291 #[repr(transparent)]
3292 pub struct ImageCreateInfoBuilder<'a> {
3293     inner: ImageCreateInfo,
3294     marker: ::std::marker::PhantomData<&'a ()>,
3295 }
3296 pub unsafe trait ExtendsImageCreateInfo {}
3297 impl<'a> ::std::ops::Deref for ImageCreateInfoBuilder<'a> {
3298     type Target = ImageCreateInfo;
deref(&self) -> &Self::Target3299     fn deref(&self) -> &Self::Target {
3300         &self.inner
3301     }
3302 }
3303 impl<'a> ::std::ops::DerefMut for ImageCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3304     fn deref_mut(&mut self) -> &mut Self::Target {
3305         &mut self.inner
3306     }
3307 }
3308 impl<'a> ImageCreateInfoBuilder<'a> {
flags(mut self, flags: ImageCreateFlags) -> Self3309     pub fn flags(mut self, flags: ImageCreateFlags) -> Self {
3310         self.inner.flags = flags;
3311         self
3312     }
image_type(mut self, image_type: ImageType) -> Self3313     pub fn image_type(mut self, image_type: ImageType) -> Self {
3314         self.inner.image_type = image_type;
3315         self
3316     }
format(mut self, format: Format) -> Self3317     pub fn format(mut self, format: Format) -> Self {
3318         self.inner.format = format;
3319         self
3320     }
extent(mut self, extent: Extent3D) -> Self3321     pub fn extent(mut self, extent: Extent3D) -> Self {
3322         self.inner.extent = extent;
3323         self
3324     }
mip_levels(mut self, mip_levels: u32) -> Self3325     pub fn mip_levels(mut self, mip_levels: u32) -> Self {
3326         self.inner.mip_levels = mip_levels;
3327         self
3328     }
array_layers(mut self, array_layers: u32) -> Self3329     pub fn array_layers(mut self, array_layers: u32) -> Self {
3330         self.inner.array_layers = array_layers;
3331         self
3332     }
samples(mut self, samples: SampleCountFlags) -> Self3333     pub fn samples(mut self, samples: SampleCountFlags) -> Self {
3334         self.inner.samples = samples;
3335         self
3336     }
tiling(mut self, tiling: ImageTiling) -> Self3337     pub fn tiling(mut self, tiling: ImageTiling) -> Self {
3338         self.inner.tiling = tiling;
3339         self
3340     }
usage(mut self, usage: ImageUsageFlags) -> Self3341     pub fn usage(mut self, usage: ImageUsageFlags) -> Self {
3342         self.inner.usage = usage;
3343         self
3344     }
sharing_mode(mut self, sharing_mode: SharingMode) -> Self3345     pub fn sharing_mode(mut self, sharing_mode: SharingMode) -> Self {
3346         self.inner.sharing_mode = sharing_mode;
3347         self
3348     }
queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self3349     pub fn queue_family_indices(mut self, queue_family_indices: &'a [u32]) -> Self {
3350         self.inner.queue_family_index_count = queue_family_indices.len() as _;
3351         self.inner.p_queue_family_indices = queue_family_indices.as_ptr();
3352         self
3353     }
initial_layout(mut self, initial_layout: ImageLayout) -> Self3354     pub fn initial_layout(mut self, initial_layout: ImageLayout) -> Self {
3355         self.inner.initial_layout = initial_layout;
3356         self
3357     }
3358     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
3359     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
3360     #[doc = r" valid extension structs can be pushed into the chain."]
3361     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
3362     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsImageCreateInfo>(mut self, next: &'a mut T) -> Self3363     pub fn push_next<T: ExtendsImageCreateInfo>(mut self, next: &'a mut T) -> Self {
3364         unsafe {
3365             let next_ptr = next as *mut T as *mut BaseOutStructure;
3366             let last_next = ptr_chain_iter(next).last().unwrap();
3367             (*last_next).p_next = self.inner.p_next as _;
3368             self.inner.p_next = next_ptr as _;
3369         }
3370         self
3371     }
3372     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3373     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3374     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageCreateInfo3375     pub fn build(self) -> ImageCreateInfo {
3376         self.inner
3377     }
3378 }
3379 #[repr(C)]
3380 #[derive(Copy, Clone, Default, Debug)]
3381 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSubresourceLayout.html>"]
3382 pub struct SubresourceLayout {
3383     pub offset: DeviceSize,
3384     pub size: DeviceSize,
3385     pub row_pitch: DeviceSize,
3386     pub array_pitch: DeviceSize,
3387     pub depth_pitch: DeviceSize,
3388 }
3389 impl SubresourceLayout {
builder<'a>() -> SubresourceLayoutBuilder<'a>3390     pub fn builder<'a>() -> SubresourceLayoutBuilder<'a> {
3391         SubresourceLayoutBuilder {
3392             inner: SubresourceLayout::default(),
3393             marker: ::std::marker::PhantomData,
3394         }
3395     }
3396 }
3397 #[repr(transparent)]
3398 pub struct SubresourceLayoutBuilder<'a> {
3399     inner: SubresourceLayout,
3400     marker: ::std::marker::PhantomData<&'a ()>,
3401 }
3402 impl<'a> ::std::ops::Deref for SubresourceLayoutBuilder<'a> {
3403     type Target = SubresourceLayout;
deref(&self) -> &Self::Target3404     fn deref(&self) -> &Self::Target {
3405         &self.inner
3406     }
3407 }
3408 impl<'a> ::std::ops::DerefMut for SubresourceLayoutBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3409     fn deref_mut(&mut self) -> &mut Self::Target {
3410         &mut self.inner
3411     }
3412 }
3413 impl<'a> SubresourceLayoutBuilder<'a> {
offset(mut self, offset: DeviceSize) -> Self3414     pub fn offset(mut self, offset: DeviceSize) -> Self {
3415         self.inner.offset = offset;
3416         self
3417     }
size(mut self, size: DeviceSize) -> Self3418     pub fn size(mut self, size: DeviceSize) -> Self {
3419         self.inner.size = size;
3420         self
3421     }
row_pitch(mut self, row_pitch: DeviceSize) -> Self3422     pub fn row_pitch(mut self, row_pitch: DeviceSize) -> Self {
3423         self.inner.row_pitch = row_pitch;
3424         self
3425     }
array_pitch(mut self, array_pitch: DeviceSize) -> Self3426     pub fn array_pitch(mut self, array_pitch: DeviceSize) -> Self {
3427         self.inner.array_pitch = array_pitch;
3428         self
3429     }
depth_pitch(mut self, depth_pitch: DeviceSize) -> Self3430     pub fn depth_pitch(mut self, depth_pitch: DeviceSize) -> Self {
3431         self.inner.depth_pitch = depth_pitch;
3432         self
3433     }
3434     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3435     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3436     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SubresourceLayout3437     pub fn build(self) -> SubresourceLayout {
3438         self.inner
3439     }
3440 }
3441 #[repr(C)]
3442 #[derive(Copy, Clone, Debug)]
3443 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageViewCreateInfo.html>"]
3444 pub struct ImageViewCreateInfo {
3445     pub s_type: StructureType,
3446     pub p_next: *const c_void,
3447     pub flags: ImageViewCreateFlags,
3448     pub image: Image,
3449     pub view_type: ImageViewType,
3450     pub format: Format,
3451     pub components: ComponentMapping,
3452     pub subresource_range: ImageSubresourceRange,
3453 }
3454 impl ::std::default::Default for ImageViewCreateInfo {
default() -> ImageViewCreateInfo3455     fn default() -> ImageViewCreateInfo {
3456         ImageViewCreateInfo {
3457             s_type: StructureType::IMAGE_VIEW_CREATE_INFO,
3458             p_next: ::std::ptr::null(),
3459             flags: ImageViewCreateFlags::default(),
3460             image: Image::default(),
3461             view_type: ImageViewType::default(),
3462             format: Format::default(),
3463             components: ComponentMapping::default(),
3464             subresource_range: ImageSubresourceRange::default(),
3465         }
3466     }
3467 }
3468 impl ImageViewCreateInfo {
builder<'a>() -> ImageViewCreateInfoBuilder<'a>3469     pub fn builder<'a>() -> ImageViewCreateInfoBuilder<'a> {
3470         ImageViewCreateInfoBuilder {
3471             inner: ImageViewCreateInfo::default(),
3472             marker: ::std::marker::PhantomData,
3473         }
3474     }
3475 }
3476 #[repr(transparent)]
3477 pub struct ImageViewCreateInfoBuilder<'a> {
3478     inner: ImageViewCreateInfo,
3479     marker: ::std::marker::PhantomData<&'a ()>,
3480 }
3481 pub unsafe trait ExtendsImageViewCreateInfo {}
3482 impl<'a> ::std::ops::Deref for ImageViewCreateInfoBuilder<'a> {
3483     type Target = ImageViewCreateInfo;
deref(&self) -> &Self::Target3484     fn deref(&self) -> &Self::Target {
3485         &self.inner
3486     }
3487 }
3488 impl<'a> ::std::ops::DerefMut for ImageViewCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3489     fn deref_mut(&mut self) -> &mut Self::Target {
3490         &mut self.inner
3491     }
3492 }
3493 impl<'a> ImageViewCreateInfoBuilder<'a> {
flags(mut self, flags: ImageViewCreateFlags) -> Self3494     pub fn flags(mut self, flags: ImageViewCreateFlags) -> Self {
3495         self.inner.flags = flags;
3496         self
3497     }
image(mut self, image: Image) -> Self3498     pub fn image(mut self, image: Image) -> Self {
3499         self.inner.image = image;
3500         self
3501     }
view_type(mut self, view_type: ImageViewType) -> Self3502     pub fn view_type(mut self, view_type: ImageViewType) -> Self {
3503         self.inner.view_type = view_type;
3504         self
3505     }
format(mut self, format: Format) -> Self3506     pub fn format(mut self, format: Format) -> Self {
3507         self.inner.format = format;
3508         self
3509     }
components(mut self, components: ComponentMapping) -> Self3510     pub fn components(mut self, components: ComponentMapping) -> Self {
3511         self.inner.components = components;
3512         self
3513     }
subresource_range(mut self, subresource_range: ImageSubresourceRange) -> Self3514     pub fn subresource_range(mut self, subresource_range: ImageSubresourceRange) -> Self {
3515         self.inner.subresource_range = subresource_range;
3516         self
3517     }
3518     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
3519     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
3520     #[doc = r" valid extension structs can be pushed into the chain."]
3521     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
3522     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsImageViewCreateInfo>(mut self, next: &'a mut T) -> Self3523     pub fn push_next<T: ExtendsImageViewCreateInfo>(mut self, next: &'a mut T) -> Self {
3524         unsafe {
3525             let next_ptr = next as *mut T as *mut BaseOutStructure;
3526             let last_next = ptr_chain_iter(next).last().unwrap();
3527             (*last_next).p_next = self.inner.p_next as _;
3528             self.inner.p_next = next_ptr as _;
3529         }
3530         self
3531     }
3532     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3533     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3534     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageViewCreateInfo3535     pub fn build(self) -> ImageViewCreateInfo {
3536         self.inner
3537     }
3538 }
3539 #[repr(C)]
3540 #[derive(Copy, Clone, Default, Debug)]
3541 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferCopy.html>"]
3542 pub struct BufferCopy {
3543     pub src_offset: DeviceSize,
3544     pub dst_offset: DeviceSize,
3545     pub size: DeviceSize,
3546 }
3547 impl BufferCopy {
builder<'a>() -> BufferCopyBuilder<'a>3548     pub fn builder<'a>() -> BufferCopyBuilder<'a> {
3549         BufferCopyBuilder {
3550             inner: BufferCopy::default(),
3551             marker: ::std::marker::PhantomData,
3552         }
3553     }
3554 }
3555 #[repr(transparent)]
3556 pub struct BufferCopyBuilder<'a> {
3557     inner: BufferCopy,
3558     marker: ::std::marker::PhantomData<&'a ()>,
3559 }
3560 impl<'a> ::std::ops::Deref for BufferCopyBuilder<'a> {
3561     type Target = BufferCopy;
deref(&self) -> &Self::Target3562     fn deref(&self) -> &Self::Target {
3563         &self.inner
3564     }
3565 }
3566 impl<'a> ::std::ops::DerefMut for BufferCopyBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3567     fn deref_mut(&mut self) -> &mut Self::Target {
3568         &mut self.inner
3569     }
3570 }
3571 impl<'a> BufferCopyBuilder<'a> {
src_offset(mut self, src_offset: DeviceSize) -> Self3572     pub fn src_offset(mut self, src_offset: DeviceSize) -> Self {
3573         self.inner.src_offset = src_offset;
3574         self
3575     }
dst_offset(mut self, dst_offset: DeviceSize) -> Self3576     pub fn dst_offset(mut self, dst_offset: DeviceSize) -> Self {
3577         self.inner.dst_offset = dst_offset;
3578         self
3579     }
size(mut self, size: DeviceSize) -> Self3580     pub fn size(mut self, size: DeviceSize) -> Self {
3581         self.inner.size = size;
3582         self
3583     }
3584     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3585     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3586     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferCopy3587     pub fn build(self) -> BufferCopy {
3588         self.inner
3589     }
3590 }
3591 #[repr(C)]
3592 #[derive(Copy, Clone, Default, Debug)]
3593 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseMemoryBind.html>"]
3594 pub struct SparseMemoryBind {
3595     pub resource_offset: DeviceSize,
3596     pub size: DeviceSize,
3597     pub memory: DeviceMemory,
3598     pub memory_offset: DeviceSize,
3599     pub flags: SparseMemoryBindFlags,
3600 }
3601 impl SparseMemoryBind {
builder<'a>() -> SparseMemoryBindBuilder<'a>3602     pub fn builder<'a>() -> SparseMemoryBindBuilder<'a> {
3603         SparseMemoryBindBuilder {
3604             inner: SparseMemoryBind::default(),
3605             marker: ::std::marker::PhantomData,
3606         }
3607     }
3608 }
3609 #[repr(transparent)]
3610 pub struct SparseMemoryBindBuilder<'a> {
3611     inner: SparseMemoryBind,
3612     marker: ::std::marker::PhantomData<&'a ()>,
3613 }
3614 impl<'a> ::std::ops::Deref for SparseMemoryBindBuilder<'a> {
3615     type Target = SparseMemoryBind;
deref(&self) -> &Self::Target3616     fn deref(&self) -> &Self::Target {
3617         &self.inner
3618     }
3619 }
3620 impl<'a> ::std::ops::DerefMut for SparseMemoryBindBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3621     fn deref_mut(&mut self) -> &mut Self::Target {
3622         &mut self.inner
3623     }
3624 }
3625 impl<'a> SparseMemoryBindBuilder<'a> {
resource_offset(mut self, resource_offset: DeviceSize) -> Self3626     pub fn resource_offset(mut self, resource_offset: DeviceSize) -> Self {
3627         self.inner.resource_offset = resource_offset;
3628         self
3629     }
size(mut self, size: DeviceSize) -> Self3630     pub fn size(mut self, size: DeviceSize) -> Self {
3631         self.inner.size = size;
3632         self
3633     }
memory(mut self, memory: DeviceMemory) -> Self3634     pub fn memory(mut self, memory: DeviceMemory) -> Self {
3635         self.inner.memory = memory;
3636         self
3637     }
memory_offset(mut self, memory_offset: DeviceSize) -> Self3638     pub fn memory_offset(mut self, memory_offset: DeviceSize) -> Self {
3639         self.inner.memory_offset = memory_offset;
3640         self
3641     }
flags(mut self, flags: SparseMemoryBindFlags) -> Self3642     pub fn flags(mut self, flags: SparseMemoryBindFlags) -> Self {
3643         self.inner.flags = flags;
3644         self
3645     }
3646     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3647     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3648     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseMemoryBind3649     pub fn build(self) -> SparseMemoryBind {
3650         self.inner
3651     }
3652 }
3653 #[repr(C)]
3654 #[derive(Copy, Clone, Default, Debug)]
3655 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryBind.html>"]
3656 pub struct SparseImageMemoryBind {
3657     pub subresource: ImageSubresource,
3658     pub offset: Offset3D,
3659     pub extent: Extent3D,
3660     pub memory: DeviceMemory,
3661     pub memory_offset: DeviceSize,
3662     pub flags: SparseMemoryBindFlags,
3663 }
3664 impl SparseImageMemoryBind {
builder<'a>() -> SparseImageMemoryBindBuilder<'a>3665     pub fn builder<'a>() -> SparseImageMemoryBindBuilder<'a> {
3666         SparseImageMemoryBindBuilder {
3667             inner: SparseImageMemoryBind::default(),
3668             marker: ::std::marker::PhantomData,
3669         }
3670     }
3671 }
3672 #[repr(transparent)]
3673 pub struct SparseImageMemoryBindBuilder<'a> {
3674     inner: SparseImageMemoryBind,
3675     marker: ::std::marker::PhantomData<&'a ()>,
3676 }
3677 impl<'a> ::std::ops::Deref for SparseImageMemoryBindBuilder<'a> {
3678     type Target = SparseImageMemoryBind;
deref(&self) -> &Self::Target3679     fn deref(&self) -> &Self::Target {
3680         &self.inner
3681     }
3682 }
3683 impl<'a> ::std::ops::DerefMut for SparseImageMemoryBindBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3684     fn deref_mut(&mut self) -> &mut Self::Target {
3685         &mut self.inner
3686     }
3687 }
3688 impl<'a> SparseImageMemoryBindBuilder<'a> {
subresource(mut self, subresource: ImageSubresource) -> Self3689     pub fn subresource(mut self, subresource: ImageSubresource) -> Self {
3690         self.inner.subresource = subresource;
3691         self
3692     }
offset(mut self, offset: Offset3D) -> Self3693     pub fn offset(mut self, offset: Offset3D) -> Self {
3694         self.inner.offset = offset;
3695         self
3696     }
extent(mut self, extent: Extent3D) -> Self3697     pub fn extent(mut self, extent: Extent3D) -> Self {
3698         self.inner.extent = extent;
3699         self
3700     }
memory(mut self, memory: DeviceMemory) -> Self3701     pub fn memory(mut self, memory: DeviceMemory) -> Self {
3702         self.inner.memory = memory;
3703         self
3704     }
memory_offset(mut self, memory_offset: DeviceSize) -> Self3705     pub fn memory_offset(mut self, memory_offset: DeviceSize) -> Self {
3706         self.inner.memory_offset = memory_offset;
3707         self
3708     }
flags(mut self, flags: SparseMemoryBindFlags) -> Self3709     pub fn flags(mut self, flags: SparseMemoryBindFlags) -> Self {
3710         self.inner.flags = flags;
3711         self
3712     }
3713     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3714     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3715     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageMemoryBind3716     pub fn build(self) -> SparseImageMemoryBind {
3717         self.inner
3718     }
3719 }
3720 #[repr(C)]
3721 #[derive(Copy, Clone, Debug)]
3722 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseBufferMemoryBindInfo.html>"]
3723 pub struct SparseBufferMemoryBindInfo {
3724     pub buffer: Buffer,
3725     pub bind_count: u32,
3726     pub p_binds: *const SparseMemoryBind,
3727 }
3728 impl ::std::default::Default for SparseBufferMemoryBindInfo {
default() -> SparseBufferMemoryBindInfo3729     fn default() -> SparseBufferMemoryBindInfo {
3730         SparseBufferMemoryBindInfo {
3731             buffer: Buffer::default(),
3732             bind_count: u32::default(),
3733             p_binds: ::std::ptr::null(),
3734         }
3735     }
3736 }
3737 impl SparseBufferMemoryBindInfo {
builder<'a>() -> SparseBufferMemoryBindInfoBuilder<'a>3738     pub fn builder<'a>() -> SparseBufferMemoryBindInfoBuilder<'a> {
3739         SparseBufferMemoryBindInfoBuilder {
3740             inner: SparseBufferMemoryBindInfo::default(),
3741             marker: ::std::marker::PhantomData,
3742         }
3743     }
3744 }
3745 #[repr(transparent)]
3746 pub struct SparseBufferMemoryBindInfoBuilder<'a> {
3747     inner: SparseBufferMemoryBindInfo,
3748     marker: ::std::marker::PhantomData<&'a ()>,
3749 }
3750 impl<'a> ::std::ops::Deref for SparseBufferMemoryBindInfoBuilder<'a> {
3751     type Target = SparseBufferMemoryBindInfo;
deref(&self) -> &Self::Target3752     fn deref(&self) -> &Self::Target {
3753         &self.inner
3754     }
3755 }
3756 impl<'a> ::std::ops::DerefMut for SparseBufferMemoryBindInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3757     fn deref_mut(&mut self) -> &mut Self::Target {
3758         &mut self.inner
3759     }
3760 }
3761 impl<'a> SparseBufferMemoryBindInfoBuilder<'a> {
buffer(mut self, buffer: Buffer) -> Self3762     pub fn buffer(mut self, buffer: Buffer) -> Self {
3763         self.inner.buffer = buffer;
3764         self
3765     }
binds(mut self, binds: &'a [SparseMemoryBind]) -> Self3766     pub fn binds(mut self, binds: &'a [SparseMemoryBind]) -> Self {
3767         self.inner.bind_count = binds.len() as _;
3768         self.inner.p_binds = binds.as_ptr();
3769         self
3770     }
3771     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3772     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3773     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseBufferMemoryBindInfo3774     pub fn build(self) -> SparseBufferMemoryBindInfo {
3775         self.inner
3776     }
3777 }
3778 #[repr(C)]
3779 #[derive(Copy, Clone, Debug)]
3780 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageOpaqueMemoryBindInfo.html>"]
3781 pub struct SparseImageOpaqueMemoryBindInfo {
3782     pub image: Image,
3783     pub bind_count: u32,
3784     pub p_binds: *const SparseMemoryBind,
3785 }
3786 impl ::std::default::Default for SparseImageOpaqueMemoryBindInfo {
default() -> SparseImageOpaqueMemoryBindInfo3787     fn default() -> SparseImageOpaqueMemoryBindInfo {
3788         SparseImageOpaqueMemoryBindInfo {
3789             image: Image::default(),
3790             bind_count: u32::default(),
3791             p_binds: ::std::ptr::null(),
3792         }
3793     }
3794 }
3795 impl SparseImageOpaqueMemoryBindInfo {
builder<'a>() -> SparseImageOpaqueMemoryBindInfoBuilder<'a>3796     pub fn builder<'a>() -> SparseImageOpaqueMemoryBindInfoBuilder<'a> {
3797         SparseImageOpaqueMemoryBindInfoBuilder {
3798             inner: SparseImageOpaqueMemoryBindInfo::default(),
3799             marker: ::std::marker::PhantomData,
3800         }
3801     }
3802 }
3803 #[repr(transparent)]
3804 pub struct SparseImageOpaqueMemoryBindInfoBuilder<'a> {
3805     inner: SparseImageOpaqueMemoryBindInfo,
3806     marker: ::std::marker::PhantomData<&'a ()>,
3807 }
3808 impl<'a> ::std::ops::Deref for SparseImageOpaqueMemoryBindInfoBuilder<'a> {
3809     type Target = SparseImageOpaqueMemoryBindInfo;
deref(&self) -> &Self::Target3810     fn deref(&self) -> &Self::Target {
3811         &self.inner
3812     }
3813 }
3814 impl<'a> ::std::ops::DerefMut for SparseImageOpaqueMemoryBindInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3815     fn deref_mut(&mut self) -> &mut Self::Target {
3816         &mut self.inner
3817     }
3818 }
3819 impl<'a> SparseImageOpaqueMemoryBindInfoBuilder<'a> {
image(mut self, image: Image) -> Self3820     pub fn image(mut self, image: Image) -> Self {
3821         self.inner.image = image;
3822         self
3823     }
binds(mut self, binds: &'a [SparseMemoryBind]) -> Self3824     pub fn binds(mut self, binds: &'a [SparseMemoryBind]) -> Self {
3825         self.inner.bind_count = binds.len() as _;
3826         self.inner.p_binds = binds.as_ptr();
3827         self
3828     }
3829     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3830     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3831     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageOpaqueMemoryBindInfo3832     pub fn build(self) -> SparseImageOpaqueMemoryBindInfo {
3833         self.inner
3834     }
3835 }
3836 #[repr(C)]
3837 #[derive(Copy, Clone, Debug)]
3838 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSparseImageMemoryBindInfo.html>"]
3839 pub struct SparseImageMemoryBindInfo {
3840     pub image: Image,
3841     pub bind_count: u32,
3842     pub p_binds: *const SparseImageMemoryBind,
3843 }
3844 impl ::std::default::Default for SparseImageMemoryBindInfo {
default() -> SparseImageMemoryBindInfo3845     fn default() -> SparseImageMemoryBindInfo {
3846         SparseImageMemoryBindInfo {
3847             image: Image::default(),
3848             bind_count: u32::default(),
3849             p_binds: ::std::ptr::null(),
3850         }
3851     }
3852 }
3853 impl SparseImageMemoryBindInfo {
builder<'a>() -> SparseImageMemoryBindInfoBuilder<'a>3854     pub fn builder<'a>() -> SparseImageMemoryBindInfoBuilder<'a> {
3855         SparseImageMemoryBindInfoBuilder {
3856             inner: SparseImageMemoryBindInfo::default(),
3857             marker: ::std::marker::PhantomData,
3858         }
3859     }
3860 }
3861 #[repr(transparent)]
3862 pub struct SparseImageMemoryBindInfoBuilder<'a> {
3863     inner: SparseImageMemoryBindInfo,
3864     marker: ::std::marker::PhantomData<&'a ()>,
3865 }
3866 impl<'a> ::std::ops::Deref for SparseImageMemoryBindInfoBuilder<'a> {
3867     type Target = SparseImageMemoryBindInfo;
deref(&self) -> &Self::Target3868     fn deref(&self) -> &Self::Target {
3869         &self.inner
3870     }
3871 }
3872 impl<'a> ::std::ops::DerefMut for SparseImageMemoryBindInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3873     fn deref_mut(&mut self) -> &mut Self::Target {
3874         &mut self.inner
3875     }
3876 }
3877 impl<'a> SparseImageMemoryBindInfoBuilder<'a> {
image(mut self, image: Image) -> Self3878     pub fn image(mut self, image: Image) -> Self {
3879         self.inner.image = image;
3880         self
3881     }
binds(mut self, binds: &'a [SparseImageMemoryBind]) -> Self3882     pub fn binds(mut self, binds: &'a [SparseImageMemoryBind]) -> Self {
3883         self.inner.bind_count = binds.len() as _;
3884         self.inner.p_binds = binds.as_ptr();
3885         self
3886     }
3887     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3888     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3889     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SparseImageMemoryBindInfo3890     pub fn build(self) -> SparseImageMemoryBindInfo {
3891         self.inner
3892     }
3893 }
3894 #[repr(C)]
3895 #[derive(Copy, Clone, Debug)]
3896 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBindSparseInfo.html>"]
3897 pub struct BindSparseInfo {
3898     pub s_type: StructureType,
3899     pub p_next: *const c_void,
3900     pub wait_semaphore_count: u32,
3901     pub p_wait_semaphores: *const Semaphore,
3902     pub buffer_bind_count: u32,
3903     pub p_buffer_binds: *const SparseBufferMemoryBindInfo,
3904     pub image_opaque_bind_count: u32,
3905     pub p_image_opaque_binds: *const SparseImageOpaqueMemoryBindInfo,
3906     pub image_bind_count: u32,
3907     pub p_image_binds: *const SparseImageMemoryBindInfo,
3908     pub signal_semaphore_count: u32,
3909     pub p_signal_semaphores: *const Semaphore,
3910 }
3911 impl ::std::default::Default for BindSparseInfo {
default() -> BindSparseInfo3912     fn default() -> BindSparseInfo {
3913         BindSparseInfo {
3914             s_type: StructureType::BIND_SPARSE_INFO,
3915             p_next: ::std::ptr::null(),
3916             wait_semaphore_count: u32::default(),
3917             p_wait_semaphores: ::std::ptr::null(),
3918             buffer_bind_count: u32::default(),
3919             p_buffer_binds: ::std::ptr::null(),
3920             image_opaque_bind_count: u32::default(),
3921             p_image_opaque_binds: ::std::ptr::null(),
3922             image_bind_count: u32::default(),
3923             p_image_binds: ::std::ptr::null(),
3924             signal_semaphore_count: u32::default(),
3925             p_signal_semaphores: ::std::ptr::null(),
3926         }
3927     }
3928 }
3929 impl BindSparseInfo {
builder<'a>() -> BindSparseInfoBuilder<'a>3930     pub fn builder<'a>() -> BindSparseInfoBuilder<'a> {
3931         BindSparseInfoBuilder {
3932             inner: BindSparseInfo::default(),
3933             marker: ::std::marker::PhantomData,
3934         }
3935     }
3936 }
3937 #[repr(transparent)]
3938 pub struct BindSparseInfoBuilder<'a> {
3939     inner: BindSparseInfo,
3940     marker: ::std::marker::PhantomData<&'a ()>,
3941 }
3942 pub unsafe trait ExtendsBindSparseInfo {}
3943 impl<'a> ::std::ops::Deref for BindSparseInfoBuilder<'a> {
3944     type Target = BindSparseInfo;
deref(&self) -> &Self::Target3945     fn deref(&self) -> &Self::Target {
3946         &self.inner
3947     }
3948 }
3949 impl<'a> ::std::ops::DerefMut for BindSparseInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target3950     fn deref_mut(&mut self) -> &mut Self::Target {
3951         &mut self.inner
3952     }
3953 }
3954 impl<'a> BindSparseInfoBuilder<'a> {
wait_semaphores(mut self, wait_semaphores: &'a [Semaphore]) -> Self3955     pub fn wait_semaphores(mut self, wait_semaphores: &'a [Semaphore]) -> Self {
3956         self.inner.wait_semaphore_count = wait_semaphores.len() as _;
3957         self.inner.p_wait_semaphores = wait_semaphores.as_ptr();
3958         self
3959     }
buffer_binds(mut self, buffer_binds: &'a [SparseBufferMemoryBindInfo]) -> Self3960     pub fn buffer_binds(mut self, buffer_binds: &'a [SparseBufferMemoryBindInfo]) -> Self {
3961         self.inner.buffer_bind_count = buffer_binds.len() as _;
3962         self.inner.p_buffer_binds = buffer_binds.as_ptr();
3963         self
3964     }
image_opaque_binds( mut self, image_opaque_binds: &'a [SparseImageOpaqueMemoryBindInfo], ) -> Self3965     pub fn image_opaque_binds(
3966         mut self,
3967         image_opaque_binds: &'a [SparseImageOpaqueMemoryBindInfo],
3968     ) -> Self {
3969         self.inner.image_opaque_bind_count = image_opaque_binds.len() as _;
3970         self.inner.p_image_opaque_binds = image_opaque_binds.as_ptr();
3971         self
3972     }
image_binds(mut self, image_binds: &'a [SparseImageMemoryBindInfo]) -> Self3973     pub fn image_binds(mut self, image_binds: &'a [SparseImageMemoryBindInfo]) -> Self {
3974         self.inner.image_bind_count = image_binds.len() as _;
3975         self.inner.p_image_binds = image_binds.as_ptr();
3976         self
3977     }
signal_semaphores(mut self, signal_semaphores: &'a [Semaphore]) -> Self3978     pub fn signal_semaphores(mut self, signal_semaphores: &'a [Semaphore]) -> Self {
3979         self.inner.signal_semaphore_count = signal_semaphores.len() as _;
3980         self.inner.p_signal_semaphores = signal_semaphores.as_ptr();
3981         self
3982     }
3983     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
3984     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
3985     #[doc = r" valid extension structs can be pushed into the chain."]
3986     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
3987     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsBindSparseInfo>(mut self, next: &'a mut T) -> Self3988     pub fn push_next<T: ExtendsBindSparseInfo>(mut self, next: &'a mut T) -> Self {
3989         unsafe {
3990             let next_ptr = next as *mut T as *mut BaseOutStructure;
3991             let last_next = ptr_chain_iter(next).last().unwrap();
3992             (*last_next).p_next = self.inner.p_next as _;
3993             self.inner.p_next = next_ptr as _;
3994         }
3995         self
3996     }
3997     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
3998     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
3999     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BindSparseInfo4000     pub fn build(self) -> BindSparseInfo {
4001         self.inner
4002     }
4003 }
4004 #[repr(C)]
4005 #[derive(Copy, Clone, Default, Debug)]
4006 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageCopy.html>"]
4007 pub struct ImageCopy {
4008     pub src_subresource: ImageSubresourceLayers,
4009     pub src_offset: Offset3D,
4010     pub dst_subresource: ImageSubresourceLayers,
4011     pub dst_offset: Offset3D,
4012     pub extent: Extent3D,
4013 }
4014 impl ImageCopy {
builder<'a>() -> ImageCopyBuilder<'a>4015     pub fn builder<'a>() -> ImageCopyBuilder<'a> {
4016         ImageCopyBuilder {
4017             inner: ImageCopy::default(),
4018             marker: ::std::marker::PhantomData,
4019         }
4020     }
4021 }
4022 #[repr(transparent)]
4023 pub struct ImageCopyBuilder<'a> {
4024     inner: ImageCopy,
4025     marker: ::std::marker::PhantomData<&'a ()>,
4026 }
4027 impl<'a> ::std::ops::Deref for ImageCopyBuilder<'a> {
4028     type Target = ImageCopy;
deref(&self) -> &Self::Target4029     fn deref(&self) -> &Self::Target {
4030         &self.inner
4031     }
4032 }
4033 impl<'a> ::std::ops::DerefMut for ImageCopyBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4034     fn deref_mut(&mut self) -> &mut Self::Target {
4035         &mut self.inner
4036     }
4037 }
4038 impl<'a> ImageCopyBuilder<'a> {
src_subresource(mut self, src_subresource: ImageSubresourceLayers) -> Self4039     pub fn src_subresource(mut self, src_subresource: ImageSubresourceLayers) -> Self {
4040         self.inner.src_subresource = src_subresource;
4041         self
4042     }
src_offset(mut self, src_offset: Offset3D) -> Self4043     pub fn src_offset(mut self, src_offset: Offset3D) -> Self {
4044         self.inner.src_offset = src_offset;
4045         self
4046     }
dst_subresource(mut self, dst_subresource: ImageSubresourceLayers) -> Self4047     pub fn dst_subresource(mut self, dst_subresource: ImageSubresourceLayers) -> Self {
4048         self.inner.dst_subresource = dst_subresource;
4049         self
4050     }
dst_offset(mut self, dst_offset: Offset3D) -> Self4051     pub fn dst_offset(mut self, dst_offset: Offset3D) -> Self {
4052         self.inner.dst_offset = dst_offset;
4053         self
4054     }
extent(mut self, extent: Extent3D) -> Self4055     pub fn extent(mut self, extent: Extent3D) -> Self {
4056         self.inner.extent = extent;
4057         self
4058     }
4059     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4060     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4061     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageCopy4062     pub fn build(self) -> ImageCopy {
4063         self.inner
4064     }
4065 }
4066 #[repr(C)]
4067 #[derive(Copy, Clone, Debug)]
4068 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageBlit.html>"]
4069 pub struct ImageBlit {
4070     pub src_subresource: ImageSubresourceLayers,
4071     pub src_offsets: [Offset3D; 2],
4072     pub dst_subresource: ImageSubresourceLayers,
4073     pub dst_offsets: [Offset3D; 2],
4074 }
4075 impl ::std::default::Default for ImageBlit {
default() -> ImageBlit4076     fn default() -> ImageBlit {
4077         ImageBlit {
4078             src_subresource: ImageSubresourceLayers::default(),
4079             src_offsets: unsafe { ::std::mem::zeroed() },
4080             dst_subresource: ImageSubresourceLayers::default(),
4081             dst_offsets: unsafe { ::std::mem::zeroed() },
4082         }
4083     }
4084 }
4085 impl ImageBlit {
builder<'a>() -> ImageBlitBuilder<'a>4086     pub fn builder<'a>() -> ImageBlitBuilder<'a> {
4087         ImageBlitBuilder {
4088             inner: ImageBlit::default(),
4089             marker: ::std::marker::PhantomData,
4090         }
4091     }
4092 }
4093 #[repr(transparent)]
4094 pub struct ImageBlitBuilder<'a> {
4095     inner: ImageBlit,
4096     marker: ::std::marker::PhantomData<&'a ()>,
4097 }
4098 impl<'a> ::std::ops::Deref for ImageBlitBuilder<'a> {
4099     type Target = ImageBlit;
deref(&self) -> &Self::Target4100     fn deref(&self) -> &Self::Target {
4101         &self.inner
4102     }
4103 }
4104 impl<'a> ::std::ops::DerefMut for ImageBlitBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4105     fn deref_mut(&mut self) -> &mut Self::Target {
4106         &mut self.inner
4107     }
4108 }
4109 impl<'a> ImageBlitBuilder<'a> {
src_subresource(mut self, src_subresource: ImageSubresourceLayers) -> Self4110     pub fn src_subresource(mut self, src_subresource: ImageSubresourceLayers) -> Self {
4111         self.inner.src_subresource = src_subresource;
4112         self
4113     }
src_offsets(mut self, src_offsets: [Offset3D; 2]) -> Self4114     pub fn src_offsets(mut self, src_offsets: [Offset3D; 2]) -> Self {
4115         self.inner.src_offsets = src_offsets;
4116         self
4117     }
dst_subresource(mut self, dst_subresource: ImageSubresourceLayers) -> Self4118     pub fn dst_subresource(mut self, dst_subresource: ImageSubresourceLayers) -> Self {
4119         self.inner.dst_subresource = dst_subresource;
4120         self
4121     }
dst_offsets(mut self, dst_offsets: [Offset3D; 2]) -> Self4122     pub fn dst_offsets(mut self, dst_offsets: [Offset3D; 2]) -> Self {
4123         self.inner.dst_offsets = dst_offsets;
4124         self
4125     }
4126     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4127     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4128     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageBlit4129     pub fn build(self) -> ImageBlit {
4130         self.inner
4131     }
4132 }
4133 #[repr(C)]
4134 #[derive(Copy, Clone, Default, Debug)]
4135 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBufferImageCopy.html>"]
4136 pub struct BufferImageCopy {
4137     pub buffer_offset: DeviceSize,
4138     pub buffer_row_length: u32,
4139     pub buffer_image_height: u32,
4140     pub image_subresource: ImageSubresourceLayers,
4141     pub image_offset: Offset3D,
4142     pub image_extent: Extent3D,
4143 }
4144 impl BufferImageCopy {
builder<'a>() -> BufferImageCopyBuilder<'a>4145     pub fn builder<'a>() -> BufferImageCopyBuilder<'a> {
4146         BufferImageCopyBuilder {
4147             inner: BufferImageCopy::default(),
4148             marker: ::std::marker::PhantomData,
4149         }
4150     }
4151 }
4152 #[repr(transparent)]
4153 pub struct BufferImageCopyBuilder<'a> {
4154     inner: BufferImageCopy,
4155     marker: ::std::marker::PhantomData<&'a ()>,
4156 }
4157 impl<'a> ::std::ops::Deref for BufferImageCopyBuilder<'a> {
4158     type Target = BufferImageCopy;
deref(&self) -> &Self::Target4159     fn deref(&self) -> &Self::Target {
4160         &self.inner
4161     }
4162 }
4163 impl<'a> ::std::ops::DerefMut for BufferImageCopyBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4164     fn deref_mut(&mut self) -> &mut Self::Target {
4165         &mut self.inner
4166     }
4167 }
4168 impl<'a> BufferImageCopyBuilder<'a> {
buffer_offset(mut self, buffer_offset: DeviceSize) -> Self4169     pub fn buffer_offset(mut self, buffer_offset: DeviceSize) -> Self {
4170         self.inner.buffer_offset = buffer_offset;
4171         self
4172     }
buffer_row_length(mut self, buffer_row_length: u32) -> Self4173     pub fn buffer_row_length(mut self, buffer_row_length: u32) -> Self {
4174         self.inner.buffer_row_length = buffer_row_length;
4175         self
4176     }
buffer_image_height(mut self, buffer_image_height: u32) -> Self4177     pub fn buffer_image_height(mut self, buffer_image_height: u32) -> Self {
4178         self.inner.buffer_image_height = buffer_image_height;
4179         self
4180     }
image_subresource(mut self, image_subresource: ImageSubresourceLayers) -> Self4181     pub fn image_subresource(mut self, image_subresource: ImageSubresourceLayers) -> Self {
4182         self.inner.image_subresource = image_subresource;
4183         self
4184     }
image_offset(mut self, image_offset: Offset3D) -> Self4185     pub fn image_offset(mut self, image_offset: Offset3D) -> Self {
4186         self.inner.image_offset = image_offset;
4187         self
4188     }
image_extent(mut self, image_extent: Extent3D) -> Self4189     pub fn image_extent(mut self, image_extent: Extent3D) -> Self {
4190         self.inner.image_extent = image_extent;
4191         self
4192     }
4193     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4194     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4195     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> BufferImageCopy4196     pub fn build(self) -> BufferImageCopy {
4197         self.inner
4198     }
4199 }
4200 #[repr(C)]
4201 #[derive(Copy, Clone, Default, Debug)]
4202 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageResolve.html>"]
4203 pub struct ImageResolve {
4204     pub src_subresource: ImageSubresourceLayers,
4205     pub src_offset: Offset3D,
4206     pub dst_subresource: ImageSubresourceLayers,
4207     pub dst_offset: Offset3D,
4208     pub extent: Extent3D,
4209 }
4210 impl ImageResolve {
builder<'a>() -> ImageResolveBuilder<'a>4211     pub fn builder<'a>() -> ImageResolveBuilder<'a> {
4212         ImageResolveBuilder {
4213             inner: ImageResolve::default(),
4214             marker: ::std::marker::PhantomData,
4215         }
4216     }
4217 }
4218 #[repr(transparent)]
4219 pub struct ImageResolveBuilder<'a> {
4220     inner: ImageResolve,
4221     marker: ::std::marker::PhantomData<&'a ()>,
4222 }
4223 impl<'a> ::std::ops::Deref for ImageResolveBuilder<'a> {
4224     type Target = ImageResolve;
deref(&self) -> &Self::Target4225     fn deref(&self) -> &Self::Target {
4226         &self.inner
4227     }
4228 }
4229 impl<'a> ::std::ops::DerefMut for ImageResolveBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4230     fn deref_mut(&mut self) -> &mut Self::Target {
4231         &mut self.inner
4232     }
4233 }
4234 impl<'a> ImageResolveBuilder<'a> {
src_subresource(mut self, src_subresource: ImageSubresourceLayers) -> Self4235     pub fn src_subresource(mut self, src_subresource: ImageSubresourceLayers) -> Self {
4236         self.inner.src_subresource = src_subresource;
4237         self
4238     }
src_offset(mut self, src_offset: Offset3D) -> Self4239     pub fn src_offset(mut self, src_offset: Offset3D) -> Self {
4240         self.inner.src_offset = src_offset;
4241         self
4242     }
dst_subresource(mut self, dst_subresource: ImageSubresourceLayers) -> Self4243     pub fn dst_subresource(mut self, dst_subresource: ImageSubresourceLayers) -> Self {
4244         self.inner.dst_subresource = dst_subresource;
4245         self
4246     }
dst_offset(mut self, dst_offset: Offset3D) -> Self4247     pub fn dst_offset(mut self, dst_offset: Offset3D) -> Self {
4248         self.inner.dst_offset = dst_offset;
4249         self
4250     }
extent(mut self, extent: Extent3D) -> Self4251     pub fn extent(mut self, extent: Extent3D) -> Self {
4252         self.inner.extent = extent;
4253         self
4254     }
4255     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4256     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4257     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ImageResolve4258     pub fn build(self) -> ImageResolve {
4259         self.inner
4260     }
4261 }
4262 #[repr(C)]
4263 #[derive(Copy, Clone, Debug)]
4264 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderModuleCreateInfo.html>"]
4265 pub struct ShaderModuleCreateInfo {
4266     pub s_type: StructureType,
4267     pub p_next: *const c_void,
4268     pub flags: ShaderModuleCreateFlags,
4269     pub code_size: usize,
4270     pub p_code: *const u32,
4271 }
4272 impl ::std::default::Default for ShaderModuleCreateInfo {
default() -> ShaderModuleCreateInfo4273     fn default() -> ShaderModuleCreateInfo {
4274         ShaderModuleCreateInfo {
4275             s_type: StructureType::SHADER_MODULE_CREATE_INFO,
4276             p_next: ::std::ptr::null(),
4277             flags: ShaderModuleCreateFlags::default(),
4278             code_size: usize::default(),
4279             p_code: ::std::ptr::null(),
4280         }
4281     }
4282 }
4283 impl ShaderModuleCreateInfo {
builder<'a>() -> ShaderModuleCreateInfoBuilder<'a>4284     pub fn builder<'a>() -> ShaderModuleCreateInfoBuilder<'a> {
4285         ShaderModuleCreateInfoBuilder {
4286             inner: ShaderModuleCreateInfo::default(),
4287             marker: ::std::marker::PhantomData,
4288         }
4289     }
4290 }
4291 #[repr(transparent)]
4292 pub struct ShaderModuleCreateInfoBuilder<'a> {
4293     inner: ShaderModuleCreateInfo,
4294     marker: ::std::marker::PhantomData<&'a ()>,
4295 }
4296 pub unsafe trait ExtendsShaderModuleCreateInfo {}
4297 impl<'a> ::std::ops::Deref for ShaderModuleCreateInfoBuilder<'a> {
4298     type Target = ShaderModuleCreateInfo;
deref(&self) -> &Self::Target4299     fn deref(&self) -> &Self::Target {
4300         &self.inner
4301     }
4302 }
4303 impl<'a> ::std::ops::DerefMut for ShaderModuleCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4304     fn deref_mut(&mut self) -> &mut Self::Target {
4305         &mut self.inner
4306     }
4307 }
4308 impl<'a> ShaderModuleCreateInfoBuilder<'a> {
flags(mut self, flags: ShaderModuleCreateFlags) -> Self4309     pub fn flags(mut self, flags: ShaderModuleCreateFlags) -> Self {
4310         self.inner.flags = flags;
4311         self
4312     }
code(mut self, code: &'a [u32]) -> Self4313     pub fn code(mut self, code: &'a [u32]) -> Self {
4314         self.inner.code_size = code.len() * 4;
4315         self.inner.p_code = code.as_ptr() as *const u32;
4316         self
4317     }
4318     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
4319     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
4320     #[doc = r" valid extension structs can be pushed into the chain."]
4321     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
4322     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsShaderModuleCreateInfo>(mut self, next: &'a mut T) -> Self4323     pub fn push_next<T: ExtendsShaderModuleCreateInfo>(mut self, next: &'a mut T) -> Self {
4324         unsafe {
4325             let next_ptr = next as *mut T as *mut BaseOutStructure;
4326             let last_next = ptr_chain_iter(next).last().unwrap();
4327             (*last_next).p_next = self.inner.p_next as _;
4328             self.inner.p_next = next_ptr as _;
4329         }
4330         self
4331     }
4332     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4333     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4334     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ShaderModuleCreateInfo4335     pub fn build(self) -> ShaderModuleCreateInfo {
4336         self.inner
4337     }
4338 }
4339 #[repr(C)]
4340 #[derive(Copy, Clone, Debug)]
4341 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayoutBinding.html>"]
4342 pub struct DescriptorSetLayoutBinding {
4343     pub binding: u32,
4344     pub descriptor_type: DescriptorType,
4345     pub descriptor_count: u32,
4346     pub stage_flags: ShaderStageFlags,
4347     pub p_immutable_samplers: *const Sampler,
4348 }
4349 impl ::std::default::Default for DescriptorSetLayoutBinding {
default() -> DescriptorSetLayoutBinding4350     fn default() -> DescriptorSetLayoutBinding {
4351         DescriptorSetLayoutBinding {
4352             binding: u32::default(),
4353             descriptor_type: DescriptorType::default(),
4354             descriptor_count: u32::default(),
4355             stage_flags: ShaderStageFlags::default(),
4356             p_immutable_samplers: ::std::ptr::null(),
4357         }
4358     }
4359 }
4360 impl DescriptorSetLayoutBinding {
builder<'a>() -> DescriptorSetLayoutBindingBuilder<'a>4361     pub fn builder<'a>() -> DescriptorSetLayoutBindingBuilder<'a> {
4362         DescriptorSetLayoutBindingBuilder {
4363             inner: DescriptorSetLayoutBinding::default(),
4364             marker: ::std::marker::PhantomData,
4365         }
4366     }
4367 }
4368 #[repr(transparent)]
4369 pub struct DescriptorSetLayoutBindingBuilder<'a> {
4370     inner: DescriptorSetLayoutBinding,
4371     marker: ::std::marker::PhantomData<&'a ()>,
4372 }
4373 impl<'a> ::std::ops::Deref for DescriptorSetLayoutBindingBuilder<'a> {
4374     type Target = DescriptorSetLayoutBinding;
deref(&self) -> &Self::Target4375     fn deref(&self) -> &Self::Target {
4376         &self.inner
4377     }
4378 }
4379 impl<'a> ::std::ops::DerefMut for DescriptorSetLayoutBindingBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4380     fn deref_mut(&mut self) -> &mut Self::Target {
4381         &mut self.inner
4382     }
4383 }
4384 impl<'a> DescriptorSetLayoutBindingBuilder<'a> {
binding(mut self, binding: u32) -> Self4385     pub fn binding(mut self, binding: u32) -> Self {
4386         self.inner.binding = binding;
4387         self
4388     }
descriptor_type(mut self, descriptor_type: DescriptorType) -> Self4389     pub fn descriptor_type(mut self, descriptor_type: DescriptorType) -> Self {
4390         self.inner.descriptor_type = descriptor_type;
4391         self
4392     }
descriptor_count(mut self, descriptor_count: u32) -> Self4393     pub fn descriptor_count(mut self, descriptor_count: u32) -> Self {
4394         self.inner.descriptor_count = descriptor_count;
4395         self
4396     }
stage_flags(mut self, stage_flags: ShaderStageFlags) -> Self4397     pub fn stage_flags(mut self, stage_flags: ShaderStageFlags) -> Self {
4398         self.inner.stage_flags = stage_flags;
4399         self
4400     }
immutable_samplers(mut self, immutable_samplers: &'a [Sampler]) -> Self4401     pub fn immutable_samplers(mut self, immutable_samplers: &'a [Sampler]) -> Self {
4402         self.inner.descriptor_count = immutable_samplers.len() as _;
4403         self.inner.p_immutable_samplers = immutable_samplers.as_ptr();
4404         self
4405     }
4406     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4407     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4408     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorSetLayoutBinding4409     pub fn build(self) -> DescriptorSetLayoutBinding {
4410         self.inner
4411     }
4412 }
4413 #[repr(C)]
4414 #[derive(Copy, Clone, Debug)]
4415 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetLayoutCreateInfo.html>"]
4416 pub struct DescriptorSetLayoutCreateInfo {
4417     pub s_type: StructureType,
4418     pub p_next: *const c_void,
4419     pub flags: DescriptorSetLayoutCreateFlags,
4420     pub binding_count: u32,
4421     pub p_bindings: *const DescriptorSetLayoutBinding,
4422 }
4423 impl ::std::default::Default for DescriptorSetLayoutCreateInfo {
default() -> DescriptorSetLayoutCreateInfo4424     fn default() -> DescriptorSetLayoutCreateInfo {
4425         DescriptorSetLayoutCreateInfo {
4426             s_type: StructureType::DESCRIPTOR_SET_LAYOUT_CREATE_INFO,
4427             p_next: ::std::ptr::null(),
4428             flags: DescriptorSetLayoutCreateFlags::default(),
4429             binding_count: u32::default(),
4430             p_bindings: ::std::ptr::null(),
4431         }
4432     }
4433 }
4434 impl DescriptorSetLayoutCreateInfo {
builder<'a>() -> DescriptorSetLayoutCreateInfoBuilder<'a>4435     pub fn builder<'a>() -> DescriptorSetLayoutCreateInfoBuilder<'a> {
4436         DescriptorSetLayoutCreateInfoBuilder {
4437             inner: DescriptorSetLayoutCreateInfo::default(),
4438             marker: ::std::marker::PhantomData,
4439         }
4440     }
4441 }
4442 #[repr(transparent)]
4443 pub struct DescriptorSetLayoutCreateInfoBuilder<'a> {
4444     inner: DescriptorSetLayoutCreateInfo,
4445     marker: ::std::marker::PhantomData<&'a ()>,
4446 }
4447 pub unsafe trait ExtendsDescriptorSetLayoutCreateInfo {}
4448 impl<'a> ::std::ops::Deref for DescriptorSetLayoutCreateInfoBuilder<'a> {
4449     type Target = DescriptorSetLayoutCreateInfo;
deref(&self) -> &Self::Target4450     fn deref(&self) -> &Self::Target {
4451         &self.inner
4452     }
4453 }
4454 impl<'a> ::std::ops::DerefMut for DescriptorSetLayoutCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4455     fn deref_mut(&mut self) -> &mut Self::Target {
4456         &mut self.inner
4457     }
4458 }
4459 impl<'a> DescriptorSetLayoutCreateInfoBuilder<'a> {
flags(mut self, flags: DescriptorSetLayoutCreateFlags) -> Self4460     pub fn flags(mut self, flags: DescriptorSetLayoutCreateFlags) -> Self {
4461         self.inner.flags = flags;
4462         self
4463     }
bindings(mut self, bindings: &'a [DescriptorSetLayoutBinding]) -> Self4464     pub fn bindings(mut self, bindings: &'a [DescriptorSetLayoutBinding]) -> Self {
4465         self.inner.binding_count = bindings.len() as _;
4466         self.inner.p_bindings = bindings.as_ptr();
4467         self
4468     }
4469     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
4470     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
4471     #[doc = r" valid extension structs can be pushed into the chain."]
4472     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
4473     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDescriptorSetLayoutCreateInfo>(mut self, next: &'a mut T) -> Self4474     pub fn push_next<T: ExtendsDescriptorSetLayoutCreateInfo>(mut self, next: &'a mut T) -> Self {
4475         unsafe {
4476             let next_ptr = next as *mut T as *mut BaseOutStructure;
4477             let last_next = ptr_chain_iter(next).last().unwrap();
4478             (*last_next).p_next = self.inner.p_next as _;
4479             self.inner.p_next = next_ptr as _;
4480         }
4481         self
4482     }
4483     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4484     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4485     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorSetLayoutCreateInfo4486     pub fn build(self) -> DescriptorSetLayoutCreateInfo {
4487         self.inner
4488     }
4489 }
4490 #[repr(C)]
4491 #[derive(Copy, Clone, Default, Debug)]
4492 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolSize.html>"]
4493 pub struct DescriptorPoolSize {
4494     pub ty: DescriptorType,
4495     pub descriptor_count: u32,
4496 }
4497 impl DescriptorPoolSize {
builder<'a>() -> DescriptorPoolSizeBuilder<'a>4498     pub fn builder<'a>() -> DescriptorPoolSizeBuilder<'a> {
4499         DescriptorPoolSizeBuilder {
4500             inner: DescriptorPoolSize::default(),
4501             marker: ::std::marker::PhantomData,
4502         }
4503     }
4504 }
4505 #[repr(transparent)]
4506 pub struct DescriptorPoolSizeBuilder<'a> {
4507     inner: DescriptorPoolSize,
4508     marker: ::std::marker::PhantomData<&'a ()>,
4509 }
4510 impl<'a> ::std::ops::Deref for DescriptorPoolSizeBuilder<'a> {
4511     type Target = DescriptorPoolSize;
deref(&self) -> &Self::Target4512     fn deref(&self) -> &Self::Target {
4513         &self.inner
4514     }
4515 }
4516 impl<'a> ::std::ops::DerefMut for DescriptorPoolSizeBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4517     fn deref_mut(&mut self) -> &mut Self::Target {
4518         &mut self.inner
4519     }
4520 }
4521 impl<'a> DescriptorPoolSizeBuilder<'a> {
ty(mut self, ty: DescriptorType) -> Self4522     pub fn ty(mut self, ty: DescriptorType) -> Self {
4523         self.inner.ty = ty;
4524         self
4525     }
descriptor_count(mut self, descriptor_count: u32) -> Self4526     pub fn descriptor_count(mut self, descriptor_count: u32) -> Self {
4527         self.inner.descriptor_count = descriptor_count;
4528         self
4529     }
4530     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4531     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4532     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorPoolSize4533     pub fn build(self) -> DescriptorPoolSize {
4534         self.inner
4535     }
4536 }
4537 #[repr(C)]
4538 #[derive(Copy, Clone, Debug)]
4539 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorPoolCreateInfo.html>"]
4540 pub struct DescriptorPoolCreateInfo {
4541     pub s_type: StructureType,
4542     pub p_next: *const c_void,
4543     pub flags: DescriptorPoolCreateFlags,
4544     pub max_sets: u32,
4545     pub pool_size_count: u32,
4546     pub p_pool_sizes: *const DescriptorPoolSize,
4547 }
4548 impl ::std::default::Default for DescriptorPoolCreateInfo {
default() -> DescriptorPoolCreateInfo4549     fn default() -> DescriptorPoolCreateInfo {
4550         DescriptorPoolCreateInfo {
4551             s_type: StructureType::DESCRIPTOR_POOL_CREATE_INFO,
4552             p_next: ::std::ptr::null(),
4553             flags: DescriptorPoolCreateFlags::default(),
4554             max_sets: u32::default(),
4555             pool_size_count: u32::default(),
4556             p_pool_sizes: ::std::ptr::null(),
4557         }
4558     }
4559 }
4560 impl DescriptorPoolCreateInfo {
builder<'a>() -> DescriptorPoolCreateInfoBuilder<'a>4561     pub fn builder<'a>() -> DescriptorPoolCreateInfoBuilder<'a> {
4562         DescriptorPoolCreateInfoBuilder {
4563             inner: DescriptorPoolCreateInfo::default(),
4564             marker: ::std::marker::PhantomData,
4565         }
4566     }
4567 }
4568 #[repr(transparent)]
4569 pub struct DescriptorPoolCreateInfoBuilder<'a> {
4570     inner: DescriptorPoolCreateInfo,
4571     marker: ::std::marker::PhantomData<&'a ()>,
4572 }
4573 pub unsafe trait ExtendsDescriptorPoolCreateInfo {}
4574 impl<'a> ::std::ops::Deref for DescriptorPoolCreateInfoBuilder<'a> {
4575     type Target = DescriptorPoolCreateInfo;
deref(&self) -> &Self::Target4576     fn deref(&self) -> &Self::Target {
4577         &self.inner
4578     }
4579 }
4580 impl<'a> ::std::ops::DerefMut for DescriptorPoolCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4581     fn deref_mut(&mut self) -> &mut Self::Target {
4582         &mut self.inner
4583     }
4584 }
4585 impl<'a> DescriptorPoolCreateInfoBuilder<'a> {
flags(mut self, flags: DescriptorPoolCreateFlags) -> Self4586     pub fn flags(mut self, flags: DescriptorPoolCreateFlags) -> Self {
4587         self.inner.flags = flags;
4588         self
4589     }
max_sets(mut self, max_sets: u32) -> Self4590     pub fn max_sets(mut self, max_sets: u32) -> Self {
4591         self.inner.max_sets = max_sets;
4592         self
4593     }
pool_sizes(mut self, pool_sizes: &'a [DescriptorPoolSize]) -> Self4594     pub fn pool_sizes(mut self, pool_sizes: &'a [DescriptorPoolSize]) -> Self {
4595         self.inner.pool_size_count = pool_sizes.len() as _;
4596         self.inner.p_pool_sizes = pool_sizes.as_ptr();
4597         self
4598     }
4599     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
4600     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
4601     #[doc = r" valid extension structs can be pushed into the chain."]
4602     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
4603     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDescriptorPoolCreateInfo>(mut self, next: &'a mut T) -> Self4604     pub fn push_next<T: ExtendsDescriptorPoolCreateInfo>(mut self, next: &'a mut T) -> Self {
4605         unsafe {
4606             let next_ptr = next as *mut T as *mut BaseOutStructure;
4607             let last_next = ptr_chain_iter(next).last().unwrap();
4608             (*last_next).p_next = self.inner.p_next as _;
4609             self.inner.p_next = next_ptr as _;
4610         }
4611         self
4612     }
4613     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4614     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4615     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorPoolCreateInfo4616     pub fn build(self) -> DescriptorPoolCreateInfo {
4617         self.inner
4618     }
4619 }
4620 #[repr(C)]
4621 #[derive(Copy, Clone, Debug)]
4622 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorSetAllocateInfo.html>"]
4623 pub struct DescriptorSetAllocateInfo {
4624     pub s_type: StructureType,
4625     pub p_next: *const c_void,
4626     pub descriptor_pool: DescriptorPool,
4627     pub descriptor_set_count: u32,
4628     pub p_set_layouts: *const DescriptorSetLayout,
4629 }
4630 impl ::std::default::Default for DescriptorSetAllocateInfo {
default() -> DescriptorSetAllocateInfo4631     fn default() -> DescriptorSetAllocateInfo {
4632         DescriptorSetAllocateInfo {
4633             s_type: StructureType::DESCRIPTOR_SET_ALLOCATE_INFO,
4634             p_next: ::std::ptr::null(),
4635             descriptor_pool: DescriptorPool::default(),
4636             descriptor_set_count: u32::default(),
4637             p_set_layouts: ::std::ptr::null(),
4638         }
4639     }
4640 }
4641 impl DescriptorSetAllocateInfo {
builder<'a>() -> DescriptorSetAllocateInfoBuilder<'a>4642     pub fn builder<'a>() -> DescriptorSetAllocateInfoBuilder<'a> {
4643         DescriptorSetAllocateInfoBuilder {
4644             inner: DescriptorSetAllocateInfo::default(),
4645             marker: ::std::marker::PhantomData,
4646         }
4647     }
4648 }
4649 #[repr(transparent)]
4650 pub struct DescriptorSetAllocateInfoBuilder<'a> {
4651     inner: DescriptorSetAllocateInfo,
4652     marker: ::std::marker::PhantomData<&'a ()>,
4653 }
4654 pub unsafe trait ExtendsDescriptorSetAllocateInfo {}
4655 impl<'a> ::std::ops::Deref for DescriptorSetAllocateInfoBuilder<'a> {
4656     type Target = DescriptorSetAllocateInfo;
deref(&self) -> &Self::Target4657     fn deref(&self) -> &Self::Target {
4658         &self.inner
4659     }
4660 }
4661 impl<'a> ::std::ops::DerefMut for DescriptorSetAllocateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4662     fn deref_mut(&mut self) -> &mut Self::Target {
4663         &mut self.inner
4664     }
4665 }
4666 impl<'a> DescriptorSetAllocateInfoBuilder<'a> {
descriptor_pool(mut self, descriptor_pool: DescriptorPool) -> Self4667     pub fn descriptor_pool(mut self, descriptor_pool: DescriptorPool) -> Self {
4668         self.inner.descriptor_pool = descriptor_pool;
4669         self
4670     }
set_layouts(mut self, set_layouts: &'a [DescriptorSetLayout]) -> Self4671     pub fn set_layouts(mut self, set_layouts: &'a [DescriptorSetLayout]) -> Self {
4672         self.inner.descriptor_set_count = set_layouts.len() as _;
4673         self.inner.p_set_layouts = set_layouts.as_ptr();
4674         self
4675     }
4676     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
4677     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
4678     #[doc = r" valid extension structs can be pushed into the chain."]
4679     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
4680     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsDescriptorSetAllocateInfo>(mut self, next: &'a mut T) -> Self4681     pub fn push_next<T: ExtendsDescriptorSetAllocateInfo>(mut self, next: &'a mut T) -> Self {
4682         unsafe {
4683             let next_ptr = next as *mut T as *mut BaseOutStructure;
4684             let last_next = ptr_chain_iter(next).last().unwrap();
4685             (*last_next).p_next = self.inner.p_next as _;
4686             self.inner.p_next = next_ptr as _;
4687         }
4688         self
4689     }
4690     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4691     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4692     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> DescriptorSetAllocateInfo4693     pub fn build(self) -> DescriptorSetAllocateInfo {
4694         self.inner
4695     }
4696 }
4697 #[repr(C)]
4698 #[derive(Copy, Clone, Default, Debug)]
4699 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSpecializationMapEntry.html>"]
4700 pub struct SpecializationMapEntry {
4701     pub constant_id: u32,
4702     pub offset: u32,
4703     pub size: usize,
4704 }
4705 impl SpecializationMapEntry {
builder<'a>() -> SpecializationMapEntryBuilder<'a>4706     pub fn builder<'a>() -> SpecializationMapEntryBuilder<'a> {
4707         SpecializationMapEntryBuilder {
4708             inner: SpecializationMapEntry::default(),
4709             marker: ::std::marker::PhantomData,
4710         }
4711     }
4712 }
4713 #[repr(transparent)]
4714 pub struct SpecializationMapEntryBuilder<'a> {
4715     inner: SpecializationMapEntry,
4716     marker: ::std::marker::PhantomData<&'a ()>,
4717 }
4718 impl<'a> ::std::ops::Deref for SpecializationMapEntryBuilder<'a> {
4719     type Target = SpecializationMapEntry;
deref(&self) -> &Self::Target4720     fn deref(&self) -> &Self::Target {
4721         &self.inner
4722     }
4723 }
4724 impl<'a> ::std::ops::DerefMut for SpecializationMapEntryBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4725     fn deref_mut(&mut self) -> &mut Self::Target {
4726         &mut self.inner
4727     }
4728 }
4729 impl<'a> SpecializationMapEntryBuilder<'a> {
constant_id(mut self, constant_id: u32) -> Self4730     pub fn constant_id(mut self, constant_id: u32) -> Self {
4731         self.inner.constant_id = constant_id;
4732         self
4733     }
offset(mut self, offset: u32) -> Self4734     pub fn offset(mut self, offset: u32) -> Self {
4735         self.inner.offset = offset;
4736         self
4737     }
size(mut self, size: usize) -> Self4738     pub fn size(mut self, size: usize) -> Self {
4739         self.inner.size = size;
4740         self
4741     }
4742     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4743     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4744     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SpecializationMapEntry4745     pub fn build(self) -> SpecializationMapEntry {
4746         self.inner
4747     }
4748 }
4749 #[repr(C)]
4750 #[derive(Copy, Clone, Debug)]
4751 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSpecializationInfo.html>"]
4752 pub struct SpecializationInfo {
4753     pub map_entry_count: u32,
4754     pub p_map_entries: *const SpecializationMapEntry,
4755     pub data_size: usize,
4756     pub p_data: *const c_void,
4757 }
4758 impl ::std::default::Default for SpecializationInfo {
default() -> SpecializationInfo4759     fn default() -> SpecializationInfo {
4760         SpecializationInfo {
4761             map_entry_count: u32::default(),
4762             p_map_entries: ::std::ptr::null(),
4763             data_size: usize::default(),
4764             p_data: ::std::ptr::null(),
4765         }
4766     }
4767 }
4768 impl SpecializationInfo {
builder<'a>() -> SpecializationInfoBuilder<'a>4769     pub fn builder<'a>() -> SpecializationInfoBuilder<'a> {
4770         SpecializationInfoBuilder {
4771             inner: SpecializationInfo::default(),
4772             marker: ::std::marker::PhantomData,
4773         }
4774     }
4775 }
4776 #[repr(transparent)]
4777 pub struct SpecializationInfoBuilder<'a> {
4778     inner: SpecializationInfo,
4779     marker: ::std::marker::PhantomData<&'a ()>,
4780 }
4781 impl<'a> ::std::ops::Deref for SpecializationInfoBuilder<'a> {
4782     type Target = SpecializationInfo;
deref(&self) -> &Self::Target4783     fn deref(&self) -> &Self::Target {
4784         &self.inner
4785     }
4786 }
4787 impl<'a> ::std::ops::DerefMut for SpecializationInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4788     fn deref_mut(&mut self) -> &mut Self::Target {
4789         &mut self.inner
4790     }
4791 }
4792 impl<'a> SpecializationInfoBuilder<'a> {
map_entries(mut self, map_entries: &'a [SpecializationMapEntry]) -> Self4793     pub fn map_entries(mut self, map_entries: &'a [SpecializationMapEntry]) -> Self {
4794         self.inner.map_entry_count = map_entries.len() as _;
4795         self.inner.p_map_entries = map_entries.as_ptr();
4796         self
4797     }
data(mut self, data: &'a [u8]) -> Self4798     pub fn data(mut self, data: &'a [u8]) -> Self {
4799         self.inner.data_size = data.len() as _;
4800         self.inner.p_data = data.as_ptr() as *const c_void;
4801         self
4802     }
4803     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4804     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4805     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> SpecializationInfo4806     pub fn build(self) -> SpecializationInfo {
4807         self.inner
4808     }
4809 }
4810 #[repr(C)]
4811 #[derive(Copy, Clone, Debug)]
4812 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineShaderStageCreateInfo.html>"]
4813 pub struct PipelineShaderStageCreateInfo {
4814     pub s_type: StructureType,
4815     pub p_next: *const c_void,
4816     pub flags: PipelineShaderStageCreateFlags,
4817     pub stage: ShaderStageFlags,
4818     pub module: ShaderModule,
4819     pub p_name: *const c_char,
4820     pub p_specialization_info: *const SpecializationInfo,
4821 }
4822 impl ::std::default::Default for PipelineShaderStageCreateInfo {
default() -> PipelineShaderStageCreateInfo4823     fn default() -> PipelineShaderStageCreateInfo {
4824         PipelineShaderStageCreateInfo {
4825             s_type: StructureType::PIPELINE_SHADER_STAGE_CREATE_INFO,
4826             p_next: ::std::ptr::null(),
4827             flags: PipelineShaderStageCreateFlags::default(),
4828             stage: ShaderStageFlags::default(),
4829             module: ShaderModule::default(),
4830             p_name: ::std::ptr::null(),
4831             p_specialization_info: ::std::ptr::null(),
4832         }
4833     }
4834 }
4835 impl PipelineShaderStageCreateInfo {
builder<'a>() -> PipelineShaderStageCreateInfoBuilder<'a>4836     pub fn builder<'a>() -> PipelineShaderStageCreateInfoBuilder<'a> {
4837         PipelineShaderStageCreateInfoBuilder {
4838             inner: PipelineShaderStageCreateInfo::default(),
4839             marker: ::std::marker::PhantomData,
4840         }
4841     }
4842 }
4843 #[repr(transparent)]
4844 pub struct PipelineShaderStageCreateInfoBuilder<'a> {
4845     inner: PipelineShaderStageCreateInfo,
4846     marker: ::std::marker::PhantomData<&'a ()>,
4847 }
4848 pub unsafe trait ExtendsPipelineShaderStageCreateInfo {}
4849 impl<'a> ::std::ops::Deref for PipelineShaderStageCreateInfoBuilder<'a> {
4850     type Target = PipelineShaderStageCreateInfo;
deref(&self) -> &Self::Target4851     fn deref(&self) -> &Self::Target {
4852         &self.inner
4853     }
4854 }
4855 impl<'a> ::std::ops::DerefMut for PipelineShaderStageCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4856     fn deref_mut(&mut self) -> &mut Self::Target {
4857         &mut self.inner
4858     }
4859 }
4860 impl<'a> PipelineShaderStageCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineShaderStageCreateFlags) -> Self4861     pub fn flags(mut self, flags: PipelineShaderStageCreateFlags) -> Self {
4862         self.inner.flags = flags;
4863         self
4864     }
stage(mut self, stage: ShaderStageFlags) -> Self4865     pub fn stage(mut self, stage: ShaderStageFlags) -> Self {
4866         self.inner.stage = stage;
4867         self
4868     }
module(mut self, module: ShaderModule) -> Self4869     pub fn module(mut self, module: ShaderModule) -> Self {
4870         self.inner.module = module;
4871         self
4872     }
name(mut self, name: &'a ::std::ffi::CStr) -> Self4873     pub fn name(mut self, name: &'a ::std::ffi::CStr) -> Self {
4874         self.inner.p_name = name.as_ptr();
4875         self
4876     }
specialization_info(mut self, specialization_info: &'a SpecializationInfo) -> Self4877     pub fn specialization_info(mut self, specialization_info: &'a SpecializationInfo) -> Self {
4878         self.inner.p_specialization_info = specialization_info;
4879         self
4880     }
4881     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
4882     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
4883     #[doc = r" valid extension structs can be pushed into the chain."]
4884     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
4885     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineShaderStageCreateInfo>(mut self, next: &'a mut T) -> Self4886     pub fn push_next<T: ExtendsPipelineShaderStageCreateInfo>(mut self, next: &'a mut T) -> Self {
4887         unsafe {
4888             let next_ptr = next as *mut T as *mut BaseOutStructure;
4889             let last_next = ptr_chain_iter(next).last().unwrap();
4890             (*last_next).p_next = self.inner.p_next as _;
4891             self.inner.p_next = next_ptr as _;
4892         }
4893         self
4894     }
4895     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4896     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4897     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineShaderStageCreateInfo4898     pub fn build(self) -> PipelineShaderStageCreateInfo {
4899         self.inner
4900     }
4901 }
4902 #[repr(C)]
4903 #[derive(Copy, Clone, Debug)]
4904 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComputePipelineCreateInfo.html>"]
4905 pub struct ComputePipelineCreateInfo {
4906     pub s_type: StructureType,
4907     pub p_next: *const c_void,
4908     pub flags: PipelineCreateFlags,
4909     pub stage: PipelineShaderStageCreateInfo,
4910     pub layout: PipelineLayout,
4911     pub base_pipeline_handle: Pipeline,
4912     pub base_pipeline_index: i32,
4913 }
4914 impl ::std::default::Default for ComputePipelineCreateInfo {
default() -> ComputePipelineCreateInfo4915     fn default() -> ComputePipelineCreateInfo {
4916         ComputePipelineCreateInfo {
4917             s_type: StructureType::COMPUTE_PIPELINE_CREATE_INFO,
4918             p_next: ::std::ptr::null(),
4919             flags: PipelineCreateFlags::default(),
4920             stage: PipelineShaderStageCreateInfo::default(),
4921             layout: PipelineLayout::default(),
4922             base_pipeline_handle: Pipeline::default(),
4923             base_pipeline_index: i32::default(),
4924         }
4925     }
4926 }
4927 impl ComputePipelineCreateInfo {
builder<'a>() -> ComputePipelineCreateInfoBuilder<'a>4928     pub fn builder<'a>() -> ComputePipelineCreateInfoBuilder<'a> {
4929         ComputePipelineCreateInfoBuilder {
4930             inner: ComputePipelineCreateInfo::default(),
4931             marker: ::std::marker::PhantomData,
4932         }
4933     }
4934 }
4935 #[repr(transparent)]
4936 pub struct ComputePipelineCreateInfoBuilder<'a> {
4937     inner: ComputePipelineCreateInfo,
4938     marker: ::std::marker::PhantomData<&'a ()>,
4939 }
4940 pub unsafe trait ExtendsComputePipelineCreateInfo {}
4941 impl<'a> ::std::ops::Deref for ComputePipelineCreateInfoBuilder<'a> {
4942     type Target = ComputePipelineCreateInfo;
deref(&self) -> &Self::Target4943     fn deref(&self) -> &Self::Target {
4944         &self.inner
4945     }
4946 }
4947 impl<'a> ::std::ops::DerefMut for ComputePipelineCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target4948     fn deref_mut(&mut self) -> &mut Self::Target {
4949         &mut self.inner
4950     }
4951 }
4952 impl<'a> ComputePipelineCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineCreateFlags) -> Self4953     pub fn flags(mut self, flags: PipelineCreateFlags) -> Self {
4954         self.inner.flags = flags;
4955         self
4956     }
stage(mut self, stage: PipelineShaderStageCreateInfo) -> Self4957     pub fn stage(mut self, stage: PipelineShaderStageCreateInfo) -> Self {
4958         self.inner.stage = stage;
4959         self
4960     }
layout(mut self, layout: PipelineLayout) -> Self4961     pub fn layout(mut self, layout: PipelineLayout) -> Self {
4962         self.inner.layout = layout;
4963         self
4964     }
base_pipeline_handle(mut self, base_pipeline_handle: Pipeline) -> Self4965     pub fn base_pipeline_handle(mut self, base_pipeline_handle: Pipeline) -> Self {
4966         self.inner.base_pipeline_handle = base_pipeline_handle;
4967         self
4968     }
base_pipeline_index(mut self, base_pipeline_index: i32) -> Self4969     pub fn base_pipeline_index(mut self, base_pipeline_index: i32) -> Self {
4970         self.inner.base_pipeline_index = base_pipeline_index;
4971         self
4972     }
4973     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
4974     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
4975     #[doc = r" valid extension structs can be pushed into the chain."]
4976     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
4977     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsComputePipelineCreateInfo>(mut self, next: &'a mut T) -> Self4978     pub fn push_next<T: ExtendsComputePipelineCreateInfo>(mut self, next: &'a mut T) -> Self {
4979         unsafe {
4980             let next_ptr = next as *mut T as *mut BaseOutStructure;
4981             let last_next = ptr_chain_iter(next).last().unwrap();
4982             (*last_next).p_next = self.inner.p_next as _;
4983             self.inner.p_next = next_ptr as _;
4984         }
4985         self
4986     }
4987     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
4988     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
4989     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> ComputePipelineCreateInfo4990     pub fn build(self) -> ComputePipelineCreateInfo {
4991         self.inner
4992     }
4993 }
4994 #[repr(C)]
4995 #[derive(Copy, Clone, Default, Debug)]
4996 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVertexInputBindingDescription.html>"]
4997 pub struct VertexInputBindingDescription {
4998     pub binding: u32,
4999     pub stride: u32,
5000     pub input_rate: VertexInputRate,
5001 }
5002 impl VertexInputBindingDescription {
builder<'a>() -> VertexInputBindingDescriptionBuilder<'a>5003     pub fn builder<'a>() -> VertexInputBindingDescriptionBuilder<'a> {
5004         VertexInputBindingDescriptionBuilder {
5005             inner: VertexInputBindingDescription::default(),
5006             marker: ::std::marker::PhantomData,
5007         }
5008     }
5009 }
5010 #[repr(transparent)]
5011 pub struct VertexInputBindingDescriptionBuilder<'a> {
5012     inner: VertexInputBindingDescription,
5013     marker: ::std::marker::PhantomData<&'a ()>,
5014 }
5015 impl<'a> ::std::ops::Deref for VertexInputBindingDescriptionBuilder<'a> {
5016     type Target = VertexInputBindingDescription;
deref(&self) -> &Self::Target5017     fn deref(&self) -> &Self::Target {
5018         &self.inner
5019     }
5020 }
5021 impl<'a> ::std::ops::DerefMut for VertexInputBindingDescriptionBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5022     fn deref_mut(&mut self) -> &mut Self::Target {
5023         &mut self.inner
5024     }
5025 }
5026 impl<'a> VertexInputBindingDescriptionBuilder<'a> {
binding(mut self, binding: u32) -> Self5027     pub fn binding(mut self, binding: u32) -> Self {
5028         self.inner.binding = binding;
5029         self
5030     }
stride(mut self, stride: u32) -> Self5031     pub fn stride(mut self, stride: u32) -> Self {
5032         self.inner.stride = stride;
5033         self
5034     }
input_rate(mut self, input_rate: VertexInputRate) -> Self5035     pub fn input_rate(mut self, input_rate: VertexInputRate) -> Self {
5036         self.inner.input_rate = input_rate;
5037         self
5038     }
5039     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5040     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5041     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> VertexInputBindingDescription5042     pub fn build(self) -> VertexInputBindingDescription {
5043         self.inner
5044     }
5045 }
5046 #[repr(C)]
5047 #[derive(Copy, Clone, Default, Debug)]
5048 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVertexInputAttributeDescription.html>"]
5049 pub struct VertexInputAttributeDescription {
5050     pub location: u32,
5051     pub binding: u32,
5052     pub format: Format,
5053     pub offset: u32,
5054 }
5055 impl VertexInputAttributeDescription {
builder<'a>() -> VertexInputAttributeDescriptionBuilder<'a>5056     pub fn builder<'a>() -> VertexInputAttributeDescriptionBuilder<'a> {
5057         VertexInputAttributeDescriptionBuilder {
5058             inner: VertexInputAttributeDescription::default(),
5059             marker: ::std::marker::PhantomData,
5060         }
5061     }
5062 }
5063 #[repr(transparent)]
5064 pub struct VertexInputAttributeDescriptionBuilder<'a> {
5065     inner: VertexInputAttributeDescription,
5066     marker: ::std::marker::PhantomData<&'a ()>,
5067 }
5068 impl<'a> ::std::ops::Deref for VertexInputAttributeDescriptionBuilder<'a> {
5069     type Target = VertexInputAttributeDescription;
deref(&self) -> &Self::Target5070     fn deref(&self) -> &Self::Target {
5071         &self.inner
5072     }
5073 }
5074 impl<'a> ::std::ops::DerefMut for VertexInputAttributeDescriptionBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5075     fn deref_mut(&mut self) -> &mut Self::Target {
5076         &mut self.inner
5077     }
5078 }
5079 impl<'a> VertexInputAttributeDescriptionBuilder<'a> {
location(mut self, location: u32) -> Self5080     pub fn location(mut self, location: u32) -> Self {
5081         self.inner.location = location;
5082         self
5083     }
binding(mut self, binding: u32) -> Self5084     pub fn binding(mut self, binding: u32) -> Self {
5085         self.inner.binding = binding;
5086         self
5087     }
format(mut self, format: Format) -> Self5088     pub fn format(mut self, format: Format) -> Self {
5089         self.inner.format = format;
5090         self
5091     }
offset(mut self, offset: u32) -> Self5092     pub fn offset(mut self, offset: u32) -> Self {
5093         self.inner.offset = offset;
5094         self
5095     }
5096     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5097     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5098     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> VertexInputAttributeDescription5099     pub fn build(self) -> VertexInputAttributeDescription {
5100         self.inner
5101     }
5102 }
5103 #[repr(C)]
5104 #[derive(Copy, Clone, Debug)]
5105 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineVertexInputStateCreateInfo.html>"]
5106 pub struct PipelineVertexInputStateCreateInfo {
5107     pub s_type: StructureType,
5108     pub p_next: *const c_void,
5109     pub flags: PipelineVertexInputStateCreateFlags,
5110     pub vertex_binding_description_count: u32,
5111     pub p_vertex_binding_descriptions: *const VertexInputBindingDescription,
5112     pub vertex_attribute_description_count: u32,
5113     pub p_vertex_attribute_descriptions: *const VertexInputAttributeDescription,
5114 }
5115 impl ::std::default::Default for PipelineVertexInputStateCreateInfo {
default() -> PipelineVertexInputStateCreateInfo5116     fn default() -> PipelineVertexInputStateCreateInfo {
5117         PipelineVertexInputStateCreateInfo {
5118             s_type: StructureType::PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
5119             p_next: ::std::ptr::null(),
5120             flags: PipelineVertexInputStateCreateFlags::default(),
5121             vertex_binding_description_count: u32::default(),
5122             p_vertex_binding_descriptions: ::std::ptr::null(),
5123             vertex_attribute_description_count: u32::default(),
5124             p_vertex_attribute_descriptions: ::std::ptr::null(),
5125         }
5126     }
5127 }
5128 impl PipelineVertexInputStateCreateInfo {
builder<'a>() -> PipelineVertexInputStateCreateInfoBuilder<'a>5129     pub fn builder<'a>() -> PipelineVertexInputStateCreateInfoBuilder<'a> {
5130         PipelineVertexInputStateCreateInfoBuilder {
5131             inner: PipelineVertexInputStateCreateInfo::default(),
5132             marker: ::std::marker::PhantomData,
5133         }
5134     }
5135 }
5136 #[repr(transparent)]
5137 pub struct PipelineVertexInputStateCreateInfoBuilder<'a> {
5138     inner: PipelineVertexInputStateCreateInfo,
5139     marker: ::std::marker::PhantomData<&'a ()>,
5140 }
5141 pub unsafe trait ExtendsPipelineVertexInputStateCreateInfo {}
5142 impl<'a> ::std::ops::Deref for PipelineVertexInputStateCreateInfoBuilder<'a> {
5143     type Target = PipelineVertexInputStateCreateInfo;
deref(&self) -> &Self::Target5144     fn deref(&self) -> &Self::Target {
5145         &self.inner
5146     }
5147 }
5148 impl<'a> ::std::ops::DerefMut for PipelineVertexInputStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5149     fn deref_mut(&mut self) -> &mut Self::Target {
5150         &mut self.inner
5151     }
5152 }
5153 impl<'a> PipelineVertexInputStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineVertexInputStateCreateFlags) -> Self5154     pub fn flags(mut self, flags: PipelineVertexInputStateCreateFlags) -> Self {
5155         self.inner.flags = flags;
5156         self
5157     }
vertex_binding_descriptions( mut self, vertex_binding_descriptions: &'a [VertexInputBindingDescription], ) -> Self5158     pub fn vertex_binding_descriptions(
5159         mut self,
5160         vertex_binding_descriptions: &'a [VertexInputBindingDescription],
5161     ) -> Self {
5162         self.inner.vertex_binding_description_count = vertex_binding_descriptions.len() as _;
5163         self.inner.p_vertex_binding_descriptions = vertex_binding_descriptions.as_ptr();
5164         self
5165     }
vertex_attribute_descriptions( mut self, vertex_attribute_descriptions: &'a [VertexInputAttributeDescription], ) -> Self5166     pub fn vertex_attribute_descriptions(
5167         mut self,
5168         vertex_attribute_descriptions: &'a [VertexInputAttributeDescription],
5169     ) -> Self {
5170         self.inner.vertex_attribute_description_count = vertex_attribute_descriptions.len() as _;
5171         self.inner.p_vertex_attribute_descriptions = vertex_attribute_descriptions.as_ptr();
5172         self
5173     }
5174     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
5175     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
5176     #[doc = r" valid extension structs can be pushed into the chain."]
5177     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
5178     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineVertexInputStateCreateInfo>( mut self, next: &'a mut T, ) -> Self5179     pub fn push_next<T: ExtendsPipelineVertexInputStateCreateInfo>(
5180         mut self,
5181         next: &'a mut T,
5182     ) -> Self {
5183         unsafe {
5184             let next_ptr = next as *mut T as *mut BaseOutStructure;
5185             let last_next = ptr_chain_iter(next).last().unwrap();
5186             (*last_next).p_next = self.inner.p_next as _;
5187             self.inner.p_next = next_ptr as _;
5188         }
5189         self
5190     }
5191     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5192     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5193     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineVertexInputStateCreateInfo5194     pub fn build(self) -> PipelineVertexInputStateCreateInfo {
5195         self.inner
5196     }
5197 }
5198 #[repr(C)]
5199 #[derive(Copy, Clone, Debug)]
5200 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineInputAssemblyStateCreateInfo.html>"]
5201 pub struct PipelineInputAssemblyStateCreateInfo {
5202     pub s_type: StructureType,
5203     pub p_next: *const c_void,
5204     pub flags: PipelineInputAssemblyStateCreateFlags,
5205     pub topology: PrimitiveTopology,
5206     pub primitive_restart_enable: Bool32,
5207 }
5208 impl ::std::default::Default for PipelineInputAssemblyStateCreateInfo {
default() -> PipelineInputAssemblyStateCreateInfo5209     fn default() -> PipelineInputAssemblyStateCreateInfo {
5210         PipelineInputAssemblyStateCreateInfo {
5211             s_type: StructureType::PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,
5212             p_next: ::std::ptr::null(),
5213             flags: PipelineInputAssemblyStateCreateFlags::default(),
5214             topology: PrimitiveTopology::default(),
5215             primitive_restart_enable: Bool32::default(),
5216         }
5217     }
5218 }
5219 impl PipelineInputAssemblyStateCreateInfo {
builder<'a>() -> PipelineInputAssemblyStateCreateInfoBuilder<'a>5220     pub fn builder<'a>() -> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
5221         PipelineInputAssemblyStateCreateInfoBuilder {
5222             inner: PipelineInputAssemblyStateCreateInfo::default(),
5223             marker: ::std::marker::PhantomData,
5224         }
5225     }
5226 }
5227 #[repr(transparent)]
5228 pub struct PipelineInputAssemblyStateCreateInfoBuilder<'a> {
5229     inner: PipelineInputAssemblyStateCreateInfo,
5230     marker: ::std::marker::PhantomData<&'a ()>,
5231 }
5232 impl<'a> ::std::ops::Deref for PipelineInputAssemblyStateCreateInfoBuilder<'a> {
5233     type Target = PipelineInputAssemblyStateCreateInfo;
deref(&self) -> &Self::Target5234     fn deref(&self) -> &Self::Target {
5235         &self.inner
5236     }
5237 }
5238 impl<'a> ::std::ops::DerefMut for PipelineInputAssemblyStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5239     fn deref_mut(&mut self) -> &mut Self::Target {
5240         &mut self.inner
5241     }
5242 }
5243 impl<'a> PipelineInputAssemblyStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineInputAssemblyStateCreateFlags) -> Self5244     pub fn flags(mut self, flags: PipelineInputAssemblyStateCreateFlags) -> Self {
5245         self.inner.flags = flags;
5246         self
5247     }
topology(mut self, topology: PrimitiveTopology) -> Self5248     pub fn topology(mut self, topology: PrimitiveTopology) -> Self {
5249         self.inner.topology = topology;
5250         self
5251     }
primitive_restart_enable(mut self, primitive_restart_enable: bool) -> Self5252     pub fn primitive_restart_enable(mut self, primitive_restart_enable: bool) -> Self {
5253         self.inner.primitive_restart_enable = primitive_restart_enable.into();
5254         self
5255     }
5256     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5257     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5258     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineInputAssemblyStateCreateInfo5259     pub fn build(self) -> PipelineInputAssemblyStateCreateInfo {
5260         self.inner
5261     }
5262 }
5263 #[repr(C)]
5264 #[derive(Copy, Clone, Debug)]
5265 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineTessellationStateCreateInfo.html>"]
5266 pub struct PipelineTessellationStateCreateInfo {
5267     pub s_type: StructureType,
5268     pub p_next: *const c_void,
5269     pub flags: PipelineTessellationStateCreateFlags,
5270     pub patch_control_points: u32,
5271 }
5272 impl ::std::default::Default for PipelineTessellationStateCreateInfo {
default() -> PipelineTessellationStateCreateInfo5273     fn default() -> PipelineTessellationStateCreateInfo {
5274         PipelineTessellationStateCreateInfo {
5275             s_type: StructureType::PIPELINE_TESSELLATION_STATE_CREATE_INFO,
5276             p_next: ::std::ptr::null(),
5277             flags: PipelineTessellationStateCreateFlags::default(),
5278             patch_control_points: u32::default(),
5279         }
5280     }
5281 }
5282 impl PipelineTessellationStateCreateInfo {
builder<'a>() -> PipelineTessellationStateCreateInfoBuilder<'a>5283     pub fn builder<'a>() -> PipelineTessellationStateCreateInfoBuilder<'a> {
5284         PipelineTessellationStateCreateInfoBuilder {
5285             inner: PipelineTessellationStateCreateInfo::default(),
5286             marker: ::std::marker::PhantomData,
5287         }
5288     }
5289 }
5290 #[repr(transparent)]
5291 pub struct PipelineTessellationStateCreateInfoBuilder<'a> {
5292     inner: PipelineTessellationStateCreateInfo,
5293     marker: ::std::marker::PhantomData<&'a ()>,
5294 }
5295 pub unsafe trait ExtendsPipelineTessellationStateCreateInfo {}
5296 impl<'a> ::std::ops::Deref for PipelineTessellationStateCreateInfoBuilder<'a> {
5297     type Target = PipelineTessellationStateCreateInfo;
deref(&self) -> &Self::Target5298     fn deref(&self) -> &Self::Target {
5299         &self.inner
5300     }
5301 }
5302 impl<'a> ::std::ops::DerefMut for PipelineTessellationStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5303     fn deref_mut(&mut self) -> &mut Self::Target {
5304         &mut self.inner
5305     }
5306 }
5307 impl<'a> PipelineTessellationStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineTessellationStateCreateFlags) -> Self5308     pub fn flags(mut self, flags: PipelineTessellationStateCreateFlags) -> Self {
5309         self.inner.flags = flags;
5310         self
5311     }
patch_control_points(mut self, patch_control_points: u32) -> Self5312     pub fn patch_control_points(mut self, patch_control_points: u32) -> Self {
5313         self.inner.patch_control_points = patch_control_points;
5314         self
5315     }
5316     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
5317     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
5318     #[doc = r" valid extension structs can be pushed into the chain."]
5319     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
5320     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineTessellationStateCreateInfo>( mut self, next: &'a mut T, ) -> Self5321     pub fn push_next<T: ExtendsPipelineTessellationStateCreateInfo>(
5322         mut self,
5323         next: &'a mut T,
5324     ) -> Self {
5325         unsafe {
5326             let next_ptr = next as *mut T as *mut BaseOutStructure;
5327             let last_next = ptr_chain_iter(next).last().unwrap();
5328             (*last_next).p_next = self.inner.p_next as _;
5329             self.inner.p_next = next_ptr as _;
5330         }
5331         self
5332     }
5333     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5334     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5335     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineTessellationStateCreateInfo5336     pub fn build(self) -> PipelineTessellationStateCreateInfo {
5337         self.inner
5338     }
5339 }
5340 #[repr(C)]
5341 #[derive(Copy, Clone, Debug)]
5342 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineViewportStateCreateInfo.html>"]
5343 pub struct PipelineViewportStateCreateInfo {
5344     pub s_type: StructureType,
5345     pub p_next: *const c_void,
5346     pub flags: PipelineViewportStateCreateFlags,
5347     pub viewport_count: u32,
5348     pub p_viewports: *const Viewport,
5349     pub scissor_count: u32,
5350     pub p_scissors: *const Rect2D,
5351 }
5352 impl ::std::default::Default for PipelineViewportStateCreateInfo {
default() -> PipelineViewportStateCreateInfo5353     fn default() -> PipelineViewportStateCreateInfo {
5354         PipelineViewportStateCreateInfo {
5355             s_type: StructureType::PIPELINE_VIEWPORT_STATE_CREATE_INFO,
5356             p_next: ::std::ptr::null(),
5357             flags: PipelineViewportStateCreateFlags::default(),
5358             viewport_count: u32::default(),
5359             p_viewports: ::std::ptr::null(),
5360             scissor_count: u32::default(),
5361             p_scissors: ::std::ptr::null(),
5362         }
5363     }
5364 }
5365 impl PipelineViewportStateCreateInfo {
builder<'a>() -> PipelineViewportStateCreateInfoBuilder<'a>5366     pub fn builder<'a>() -> PipelineViewportStateCreateInfoBuilder<'a> {
5367         PipelineViewportStateCreateInfoBuilder {
5368             inner: PipelineViewportStateCreateInfo::default(),
5369             marker: ::std::marker::PhantomData,
5370         }
5371     }
5372 }
5373 #[repr(transparent)]
5374 pub struct PipelineViewportStateCreateInfoBuilder<'a> {
5375     inner: PipelineViewportStateCreateInfo,
5376     marker: ::std::marker::PhantomData<&'a ()>,
5377 }
5378 pub unsafe trait ExtendsPipelineViewportStateCreateInfo {}
5379 impl<'a> ::std::ops::Deref for PipelineViewportStateCreateInfoBuilder<'a> {
5380     type Target = PipelineViewportStateCreateInfo;
deref(&self) -> &Self::Target5381     fn deref(&self) -> &Self::Target {
5382         &self.inner
5383     }
5384 }
5385 impl<'a> ::std::ops::DerefMut for PipelineViewportStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5386     fn deref_mut(&mut self) -> &mut Self::Target {
5387         &mut self.inner
5388     }
5389 }
5390 impl<'a> PipelineViewportStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineViewportStateCreateFlags) -> Self5391     pub fn flags(mut self, flags: PipelineViewportStateCreateFlags) -> Self {
5392         self.inner.flags = flags;
5393         self
5394     }
viewport_count(mut self, viewport_count: u32) -> Self5395     pub fn viewport_count(mut self, viewport_count: u32) -> Self {
5396         self.inner.viewport_count = viewport_count;
5397         self
5398     }
viewports(mut self, viewports: &'a [Viewport]) -> Self5399     pub fn viewports(mut self, viewports: &'a [Viewport]) -> Self {
5400         self.inner.viewport_count = viewports.len() as _;
5401         self.inner.p_viewports = viewports.as_ptr();
5402         self
5403     }
scissor_count(mut self, scissor_count: u32) -> Self5404     pub fn scissor_count(mut self, scissor_count: u32) -> Self {
5405         self.inner.scissor_count = scissor_count;
5406         self
5407     }
scissors(mut self, scissors: &'a [Rect2D]) -> Self5408     pub fn scissors(mut self, scissors: &'a [Rect2D]) -> Self {
5409         self.inner.scissor_count = scissors.len() as _;
5410         self.inner.p_scissors = scissors.as_ptr();
5411         self
5412     }
5413     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
5414     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
5415     #[doc = r" valid extension structs can be pushed into the chain."]
5416     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
5417     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineViewportStateCreateInfo>(mut self, next: &'a mut T) -> Self5418     pub fn push_next<T: ExtendsPipelineViewportStateCreateInfo>(mut self, next: &'a mut T) -> Self {
5419         unsafe {
5420             let next_ptr = next as *mut T as *mut BaseOutStructure;
5421             let last_next = ptr_chain_iter(next).last().unwrap();
5422             (*last_next).p_next = self.inner.p_next as _;
5423             self.inner.p_next = next_ptr as _;
5424         }
5425         self
5426     }
5427     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5428     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5429     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineViewportStateCreateInfo5430     pub fn build(self) -> PipelineViewportStateCreateInfo {
5431         self.inner
5432     }
5433 }
5434 #[repr(C)]
5435 #[derive(Copy, Clone, Debug)]
5436 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineRasterizationStateCreateInfo.html>"]
5437 pub struct PipelineRasterizationStateCreateInfo {
5438     pub s_type: StructureType,
5439     pub p_next: *const c_void,
5440     pub flags: PipelineRasterizationStateCreateFlags,
5441     pub depth_clamp_enable: Bool32,
5442     pub rasterizer_discard_enable: Bool32,
5443     pub polygon_mode: PolygonMode,
5444     pub cull_mode: CullModeFlags,
5445     pub front_face: FrontFace,
5446     pub depth_bias_enable: Bool32,
5447     pub depth_bias_constant_factor: f32,
5448     pub depth_bias_clamp: f32,
5449     pub depth_bias_slope_factor: f32,
5450     pub line_width: f32,
5451 }
5452 impl ::std::default::Default for PipelineRasterizationStateCreateInfo {
default() -> PipelineRasterizationStateCreateInfo5453     fn default() -> PipelineRasterizationStateCreateInfo {
5454         PipelineRasterizationStateCreateInfo {
5455             s_type: StructureType::PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
5456             p_next: ::std::ptr::null(),
5457             flags: PipelineRasterizationStateCreateFlags::default(),
5458             depth_clamp_enable: Bool32::default(),
5459             rasterizer_discard_enable: Bool32::default(),
5460             polygon_mode: PolygonMode::default(),
5461             cull_mode: CullModeFlags::default(),
5462             front_face: FrontFace::default(),
5463             depth_bias_enable: Bool32::default(),
5464             depth_bias_constant_factor: f32::default(),
5465             depth_bias_clamp: f32::default(),
5466             depth_bias_slope_factor: f32::default(),
5467             line_width: f32::default(),
5468         }
5469     }
5470 }
5471 impl PipelineRasterizationStateCreateInfo {
builder<'a>() -> PipelineRasterizationStateCreateInfoBuilder<'a>5472     pub fn builder<'a>() -> PipelineRasterizationStateCreateInfoBuilder<'a> {
5473         PipelineRasterizationStateCreateInfoBuilder {
5474             inner: PipelineRasterizationStateCreateInfo::default(),
5475             marker: ::std::marker::PhantomData,
5476         }
5477     }
5478 }
5479 #[repr(transparent)]
5480 pub struct PipelineRasterizationStateCreateInfoBuilder<'a> {
5481     inner: PipelineRasterizationStateCreateInfo,
5482     marker: ::std::marker::PhantomData<&'a ()>,
5483 }
5484 pub unsafe trait ExtendsPipelineRasterizationStateCreateInfo {}
5485 impl<'a> ::std::ops::Deref for PipelineRasterizationStateCreateInfoBuilder<'a> {
5486     type Target = PipelineRasterizationStateCreateInfo;
deref(&self) -> &Self::Target5487     fn deref(&self) -> &Self::Target {
5488         &self.inner
5489     }
5490 }
5491 impl<'a> ::std::ops::DerefMut for PipelineRasterizationStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5492     fn deref_mut(&mut self) -> &mut Self::Target {
5493         &mut self.inner
5494     }
5495 }
5496 impl<'a> PipelineRasterizationStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineRasterizationStateCreateFlags) -> Self5497     pub fn flags(mut self, flags: PipelineRasterizationStateCreateFlags) -> Self {
5498         self.inner.flags = flags;
5499         self
5500     }
depth_clamp_enable(mut self, depth_clamp_enable: bool) -> Self5501     pub fn depth_clamp_enable(mut self, depth_clamp_enable: bool) -> Self {
5502         self.inner.depth_clamp_enable = depth_clamp_enable.into();
5503         self
5504     }
rasterizer_discard_enable(mut self, rasterizer_discard_enable: bool) -> Self5505     pub fn rasterizer_discard_enable(mut self, rasterizer_discard_enable: bool) -> Self {
5506         self.inner.rasterizer_discard_enable = rasterizer_discard_enable.into();
5507         self
5508     }
polygon_mode(mut self, polygon_mode: PolygonMode) -> Self5509     pub fn polygon_mode(mut self, polygon_mode: PolygonMode) -> Self {
5510         self.inner.polygon_mode = polygon_mode;
5511         self
5512     }
cull_mode(mut self, cull_mode: CullModeFlags) -> Self5513     pub fn cull_mode(mut self, cull_mode: CullModeFlags) -> Self {
5514         self.inner.cull_mode = cull_mode;
5515         self
5516     }
front_face(mut self, front_face: FrontFace) -> Self5517     pub fn front_face(mut self, front_face: FrontFace) -> Self {
5518         self.inner.front_face = front_face;
5519         self
5520     }
depth_bias_enable(mut self, depth_bias_enable: bool) -> Self5521     pub fn depth_bias_enable(mut self, depth_bias_enable: bool) -> Self {
5522         self.inner.depth_bias_enable = depth_bias_enable.into();
5523         self
5524     }
depth_bias_constant_factor(mut self, depth_bias_constant_factor: f32) -> Self5525     pub fn depth_bias_constant_factor(mut self, depth_bias_constant_factor: f32) -> Self {
5526         self.inner.depth_bias_constant_factor = depth_bias_constant_factor;
5527         self
5528     }
depth_bias_clamp(mut self, depth_bias_clamp: f32) -> Self5529     pub fn depth_bias_clamp(mut self, depth_bias_clamp: f32) -> Self {
5530         self.inner.depth_bias_clamp = depth_bias_clamp;
5531         self
5532     }
depth_bias_slope_factor(mut self, depth_bias_slope_factor: f32) -> Self5533     pub fn depth_bias_slope_factor(mut self, depth_bias_slope_factor: f32) -> Self {
5534         self.inner.depth_bias_slope_factor = depth_bias_slope_factor;
5535         self
5536     }
line_width(mut self, line_width: f32) -> Self5537     pub fn line_width(mut self, line_width: f32) -> Self {
5538         self.inner.line_width = line_width;
5539         self
5540     }
5541     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
5542     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
5543     #[doc = r" valid extension structs can be pushed into the chain."]
5544     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
5545     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineRasterizationStateCreateInfo>( mut self, next: &'a mut T, ) -> Self5546     pub fn push_next<T: ExtendsPipelineRasterizationStateCreateInfo>(
5547         mut self,
5548         next: &'a mut T,
5549     ) -> Self {
5550         unsafe {
5551             let next_ptr = next as *mut T as *mut BaseOutStructure;
5552             let last_next = ptr_chain_iter(next).last().unwrap();
5553             (*last_next).p_next = self.inner.p_next as _;
5554             self.inner.p_next = next_ptr as _;
5555         }
5556         self
5557     }
5558     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5559     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5560     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineRasterizationStateCreateInfo5561     pub fn build(self) -> PipelineRasterizationStateCreateInfo {
5562         self.inner
5563     }
5564 }
5565 #[repr(C)]
5566 #[derive(Copy, Clone, Debug)]
5567 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineMultisampleStateCreateInfo.html>"]
5568 pub struct PipelineMultisampleStateCreateInfo {
5569     pub s_type: StructureType,
5570     pub p_next: *const c_void,
5571     pub flags: PipelineMultisampleStateCreateFlags,
5572     pub rasterization_samples: SampleCountFlags,
5573     pub sample_shading_enable: Bool32,
5574     pub min_sample_shading: f32,
5575     pub p_sample_mask: *const SampleMask,
5576     pub alpha_to_coverage_enable: Bool32,
5577     pub alpha_to_one_enable: Bool32,
5578 }
5579 impl ::std::default::Default for PipelineMultisampleStateCreateInfo {
default() -> PipelineMultisampleStateCreateInfo5580     fn default() -> PipelineMultisampleStateCreateInfo {
5581         PipelineMultisampleStateCreateInfo {
5582             s_type: StructureType::PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,
5583             p_next: ::std::ptr::null(),
5584             flags: PipelineMultisampleStateCreateFlags::default(),
5585             rasterization_samples: SampleCountFlags::default(),
5586             sample_shading_enable: Bool32::default(),
5587             min_sample_shading: f32::default(),
5588             p_sample_mask: ::std::ptr::null(),
5589             alpha_to_coverage_enable: Bool32::default(),
5590             alpha_to_one_enable: Bool32::default(),
5591         }
5592     }
5593 }
5594 impl PipelineMultisampleStateCreateInfo {
builder<'a>() -> PipelineMultisampleStateCreateInfoBuilder<'a>5595     pub fn builder<'a>() -> PipelineMultisampleStateCreateInfoBuilder<'a> {
5596         PipelineMultisampleStateCreateInfoBuilder {
5597             inner: PipelineMultisampleStateCreateInfo::default(),
5598             marker: ::std::marker::PhantomData,
5599         }
5600     }
5601 }
5602 #[repr(transparent)]
5603 pub struct PipelineMultisampleStateCreateInfoBuilder<'a> {
5604     inner: PipelineMultisampleStateCreateInfo,
5605     marker: ::std::marker::PhantomData<&'a ()>,
5606 }
5607 pub unsafe trait ExtendsPipelineMultisampleStateCreateInfo {}
5608 impl<'a> ::std::ops::Deref for PipelineMultisampleStateCreateInfoBuilder<'a> {
5609     type Target = PipelineMultisampleStateCreateInfo;
deref(&self) -> &Self::Target5610     fn deref(&self) -> &Self::Target {
5611         &self.inner
5612     }
5613 }
5614 impl<'a> ::std::ops::DerefMut for PipelineMultisampleStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5615     fn deref_mut(&mut self) -> &mut Self::Target {
5616         &mut self.inner
5617     }
5618 }
5619 impl<'a> PipelineMultisampleStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineMultisampleStateCreateFlags) -> Self5620     pub fn flags(mut self, flags: PipelineMultisampleStateCreateFlags) -> Self {
5621         self.inner.flags = flags;
5622         self
5623     }
rasterization_samples(mut self, rasterization_samples: SampleCountFlags) -> Self5624     pub fn rasterization_samples(mut self, rasterization_samples: SampleCountFlags) -> Self {
5625         self.inner.rasterization_samples = rasterization_samples;
5626         self
5627     }
sample_shading_enable(mut self, sample_shading_enable: bool) -> Self5628     pub fn sample_shading_enable(mut self, sample_shading_enable: bool) -> Self {
5629         self.inner.sample_shading_enable = sample_shading_enable.into();
5630         self
5631     }
min_sample_shading(mut self, min_sample_shading: f32) -> Self5632     pub fn min_sample_shading(mut self, min_sample_shading: f32) -> Self {
5633         self.inner.min_sample_shading = min_sample_shading;
5634         self
5635     }
5636     #[doc = r" Sets `p_sample_mask` to `null` if the slice is empty. The mask will"]
5637     #[doc = r" be treated as if it has all bits set to `1`."]
5638     #[doc = r""]
5639     #[doc = r" See <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineMultisampleStateCreateInfo.html#_description>"]
5640     #[doc = r" for more details."]
sample_mask(mut self, sample_mask: &'a [SampleMask]) -> Self5641     pub fn sample_mask(mut self, sample_mask: &'a [SampleMask]) -> Self {
5642         self.inner.p_sample_mask = if sample_mask.is_empty() {
5643             std::ptr::null()
5644         } else {
5645             sample_mask.as_ptr() as *const SampleMask
5646         };
5647         self
5648     }
alpha_to_coverage_enable(mut self, alpha_to_coverage_enable: bool) -> Self5649     pub fn alpha_to_coverage_enable(mut self, alpha_to_coverage_enable: bool) -> Self {
5650         self.inner.alpha_to_coverage_enable = alpha_to_coverage_enable.into();
5651         self
5652     }
alpha_to_one_enable(mut self, alpha_to_one_enable: bool) -> Self5653     pub fn alpha_to_one_enable(mut self, alpha_to_one_enable: bool) -> Self {
5654         self.inner.alpha_to_one_enable = alpha_to_one_enable.into();
5655         self
5656     }
5657     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
5658     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
5659     #[doc = r" valid extension structs can be pushed into the chain."]
5660     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
5661     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineMultisampleStateCreateInfo>( mut self, next: &'a mut T, ) -> Self5662     pub fn push_next<T: ExtendsPipelineMultisampleStateCreateInfo>(
5663         mut self,
5664         next: &'a mut T,
5665     ) -> Self {
5666         unsafe {
5667             let next_ptr = next as *mut T as *mut BaseOutStructure;
5668             let last_next = ptr_chain_iter(next).last().unwrap();
5669             (*last_next).p_next = self.inner.p_next as _;
5670             self.inner.p_next = next_ptr as _;
5671         }
5672         self
5673     }
5674     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5675     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5676     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineMultisampleStateCreateInfo5677     pub fn build(self) -> PipelineMultisampleStateCreateInfo {
5678         self.inner
5679     }
5680 }
5681 #[repr(C)]
5682 #[derive(Copy, Clone, Default, Debug)]
5683 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendAttachmentState.html>"]
5684 pub struct PipelineColorBlendAttachmentState {
5685     pub blend_enable: Bool32,
5686     pub src_color_blend_factor: BlendFactor,
5687     pub dst_color_blend_factor: BlendFactor,
5688     pub color_blend_op: BlendOp,
5689     pub src_alpha_blend_factor: BlendFactor,
5690     pub dst_alpha_blend_factor: BlendFactor,
5691     pub alpha_blend_op: BlendOp,
5692     pub color_write_mask: ColorComponentFlags,
5693 }
5694 impl PipelineColorBlendAttachmentState {
builder<'a>() -> PipelineColorBlendAttachmentStateBuilder<'a>5695     pub fn builder<'a>() -> PipelineColorBlendAttachmentStateBuilder<'a> {
5696         PipelineColorBlendAttachmentStateBuilder {
5697             inner: PipelineColorBlendAttachmentState::default(),
5698             marker: ::std::marker::PhantomData,
5699         }
5700     }
5701 }
5702 #[repr(transparent)]
5703 pub struct PipelineColorBlendAttachmentStateBuilder<'a> {
5704     inner: PipelineColorBlendAttachmentState,
5705     marker: ::std::marker::PhantomData<&'a ()>,
5706 }
5707 impl<'a> ::std::ops::Deref for PipelineColorBlendAttachmentStateBuilder<'a> {
5708     type Target = PipelineColorBlendAttachmentState;
deref(&self) -> &Self::Target5709     fn deref(&self) -> &Self::Target {
5710         &self.inner
5711     }
5712 }
5713 impl<'a> ::std::ops::DerefMut for PipelineColorBlendAttachmentStateBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5714     fn deref_mut(&mut self) -> &mut Self::Target {
5715         &mut self.inner
5716     }
5717 }
5718 impl<'a> PipelineColorBlendAttachmentStateBuilder<'a> {
blend_enable(mut self, blend_enable: bool) -> Self5719     pub fn blend_enable(mut self, blend_enable: bool) -> Self {
5720         self.inner.blend_enable = blend_enable.into();
5721         self
5722     }
src_color_blend_factor(mut self, src_color_blend_factor: BlendFactor) -> Self5723     pub fn src_color_blend_factor(mut self, src_color_blend_factor: BlendFactor) -> Self {
5724         self.inner.src_color_blend_factor = src_color_blend_factor;
5725         self
5726     }
dst_color_blend_factor(mut self, dst_color_blend_factor: BlendFactor) -> Self5727     pub fn dst_color_blend_factor(mut self, dst_color_blend_factor: BlendFactor) -> Self {
5728         self.inner.dst_color_blend_factor = dst_color_blend_factor;
5729         self
5730     }
color_blend_op(mut self, color_blend_op: BlendOp) -> Self5731     pub fn color_blend_op(mut self, color_blend_op: BlendOp) -> Self {
5732         self.inner.color_blend_op = color_blend_op;
5733         self
5734     }
src_alpha_blend_factor(mut self, src_alpha_blend_factor: BlendFactor) -> Self5735     pub fn src_alpha_blend_factor(mut self, src_alpha_blend_factor: BlendFactor) -> Self {
5736         self.inner.src_alpha_blend_factor = src_alpha_blend_factor;
5737         self
5738     }
dst_alpha_blend_factor(mut self, dst_alpha_blend_factor: BlendFactor) -> Self5739     pub fn dst_alpha_blend_factor(mut self, dst_alpha_blend_factor: BlendFactor) -> Self {
5740         self.inner.dst_alpha_blend_factor = dst_alpha_blend_factor;
5741         self
5742     }
alpha_blend_op(mut self, alpha_blend_op: BlendOp) -> Self5743     pub fn alpha_blend_op(mut self, alpha_blend_op: BlendOp) -> Self {
5744         self.inner.alpha_blend_op = alpha_blend_op;
5745         self
5746     }
color_write_mask(mut self, color_write_mask: ColorComponentFlags) -> Self5747     pub fn color_write_mask(mut self, color_write_mask: ColorComponentFlags) -> Self {
5748         self.inner.color_write_mask = color_write_mask;
5749         self
5750     }
5751     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5752     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5753     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineColorBlendAttachmentState5754     pub fn build(self) -> PipelineColorBlendAttachmentState {
5755         self.inner
5756     }
5757 }
5758 #[repr(C)]
5759 #[derive(Copy, Clone, Debug)]
5760 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineColorBlendStateCreateInfo.html>"]
5761 pub struct PipelineColorBlendStateCreateInfo {
5762     pub s_type: StructureType,
5763     pub p_next: *const c_void,
5764     pub flags: PipelineColorBlendStateCreateFlags,
5765     pub logic_op_enable: Bool32,
5766     pub logic_op: LogicOp,
5767     pub attachment_count: u32,
5768     pub p_attachments: *const PipelineColorBlendAttachmentState,
5769     pub blend_constants: [f32; 4],
5770 }
5771 impl ::std::default::Default for PipelineColorBlendStateCreateInfo {
default() -> PipelineColorBlendStateCreateInfo5772     fn default() -> PipelineColorBlendStateCreateInfo {
5773         PipelineColorBlendStateCreateInfo {
5774             s_type: StructureType::PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
5775             p_next: ::std::ptr::null(),
5776             flags: PipelineColorBlendStateCreateFlags::default(),
5777             logic_op_enable: Bool32::default(),
5778             logic_op: LogicOp::default(),
5779             attachment_count: u32::default(),
5780             p_attachments: ::std::ptr::null(),
5781             blend_constants: unsafe { ::std::mem::zeroed() },
5782         }
5783     }
5784 }
5785 impl PipelineColorBlendStateCreateInfo {
builder<'a>() -> PipelineColorBlendStateCreateInfoBuilder<'a>5786     pub fn builder<'a>() -> PipelineColorBlendStateCreateInfoBuilder<'a> {
5787         PipelineColorBlendStateCreateInfoBuilder {
5788             inner: PipelineColorBlendStateCreateInfo::default(),
5789             marker: ::std::marker::PhantomData,
5790         }
5791     }
5792 }
5793 #[repr(transparent)]
5794 pub struct PipelineColorBlendStateCreateInfoBuilder<'a> {
5795     inner: PipelineColorBlendStateCreateInfo,
5796     marker: ::std::marker::PhantomData<&'a ()>,
5797 }
5798 pub unsafe trait ExtendsPipelineColorBlendStateCreateInfo {}
5799 impl<'a> ::std::ops::Deref for PipelineColorBlendStateCreateInfoBuilder<'a> {
5800     type Target = PipelineColorBlendStateCreateInfo;
deref(&self) -> &Self::Target5801     fn deref(&self) -> &Self::Target {
5802         &self.inner
5803     }
5804 }
5805 impl<'a> ::std::ops::DerefMut for PipelineColorBlendStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5806     fn deref_mut(&mut self) -> &mut Self::Target {
5807         &mut self.inner
5808     }
5809 }
5810 impl<'a> PipelineColorBlendStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineColorBlendStateCreateFlags) -> Self5811     pub fn flags(mut self, flags: PipelineColorBlendStateCreateFlags) -> Self {
5812         self.inner.flags = flags;
5813         self
5814     }
logic_op_enable(mut self, logic_op_enable: bool) -> Self5815     pub fn logic_op_enable(mut self, logic_op_enable: bool) -> Self {
5816         self.inner.logic_op_enable = logic_op_enable.into();
5817         self
5818     }
logic_op(mut self, logic_op: LogicOp) -> Self5819     pub fn logic_op(mut self, logic_op: LogicOp) -> Self {
5820         self.inner.logic_op = logic_op;
5821         self
5822     }
attachments(mut self, attachments: &'a [PipelineColorBlendAttachmentState]) -> Self5823     pub fn attachments(mut self, attachments: &'a [PipelineColorBlendAttachmentState]) -> Self {
5824         self.inner.attachment_count = attachments.len() as _;
5825         self.inner.p_attachments = attachments.as_ptr();
5826         self
5827     }
blend_constants(mut self, blend_constants: [f32; 4]) -> Self5828     pub fn blend_constants(mut self, blend_constants: [f32; 4]) -> Self {
5829         self.inner.blend_constants = blend_constants;
5830         self
5831     }
5832     #[doc = r" Prepends the given extension struct between the root and the first pointer. This"]
5833     #[doc = r" method only exists on structs that can be passed to a function directly. Only"]
5834     #[doc = r" valid extension structs can be pushed into the chain."]
5835     #[doc = r" If the chain looks like `A -> B -> C`, and you call `builder.push_next(&mut D)`, then the"]
5836     #[doc = r" chain will look like `A -> D -> B -> C`."]
push_next<T: ExtendsPipelineColorBlendStateCreateInfo>( mut self, next: &'a mut T, ) -> Self5837     pub fn push_next<T: ExtendsPipelineColorBlendStateCreateInfo>(
5838         mut self,
5839         next: &'a mut T,
5840     ) -> Self {
5841         unsafe {
5842             let next_ptr = next as *mut T as *mut BaseOutStructure;
5843             let last_next = ptr_chain_iter(next).last().unwrap();
5844             (*last_next).p_next = self.inner.p_next as _;
5845             self.inner.p_next = next_ptr as _;
5846         }
5847         self
5848     }
5849     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5850     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5851     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineColorBlendStateCreateInfo5852     pub fn build(self) -> PipelineColorBlendStateCreateInfo {
5853         self.inner
5854     }
5855 }
5856 #[repr(C)]
5857 #[derive(Copy, Clone, Debug)]
5858 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDynamicStateCreateInfo.html>"]
5859 pub struct PipelineDynamicStateCreateInfo {
5860     pub s_type: StructureType,
5861     pub p_next: *const c_void,
5862     pub flags: PipelineDynamicStateCreateFlags,
5863     pub dynamic_state_count: u32,
5864     pub p_dynamic_states: *const DynamicState,
5865 }
5866 impl ::std::default::Default for PipelineDynamicStateCreateInfo {
default() -> PipelineDynamicStateCreateInfo5867     fn default() -> PipelineDynamicStateCreateInfo {
5868         PipelineDynamicStateCreateInfo {
5869             s_type: StructureType::PIPELINE_DYNAMIC_STATE_CREATE_INFO,
5870             p_next: ::std::ptr::null(),
5871             flags: PipelineDynamicStateCreateFlags::default(),
5872             dynamic_state_count: u32::default(),
5873             p_dynamic_states: ::std::ptr::null(),
5874         }
5875     }
5876 }
5877 impl PipelineDynamicStateCreateInfo {
builder<'a>() -> PipelineDynamicStateCreateInfoBuilder<'a>5878     pub fn builder<'a>() -> PipelineDynamicStateCreateInfoBuilder<'a> {
5879         PipelineDynamicStateCreateInfoBuilder {
5880             inner: PipelineDynamicStateCreateInfo::default(),
5881             marker: ::std::marker::PhantomData,
5882         }
5883     }
5884 }
5885 #[repr(transparent)]
5886 pub struct PipelineDynamicStateCreateInfoBuilder<'a> {
5887     inner: PipelineDynamicStateCreateInfo,
5888     marker: ::std::marker::PhantomData<&'a ()>,
5889 }
5890 impl<'a> ::std::ops::Deref for PipelineDynamicStateCreateInfoBuilder<'a> {
5891     type Target = PipelineDynamicStateCreateInfo;
deref(&self) -> &Self::Target5892     fn deref(&self) -> &Self::Target {
5893         &self.inner
5894     }
5895 }
5896 impl<'a> ::std::ops::DerefMut for PipelineDynamicStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5897     fn deref_mut(&mut self) -> &mut Self::Target {
5898         &mut self.inner
5899     }
5900 }
5901 impl<'a> PipelineDynamicStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineDynamicStateCreateFlags) -> Self5902     pub fn flags(mut self, flags: PipelineDynamicStateCreateFlags) -> Self {
5903         self.inner.flags = flags;
5904         self
5905     }
dynamic_states(mut self, dynamic_states: &'a [DynamicState]) -> Self5906     pub fn dynamic_states(mut self, dynamic_states: &'a [DynamicState]) -> Self {
5907         self.inner.dynamic_state_count = dynamic_states.len() as _;
5908         self.inner.p_dynamic_states = dynamic_states.as_ptr();
5909         self
5910     }
5911     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5912     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5913     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineDynamicStateCreateInfo5914     pub fn build(self) -> PipelineDynamicStateCreateInfo {
5915         self.inner
5916     }
5917 }
5918 #[repr(C)]
5919 #[derive(Copy, Clone, Default, Debug)]
5920 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStencilOpState.html>"]
5921 pub struct StencilOpState {
5922     pub fail_op: StencilOp,
5923     pub pass_op: StencilOp,
5924     pub depth_fail_op: StencilOp,
5925     pub compare_op: CompareOp,
5926     pub compare_mask: u32,
5927     pub write_mask: u32,
5928     pub reference: u32,
5929 }
5930 impl StencilOpState {
builder<'a>() -> StencilOpStateBuilder<'a>5931     pub fn builder<'a>() -> StencilOpStateBuilder<'a> {
5932         StencilOpStateBuilder {
5933             inner: StencilOpState::default(),
5934             marker: ::std::marker::PhantomData,
5935         }
5936     }
5937 }
5938 #[repr(transparent)]
5939 pub struct StencilOpStateBuilder<'a> {
5940     inner: StencilOpState,
5941     marker: ::std::marker::PhantomData<&'a ()>,
5942 }
5943 impl<'a> ::std::ops::Deref for StencilOpStateBuilder<'a> {
5944     type Target = StencilOpState;
deref(&self) -> &Self::Target5945     fn deref(&self) -> &Self::Target {
5946         &self.inner
5947     }
5948 }
5949 impl<'a> ::std::ops::DerefMut for StencilOpStateBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target5950     fn deref_mut(&mut self) -> &mut Self::Target {
5951         &mut self.inner
5952     }
5953 }
5954 impl<'a> StencilOpStateBuilder<'a> {
fail_op(mut self, fail_op: StencilOp) -> Self5955     pub fn fail_op(mut self, fail_op: StencilOp) -> Self {
5956         self.inner.fail_op = fail_op;
5957         self
5958     }
pass_op(mut self, pass_op: StencilOp) -> Self5959     pub fn pass_op(mut self, pass_op: StencilOp) -> Self {
5960         self.inner.pass_op = pass_op;
5961         self
5962     }
depth_fail_op(mut self, depth_fail_op: StencilOp) -> Self5963     pub fn depth_fail_op(mut self, depth_fail_op: StencilOp) -> Self {
5964         self.inner.depth_fail_op = depth_fail_op;
5965         self
5966     }
compare_op(mut self, compare_op: CompareOp) -> Self5967     pub fn compare_op(mut self, compare_op: CompareOp) -> Self {
5968         self.inner.compare_op = compare_op;
5969         self
5970     }
compare_mask(mut self, compare_mask: u32) -> Self5971     pub fn compare_mask(mut self, compare_mask: u32) -> Self {
5972         self.inner.compare_mask = compare_mask;
5973         self
5974     }
write_mask(mut self, write_mask: u32) -> Self5975     pub fn write_mask(mut self, write_mask: u32) -> Self {
5976         self.inner.write_mask = write_mask;
5977         self
5978     }
reference(mut self, reference: u32) -> Self5979     pub fn reference(mut self, reference: u32) -> Self {
5980         self.inner.reference = reference;
5981         self
5982     }
5983     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
5984     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
5985     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> StencilOpState5986     pub fn build(self) -> StencilOpState {
5987         self.inner
5988     }
5989 }
5990 #[repr(C)]
5991 #[derive(Copy, Clone, Debug)]
5992 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineDepthStencilStateCreateInfo.html>"]
5993 pub struct PipelineDepthStencilStateCreateInfo {
5994     pub s_type: StructureType,
5995     pub p_next: *const c_void,
5996     pub flags: PipelineDepthStencilStateCreateFlags,
5997     pub depth_test_enable: Bool32,
5998     pub depth_write_enable: Bool32,
5999     pub depth_compare_op: CompareOp,
6000     pub depth_bounds_test_enable: Bool32,
6001     pub stencil_test_enable: Bool32,
6002     pub front: StencilOpState,
6003     pub back: StencilOpState,
6004     pub min_depth_bounds: f32,
6005     pub max_depth_bounds: f32,
6006 }
6007 impl ::std::default::Default for PipelineDepthStencilStateCreateInfo {
default() -> PipelineDepthStencilStateCreateInfo6008     fn default() -> PipelineDepthStencilStateCreateInfo {
6009         PipelineDepthStencilStateCreateInfo {
6010             s_type: StructureType::PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO,
6011             p_next: ::std::ptr::null(),
6012             flags: PipelineDepthStencilStateCreateFlags::default(),
6013             depth_test_enable: Bool32::default(),
6014             depth_write_enable: Bool32::default(),
6015             depth_compare_op: CompareOp::default(),
6016             depth_bounds_test_enable: Bool32::default(),
6017             stencil_test_enable: Bool32::default(),
6018             front: StencilOpState::default(),
6019             back: StencilOpState::default(),
6020             min_depth_bounds: f32::default(),
6021             max_depth_bounds: f32::default(),
6022         }
6023     }
6024 }
6025 impl PipelineDepthStencilStateCreateInfo {
builder<'a>() -> PipelineDepthStencilStateCreateInfoBuilder<'a>6026     pub fn builder<'a>() -> PipelineDepthStencilStateCreateInfoBuilder<'a> {
6027         PipelineDepthStencilStateCreateInfoBuilder {
6028             inner: PipelineDepthStencilStateCreateInfo::default(),
6029             marker: ::std::marker::PhantomData,
6030         }
6031     }
6032 }
6033 #[repr(transparent)]
6034 pub struct PipelineDepthStencilStateCreateInfoBuilder<'a> {
6035     inner: PipelineDepthStencilStateCreateInfo,
6036     marker: ::std::marker::PhantomData<&'a ()>,
6037 }
6038 impl<'a> ::std::ops::Deref for PipelineDepthStencilStateCreateInfoBuilder<'a> {
6039     type Target = PipelineDepthStencilStateCreateInfo;
deref(&self) -> &Self::Target6040     fn deref(&self) -> &Self::Target {
6041         &self.inner
6042     }
6043 }
6044 impl<'a> ::std::ops::DerefMut for PipelineDepthStencilStateCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target6045     fn deref_mut(&mut self) -> &mut Self::Target {
6046         &mut self.inner
6047     }
6048 }
6049 impl<'a> PipelineDepthStencilStateCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineDepthStencilStateCreateFlags) -> Self6050     pub fn flags(mut self, flags: PipelineDepthStencilStateCreateFlags) -> Self {
6051         self.inner.flags = flags;
6052         self
6053     }
depth_test_enable(mut self, depth_test_enable: bool) -> Self6054     pub fn depth_test_enable(mut self, depth_test_enable: bool) -> Self {
6055         self.inner.depth_test_enable = depth_test_enable.into();
6056         self
6057     }
depth_write_enable(mut self, depth_write_enable: bool) -> Self6058     pub fn depth_write_enable(mut self, depth_write_enable: bool) -> Self {
6059         self.inner.depth_write_enable = depth_write_enable.into();
6060         self
6061     }
depth_compare_op(mut self, depth_compare_op: CompareOp) -> Self6062     pub fn depth_compare_op(mut self, depth_compare_op: CompareOp) -> Self {
6063         self.inner.depth_compare_op = depth_compare_op;
6064         self
6065     }
depth_bounds_test_enable(mut self, depth_bounds_test_enable: bool) -> Self6066     pub fn depth_bounds_test_enable(mut self, depth_bounds_test_enable: bool) -> Self {
6067         self.inner.depth_bounds_test_enable = depth_bounds_test_enable.into();
6068         self
6069     }
stencil_test_enable(mut self, stencil_test_enable: bool) -> Self6070     pub fn stencil_test_enable(mut self, stencil_test_enable: bool) -> Self {
6071         self.inner.stencil_test_enable = stencil_test_enable.into();
6072         self
6073     }
front(mut self, front: StencilOpState) -> Self6074     pub fn front(mut self, front: StencilOpState) -> Self {
6075         self.inner.front = front;
6076         self
6077     }
back(mut self, back: StencilOpState) -> Self6078     pub fn back(mut self, back: StencilOpState) -> Self {
6079         self.inner.back = back;
6080         self
6081     }
min_depth_bounds(mut self, min_depth_bounds: f32) -> Self6082     pub fn min_depth_bounds(mut self, min_depth_bounds: f32) -> Self {
6083         self.inner.min_depth_bounds = min_depth_bounds;
6084         self
6085     }
max_depth_bounds(mut self, max_depth_bounds: f32) -> Self6086     pub fn max_depth_bounds(mut self, max_depth_bounds: f32) -> Self {
6087         self.inner.max_depth_bounds = max_depth_bounds;
6088         self
6089     }
6090     #[doc = r" Calling build will **discard** all the lifetime information. Only call this if"]
6091     #[doc = r" necessary! Builders implement `Deref` targeting their corresponding Vulkan struct,"]
6092     #[doc = r" so references to builders can be passed directly to Vulkan functions."]
build(self) -> PipelineDepthStencilStateCreateInfo6093     pub fn build(self) -> PipelineDepthStencilStateCreateInfo {
6094         self.inner
6095     }
6096 }
6097 #[repr(C)]
6098 #[derive(Copy, Clone, Debug)]
6099 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkGraphicsPipelineCreateInfo.html>"]
6100 pub struct GraphicsPipelineCreateInfo {
6101     pub s_type: StructureType,
6102     pub p_next: *const c_void,
6103     pub flags: PipelineCreateFlags,
6104     pub stage_count: u32,
6105     pub p_stages: *const PipelineShaderStageCreateInfo,
6106     pub p_vertex_input_state: *const PipelineVertexInputStateCreateInfo,
6107     pub p_input_assembly_state: *const PipelineInputAssemblyStateCreateInfo,
6108     pub p_tessellation_state: *const PipelineTessellationStateCreateInfo,
6109     pub p_viewport_state: *const PipelineViewportStateCreateInfo,
6110     pub p_rasterization_state: *const PipelineRasterizationStateCreateInfo,
6111     pub p_multisample_state: *const PipelineMultisampleStateCreateInfo,
6112     pub p_depth_stencil_state: *const PipelineDepthStencilStateCreateInfo,
6113     pub p_color_blend_state: *const PipelineColorBlendStateCreateInfo,
6114     pub p_dynamic_state: *const PipelineDynamicStateCreateInfo,
6115     pub layout: PipelineLayout,
6116     pub render_pass: RenderPass,
6117     pub subpass: u32,
6118     pub base_pipeline_handle: Pipeline,
6119     pub base_pipeline_index: i32,
6120 }
6121 impl ::std::default::Default for GraphicsPipelineCreateInfo {
default() -> GraphicsPipelineCreateInfo6122     fn default() -> GraphicsPipelineCreateInfo {
6123         GraphicsPipelineCreateInfo {
6124             s_type: StructureType::GRAPHICS_PIPELINE_CREATE_INFO,
6125             p_next: ::std::ptr::null(),
6126             flags: PipelineCreateFlags::default(),
6127             stage_count: u32::default(),
6128             p_stages: ::std::ptr::null(),
6129             p_vertex_input_state: ::std::ptr::null(),
6130             p_input_assembly_state: ::std::ptr::null(),
6131             p_tessellation_state: ::std::ptr::null(),
6132             p_viewport_state: ::std::ptr::null(),
6133             p_rasterization_state: ::std::ptr::null(),
6134             p_multisample_state: ::std::ptr::null(),
6135             p_depth_stencil_state: ::std::ptr::null(),
6136             p_color_blend_state: ::std::ptr::null(),
6137             p_dynamic_state: ::std::ptr::null(),
6138             layout: PipelineLayout::default(),
6139             render_pass: RenderPass::default(),
6140             subpass: u32::default(),
6141             base_pipeline_handle: Pipeline::default(),
6142             base_pipeline_index: i32::default(),
6143         }
6144     }
6145 }
6146 impl GraphicsPipelineCreateInfo {
builder<'a>() -> GraphicsPipelineCreateInfoBuilder<'a>6147     pub fn builder<'a>() -> GraphicsPipelineCreateInfoBuilder<'a> {
6148         GraphicsPipelineCreateInfoBuilder {
6149             inner: GraphicsPipelineCreateInfo::default(),
6150             marker: ::std::marker::PhantomData,
6151         }
6152     }
6153 }
6154 #[repr(transparent)]
6155 pub struct GraphicsPipelineCreateInfoBuilder<'a> {
6156     inner: GraphicsPipelineCreateInfo,
6157     marker: ::std::marker::PhantomData<&'a ()>,
6158 }
6159 pub unsafe trait ExtendsGraphicsPipelineCreateInfo {}
6160 impl<'a> ::std::ops::Deref for GraphicsPipelineCreateInfoBuilder<'a> {
6161     type Target = GraphicsPipelineCreateInfo;
deref(&self) -> &Self::Target6162     fn deref(&self) -> &Self::Target {
6163         &self.inner
6164     }
6165 }
6166 impl<'a> ::std::ops::DerefMut for GraphicsPipelineCreateInfoBuilder<'a> {
deref_mut(&mut self) -> &mut Self::Target6167     fn deref_mut(&mut self) -> &mut Self::Target {
6168         &mut self.inner
6169     }
6170 }
6171 impl<'a> GraphicsPipelineCreateInfoBuilder<'a> {
flags(mut self, flags: PipelineCreateFlags) -> Self6172     pub fn flags(mut self, flags: PipelineCreateFlags) -> Self {
6173         self.inner.flags = flags;
6174         self
6175     }
stages(mut self, stages: &'a [PipelineShaderStageCreateInfo]) -> Self6176     pub fn stages(mut self, stages: &'a [PipelineShaderStageCreateInfo]) -> Self {
6177         self.inner.stage_count = stages.len() as _;
6178         self.inner.p_stages = stages.as_ptr();
6179         self
6180     }
vertex_input_state( mut self, vertex_input_state: &'a PipelineVertexInputStateCreateInfo, ) -> Self6181     pub fn vertex_input_state(
6182         mut self,
6183         vertex_input_state: &'a PipelineVertexInputStateCreateInfo,
6184     ) -> Self {
6185         self.inner.p_vertex_input_state = vertex_input_state;
6186         self
6187     }
input_assembly_state( mut self, input_assembly_state: &'a PipelineInputAssemblyStateCreateInfo, ) -> Self6188     pub fn input_assembly_state(
6189         mut self,
6190         input_assembly_state: &'a PipelineInputAssemblyStateCreateInfo,
6191     ) -> Self {
6192         self.inner.p_input_assembly_state = input_assembly_state;
6193         self
6194     }
tessellation_state( mut self, tessellation_state: &'a PipelineTessellationStateCreateInfo, ) -> Self6195     pub fn tessellation_state(
6196         mut self,
6197         tessellation_state: &'a PipelineTessellationStateCreateInfo,
6198     ) -> Self {
6199         self.inner.p_tessellation_state = tessellation_state;
6200         self
6201     }
viewport_state(mut self, viewport_state: &'a PipelineViewportStateCreateInfo) -> Self6202