1 use std::fmt;
2 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3 #[repr(transparent)]
4 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageLayout.html>"]
5 pub struct ImageLayout(pub(crate) i32);
6 impl ImageLayout {
from_raw(x: i32) -> Self7     pub const fn from_raw(x: i32) -> Self {
8         Self(x)
9     }
as_raw(self) -> i3210     pub const fn as_raw(self) -> i32 {
11         self.0
12     }
13 }
14 impl ImageLayout {
15     #[doc = "Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)"]
16     pub const UNDEFINED: Self = Self(0);
17     #[doc = "General layout when image can be used for any kind of access"]
18     pub const GENERAL: Self = Self(1);
19     #[doc = "Optimal layout when image is only used for color attachment read/write"]
20     pub const COLOR_ATTACHMENT_OPTIMAL: Self = Self(2);
21     #[doc = "Optimal layout when image is only used for depth/stencil attachment read/write"]
22     pub const DEPTH_STENCIL_ATTACHMENT_OPTIMAL: Self = Self(3);
23     #[doc = "Optimal layout when image is used for read only depth/stencil attachment and shader access"]
24     pub const DEPTH_STENCIL_READ_ONLY_OPTIMAL: Self = Self(4);
25     #[doc = "Optimal layout when image is used for read only shader access"]
26     pub const SHADER_READ_ONLY_OPTIMAL: Self = Self(5);
27     #[doc = "Optimal layout when image is used only as source of transfer operations"]
28     pub const TRANSFER_SRC_OPTIMAL: Self = Self(6);
29     #[doc = "Optimal layout when image is used only as destination of transfer operations"]
30     pub const TRANSFER_DST_OPTIMAL: Self = Self(7);
31     #[doc = "Initial layout used when the data is populated by the CPU"]
32     pub const PREINITIALIZED: Self = Self(8);
33 }
34 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
35 #[repr(transparent)]
36 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAttachmentLoadOp.html>"]
37 pub struct AttachmentLoadOp(pub(crate) i32);
38 impl AttachmentLoadOp {
from_raw(x: i32) -> Self39     pub const fn from_raw(x: i32) -> Self {
40         Self(x)
41     }
as_raw(self) -> i3242     pub const fn as_raw(self) -> i32 {
43         self.0
44     }
45 }
46 impl AttachmentLoadOp {
47     pub const LOAD: Self = Self(0);
48     pub const CLEAR: Self = Self(1);
49     pub const DONT_CARE: Self = Self(2);
50 }
51 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
52 #[repr(transparent)]
53 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAttachmentStoreOp.html>"]
54 pub struct AttachmentStoreOp(pub(crate) i32);
55 impl AttachmentStoreOp {
from_raw(x: i32) -> Self56     pub const fn from_raw(x: i32) -> Self {
57         Self(x)
58     }
as_raw(self) -> i3259     pub const fn as_raw(self) -> i32 {
60         self.0
61     }
62 }
63 impl AttachmentStoreOp {
64     pub const STORE: Self = Self(0);
65     pub const DONT_CARE: Self = Self(1);
66 }
67 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
68 #[repr(transparent)]
69 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageType.html>"]
70 pub struct ImageType(pub(crate) i32);
71 impl ImageType {
from_raw(x: i32) -> Self72     pub const fn from_raw(x: i32) -> Self {
73         Self(x)
74     }
as_raw(self) -> i3275     pub const fn as_raw(self) -> i32 {
76         self.0
77     }
78 }
79 impl ImageType {
80     pub const TYPE_1D: Self = Self(0);
81     pub const TYPE_2D: Self = Self(1);
82     pub const TYPE_3D: Self = Self(2);
83 }
84 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
85 #[repr(transparent)]
86 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageTiling.html>"]
87 pub struct ImageTiling(pub(crate) i32);
88 impl ImageTiling {
from_raw(x: i32) -> Self89     pub const fn from_raw(x: i32) -> Self {
90         Self(x)
91     }
as_raw(self) -> i3292     pub const fn as_raw(self) -> i32 {
93         self.0
94     }
95 }
96 impl ImageTiling {
97     pub const OPTIMAL: Self = Self(0);
98     pub const LINEAR: Self = Self(1);
99 }
100 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
101 #[repr(transparent)]
102 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageViewType.html>"]
103 pub struct ImageViewType(pub(crate) i32);
104 impl ImageViewType {
from_raw(x: i32) -> Self105     pub const fn from_raw(x: i32) -> Self {
106         Self(x)
107     }
as_raw(self) -> i32108     pub const fn as_raw(self) -> i32 {
109         self.0
110     }
111 }
112 impl ImageViewType {
113     pub const TYPE_1D: Self = Self(0);
114     pub const TYPE_2D: Self = Self(1);
115     pub const TYPE_3D: Self = Self(2);
116     pub const CUBE: Self = Self(3);
117     pub const TYPE_1D_ARRAY: Self = Self(4);
118     pub const TYPE_2D_ARRAY: Self = Self(5);
119     pub const CUBE_ARRAY: Self = Self(6);
120 }
121 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
122 #[repr(transparent)]
123 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCommandBufferLevel.html>"]
124 pub struct CommandBufferLevel(pub(crate) i32);
125 impl CommandBufferLevel {
from_raw(x: i32) -> Self126     pub const fn from_raw(x: i32) -> Self {
127         Self(x)
128     }
as_raw(self) -> i32129     pub const fn as_raw(self) -> i32 {
130         self.0
131     }
132 }
133 impl CommandBufferLevel {
134     pub const PRIMARY: Self = Self(0);
135     pub const SECONDARY: Self = Self(1);
136 }
137 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
138 #[repr(transparent)]
139 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComponentSwizzle.html>"]
140 pub struct ComponentSwizzle(pub(crate) i32);
141 impl ComponentSwizzle {
from_raw(x: i32) -> Self142     pub const fn from_raw(x: i32) -> Self {
143         Self(x)
144     }
as_raw(self) -> i32145     pub const fn as_raw(self) -> i32 {
146         self.0
147     }
148 }
149 impl ComponentSwizzle {
150     pub const IDENTITY: Self = Self(0);
151     pub const ZERO: Self = Self(1);
152     pub const ONE: Self = Self(2);
153     pub const R: Self = Self(3);
154     pub const G: Self = Self(4);
155     pub const B: Self = Self(5);
156     pub const A: Self = Self(6);
157 }
158 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
159 #[repr(transparent)]
160 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorType.html>"]
161 pub struct DescriptorType(pub(crate) i32);
162 impl DescriptorType {
from_raw(x: i32) -> Self163     pub const fn from_raw(x: i32) -> Self {
164         Self(x)
165     }
as_raw(self) -> i32166     pub const fn as_raw(self) -> i32 {
167         self.0
168     }
169 }
170 impl DescriptorType {
171     pub const SAMPLER: Self = Self(0);
172     pub const COMBINED_IMAGE_SAMPLER: Self = Self(1);
173     pub const SAMPLED_IMAGE: Self = Self(2);
174     pub const STORAGE_IMAGE: Self = Self(3);
175     pub const UNIFORM_TEXEL_BUFFER: Self = Self(4);
176     pub const STORAGE_TEXEL_BUFFER: Self = Self(5);
177     pub const UNIFORM_BUFFER: Self = Self(6);
178     pub const STORAGE_BUFFER: Self = Self(7);
179     pub const UNIFORM_BUFFER_DYNAMIC: Self = Self(8);
180     pub const STORAGE_BUFFER_DYNAMIC: Self = Self(9);
181     pub const INPUT_ATTACHMENT: Self = Self(10);
182 }
183 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
184 #[repr(transparent)]
185 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryType.html>"]
186 pub struct QueryType(pub(crate) i32);
187 impl QueryType {
from_raw(x: i32) -> Self188     pub const fn from_raw(x: i32) -> Self {
189         Self(x)
190     }
as_raw(self) -> i32191     pub const fn as_raw(self) -> i32 {
192         self.0
193     }
194 }
195 impl QueryType {
196     pub const OCCLUSION: Self = Self(0);
197     #[doc = "Optional"]
198     pub const PIPELINE_STATISTICS: Self = Self(1);
199     pub const TIMESTAMP: Self = Self(2);
200 }
201 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
202 #[repr(transparent)]
203 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBorderColor.html>"]
204 pub struct BorderColor(pub(crate) i32);
205 impl BorderColor {
from_raw(x: i32) -> Self206     pub const fn from_raw(x: i32) -> Self {
207         Self(x)
208     }
as_raw(self) -> i32209     pub const fn as_raw(self) -> i32 {
210         self.0
211     }
212 }
213 impl BorderColor {
214     pub const FLOAT_TRANSPARENT_BLACK: Self = Self(0);
215     pub const INT_TRANSPARENT_BLACK: Self = Self(1);
216     pub const FLOAT_OPAQUE_BLACK: Self = Self(2);
217     pub const INT_OPAQUE_BLACK: Self = Self(3);
218     pub const FLOAT_OPAQUE_WHITE: Self = Self(4);
219     pub const INT_OPAQUE_WHITE: Self = Self(5);
220 }
221 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
222 #[repr(transparent)]
223 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineBindPoint.html>"]
224 pub struct PipelineBindPoint(pub(crate) i32);
225 impl PipelineBindPoint {
from_raw(x: i32) -> Self226     pub const fn from_raw(x: i32) -> Self {
227         Self(x)
228     }
as_raw(self) -> i32229     pub const fn as_raw(self) -> i32 {
230         self.0
231     }
232 }
233 impl PipelineBindPoint {
234     pub const GRAPHICS: Self = Self(0);
235     pub const COMPUTE: Self = Self(1);
236 }
237 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
238 #[repr(transparent)]
239 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineCacheHeaderVersion.html>"]
240 pub struct PipelineCacheHeaderVersion(pub(crate) i32);
241 impl PipelineCacheHeaderVersion {
from_raw(x: i32) -> Self242     pub const fn from_raw(x: i32) -> Self {
243         Self(x)
244     }
as_raw(self) -> i32245     pub const fn as_raw(self) -> i32 {
246         self.0
247     }
248 }
249 impl PipelineCacheHeaderVersion {
250     pub const ONE: Self = Self(1);
251 }
252 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
253 #[repr(transparent)]
254 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPrimitiveTopology.html>"]
255 pub struct PrimitiveTopology(pub(crate) i32);
256 impl PrimitiveTopology {
from_raw(x: i32) -> Self257     pub const fn from_raw(x: i32) -> Self {
258         Self(x)
259     }
as_raw(self) -> i32260     pub const fn as_raw(self) -> i32 {
261         self.0
262     }
263 }
264 impl PrimitiveTopology {
265     pub const POINT_LIST: Self = Self(0);
266     pub const LINE_LIST: Self = Self(1);
267     pub const LINE_STRIP: Self = Self(2);
268     pub const TRIANGLE_LIST: Self = Self(3);
269     pub const TRIANGLE_STRIP: Self = Self(4);
270     pub const TRIANGLE_FAN: Self = Self(5);
271     pub const LINE_LIST_WITH_ADJACENCY: Self = Self(6);
272     pub const LINE_STRIP_WITH_ADJACENCY: Self = Self(7);
273     pub const TRIANGLE_LIST_WITH_ADJACENCY: Self = Self(8);
274     pub const TRIANGLE_STRIP_WITH_ADJACENCY: Self = Self(9);
275     pub const PATCH_LIST: Self = Self(10);
276 }
277 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
278 #[repr(transparent)]
279 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSharingMode.html>"]
280 pub struct SharingMode(pub(crate) i32);
281 impl SharingMode {
from_raw(x: i32) -> Self282     pub const fn from_raw(x: i32) -> Self {
283         Self(x)
284     }
as_raw(self) -> i32285     pub const fn as_raw(self) -> i32 {
286         self.0
287     }
288 }
289 impl SharingMode {
290     pub const EXCLUSIVE: Self = Self(0);
291     pub const CONCURRENT: Self = Self(1);
292 }
293 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
294 #[repr(transparent)]
295 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIndexType.html>"]
296 pub struct IndexType(pub(crate) i32);
297 impl IndexType {
from_raw(x: i32) -> Self298     pub const fn from_raw(x: i32) -> Self {
299         Self(x)
300     }
as_raw(self) -> i32301     pub const fn as_raw(self) -> i32 {
302         self.0
303     }
304 }
305 impl IndexType {
306     pub const UINT16: Self = Self(0);
307     pub const UINT32: Self = Self(1);
308 }
309 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
310 #[repr(transparent)]
311 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFilter.html>"]
312 pub struct Filter(pub(crate) i32);
313 impl Filter {
from_raw(x: i32) -> Self314     pub const fn from_raw(x: i32) -> Self {
315         Self(x)
316     }
as_raw(self) -> i32317     pub const fn as_raw(self) -> i32 {
318         self.0
319     }
320 }
321 impl Filter {
322     pub const NEAREST: Self = Self(0);
323     pub const LINEAR: Self = Self(1);
324 }
325 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
326 #[repr(transparent)]
327 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerMipmapMode.html>"]
328 pub struct SamplerMipmapMode(pub(crate) i32);
329 impl SamplerMipmapMode {
from_raw(x: i32) -> Self330     pub const fn from_raw(x: i32) -> Self {
331         Self(x)
332     }
as_raw(self) -> i32333     pub const fn as_raw(self) -> i32 {
334         self.0
335     }
336 }
337 impl SamplerMipmapMode {
338     #[doc = "Choose nearest mip level"]
339     pub const NEAREST: Self = Self(0);
340     #[doc = "Linear filter between mip levels"]
341     pub const LINEAR: Self = Self(1);
342 }
343 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
344 #[repr(transparent)]
345 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerAddressMode.html>"]
346 pub struct SamplerAddressMode(pub(crate) i32);
347 impl SamplerAddressMode {
from_raw(x: i32) -> Self348     pub const fn from_raw(x: i32) -> Self {
349         Self(x)
350     }
as_raw(self) -> i32351     pub const fn as_raw(self) -> i32 {
352         self.0
353     }
354 }
355 impl SamplerAddressMode {
356     pub const REPEAT: Self = Self(0);
357     pub const MIRRORED_REPEAT: Self = Self(1);
358     pub const CLAMP_TO_EDGE: Self = Self(2);
359     pub const CLAMP_TO_BORDER: Self = Self(3);
360 }
361 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
362 #[repr(transparent)]
363 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCompareOp.html>"]
364 pub struct CompareOp(pub(crate) i32);
365 impl CompareOp {
from_raw(x: i32) -> Self366     pub const fn from_raw(x: i32) -> Self {
367         Self(x)
368     }
as_raw(self) -> i32369     pub const fn as_raw(self) -> i32 {
370         self.0
371     }
372 }
373 impl CompareOp {
374     pub const NEVER: Self = Self(0);
375     pub const LESS: Self = Self(1);
376     pub const EQUAL: Self = Self(2);
377     pub const LESS_OR_EQUAL: Self = Self(3);
378     pub const GREATER: Self = Self(4);
379     pub const NOT_EQUAL: Self = Self(5);
380     pub const GREATER_OR_EQUAL: Self = Self(6);
381     pub const ALWAYS: Self = Self(7);
382 }
383 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
384 #[repr(transparent)]
385 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPolygonMode.html>"]
386 pub struct PolygonMode(pub(crate) i32);
387 impl PolygonMode {
from_raw(x: i32) -> Self388     pub const fn from_raw(x: i32) -> Self {
389         Self(x)
390     }
as_raw(self) -> i32391     pub const fn as_raw(self) -> i32 {
392         self.0
393     }
394 }
395 impl PolygonMode {
396     pub const FILL: Self = Self(0);
397     pub const LINE: Self = Self(1);
398     pub const POINT: Self = Self(2);
399 }
400 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
401 #[repr(transparent)]
402 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFrontFace.html>"]
403 pub struct FrontFace(pub(crate) i32);
404 impl FrontFace {
from_raw(x: i32) -> Self405     pub const fn from_raw(x: i32) -> Self {
406         Self(x)
407     }
as_raw(self) -> i32408     pub const fn as_raw(self) -> i32 {
409         self.0
410     }
411 }
412 impl FrontFace {
413     pub const COUNTER_CLOCKWISE: Self = Self(0);
414     pub const CLOCKWISE: Self = Self(1);
415 }
416 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
417 #[repr(transparent)]
418 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBlendFactor.html>"]
419 pub struct BlendFactor(pub(crate) i32);
420 impl BlendFactor {
from_raw(x: i32) -> Self421     pub const fn from_raw(x: i32) -> Self {
422         Self(x)
423     }
as_raw(self) -> i32424     pub const fn as_raw(self) -> i32 {
425         self.0
426     }
427 }
428 impl BlendFactor {
429     pub const ZERO: Self = Self(0);
430     pub const ONE: Self = Self(1);
431     pub const SRC_COLOR: Self = Self(2);
432     pub const ONE_MINUS_SRC_COLOR: Self = Self(3);
433     pub const DST_COLOR: Self = Self(4);
434     pub const ONE_MINUS_DST_COLOR: Self = Self(5);
435     pub const SRC_ALPHA: Self = Self(6);
436     pub const ONE_MINUS_SRC_ALPHA: Self = Self(7);
437     pub const DST_ALPHA: Self = Self(8);
438     pub const ONE_MINUS_DST_ALPHA: Self = Self(9);
439     pub const CONSTANT_COLOR: Self = Self(10);
440     pub const ONE_MINUS_CONSTANT_COLOR: Self = Self(11);
441     pub const CONSTANT_ALPHA: Self = Self(12);
442     pub const ONE_MINUS_CONSTANT_ALPHA: Self = Self(13);
443     pub const SRC_ALPHA_SATURATE: Self = Self(14);
444     pub const SRC1_COLOR: Self = Self(15);
445     pub const ONE_MINUS_SRC1_COLOR: Self = Self(16);
446     pub const SRC1_ALPHA: Self = Self(17);
447     pub const ONE_MINUS_SRC1_ALPHA: Self = Self(18);
448 }
449 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
450 #[repr(transparent)]
451 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBlendOp.html>"]
452 pub struct BlendOp(pub(crate) i32);
453 impl BlendOp {
from_raw(x: i32) -> Self454     pub const fn from_raw(x: i32) -> Self {
455         Self(x)
456     }
as_raw(self) -> i32457     pub const fn as_raw(self) -> i32 {
458         self.0
459     }
460 }
461 impl BlendOp {
462     pub const ADD: Self = Self(0);
463     pub const SUBTRACT: Self = Self(1);
464     pub const REVERSE_SUBTRACT: Self = Self(2);
465     pub const MIN: Self = Self(3);
466     pub const MAX: Self = Self(4);
467 }
468 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
469 #[repr(transparent)]
470 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStencilOp.html>"]
471 pub struct StencilOp(pub(crate) i32);
472 impl StencilOp {
from_raw(x: i32) -> Self473     pub const fn from_raw(x: i32) -> Self {
474         Self(x)
475     }
as_raw(self) -> i32476     pub const fn as_raw(self) -> i32 {
477         self.0
478     }
479 }
480 impl StencilOp {
481     pub const KEEP: Self = Self(0);
482     pub const ZERO: Self = Self(1);
483     pub const REPLACE: Self = Self(2);
484     pub const INCREMENT_AND_CLAMP: Self = Self(3);
485     pub const DECREMENT_AND_CLAMP: Self = Self(4);
486     pub const INVERT: Self = Self(5);
487     pub const INCREMENT_AND_WRAP: Self = Self(6);
488     pub const DECREMENT_AND_WRAP: Self = Self(7);
489 }
490 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
491 #[repr(transparent)]
492 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkLogicOp.html>"]
493 pub struct LogicOp(pub(crate) i32);
494 impl LogicOp {
from_raw(x: i32) -> Self495     pub const fn from_raw(x: i32) -> Self {
496         Self(x)
497     }
as_raw(self) -> i32498     pub const fn as_raw(self) -> i32 {
499         self.0
500     }
501 }
502 impl LogicOp {
503     pub const CLEAR: Self = Self(0);
504     pub const AND: Self = Self(1);
505     pub const AND_REVERSE: Self = Self(2);
506     pub const COPY: Self = Self(3);
507     pub const AND_INVERTED: Self = Self(4);
508     pub const NO_OP: Self = Self(5);
509     pub const XOR: Self = Self(6);
510     pub const OR: Self = Self(7);
511     pub const NOR: Self = Self(8);
512     pub const EQUIVALENT: Self = Self(9);
513     pub const INVERT: Self = Self(10);
514     pub const OR_REVERSE: Self = Self(11);
515     pub const COPY_INVERTED: Self = Self(12);
516     pub const OR_INVERTED: Self = Self(13);
517     pub const NAND: Self = Self(14);
518     pub const SET: Self = Self(15);
519 }
520 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
521 #[repr(transparent)]
522 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkInternalAllocationType.html>"]
523 pub struct InternalAllocationType(pub(crate) i32);
524 impl InternalAllocationType {
from_raw(x: i32) -> Self525     pub const fn from_raw(x: i32) -> Self {
526         Self(x)
527     }
as_raw(self) -> i32528     pub const fn as_raw(self) -> i32 {
529         self.0
530     }
531 }
532 impl InternalAllocationType {
533     pub const EXECUTABLE: Self = Self(0);
534 }
535 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
536 #[repr(transparent)]
537 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSystemAllocationScope.html>"]
538 pub struct SystemAllocationScope(pub(crate) i32);
539 impl SystemAllocationScope {
from_raw(x: i32) -> Self540     pub const fn from_raw(x: i32) -> Self {
541         Self(x)
542     }
as_raw(self) -> i32543     pub const fn as_raw(self) -> i32 {
544         self.0
545     }
546 }
547 impl SystemAllocationScope {
548     pub const COMMAND: Self = Self(0);
549     pub const OBJECT: Self = Self(1);
550     pub const CACHE: Self = Self(2);
551     pub const DEVICE: Self = Self(3);
552     pub const INSTANCE: Self = Self(4);
553 }
554 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
555 #[repr(transparent)]
556 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceType.html>"]
557 pub struct PhysicalDeviceType(pub(crate) i32);
558 impl PhysicalDeviceType {
from_raw(x: i32) -> Self559     pub const fn from_raw(x: i32) -> Self {
560         Self(x)
561     }
as_raw(self) -> i32562     pub const fn as_raw(self) -> i32 {
563         self.0
564     }
565 }
566 impl PhysicalDeviceType {
567     pub const OTHER: Self = Self(0);
568     pub const INTEGRATED_GPU: Self = Self(1);
569     pub const DISCRETE_GPU: Self = Self(2);
570     pub const VIRTUAL_GPU: Self = Self(3);
571     pub const CPU: Self = Self(4);
572 }
573 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
574 #[repr(transparent)]
575 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVertexInputRate.html>"]
576 pub struct VertexInputRate(pub(crate) i32);
577 impl VertexInputRate {
from_raw(x: i32) -> Self578     pub const fn from_raw(x: i32) -> Self {
579         Self(x)
580     }
as_raw(self) -> i32581     pub const fn as_raw(self) -> i32 {
582         self.0
583     }
584 }
585 impl VertexInputRate {
586     pub const VERTEX: Self = Self(0);
587     pub const INSTANCE: Self = Self(1);
588 }
589 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
590 #[repr(transparent)]
591 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFormat.html>"]
592 pub struct Format(pub(crate) i32);
593 impl Format {
from_raw(x: i32) -> Self594     pub const fn from_raw(x: i32) -> Self {
595         Self(x)
596     }
as_raw(self) -> i32597     pub const fn as_raw(self) -> i32 {
598         self.0
599     }
600 }
601 impl Format {
602     pub const UNDEFINED: Self = Self(0);
603     pub const R4G4_UNORM_PACK8: Self = Self(1);
604     pub const R4G4B4A4_UNORM_PACK16: Self = Self(2);
605     pub const B4G4R4A4_UNORM_PACK16: Self = Self(3);
606     pub const R5G6B5_UNORM_PACK16: Self = Self(4);
607     pub const B5G6R5_UNORM_PACK16: Self = Self(5);
608     pub const R5G5B5A1_UNORM_PACK16: Self = Self(6);
609     pub const B5G5R5A1_UNORM_PACK16: Self = Self(7);
610     pub const A1R5G5B5_UNORM_PACK16: Self = Self(8);
611     pub const R8_UNORM: Self = Self(9);
612     pub const R8_SNORM: Self = Self(10);
613     pub const R8_USCALED: Self = Self(11);
614     pub const R8_SSCALED: Self = Self(12);
615     pub const R8_UINT: Self = Self(13);
616     pub const R8_SINT: Self = Self(14);
617     pub const R8_SRGB: Self = Self(15);
618     pub const R8G8_UNORM: Self = Self(16);
619     pub const R8G8_SNORM: Self = Self(17);
620     pub const R8G8_USCALED: Self = Self(18);
621     pub const R8G8_SSCALED: Self = Self(19);
622     pub const R8G8_UINT: Self = Self(20);
623     pub const R8G8_SINT: Self = Self(21);
624     pub const R8G8_SRGB: Self = Self(22);
625     pub const R8G8B8_UNORM: Self = Self(23);
626     pub const R8G8B8_SNORM: Self = Self(24);
627     pub const R8G8B8_USCALED: Self = Self(25);
628     pub const R8G8B8_SSCALED: Self = Self(26);
629     pub const R8G8B8_UINT: Self = Self(27);
630     pub const R8G8B8_SINT: Self = Self(28);
631     pub const R8G8B8_SRGB: Self = Self(29);
632     pub const B8G8R8_UNORM: Self = Self(30);
633     pub const B8G8R8_SNORM: Self = Self(31);
634     pub const B8G8R8_USCALED: Self = Self(32);
635     pub const B8G8R8_SSCALED: Self = Self(33);
636     pub const B8G8R8_UINT: Self = Self(34);
637     pub const B8G8R8_SINT: Self = Self(35);
638     pub const B8G8R8_SRGB: Self = Self(36);
639     pub const R8G8B8A8_UNORM: Self = Self(37);
640     pub const R8G8B8A8_SNORM: Self = Self(38);
641     pub const R8G8B8A8_USCALED: Self = Self(39);
642     pub const R8G8B8A8_SSCALED: Self = Self(40);
643     pub const R8G8B8A8_UINT: Self = Self(41);
644     pub const R8G8B8A8_SINT: Self = Self(42);
645     pub const R8G8B8A8_SRGB: Self = Self(43);
646     pub const B8G8R8A8_UNORM: Self = Self(44);
647     pub const B8G8R8A8_SNORM: Self = Self(45);
648     pub const B8G8R8A8_USCALED: Self = Self(46);
649     pub const B8G8R8A8_SSCALED: Self = Self(47);
650     pub const B8G8R8A8_UINT: Self = Self(48);
651     pub const B8G8R8A8_SINT: Self = Self(49);
652     pub const B8G8R8A8_SRGB: Self = Self(50);
653     pub const A8B8G8R8_UNORM_PACK32: Self = Self(51);
654     pub const A8B8G8R8_SNORM_PACK32: Self = Self(52);
655     pub const A8B8G8R8_USCALED_PACK32: Self = Self(53);
656     pub const A8B8G8R8_SSCALED_PACK32: Self = Self(54);
657     pub const A8B8G8R8_UINT_PACK32: Self = Self(55);
658     pub const A8B8G8R8_SINT_PACK32: Self = Self(56);
659     pub const A8B8G8R8_SRGB_PACK32: Self = Self(57);
660     pub const A2R10G10B10_UNORM_PACK32: Self = Self(58);
661     pub const A2R10G10B10_SNORM_PACK32: Self = Self(59);
662     pub const A2R10G10B10_USCALED_PACK32: Self = Self(60);
663     pub const A2R10G10B10_SSCALED_PACK32: Self = Self(61);
664     pub const A2R10G10B10_UINT_PACK32: Self = Self(62);
665     pub const A2R10G10B10_SINT_PACK32: Self = Self(63);
666     pub const A2B10G10R10_UNORM_PACK32: Self = Self(64);
667     pub const A2B10G10R10_SNORM_PACK32: Self = Self(65);
668     pub const A2B10G10R10_USCALED_PACK32: Self = Self(66);
669     pub const A2B10G10R10_SSCALED_PACK32: Self = Self(67);
670     pub const A2B10G10R10_UINT_PACK32: Self = Self(68);
671     pub const A2B10G10R10_SINT_PACK32: Self = Self(69);
672     pub const R16_UNORM: Self = Self(70);
673     pub const R16_SNORM: Self = Self(71);
674     pub const R16_USCALED: Self = Self(72);
675     pub const R16_SSCALED: Self = Self(73);
676     pub const R16_UINT: Self = Self(74);
677     pub const R16_SINT: Self = Self(75);
678     pub const R16_SFLOAT: Self = Self(76);
679     pub const R16G16_UNORM: Self = Self(77);
680     pub const R16G16_SNORM: Self = Self(78);
681     pub const R16G16_USCALED: Self = Self(79);
682     pub const R16G16_SSCALED: Self = Self(80);
683     pub const R16G16_UINT: Self = Self(81);
684     pub const R16G16_SINT: Self = Self(82);
685     pub const R16G16_SFLOAT: Self = Self(83);
686     pub const R16G16B16_UNORM: Self = Self(84);
687     pub const R16G16B16_SNORM: Self = Self(85);
688     pub const R16G16B16_USCALED: Self = Self(86);
689     pub const R16G16B16_SSCALED: Self = Self(87);
690     pub const R16G16B16_UINT: Self = Self(88);
691     pub const R16G16B16_SINT: Self = Self(89);
692     pub const R16G16B16_SFLOAT: Self = Self(90);
693     pub const R16G16B16A16_UNORM: Self = Self(91);
694     pub const R16G16B16A16_SNORM: Self = Self(92);
695     pub const R16G16B16A16_USCALED: Self = Self(93);
696     pub const R16G16B16A16_SSCALED: Self = Self(94);
697     pub const R16G16B16A16_UINT: Self = Self(95);
698     pub const R16G16B16A16_SINT: Self = Self(96);
699     pub const R16G16B16A16_SFLOAT: Self = Self(97);
700     pub const R32_UINT: Self = Self(98);
701     pub const R32_SINT: Self = Self(99);
702     pub const R32_SFLOAT: Self = Self(100);
703     pub const R32G32_UINT: Self = Self(101);
704     pub const R32G32_SINT: Self = Self(102);
705     pub const R32G32_SFLOAT: Self = Self(103);
706     pub const R32G32B32_UINT: Self = Self(104);
707     pub const R32G32B32_SINT: Self = Self(105);
708     pub const R32G32B32_SFLOAT: Self = Self(106);
709     pub const R32G32B32A32_UINT: Self = Self(107);
710     pub const R32G32B32A32_SINT: Self = Self(108);
711     pub const R32G32B32A32_SFLOAT: Self = Self(109);
712     pub const R64_UINT: Self = Self(110);
713     pub const R64_SINT: Self = Self(111);
714     pub const R64_SFLOAT: Self = Self(112);
715     pub const R64G64_UINT: Self = Self(113);
716     pub const R64G64_SINT: Self = Self(114);
717     pub const R64G64_SFLOAT: Self = Self(115);
718     pub const R64G64B64_UINT: Self = Self(116);
719     pub const R64G64B64_SINT: Self = Self(117);
720     pub const R64G64B64_SFLOAT: Self = Self(118);
721     pub const R64G64B64A64_UINT: Self = Self(119);
722     pub const R64G64B64A64_SINT: Self = Self(120);
723     pub const R64G64B64A64_SFLOAT: Self = Self(121);
724     pub const B10G11R11_UFLOAT_PACK32: Self = Self(122);
725     pub const E5B9G9R9_UFLOAT_PACK32: Self = Self(123);
726     pub const D16_UNORM: Self = Self(124);
727     pub const X8_D24_UNORM_PACK32: Self = Self(125);
728     pub const D32_SFLOAT: Self = Self(126);
729     pub const S8_UINT: Self = Self(127);
730     pub const D16_UNORM_S8_UINT: Self = Self(128);
731     pub const D24_UNORM_S8_UINT: Self = Self(129);
732     pub const D32_SFLOAT_S8_UINT: Self = Self(130);
733     pub const BC1_RGB_UNORM_BLOCK: Self = Self(131);
734     pub const BC1_RGB_SRGB_BLOCK: Self = Self(132);
735     pub const BC1_RGBA_UNORM_BLOCK: Self = Self(133);
736     pub const BC1_RGBA_SRGB_BLOCK: Self = Self(134);
737     pub const BC2_UNORM_BLOCK: Self = Self(135);
738     pub const BC2_SRGB_BLOCK: Self = Self(136);
739     pub const BC3_UNORM_BLOCK: Self = Self(137);
740     pub const BC3_SRGB_BLOCK: Self = Self(138);
741     pub const BC4_UNORM_BLOCK: Self = Self(139);
742     pub const BC4_SNORM_BLOCK: Self = Self(140);
743     pub const BC5_UNORM_BLOCK: Self = Self(141);
744     pub const BC5_SNORM_BLOCK: Self = Self(142);
745     pub const BC6H_UFLOAT_BLOCK: Self = Self(143);
746     pub const BC6H_SFLOAT_BLOCK: Self = Self(144);
747     pub const BC7_UNORM_BLOCK: Self = Self(145);
748     pub const BC7_SRGB_BLOCK: Self = Self(146);
749     pub const ETC2_R8G8B8_UNORM_BLOCK: Self = Self(147);
750     pub const ETC2_R8G8B8_SRGB_BLOCK: Self = Self(148);
751     pub const ETC2_R8G8B8A1_UNORM_BLOCK: Self = Self(149);
752     pub const ETC2_R8G8B8A1_SRGB_BLOCK: Self = Self(150);
753     pub const ETC2_R8G8B8A8_UNORM_BLOCK: Self = Self(151);
754     pub const ETC2_R8G8B8A8_SRGB_BLOCK: Self = Self(152);
755     pub const EAC_R11_UNORM_BLOCK: Self = Self(153);
756     pub const EAC_R11_SNORM_BLOCK: Self = Self(154);
757     pub const EAC_R11G11_UNORM_BLOCK: Self = Self(155);
758     pub const EAC_R11G11_SNORM_BLOCK: Self = Self(156);
759     pub const ASTC_4X4_UNORM_BLOCK: Self = Self(157);
760     pub const ASTC_4X4_SRGB_BLOCK: Self = Self(158);
761     pub const ASTC_5X4_UNORM_BLOCK: Self = Self(159);
762     pub const ASTC_5X4_SRGB_BLOCK: Self = Self(160);
763     pub const ASTC_5X5_UNORM_BLOCK: Self = Self(161);
764     pub const ASTC_5X5_SRGB_BLOCK: Self = Self(162);
765     pub const ASTC_6X5_UNORM_BLOCK: Self = Self(163);
766     pub const ASTC_6X5_SRGB_BLOCK: Self = Self(164);
767     pub const ASTC_6X6_UNORM_BLOCK: Self = Self(165);
768     pub const ASTC_6X6_SRGB_BLOCK: Self = Self(166);
769     pub const ASTC_8X5_UNORM_BLOCK: Self = Self(167);
770     pub const ASTC_8X5_SRGB_BLOCK: Self = Self(168);
771     pub const ASTC_8X6_UNORM_BLOCK: Self = Self(169);
772     pub const ASTC_8X6_SRGB_BLOCK: Self = Self(170);
773     pub const ASTC_8X8_UNORM_BLOCK: Self = Self(171);
774     pub const ASTC_8X8_SRGB_BLOCK: Self = Self(172);
775     pub const ASTC_10X5_UNORM_BLOCK: Self = Self(173);
776     pub const ASTC_10X5_SRGB_BLOCK: Self = Self(174);
777     pub const ASTC_10X6_UNORM_BLOCK: Self = Self(175);
778     pub const ASTC_10X6_SRGB_BLOCK: Self = Self(176);
779     pub const ASTC_10X8_UNORM_BLOCK: Self = Self(177);
780     pub const ASTC_10X8_SRGB_BLOCK: Self = Self(178);
781     pub const ASTC_10X10_UNORM_BLOCK: Self = Self(179);
782     pub const ASTC_10X10_SRGB_BLOCK: Self = Self(180);
783     pub const ASTC_12X10_UNORM_BLOCK: Self = Self(181);
784     pub const ASTC_12X10_SRGB_BLOCK: Self = Self(182);
785     pub const ASTC_12X12_UNORM_BLOCK: Self = Self(183);
786     pub const ASTC_12X12_SRGB_BLOCK: Self = Self(184);
787 }
788 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
789 #[repr(transparent)]
790 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkStructureType.html>"]
791 pub struct StructureType(pub(crate) i32);
792 impl StructureType {
from_raw(x: i32) -> Self793     pub const fn from_raw(x: i32) -> Self {
794         Self(x)
795     }
as_raw(self) -> i32796     pub const fn as_raw(self) -> i32 {
797         self.0
798     }
799 }
800 impl StructureType {
801     pub const APPLICATION_INFO: Self = Self(0);
802     pub const INSTANCE_CREATE_INFO: Self = Self(1);
803     pub const DEVICE_QUEUE_CREATE_INFO: Self = Self(2);
804     pub const DEVICE_CREATE_INFO: Self = Self(3);
805     pub const SUBMIT_INFO: Self = Self(4);
806     pub const MEMORY_ALLOCATE_INFO: Self = Self(5);
807     pub const MAPPED_MEMORY_RANGE: Self = Self(6);
808     pub const BIND_SPARSE_INFO: Self = Self(7);
809     pub const FENCE_CREATE_INFO: Self = Self(8);
810     pub const SEMAPHORE_CREATE_INFO: Self = Self(9);
811     pub const EVENT_CREATE_INFO: Self = Self(10);
812     pub const QUERY_POOL_CREATE_INFO: Self = Self(11);
813     pub const BUFFER_CREATE_INFO: Self = Self(12);
814     pub const BUFFER_VIEW_CREATE_INFO: Self = Self(13);
815     pub const IMAGE_CREATE_INFO: Self = Self(14);
816     pub const IMAGE_VIEW_CREATE_INFO: Self = Self(15);
817     pub const SHADER_MODULE_CREATE_INFO: Self = Self(16);
818     pub const PIPELINE_CACHE_CREATE_INFO: Self = Self(17);
819     pub const PIPELINE_SHADER_STAGE_CREATE_INFO: Self = Self(18);
820     pub const PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO: Self = Self(19);
821     pub const PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO: Self = Self(20);
822     pub const PIPELINE_TESSELLATION_STATE_CREATE_INFO: Self = Self(21);
823     pub const PIPELINE_VIEWPORT_STATE_CREATE_INFO: Self = Self(22);
824     pub const PIPELINE_RASTERIZATION_STATE_CREATE_INFO: Self = Self(23);
825     pub const PIPELINE_MULTISAMPLE_STATE_CREATE_INFO: Self = Self(24);
826     pub const PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO: Self = Self(25);
827     pub const PIPELINE_COLOR_BLEND_STATE_CREATE_INFO: Self = Self(26);
828     pub const PIPELINE_DYNAMIC_STATE_CREATE_INFO: Self = Self(27);
829     pub const GRAPHICS_PIPELINE_CREATE_INFO: Self = Self(28);
830     pub const COMPUTE_PIPELINE_CREATE_INFO: Self = Self(29);
831     pub const PIPELINE_LAYOUT_CREATE_INFO: Self = Self(30);
832     pub const SAMPLER_CREATE_INFO: Self = Self(31);
833     pub const DESCRIPTOR_SET_LAYOUT_CREATE_INFO: Self = Self(32);
834     pub const DESCRIPTOR_POOL_CREATE_INFO: Self = Self(33);
835     pub const DESCRIPTOR_SET_ALLOCATE_INFO: Self = Self(34);
836     pub const WRITE_DESCRIPTOR_SET: Self = Self(35);
837     pub const COPY_DESCRIPTOR_SET: Self = Self(36);
838     pub const FRAMEBUFFER_CREATE_INFO: Self = Self(37);
839     pub const RENDER_PASS_CREATE_INFO: Self = Self(38);
840     pub const COMMAND_POOL_CREATE_INFO: Self = Self(39);
841     pub const COMMAND_BUFFER_ALLOCATE_INFO: Self = Self(40);
842     pub const COMMAND_BUFFER_INHERITANCE_INFO: Self = Self(41);
843     pub const COMMAND_BUFFER_BEGIN_INFO: Self = Self(42);
844     pub const RENDER_PASS_BEGIN_INFO: Self = Self(43);
845     pub const BUFFER_MEMORY_BARRIER: Self = Self(44);
846     pub const IMAGE_MEMORY_BARRIER: Self = Self(45);
847     pub const MEMORY_BARRIER: Self = Self(46);
848     #[doc = "Reserved for internal use by the loader, layers, and ICDs"]
849     pub const LOADER_INSTANCE_CREATE_INFO: Self = Self(47);
850     #[doc = "Reserved for internal use by the loader, layers, and ICDs"]
851     pub const LOADER_DEVICE_CREATE_INFO: Self = Self(48);
852 }
853 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
854 #[repr(transparent)]
855 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSubpassContents.html>"]
856 pub struct SubpassContents(pub(crate) i32);
857 impl SubpassContents {
from_raw(x: i32) -> Self858     pub const fn from_raw(x: i32) -> Self {
859         Self(x)
860     }
as_raw(self) -> i32861     pub const fn as_raw(self) -> i32 {
862         self.0
863     }
864 }
865 impl SubpassContents {
866     pub const INLINE: Self = Self(0);
867     pub const SECONDARY_COMMAND_BUFFERS: Self = Self(1);
868 }
869 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
870 #[repr(transparent)]
871 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkResult.html>"]
872 #[must_use]
873 pub struct Result(pub(crate) i32);
874 impl Result {
from_raw(x: i32) -> Self875     pub const fn from_raw(x: i32) -> Self {
876         Self(x)
877     }
as_raw(self) -> i32878     pub const fn as_raw(self) -> i32 {
879         self.0
880     }
881 }
882 impl Result {
883     #[doc = "Command completed successfully"]
884     pub const SUCCESS: Self = Self(0);
885     #[doc = "A fence or query has not yet completed"]
886     pub const NOT_READY: Self = Self(1);
887     #[doc = "A wait operation has not completed in the specified time"]
888     pub const TIMEOUT: Self = Self(2);
889     #[doc = "An event is signaled"]
890     pub const EVENT_SET: Self = Self(3);
891     #[doc = "An event is unsignaled"]
892     pub const EVENT_RESET: Self = Self(4);
893     #[doc = "A return array was too small for the result"]
894     pub const INCOMPLETE: Self = Self(5);
895     #[doc = "A host memory allocation has failed"]
896     pub const ERROR_OUT_OF_HOST_MEMORY: Self = Self(-1);
897     #[doc = "A device memory allocation has failed"]
898     pub const ERROR_OUT_OF_DEVICE_MEMORY: Self = Self(-2);
899     #[doc = "Initialization of a object has failed"]
900     pub const ERROR_INITIALIZATION_FAILED: Self = Self(-3);
901     #[doc = "The logical device has been lost. See <<devsandqueues-lost-device>>"]
902     pub const ERROR_DEVICE_LOST: Self = Self(-4);
903     #[doc = "Mapping of a memory object has failed"]
904     pub const ERROR_MEMORY_MAP_FAILED: Self = Self(-5);
905     #[doc = "Layer specified does not exist"]
906     pub const ERROR_LAYER_NOT_PRESENT: Self = Self(-6);
907     #[doc = "Extension specified does not exist"]
908     pub const ERROR_EXTENSION_NOT_PRESENT: Self = Self(-7);
909     #[doc = "Requested feature is not available on this device"]
910     pub const ERROR_FEATURE_NOT_PRESENT: Self = Self(-8);
911     #[doc = "Unable to find a Vulkan driver"]
912     pub const ERROR_INCOMPATIBLE_DRIVER: Self = Self(-9);
913     #[doc = "Too many objects of the type have already been created"]
914     pub const ERROR_TOO_MANY_OBJECTS: Self = Self(-10);
915     #[doc = "Requested format is not supported on this device"]
916     pub const ERROR_FORMAT_NOT_SUPPORTED: Self = Self(-11);
917     #[doc = "A requested pool allocation has failed due to fragmentation of the pool's memory"]
918     pub const ERROR_FRAGMENTED_POOL: Self = Self(-12);
919     #[doc = "An unknown error has occurred, due to an implementation or application bug"]
920     pub const ERROR_UNKNOWN: Self = Self(-13);
921 }
922 impl ::std::error::Error for Result {}
923 impl fmt::Display for Result {
fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result924     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
925         let name = match *self {
926             Self::SUCCESS => Some("Command completed successfully"),
927             Self::NOT_READY => Some("A fence or query has not yet completed"),
928             Self::TIMEOUT => Some("A wait operation has not completed in the specified time"),
929             Self::EVENT_SET => Some("An event is signaled"),
930             Self::EVENT_RESET => Some("An event is unsignaled"),
931             Self::INCOMPLETE => Some("A return array was too small for the result"),
932             Self::ERROR_OUT_OF_HOST_MEMORY => Some("A host memory allocation has failed"),
933             Self::ERROR_OUT_OF_DEVICE_MEMORY => Some("A device memory allocation has failed"),
934             Self::ERROR_INITIALIZATION_FAILED => Some("Initialization of a object has failed"),
935             Self::ERROR_DEVICE_LOST => {
936                 Some("The logical device has been lost. See <<devsandqueues-lost-device>>")
937             }
938             Self::ERROR_MEMORY_MAP_FAILED => Some("Mapping of a memory object has failed"),
939             Self::ERROR_LAYER_NOT_PRESENT => Some("Layer specified does not exist"),
940             Self::ERROR_EXTENSION_NOT_PRESENT => Some("Extension specified does not exist"),
941             Self::ERROR_FEATURE_NOT_PRESENT => {
942                 Some("Requested feature is not available on this device")
943             }
944             Self::ERROR_INCOMPATIBLE_DRIVER => Some("Unable to find a Vulkan driver"),
945             Self::ERROR_TOO_MANY_OBJECTS => {
946                 Some("Too many objects of the type have already been created")
947             }
948             Self::ERROR_FORMAT_NOT_SUPPORTED => {
949                 Some("Requested format is not supported on this device")
950             }
951             Self::ERROR_FRAGMENTED_POOL => Some(
952                 "A requested pool allocation has failed due to fragmentation of the pool's memory",
953             ),
954             Self::ERROR_UNKNOWN => {
955                 Some("An unknown error has occurred, due to an implementation or application bug")
956             }
957             _ => None,
958         };
959         if let Some(x) = name {
960             fmt.write_str(x)
961         } else {
962             <Self as fmt::Debug>::fmt(self, fmt)
963         }
964     }
965 }
966 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
967 #[repr(transparent)]
968 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDynamicState.html>"]
969 pub struct DynamicState(pub(crate) i32);
970 impl DynamicState {
from_raw(x: i32) -> Self971     pub const fn from_raw(x: i32) -> Self {
972         Self(x)
973     }
as_raw(self) -> i32974     pub const fn as_raw(self) -> i32 {
975         self.0
976     }
977 }
978 impl DynamicState {
979     pub const VIEWPORT: Self = Self(0);
980     pub const SCISSOR: Self = Self(1);
981     pub const LINE_WIDTH: Self = Self(2);
982     pub const DEPTH_BIAS: Self = Self(3);
983     pub const BLEND_CONSTANTS: Self = Self(4);
984     pub const DEPTH_BOUNDS: Self = Self(5);
985     pub const STENCIL_COMPARE_MASK: Self = Self(6);
986     pub const STENCIL_WRITE_MASK: Self = Self(7);
987     pub const STENCIL_REFERENCE: Self = Self(8);
988 }
989 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
990 #[repr(transparent)]
991 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDescriptorUpdateTemplateType.html>"]
992 pub struct DescriptorUpdateTemplateType(pub(crate) i32);
993 impl DescriptorUpdateTemplateType {
from_raw(x: i32) -> Self994     pub const fn from_raw(x: i32) -> Self {
995         Self(x)
996     }
as_raw(self) -> i32997     pub const fn as_raw(self) -> i32 {
998         self.0
999     }
1000 }
1001 impl DescriptorUpdateTemplateType {
1002     #[doc = "Create descriptor update template for descriptor set updates"]
1003     pub const DESCRIPTOR_SET: Self = Self(0);
1004 }
1005 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1006 #[repr(transparent)]
1007 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkObjectType.html>"]
1008 pub struct ObjectType(pub(crate) i32);
1009 impl ObjectType {
from_raw(x: i32) -> Self1010     pub const fn from_raw(x: i32) -> Self {
1011         Self(x)
1012     }
as_raw(self) -> i321013     pub const fn as_raw(self) -> i32 {
1014         self.0
1015     }
1016 }
1017 impl ObjectType {
1018     pub const UNKNOWN: Self = Self(0);
1019     pub const INSTANCE: Self = Self(1);
1020     pub const PHYSICAL_DEVICE: Self = Self(2);
1021     pub const DEVICE: Self = Self(3);
1022     pub const QUEUE: Self = Self(4);
1023     pub const SEMAPHORE: Self = Self(5);
1024     pub const COMMAND_BUFFER: Self = Self(6);
1025     pub const FENCE: Self = Self(7);
1026     pub const DEVICE_MEMORY: Self = Self(8);
1027     pub const BUFFER: Self = Self(9);
1028     pub const IMAGE: Self = Self(10);
1029     pub const EVENT: Self = Self(11);
1030     pub const QUERY_POOL: Self = Self(12);
1031     pub const BUFFER_VIEW: Self = Self(13);
1032     pub const IMAGE_VIEW: Self = Self(14);
1033     pub const SHADER_MODULE: Self = Self(15);
1034     pub const PIPELINE_CACHE: Self = Self(16);
1035     pub const PIPELINE_LAYOUT: Self = Self(17);
1036     pub const RENDER_PASS: Self = Self(18);
1037     pub const PIPELINE: Self = Self(19);
1038     pub const DESCRIPTOR_SET_LAYOUT: Self = Self(20);
1039     pub const SAMPLER: Self = Self(21);
1040     pub const DESCRIPTOR_POOL: Self = Self(22);
1041     pub const DESCRIPTOR_SET: Self = Self(23);
1042     pub const FRAMEBUFFER: Self = Self(24);
1043     pub const COMMAND_POOL: Self = Self(25);
1044 }
1045 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1046 #[repr(transparent)]
1047 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSemaphoreType.html>"]
1048 pub struct SemaphoreType(pub(crate) i32);
1049 impl SemaphoreType {
from_raw(x: i32) -> Self1050     pub const fn from_raw(x: i32) -> Self {
1051         Self(x)
1052     }
as_raw(self) -> i321053     pub const fn as_raw(self) -> i32 {
1054         self.0
1055     }
1056 }
1057 impl SemaphoreType {
1058     pub const BINARY: Self = Self(0);
1059     pub const TIMELINE: Self = Self(1);
1060 }
1061 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1062 #[repr(transparent)]
1063 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPresentModeKHR.html>"]
1064 pub struct PresentModeKHR(pub(crate) i32);
1065 impl PresentModeKHR {
from_raw(x: i32) -> Self1066     pub const fn from_raw(x: i32) -> Self {
1067         Self(x)
1068     }
as_raw(self) -> i321069     pub const fn as_raw(self) -> i32 {
1070         self.0
1071     }
1072 }
1073 impl PresentModeKHR {
1074     pub const IMMEDIATE: Self = Self(0);
1075     pub const MAILBOX: Self = Self(1);
1076     pub const FIFO: Self = Self(2);
1077     pub const FIFO_RELAXED: Self = Self(3);
1078 }
1079 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1080 #[repr(transparent)]
1081 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkColorSpaceKHR.html>"]
1082 pub struct ColorSpaceKHR(pub(crate) i32);
1083 impl ColorSpaceKHR {
from_raw(x: i32) -> Self1084     pub const fn from_raw(x: i32) -> Self {
1085         Self(x)
1086     }
as_raw(self) -> i321087     pub const fn as_raw(self) -> i32 {
1088         self.0
1089     }
1090 }
1091 impl ColorSpaceKHR {
1092     pub const SRGB_NONLINEAR: Self = Self(0);
1093 }
1094 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1095 #[repr(transparent)]
1096 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkTimeDomainEXT.html>"]
1097 pub struct TimeDomainEXT(pub(crate) i32);
1098 impl TimeDomainEXT {
from_raw(x: i32) -> Self1099     pub const fn from_raw(x: i32) -> Self {
1100         Self(x)
1101     }
as_raw(self) -> i321102     pub const fn as_raw(self) -> i32 {
1103         self.0
1104     }
1105 }
1106 impl TimeDomainEXT {
1107     pub const DEVICE: Self = Self(0);
1108     pub const CLOCK_MONOTONIC: Self = Self(1);
1109     pub const CLOCK_MONOTONIC_RAW: Self = Self(2);
1110     pub const QUERY_PERFORMANCE_COUNTER: Self = Self(3);
1111 }
1112 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1113 #[repr(transparent)]
1114 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDebugReportObjectTypeEXT.html>"]
1115 pub struct DebugReportObjectTypeEXT(pub(crate) i32);
1116 impl DebugReportObjectTypeEXT {
from_raw(x: i32) -> Self1117     pub const fn from_raw(x: i32) -> Self {
1118         Self(x)
1119     }
as_raw(self) -> i321120     pub const fn as_raw(self) -> i32 {
1121         self.0
1122     }
1123 }
1124 impl DebugReportObjectTypeEXT {
1125     pub const UNKNOWN: Self = Self(0);
1126     pub const INSTANCE: Self = Self(1);
1127     pub const PHYSICAL_DEVICE: Self = Self(2);
1128     pub const DEVICE: Self = Self(3);
1129     pub const QUEUE: Self = Self(4);
1130     pub const SEMAPHORE: Self = Self(5);
1131     pub const COMMAND_BUFFER: Self = Self(6);
1132     pub const FENCE: Self = Self(7);
1133     pub const DEVICE_MEMORY: Self = Self(8);
1134     pub const BUFFER: Self = Self(9);
1135     pub const IMAGE: Self = Self(10);
1136     pub const EVENT: Self = Self(11);
1137     pub const QUERY_POOL: Self = Self(12);
1138     pub const BUFFER_VIEW: Self = Self(13);
1139     pub const IMAGE_VIEW: Self = Self(14);
1140     pub const SHADER_MODULE: Self = Self(15);
1141     pub const PIPELINE_CACHE: Self = Self(16);
1142     pub const PIPELINE_LAYOUT: Self = Self(17);
1143     pub const RENDER_PASS: Self = Self(18);
1144     pub const PIPELINE: Self = Self(19);
1145     pub const DESCRIPTOR_SET_LAYOUT: Self = Self(20);
1146     pub const SAMPLER: Self = Self(21);
1147     pub const DESCRIPTOR_POOL: Self = Self(22);
1148     pub const DESCRIPTOR_SET: Self = Self(23);
1149     pub const FRAMEBUFFER: Self = Self(24);
1150     pub const COMMAND_POOL: Self = Self(25);
1151     pub const SURFACE_KHR: Self = Self(26);
1152     pub const SWAPCHAIN_KHR: Self = Self(27);
1153     pub const DEBUG_REPORT_CALLBACK_EXT: Self = Self(28);
1154     pub const DISPLAY_KHR: Self = Self(29);
1155     pub const DISPLAY_MODE_KHR: Self = Self(30);
1156     pub const VALIDATION_CACHE_EXT: Self = Self(33);
1157 }
1158 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1159 #[repr(transparent)]
1160 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceMemoryReportEventTypeEXT.html>"]
1161 pub struct DeviceMemoryReportEventTypeEXT(pub(crate) i32);
1162 impl DeviceMemoryReportEventTypeEXT {
from_raw(x: i32) -> Self1163     pub const fn from_raw(x: i32) -> Self {
1164         Self(x)
1165     }
as_raw(self) -> i321166     pub const fn as_raw(self) -> i32 {
1167         self.0
1168     }
1169 }
1170 impl DeviceMemoryReportEventTypeEXT {
1171     pub const ALLOCATE: Self = Self(0);
1172     pub const FREE: Self = Self(1);
1173     pub const IMPORT: Self = Self(2);
1174     pub const UNIMPORT: Self = Self(3);
1175     pub const ALLOCATION_FAILED: Self = Self(4);
1176 }
1177 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1178 #[repr(transparent)]
1179 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRasterizationOrderAMD.html>"]
1180 pub struct RasterizationOrderAMD(pub(crate) i32);
1181 impl RasterizationOrderAMD {
from_raw(x: i32) -> Self1182     pub const fn from_raw(x: i32) -> Self {
1183         Self(x)
1184     }
as_raw(self) -> i321185     pub const fn as_raw(self) -> i32 {
1186         self.0
1187     }
1188 }
1189 impl RasterizationOrderAMD {
1190     pub const STRICT: Self = Self(0);
1191     pub const RELAXED: Self = Self(1);
1192 }
1193 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1194 #[repr(transparent)]
1195 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCheckEXT.html>"]
1196 pub struct ValidationCheckEXT(pub(crate) i32);
1197 impl ValidationCheckEXT {
from_raw(x: i32) -> Self1198     pub const fn from_raw(x: i32) -> Self {
1199         Self(x)
1200     }
as_raw(self) -> i321201     pub const fn as_raw(self) -> i32 {
1202         self.0
1203     }
1204 }
1205 impl ValidationCheckEXT {
1206     pub const ALL: Self = Self(0);
1207     pub const SHADERS: Self = Self(1);
1208 }
1209 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1210 #[repr(transparent)]
1211 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationFeatureEnableEXT.html>"]
1212 pub struct ValidationFeatureEnableEXT(pub(crate) i32);
1213 impl ValidationFeatureEnableEXT {
from_raw(x: i32) -> Self1214     pub const fn from_raw(x: i32) -> Self {
1215         Self(x)
1216     }
as_raw(self) -> i321217     pub const fn as_raw(self) -> i32 {
1218         self.0
1219     }
1220 }
1221 impl ValidationFeatureEnableEXT {
1222     pub const GPU_ASSISTED: Self = Self(0);
1223     pub const GPU_ASSISTED_RESERVE_BINDING_SLOT: Self = Self(1);
1224     pub const BEST_PRACTICES: Self = Self(2);
1225     pub const DEBUG_PRINTF: Self = Self(3);
1226     pub const SYNCHRONIZATION_VALIDATION: Self = Self(4);
1227 }
1228 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1229 #[repr(transparent)]
1230 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationFeatureDisableEXT.html>"]
1231 pub struct ValidationFeatureDisableEXT(pub(crate) i32);
1232 impl ValidationFeatureDisableEXT {
from_raw(x: i32) -> Self1233     pub const fn from_raw(x: i32) -> Self {
1234         Self(x)
1235     }
as_raw(self) -> i321236     pub const fn as_raw(self) -> i32 {
1237         self.0
1238     }
1239 }
1240 impl ValidationFeatureDisableEXT {
1241     pub const ALL: Self = Self(0);
1242     pub const SHADERS: Self = Self(1);
1243     pub const THREAD_SAFETY: Self = Self(2);
1244     pub const API_PARAMETERS: Self = Self(3);
1245     pub const OBJECT_LIFETIMES: Self = Self(4);
1246     pub const CORE_CHECKS: Self = Self(5);
1247     pub const UNIQUE_HANDLES: Self = Self(6);
1248     pub const SHADER_VALIDATION_CACHE: Self = Self(7);
1249 }
1250 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1251 #[repr(transparent)]
1252 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkIndirectCommandsTokenTypeNV.html>"]
1253 pub struct IndirectCommandsTokenTypeNV(pub(crate) i32);
1254 impl IndirectCommandsTokenTypeNV {
from_raw(x: i32) -> Self1255     pub const fn from_raw(x: i32) -> Self {
1256         Self(x)
1257     }
as_raw(self) -> i321258     pub const fn as_raw(self) -> i32 {
1259         self.0
1260     }
1261 }
1262 impl IndirectCommandsTokenTypeNV {
1263     pub const SHADER_GROUP: Self = Self(0);
1264     pub const STATE_FLAGS: Self = Self(1);
1265     pub const INDEX_BUFFER: Self = Self(2);
1266     pub const VERTEX_BUFFER: Self = Self(3);
1267     pub const PUSH_CONSTANT: Self = Self(4);
1268     pub const DRAW_INDEXED: Self = Self(5);
1269     pub const DRAW: Self = Self(6);
1270     pub const DRAW_TASKS: Self = Self(7);
1271 }
1272 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1273 #[repr(transparent)]
1274 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayPowerStateEXT.html>"]
1275 pub struct DisplayPowerStateEXT(pub(crate) i32);
1276 impl DisplayPowerStateEXT {
from_raw(x: i32) -> Self1277     pub const fn from_raw(x: i32) -> Self {
1278         Self(x)
1279     }
as_raw(self) -> i321280     pub const fn as_raw(self) -> i32 {
1281         self.0
1282     }
1283 }
1284 impl DisplayPowerStateEXT {
1285     pub const OFF: Self = Self(0);
1286     pub const SUSPEND: Self = Self(1);
1287     pub const ON: Self = Self(2);
1288 }
1289 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1290 #[repr(transparent)]
1291 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDeviceEventTypeEXT.html>"]
1292 pub struct DeviceEventTypeEXT(pub(crate) i32);
1293 impl DeviceEventTypeEXT {
from_raw(x: i32) -> Self1294     pub const fn from_raw(x: i32) -> Self {
1295         Self(x)
1296     }
as_raw(self) -> i321297     pub const fn as_raw(self) -> i32 {
1298         self.0
1299     }
1300 }
1301 impl DeviceEventTypeEXT {
1302     pub const DISPLAY_HOTPLUG: Self = Self(0);
1303 }
1304 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1305 #[repr(transparent)]
1306 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDisplayEventTypeEXT.html>"]
1307 pub struct DisplayEventTypeEXT(pub(crate) i32);
1308 impl DisplayEventTypeEXT {
from_raw(x: i32) -> Self1309     pub const fn from_raw(x: i32) -> Self {
1310         Self(x)
1311     }
as_raw(self) -> i321312     pub const fn as_raw(self) -> i32 {
1313         self.0
1314     }
1315 }
1316 impl DisplayEventTypeEXT {
1317     pub const FIRST_PIXEL_OUT: Self = Self(0);
1318 }
1319 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1320 #[repr(transparent)]
1321 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkViewportCoordinateSwizzleNV.html>"]
1322 pub struct ViewportCoordinateSwizzleNV(pub(crate) i32);
1323 impl ViewportCoordinateSwizzleNV {
from_raw(x: i32) -> Self1324     pub const fn from_raw(x: i32) -> Self {
1325         Self(x)
1326     }
as_raw(self) -> i321327     pub const fn as_raw(self) -> i32 {
1328         self.0
1329     }
1330 }
1331 impl ViewportCoordinateSwizzleNV {
1332     pub const POSITIVE_X: Self = Self(0);
1333     pub const NEGATIVE_X: Self = Self(1);
1334     pub const POSITIVE_Y: Self = Self(2);
1335     pub const NEGATIVE_Y: Self = Self(3);
1336     pub const POSITIVE_Z: Self = Self(4);
1337     pub const NEGATIVE_Z: Self = Self(5);
1338     pub const POSITIVE_W: Self = Self(6);
1339     pub const NEGATIVE_W: Self = Self(7);
1340 }
1341 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1342 #[repr(transparent)]
1343 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDiscardRectangleModeEXT.html>"]
1344 pub struct DiscardRectangleModeEXT(pub(crate) i32);
1345 impl DiscardRectangleModeEXT {
from_raw(x: i32) -> Self1346     pub const fn from_raw(x: i32) -> Self {
1347         Self(x)
1348     }
as_raw(self) -> i321349     pub const fn as_raw(self) -> i32 {
1350         self.0
1351     }
1352 }
1353 impl DiscardRectangleModeEXT {
1354     pub const INCLUSIVE: Self = Self(0);
1355     pub const EXCLUSIVE: Self = Self(1);
1356 }
1357 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1358 #[repr(transparent)]
1359 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPointClippingBehavior.html>"]
1360 pub struct PointClippingBehavior(pub(crate) i32);
1361 impl PointClippingBehavior {
from_raw(x: i32) -> Self1362     pub const fn from_raw(x: i32) -> Self {
1363         Self(x)
1364     }
as_raw(self) -> i321365     pub const fn as_raw(self) -> i32 {
1366         self.0
1367     }
1368 }
1369 impl PointClippingBehavior {
1370     pub const ALL_CLIP_PLANES: Self = Self(0);
1371     pub const USER_CLIP_PLANES_ONLY: Self = Self(1);
1372 }
1373 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1374 #[repr(transparent)]
1375 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerReductionMode.html>"]
1376 pub struct SamplerReductionMode(pub(crate) i32);
1377 impl SamplerReductionMode {
from_raw(x: i32) -> Self1378     pub const fn from_raw(x: i32) -> Self {
1379         Self(x)
1380     }
as_raw(self) -> i321381     pub const fn as_raw(self) -> i32 {
1382         self.0
1383     }
1384 }
1385 impl SamplerReductionMode {
1386     pub const WEIGHTED_AVERAGE: Self = Self(0);
1387     pub const MIN: Self = Self(1);
1388     pub const MAX: Self = Self(2);
1389 }
1390 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1391 #[repr(transparent)]
1392 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkTessellationDomainOrigin.html>"]
1393 pub struct TessellationDomainOrigin(pub(crate) i32);
1394 impl TessellationDomainOrigin {
from_raw(x: i32) -> Self1395     pub const fn from_raw(x: i32) -> Self {
1396         Self(x)
1397     }
as_raw(self) -> i321398     pub const fn as_raw(self) -> i32 {
1399         self.0
1400     }
1401 }
1402 impl TessellationDomainOrigin {
1403     pub const UPPER_LEFT: Self = Self(0);
1404     pub const LOWER_LEFT: Self = Self(1);
1405 }
1406 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1407 #[repr(transparent)]
1408 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerYcbcrModelConversion.html>"]
1409 pub struct SamplerYcbcrModelConversion(pub(crate) i32);
1410 impl SamplerYcbcrModelConversion {
from_raw(x: i32) -> Self1411     pub const fn from_raw(x: i32) -> Self {
1412         Self(x)
1413     }
as_raw(self) -> i321414     pub const fn as_raw(self) -> i32 {
1415         self.0
1416     }
1417 }
1418 impl SamplerYcbcrModelConversion {
1419     pub const RGB_IDENTITY: Self = Self(0);
1420     #[doc = "just range expansion"]
1421     pub const YCBCR_IDENTITY: Self = Self(1);
1422     #[doc = "aka HD YUV"]
1423     pub const YCBCR_709: Self = Self(2);
1424     #[doc = "aka SD YUV"]
1425     pub const YCBCR_601: Self = Self(3);
1426     #[doc = "aka UHD YUV"]
1427     pub const YCBCR_2020: Self = Self(4);
1428 }
1429 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1430 #[repr(transparent)]
1431 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerYcbcrRange.html>"]
1432 pub struct SamplerYcbcrRange(pub(crate) i32);
1433 impl SamplerYcbcrRange {
from_raw(x: i32) -> Self1434     pub const fn from_raw(x: i32) -> Self {
1435         Self(x)
1436     }
as_raw(self) -> i321437     pub const fn as_raw(self) -> i32 {
1438         self.0
1439     }
1440 }
1441 impl SamplerYcbcrRange {
1442     #[doc = "Luma 0..1 maps to 0..255, chroma -0.5..0.5 to 1..255 (clamped)"]
1443     pub const ITU_FULL: Self = Self(0);
1444     #[doc = "Luma 0..1 maps to 16..235, chroma -0.5..0.5 to 16..240"]
1445     pub const ITU_NARROW: Self = Self(1);
1446 }
1447 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1448 #[repr(transparent)]
1449 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkChromaLocation.html>"]
1450 pub struct ChromaLocation(pub(crate) i32);
1451 impl ChromaLocation {
from_raw(x: i32) -> Self1452     pub const fn from_raw(x: i32) -> Self {
1453         Self(x)
1454     }
as_raw(self) -> i321455     pub const fn as_raw(self) -> i32 {
1456         self.0
1457     }
1458 }
1459 impl ChromaLocation {
1460     pub const COSITED_EVEN: Self = Self(0);
1461     pub const MIDPOINT: Self = Self(1);
1462 }
1463 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1464 #[repr(transparent)]
1465 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBlendOverlapEXT.html>"]
1466 pub struct BlendOverlapEXT(pub(crate) i32);
1467 impl BlendOverlapEXT {
from_raw(x: i32) -> Self1468     pub const fn from_raw(x: i32) -> Self {
1469         Self(x)
1470     }
as_raw(self) -> i321471     pub const fn as_raw(self) -> i32 {
1472         self.0
1473     }
1474 }
1475 impl BlendOverlapEXT {
1476     pub const UNCORRELATED: Self = Self(0);
1477     pub const DISJOINT: Self = Self(1);
1478     pub const CONJOINT: Self = Self(2);
1479 }
1480 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1481 #[repr(transparent)]
1482 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCoverageModulationModeNV.html>"]
1483 pub struct CoverageModulationModeNV(pub(crate) i32);
1484 impl CoverageModulationModeNV {
from_raw(x: i32) -> Self1485     pub const fn from_raw(x: i32) -> Self {
1486         Self(x)
1487     }
as_raw(self) -> i321488     pub const fn as_raw(self) -> i32 {
1489         self.0
1490     }
1491 }
1492 impl CoverageModulationModeNV {
1493     pub const NONE: Self = Self(0);
1494     pub const RGB: Self = Self(1);
1495     pub const ALPHA: Self = Self(2);
1496     pub const RGBA: Self = Self(3);
1497 }
1498 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1499 #[repr(transparent)]
1500 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCoverageReductionModeNV.html>"]
1501 pub struct CoverageReductionModeNV(pub(crate) i32);
1502 impl CoverageReductionModeNV {
from_raw(x: i32) -> Self1503     pub const fn from_raw(x: i32) -> Self {
1504         Self(x)
1505     }
as_raw(self) -> i321506     pub const fn as_raw(self) -> i32 {
1507         self.0
1508     }
1509 }
1510 impl CoverageReductionModeNV {
1511     pub const MERGE: Self = Self(0);
1512     pub const TRUNCATE: Self = Self(1);
1513 }
1514 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1515 #[repr(transparent)]
1516 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkValidationCacheHeaderVersionEXT.html>"]
1517 pub struct ValidationCacheHeaderVersionEXT(pub(crate) i32);
1518 impl ValidationCacheHeaderVersionEXT {
from_raw(x: i32) -> Self1519     pub const fn from_raw(x: i32) -> Self {
1520         Self(x)
1521     }
as_raw(self) -> i321522     pub const fn as_raw(self) -> i32 {
1523         self.0
1524     }
1525 }
1526 impl ValidationCacheHeaderVersionEXT {
1527     pub const ONE: Self = Self(1);
1528 }
1529 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1530 #[repr(transparent)]
1531 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderInfoTypeAMD.html>"]
1532 pub struct ShaderInfoTypeAMD(pub(crate) i32);
1533 impl ShaderInfoTypeAMD {
from_raw(x: i32) -> Self1534     pub const fn from_raw(x: i32) -> Self {
1535         Self(x)
1536     }
as_raw(self) -> i321537     pub const fn as_raw(self) -> i32 {
1538         self.0
1539     }
1540 }
1541 impl ShaderInfoTypeAMD {
1542     pub const STATISTICS: Self = Self(0);
1543     pub const BINARY: Self = Self(1);
1544     pub const DISASSEMBLY: Self = Self(2);
1545 }
1546 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1547 #[repr(transparent)]
1548 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueueGlobalPriorityEXT.html>"]
1549 pub struct QueueGlobalPriorityEXT(pub(crate) i32);
1550 impl QueueGlobalPriorityEXT {
from_raw(x: i32) -> Self1551     pub const fn from_raw(x: i32) -> Self {
1552         Self(x)
1553     }
as_raw(self) -> i321554     pub const fn as_raw(self) -> i32 {
1555         self.0
1556     }
1557 }
1558 impl QueueGlobalPriorityEXT {
1559     pub const LOW: Self = Self(128);
1560     pub const MEDIUM: Self = Self(256);
1561     pub const HIGH: Self = Self(512);
1562     pub const REALTIME: Self = Self(1_024);
1563 }
1564 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1565 #[repr(transparent)]
1566 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkConservativeRasterizationModeEXT.html>"]
1567 pub struct ConservativeRasterizationModeEXT(pub(crate) i32);
1568 impl ConservativeRasterizationModeEXT {
from_raw(x: i32) -> Self1569     pub const fn from_raw(x: i32) -> Self {
1570         Self(x)
1571     }
as_raw(self) -> i321572     pub const fn as_raw(self) -> i32 {
1573         self.0
1574     }
1575 }
1576 impl ConservativeRasterizationModeEXT {
1577     pub const DISABLED: Self = Self(0);
1578     pub const OVERESTIMATE: Self = Self(1);
1579     pub const UNDERESTIMATE: Self = Self(2);
1580 }
1581 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1582 #[repr(transparent)]
1583 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkVendorId.html>"]
1584 pub struct VendorId(pub(crate) i32);
1585 impl VendorId {
from_raw(x: i32) -> Self1586     pub const fn from_raw(x: i32) -> Self {
1587         Self(x)
1588     }
as_raw(self) -> i321589     pub const fn as_raw(self) -> i32 {
1590         self.0
1591     }
1592 }
1593 impl VendorId {
1594     #[doc = "Vivante vendor ID"]
1595     pub const VIV: Self = Self(0x1_0001);
1596     #[doc = "VeriSilicon vendor ID"]
1597     pub const VSI: Self = Self(0x1_0002);
1598     #[doc = "Kazan Software Renderer"]
1599     pub const KAZAN: Self = Self(0x1_0003);
1600     #[doc = "Codeplay Software Ltd. vendor ID"]
1601     pub const CODEPLAY: Self = Self(0x1_0004);
1602     #[doc = "Mesa vendor ID"]
1603     pub const MESA: Self = Self(0x1_0005);
1604     #[doc = "PoCL vendor ID"]
1605     pub const POCL: Self = Self(0x1_0006);
1606 }
1607 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1608 #[repr(transparent)]
1609 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDriverId.html>"]
1610 pub struct DriverId(pub(crate) i32);
1611 impl DriverId {
from_raw(x: i32) -> Self1612     pub const fn from_raw(x: i32) -> Self {
1613         Self(x)
1614     }
as_raw(self) -> i321615     pub const fn as_raw(self) -> i32 {
1616         self.0
1617     }
1618 }
1619 impl DriverId {
1620     #[doc = "Advanced Micro Devices, Inc."]
1621     pub const AMD_PROPRIETARY: Self = Self(1);
1622     #[doc = "Advanced Micro Devices, Inc."]
1623     pub const AMD_OPEN_SOURCE: Self = Self(2);
1624     #[doc = "Mesa open source project"]
1625     pub const MESA_RADV: Self = Self(3);
1626     #[doc = "NVIDIA Corporation"]
1627     pub const NVIDIA_PROPRIETARY: Self = Self(4);
1628     #[doc = "Intel Corporation"]
1629     pub const INTEL_PROPRIETARY_WINDOWS: Self = Self(5);
1630     #[doc = "Intel Corporation"]
1631     pub const INTEL_OPEN_SOURCE_MESA: Self = Self(6);
1632     #[doc = "Imagination Technologies"]
1633     pub const IMAGINATION_PROPRIETARY: Self = Self(7);
1634     #[doc = "Qualcomm Technologies, Inc."]
1635     pub const QUALCOMM_PROPRIETARY: Self = Self(8);
1636     #[doc = "Arm Limited"]
1637     pub const ARM_PROPRIETARY: Self = Self(9);
1638     #[doc = "Google LLC"]
1639     pub const GOOGLE_SWIFTSHADER: Self = Self(10);
1640     #[doc = "Google LLC"]
1641     pub const GGP_PROPRIETARY: Self = Self(11);
1642     #[doc = "Broadcom Inc."]
1643     pub const BROADCOM_PROPRIETARY: Self = Self(12);
1644     #[doc = "Mesa"]
1645     pub const MESA_LLVMPIPE: Self = Self(13);
1646     #[doc = "MoltenVK"]
1647     pub const MOLTENVK: Self = Self(14);
1648     #[doc = "Core Avionics & Industrial Inc."]
1649     pub const COREAVI_PROPRIETARY: Self = Self(15);
1650     #[doc = "Juice Technologies, Inc."]
1651     pub const JUICE_PROPRIETARY: Self = Self(16);
1652     #[doc = "Verisilicon, Inc."]
1653     pub const VERISILICON_PROPRIETARY: Self = Self(17);
1654     #[doc = "Mesa open source project"]
1655     pub const MESA_TURNIP: Self = Self(18);
1656     #[doc = "Mesa open source project"]
1657     pub const MESA_V3DV: Self = Self(19);
1658     #[doc = "Mesa open source project"]
1659     pub const MESA_PANVK: Self = Self(20);
1660     #[doc = "Samsung Electronics Co., Ltd."]
1661     pub const SAMSUNG_PROPRIETARY: Self = Self(21);
1662 }
1663 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1664 #[repr(transparent)]
1665 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShadingRatePaletteEntryNV.html>"]
1666 pub struct ShadingRatePaletteEntryNV(pub(crate) i32);
1667 impl ShadingRatePaletteEntryNV {
from_raw(x: i32) -> Self1668     pub const fn from_raw(x: i32) -> Self {
1669         Self(x)
1670     }
as_raw(self) -> i321671     pub const fn as_raw(self) -> i32 {
1672         self.0
1673     }
1674 }
1675 impl ShadingRatePaletteEntryNV {
1676     pub const NO_INVOCATIONS: Self = Self(0);
1677     pub const TYPE_16_INVOCATIONS_PER_PIXEL: Self = Self(1);
1678     pub const TYPE_8_INVOCATIONS_PER_PIXEL: Self = Self(2);
1679     pub const TYPE_4_INVOCATIONS_PER_PIXEL: Self = Self(3);
1680     pub const TYPE_2_INVOCATIONS_PER_PIXEL: Self = Self(4);
1681     pub const TYPE_1_INVOCATION_PER_PIXEL: Self = Self(5);
1682     pub const TYPE_1_INVOCATION_PER_2X1_PIXELS: Self = Self(6);
1683     pub const TYPE_1_INVOCATION_PER_1X2_PIXELS: Self = Self(7);
1684     pub const TYPE_1_INVOCATION_PER_2X2_PIXELS: Self = Self(8);
1685     pub const TYPE_1_INVOCATION_PER_4X2_PIXELS: Self = Self(9);
1686     pub const TYPE_1_INVOCATION_PER_2X4_PIXELS: Self = Self(10);
1687     pub const TYPE_1_INVOCATION_PER_4X4_PIXELS: Self = Self(11);
1688 }
1689 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1690 #[repr(transparent)]
1691 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCoarseSampleOrderTypeNV.html>"]
1692 pub struct CoarseSampleOrderTypeNV(pub(crate) i32);
1693 impl CoarseSampleOrderTypeNV {
from_raw(x: i32) -> Self1694     pub const fn from_raw(x: i32) -> Self {
1695         Self(x)
1696     }
as_raw(self) -> i321697     pub const fn as_raw(self) -> i32 {
1698         self.0
1699     }
1700 }
1701 impl CoarseSampleOrderTypeNV {
1702     pub const DEFAULT: Self = Self(0);
1703     pub const CUSTOM: Self = Self(1);
1704     pub const PIXEL_MAJOR: Self = Self(2);
1705     pub const SAMPLE_MAJOR: Self = Self(3);
1706 }
1707 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1708 #[repr(transparent)]
1709 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCopyAccelerationStructureModeKHR.html>"]
1710 pub struct CopyAccelerationStructureModeKHR(pub(crate) i32);
1711 impl CopyAccelerationStructureModeKHR {
from_raw(x: i32) -> Self1712     pub const fn from_raw(x: i32) -> Self {
1713         Self(x)
1714     }
as_raw(self) -> i321715     pub const fn as_raw(self) -> i32 {
1716         self.0
1717     }
1718 }
1719 impl CopyAccelerationStructureModeKHR {
1720     pub const CLONE: Self = Self(0);
1721     pub const COMPACT: Self = Self(1);
1722     pub const SERIALIZE: Self = Self(2);
1723     pub const DESERIALIZE: Self = Self(3);
1724 }
1725 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1726 #[repr(transparent)]
1727 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkBuildAccelerationStructureModeKHR.html>"]
1728 pub struct BuildAccelerationStructureModeKHR(pub(crate) i32);
1729 impl BuildAccelerationStructureModeKHR {
from_raw(x: i32) -> Self1730     pub const fn from_raw(x: i32) -> Self {
1731         Self(x)
1732     }
as_raw(self) -> i321733     pub const fn as_raw(self) -> i32 {
1734         self.0
1735     }
1736 }
1737 impl BuildAccelerationStructureModeKHR {
1738     pub const BUILD: Self = Self(0);
1739     pub const UPDATE: Self = Self(1);
1740 }
1741 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1742 #[repr(transparent)]
1743 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureTypeKHR.html>"]
1744 pub struct AccelerationStructureTypeKHR(pub(crate) i32);
1745 impl AccelerationStructureTypeKHR {
from_raw(x: i32) -> Self1746     pub const fn from_raw(x: i32) -> Self {
1747         Self(x)
1748     }
as_raw(self) -> i321749     pub const fn as_raw(self) -> i32 {
1750         self.0
1751     }
1752 }
1753 impl AccelerationStructureTypeKHR {
1754     pub const TOP_LEVEL: Self = Self(0);
1755     pub const BOTTOM_LEVEL: Self = Self(1);
1756     pub const GENERIC: Self = Self(2);
1757 }
1758 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1759 #[repr(transparent)]
1760 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkGeometryTypeKHR.html>"]
1761 pub struct GeometryTypeKHR(pub(crate) i32);
1762 impl GeometryTypeKHR {
from_raw(x: i32) -> Self1763     pub const fn from_raw(x: i32) -> Self {
1764         Self(x)
1765     }
as_raw(self) -> i321766     pub const fn as_raw(self) -> i32 {
1767         self.0
1768     }
1769 }
1770 impl GeometryTypeKHR {
1771     pub const TRIANGLES: Self = Self(0);
1772     pub const AABBS: Self = Self(1);
1773     pub const INSTANCES: Self = Self(2);
1774 }
1775 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1776 #[repr(transparent)]
1777 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureMemoryRequirementsTypeNV.html>"]
1778 pub struct AccelerationStructureMemoryRequirementsTypeNV(pub(crate) i32);
1779 impl AccelerationStructureMemoryRequirementsTypeNV {
from_raw(x: i32) -> Self1780     pub const fn from_raw(x: i32) -> Self {
1781         Self(x)
1782     }
as_raw(self) -> i321783     pub const fn as_raw(self) -> i32 {
1784         self.0
1785     }
1786 }
1787 impl AccelerationStructureMemoryRequirementsTypeNV {
1788     pub const OBJECT: Self = Self(0);
1789     pub const BUILD_SCRATCH: Self = Self(1);
1790     pub const UPDATE_SCRATCH: Self = Self(2);
1791 }
1792 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1793 #[repr(transparent)]
1794 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureBuildTypeKHR.html>"]
1795 pub struct AccelerationStructureBuildTypeKHR(pub(crate) i32);
1796 impl AccelerationStructureBuildTypeKHR {
from_raw(x: i32) -> Self1797     pub const fn from_raw(x: i32) -> Self {
1798         Self(x)
1799     }
as_raw(self) -> i321800     pub const fn as_raw(self) -> i32 {
1801         self.0
1802     }
1803 }
1804 impl AccelerationStructureBuildTypeKHR {
1805     pub const HOST: Self = Self(0);
1806     pub const DEVICE: Self = Self(1);
1807     pub const HOST_OR_DEVICE: Self = Self(2);
1808 }
1809 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1810 #[repr(transparent)]
1811 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkRayTracingShaderGroupTypeKHR.html>"]
1812 pub struct RayTracingShaderGroupTypeKHR(pub(crate) i32);
1813 impl RayTracingShaderGroupTypeKHR {
from_raw(x: i32) -> Self1814     pub const fn from_raw(x: i32) -> Self {
1815         Self(x)
1816     }
as_raw(self) -> i321817     pub const fn as_raw(self) -> i32 {
1818         self.0
1819     }
1820 }
1821 impl RayTracingShaderGroupTypeKHR {
1822     pub const GENERAL: Self = Self(0);
1823     pub const TRIANGLES_HIT_GROUP: Self = Self(1);
1824     pub const PROCEDURAL_HIT_GROUP: Self = Self(2);
1825 }
1826 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1827 #[repr(transparent)]
1828 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureCompatibilityKHR.html>"]
1829 pub struct AccelerationStructureCompatibilityKHR(pub(crate) i32);
1830 impl AccelerationStructureCompatibilityKHR {
from_raw(x: i32) -> Self1831     pub const fn from_raw(x: i32) -> Self {
1832         Self(x)
1833     }
as_raw(self) -> i321834     pub const fn as_raw(self) -> i32 {
1835         self.0
1836     }
1837 }
1838 impl AccelerationStructureCompatibilityKHR {
1839     pub const COMPATIBLE: Self = Self(0);
1840     pub const INCOMPATIBLE: Self = Self(1);
1841 }
1842 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1843 #[repr(transparent)]
1844 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderGroupShaderKHR.html>"]
1845 pub struct ShaderGroupShaderKHR(pub(crate) i32);
1846 impl ShaderGroupShaderKHR {
from_raw(x: i32) -> Self1847     pub const fn from_raw(x: i32) -> Self {
1848         Self(x)
1849     }
as_raw(self) -> i321850     pub const fn as_raw(self) -> i32 {
1851         self.0
1852     }
1853 }
1854 impl ShaderGroupShaderKHR {
1855     pub const GENERAL: Self = Self(0);
1856     pub const CLOSEST_HIT: Self = Self(1);
1857     pub const ANY_HIT: Self = Self(2);
1858     pub const INTERSECTION: Self = Self(3);
1859 }
1860 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1861 #[repr(transparent)]
1862 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryOverallocationBehaviorAMD.html>"]
1863 pub struct MemoryOverallocationBehaviorAMD(pub(crate) i32);
1864 impl MemoryOverallocationBehaviorAMD {
from_raw(x: i32) -> Self1865     pub const fn from_raw(x: i32) -> Self {
1866         Self(x)
1867     }
as_raw(self) -> i321868     pub const fn as_raw(self) -> i32 {
1869         self.0
1870     }
1871 }
1872 impl MemoryOverallocationBehaviorAMD {
1873     pub const DEFAULT: Self = Self(0);
1874     pub const ALLOWED: Self = Self(1);
1875     pub const DISALLOWED: Self = Self(2);
1876 }
1877 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1878 #[repr(transparent)]
1879 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkScopeNV.html>"]
1880 pub struct ScopeNV(pub(crate) i32);
1881 impl ScopeNV {
from_raw(x: i32) -> Self1882     pub const fn from_raw(x: i32) -> Self {
1883         Self(x)
1884     }
as_raw(self) -> i321885     pub const fn as_raw(self) -> i32 {
1886         self.0
1887     }
1888 }
1889 impl ScopeNV {
1890     pub const DEVICE: Self = Self(1);
1891     pub const WORKGROUP: Self = Self(2);
1892     pub const SUBGROUP: Self = Self(3);
1893     pub const QUEUE_FAMILY: Self = Self(5);
1894 }
1895 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1896 #[repr(transparent)]
1897 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComponentTypeNV.html>"]
1898 pub struct ComponentTypeNV(pub(crate) i32);
1899 impl ComponentTypeNV {
from_raw(x: i32) -> Self1900     pub const fn from_raw(x: i32) -> Self {
1901         Self(x)
1902     }
as_raw(self) -> i321903     pub const fn as_raw(self) -> i32 {
1904         self.0
1905     }
1906 }
1907 impl ComponentTypeNV {
1908     pub const FLOAT16: Self = Self(0);
1909     pub const FLOAT32: Self = Self(1);
1910     pub const FLOAT64: Self = Self(2);
1911     pub const SINT8: Self = Self(3);
1912     pub const SINT16: Self = Self(4);
1913     pub const SINT32: Self = Self(5);
1914     pub const SINT64: Self = Self(6);
1915     pub const UINT8: Self = Self(7);
1916     pub const UINT16: Self = Self(8);
1917     pub const UINT32: Self = Self(9);
1918     pub const UINT64: Self = Self(10);
1919 }
1920 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1921 #[repr(transparent)]
1922 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFullScreenExclusiveEXT.html>"]
1923 pub struct FullScreenExclusiveEXT(pub(crate) i32);
1924 impl FullScreenExclusiveEXT {
from_raw(x: i32) -> Self1925     pub const fn from_raw(x: i32) -> Self {
1926         Self(x)
1927     }
as_raw(self) -> i321928     pub const fn as_raw(self) -> i32 {
1929         self.0
1930     }
1931 }
1932 impl FullScreenExclusiveEXT {
1933     pub const DEFAULT: Self = Self(0);
1934     pub const ALLOWED: Self = Self(1);
1935     pub const DISALLOWED: Self = Self(2);
1936     pub const APPLICATION_CONTROLLED: Self = Self(3);
1937 }
1938 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1939 #[repr(transparent)]
1940 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceCounterScopeKHR.html>"]
1941 pub struct PerformanceCounterScopeKHR(pub(crate) i32);
1942 impl PerformanceCounterScopeKHR {
from_raw(x: i32) -> Self1943     pub const fn from_raw(x: i32) -> Self {
1944         Self(x)
1945     }
as_raw(self) -> i321946     pub const fn as_raw(self) -> i32 {
1947         self.0
1948     }
1949 }
1950 impl PerformanceCounterScopeKHR {
1951     pub const COMMAND_BUFFER: Self = Self(0);
1952     pub const RENDER_PASS: Self = Self(1);
1953     pub const COMMAND: Self = Self(2);
1954 }
1955 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1956 #[repr(transparent)]
1957 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceCounterUnitKHR.html>"]
1958 pub struct PerformanceCounterUnitKHR(pub(crate) i32);
1959 impl PerformanceCounterUnitKHR {
from_raw(x: i32) -> Self1960     pub const fn from_raw(x: i32) -> Self {
1961         Self(x)
1962     }
as_raw(self) -> i321963     pub const fn as_raw(self) -> i32 {
1964         self.0
1965     }
1966 }
1967 impl PerformanceCounterUnitKHR {
1968     pub const GENERIC: Self = Self(0);
1969     pub const PERCENTAGE: Self = Self(1);
1970     pub const NANOSECONDS: Self = Self(2);
1971     pub const BYTES: Self = Self(3);
1972     pub const BYTES_PER_SECOND: Self = Self(4);
1973     pub const KELVIN: Self = Self(5);
1974     pub const WATTS: Self = Self(6);
1975     pub const VOLTS: Self = Self(7);
1976     pub const AMPS: Self = Self(8);
1977     pub const HERTZ: Self = Self(9);
1978     pub const CYCLES: Self = Self(10);
1979 }
1980 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1981 #[repr(transparent)]
1982 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceCounterStorageKHR.html>"]
1983 pub struct PerformanceCounterStorageKHR(pub(crate) i32);
1984 impl PerformanceCounterStorageKHR {
from_raw(x: i32) -> Self1985     pub const fn from_raw(x: i32) -> Self {
1986         Self(x)
1987     }
as_raw(self) -> i321988     pub const fn as_raw(self) -> i32 {
1989         self.0
1990     }
1991 }
1992 impl PerformanceCounterStorageKHR {
1993     pub const INT32: Self = Self(0);
1994     pub const INT64: Self = Self(1);
1995     pub const UINT32: Self = Self(2);
1996     pub const UINT64: Self = Self(3);
1997     pub const FLOAT32: Self = Self(4);
1998     pub const FLOAT64: Self = Self(5);
1999 }
2000 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2001 #[repr(transparent)]
2002 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceConfigurationTypeINTEL.html>"]
2003 pub struct PerformanceConfigurationTypeINTEL(pub(crate) i32);
2004 impl PerformanceConfigurationTypeINTEL {
from_raw(x: i32) -> Self2005     pub const fn from_raw(x: i32) -> Self {
2006         Self(x)
2007     }
as_raw(self) -> i322008     pub const fn as_raw(self) -> i32 {
2009         self.0
2010     }
2011 }
2012 impl PerformanceConfigurationTypeINTEL {
2013     pub const COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED: Self = Self(0);
2014 }
2015 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2016 #[repr(transparent)]
2017 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryPoolSamplingModeINTEL.html>"]
2018 pub struct QueryPoolSamplingModeINTEL(pub(crate) i32);
2019 impl QueryPoolSamplingModeINTEL {
from_raw(x: i32) -> Self2020     pub const fn from_raw(x: i32) -> Self {
2021         Self(x)
2022     }
as_raw(self) -> i322023     pub const fn as_raw(self) -> i32 {
2024         self.0
2025     }
2026 }
2027 impl QueryPoolSamplingModeINTEL {
2028     pub const MANUAL: Self = Self(0);
2029 }
2030 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2031 #[repr(transparent)]
2032 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceOverrideTypeINTEL.html>"]
2033 pub struct PerformanceOverrideTypeINTEL(pub(crate) i32);
2034 impl PerformanceOverrideTypeINTEL {
from_raw(x: i32) -> Self2035     pub const fn from_raw(x: i32) -> Self {
2036         Self(x)
2037     }
as_raw(self) -> i322038     pub const fn as_raw(self) -> i32 {
2039         self.0
2040     }
2041 }
2042 impl PerformanceOverrideTypeINTEL {
2043     pub const NULL_HARDWARE: Self = Self(0);
2044     pub const FLUSH_GPU_CACHES: Self = Self(1);
2045 }
2046 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2047 #[repr(transparent)]
2048 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceParameterTypeINTEL.html>"]
2049 pub struct PerformanceParameterTypeINTEL(pub(crate) i32);
2050 impl PerformanceParameterTypeINTEL {
from_raw(x: i32) -> Self2051     pub const fn from_raw(x: i32) -> Self {
2052         Self(x)
2053     }
as_raw(self) -> i322054     pub const fn as_raw(self) -> i32 {
2055         self.0
2056     }
2057 }
2058 impl PerformanceParameterTypeINTEL {
2059     pub const HW_COUNTERS_SUPPORTED: Self = Self(0);
2060     pub const STREAM_MARKER_VALIDS: Self = Self(1);
2061 }
2062 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2063 #[repr(transparent)]
2064 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPerformanceValueTypeINTEL.html>"]
2065 pub struct PerformanceValueTypeINTEL(pub(crate) i32);
2066 impl PerformanceValueTypeINTEL {
from_raw(x: i32) -> Self2067     pub const fn from_raw(x: i32) -> Self {
2068         Self(x)
2069     }
as_raw(self) -> i322070     pub const fn as_raw(self) -> i32 {
2071         self.0
2072     }
2073 }
2074 impl PerformanceValueTypeINTEL {
2075     pub const UINT32: Self = Self(0);
2076     pub const UINT64: Self = Self(1);
2077     pub const FLOAT: Self = Self(2);
2078     pub const BOOL: Self = Self(3);
2079     pub const STRING: Self = Self(4);
2080 }
2081 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2082 #[repr(transparent)]
2083 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkShaderFloatControlsIndependence.html>"]
2084 pub struct ShaderFloatControlsIndependence(pub(crate) i32);
2085 impl ShaderFloatControlsIndependence {
from_raw(x: i32) -> Self2086     pub const fn from_raw(x: i32) -> Self {
2087         Self(x)
2088     }
as_raw(self) -> i322089     pub const fn as_raw(self) -> i32 {
2090         self.0
2091     }
2092 }
2093 impl ShaderFloatControlsIndependence {
2094     pub const TYPE_32_ONLY: Self = Self(0);
2095     pub const ALL: Self = Self(1);
2096     pub const NONE: Self = Self(2);
2097 }
2098 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2099 #[repr(transparent)]
2100 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPipelineExecutableStatisticFormatKHR.html>"]
2101 pub struct PipelineExecutableStatisticFormatKHR(pub(crate) i32);
2102 impl PipelineExecutableStatisticFormatKHR {
from_raw(x: i32) -> Self2103     pub const fn from_raw(x: i32) -> Self {
2104         Self(x)
2105     }
as_raw(self) -> i322106     pub const fn as_raw(self) -> i32 {
2107         self.0
2108     }
2109 }
2110 impl PipelineExecutableStatisticFormatKHR {
2111     pub const BOOL32: Self = Self(0);
2112     pub const INT64: Self = Self(1);
2113     pub const UINT64: Self = Self(2);
2114     pub const FLOAT64: Self = Self(3);
2115 }
2116 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2117 #[repr(transparent)]
2118 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkLineRasterizationModeEXT.html>"]
2119 pub struct LineRasterizationModeEXT(pub(crate) i32);
2120 impl LineRasterizationModeEXT {
from_raw(x: i32) -> Self2121     pub const fn from_raw(x: i32) -> Self {
2122         Self(x)
2123     }
as_raw(self) -> i322124     pub const fn as_raw(self) -> i32 {
2125         self.0
2126     }
2127 }
2128 impl LineRasterizationModeEXT {
2129     pub const DEFAULT: Self = Self(0);
2130     pub const RECTANGULAR: Self = Self(1);
2131     pub const BRESENHAM: Self = Self(2);
2132     pub const RECTANGULAR_SMOOTH: Self = Self(3);
2133 }
2134 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2135 #[repr(transparent)]
2136 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFragmentShadingRateCombinerOpKHR.html>"]
2137 pub struct FragmentShadingRateCombinerOpKHR(pub(crate) i32);
2138 impl FragmentShadingRateCombinerOpKHR {
from_raw(x: i32) -> Self2139     pub const fn from_raw(x: i32) -> Self {
2140         Self(x)
2141     }
as_raw(self) -> i322142     pub const fn as_raw(self) -> i32 {
2143         self.0
2144     }
2145 }
2146 impl FragmentShadingRateCombinerOpKHR {
2147     pub const KEEP: Self = Self(0);
2148     pub const REPLACE: Self = Self(1);
2149     pub const MIN: Self = Self(2);
2150     pub const MAX: Self = Self(3);
2151     pub const MUL: Self = Self(4);
2152 }
2153 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2154 #[repr(transparent)]
2155 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFragmentShadingRateNV.html>"]
2156 pub struct FragmentShadingRateNV(pub(crate) i32);
2157 impl FragmentShadingRateNV {
from_raw(x: i32) -> Self2158     pub const fn from_raw(x: i32) -> Self {
2159         Self(x)
2160     }
as_raw(self) -> i322161     pub const fn as_raw(self) -> i32 {
2162         self.0
2163     }
2164 }
2165 impl FragmentShadingRateNV {
2166     pub const TYPE_1_INVOCATION_PER_PIXEL: Self = Self(0);
2167     pub const TYPE_1_INVOCATION_PER_1X2_PIXELS: Self = Self(1);
2168     pub const TYPE_1_INVOCATION_PER_2X1_PIXELS: Self = Self(4);
2169     pub const TYPE_1_INVOCATION_PER_2X2_PIXELS: Self = Self(5);
2170     pub const TYPE_1_INVOCATION_PER_2X4_PIXELS: Self = Self(6);
2171     pub const TYPE_1_INVOCATION_PER_4X2_PIXELS: Self = Self(9);
2172     pub const TYPE_1_INVOCATION_PER_4X4_PIXELS: Self = Self(10);
2173     pub const TYPE_2_INVOCATIONS_PER_PIXEL: Self = Self(11);
2174     pub const TYPE_4_INVOCATIONS_PER_PIXEL: Self = Self(12);
2175     pub const TYPE_8_INVOCATIONS_PER_PIXEL: Self = Self(13);
2176     pub const TYPE_16_INVOCATIONS_PER_PIXEL: Self = Self(14);
2177     pub const NO_INVOCATIONS: Self = Self(15);
2178 }
2179 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2180 #[repr(transparent)]
2181 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkFragmentShadingRateTypeNV.html>"]
2182 pub struct FragmentShadingRateTypeNV(pub(crate) i32);
2183 impl FragmentShadingRateTypeNV {
from_raw(x: i32) -> Self2184     pub const fn from_raw(x: i32) -> Self {
2185         Self(x)
2186     }
as_raw(self) -> i322187     pub const fn as_raw(self) -> i32 {
2188         self.0
2189     }
2190 }
2191 impl FragmentShadingRateTypeNV {
2192     pub const FRAGMENT_SIZE: Self = Self(0);
2193     pub const ENUMS: Self = Self(1);
2194 }
2195 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2196 #[repr(transparent)]
2197 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkProvokingVertexModeEXT.html>"]
2198 pub struct ProvokingVertexModeEXT(pub(crate) i32);
2199 impl ProvokingVertexModeEXT {
from_raw(x: i32) -> Self2200     pub const fn from_raw(x: i32) -> Self {
2201         Self(x)
2202     }
as_raw(self) -> i322203     pub const fn as_raw(self) -> i32 {
2204         self.0
2205     }
2206 }
2207 impl ProvokingVertexModeEXT {
2208     pub const FIRST_VERTEX: Self = Self(0);
2209     pub const LAST_VERTEX: Self = Self(1);
2210 }
2211 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2212 #[repr(transparent)]
2213 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureMotionInstanceTypeNV.html>"]
2214 pub struct AccelerationStructureMotionInstanceTypeNV(pub(crate) i32);
2215 impl AccelerationStructureMotionInstanceTypeNV {
from_raw(x: i32) -> Self2216     pub const fn from_raw(x: i32) -> Self {
2217         Self(x)
2218     }
as_raw(self) -> i322219     pub const fn as_raw(self) -> i32 {
2220         self.0
2221     }
2222 }
2223 impl AccelerationStructureMotionInstanceTypeNV {
2224     pub const STATIC: Self = Self(0);
2225     pub const MATRIX_MOTION: Self = Self(1);
2226     pub const SRT_MOTION: Self = Self(2);
2227 }
2228 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2229 #[repr(transparent)]
2230 #[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueryResultStatusKHR.html>"]
2231 pub struct QueryResultStatusKHR(pub(crate) i32);
2232 impl QueryResultStatusKHR {
from_raw(x: i32) -> Self2233     pub const fn from_raw(x: i32) -> Self {
2234         Self(x)
2235     }
as_raw(self) -> i322236     pub const fn as_raw(self) -> i32 {
2237         self.0
2238     }
2239 }
2240 impl QueryResultStatusKHR {
2241     pub const ERROR: Self = Self(-1);
2242     pub const NOT_READY: Self = Self(0);
2243     pub const COMPLETE: Self = Self(1);
2244 }
2245 impl fmt::Debug for ObjectType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2246     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2247         let name = match *self {
2248             Self::UNKNOWN => Some("UNKNOWN"),
2249             Self::INSTANCE => Some("INSTANCE"),
2250             Self::PHYSICAL_DEVICE => Some("PHYSICAL_DEVICE"),
2251             Self::DEVICE => Some("DEVICE"),
2252             Self::QUEUE => Some("QUEUE"),
2253             Self::SEMAPHORE => Some("SEMAPHORE"),
2254             Self::COMMAND_BUFFER => Some("COMMAND_BUFFER"),
2255             Self::FENCE => Some("FENCE"),
2256             Self::DEVICE_MEMORY => Some("DEVICE_MEMORY"),
2257             Self::BUFFER => Some("BUFFER"),
2258             Self::IMAGE => Some("IMAGE"),
2259             Self::EVENT => Some("EVENT"),
2260             Self::QUERY_POOL => Some("QUERY_POOL"),
2261             Self::BUFFER_VIEW => Some("BUFFER_VIEW"),
2262             Self::IMAGE_VIEW => Some("IMAGE_VIEW"),
2263             Self::SHADER_MODULE => Some("SHADER_MODULE"),
2264             Self::PIPELINE_CACHE => Some("PIPELINE_CACHE"),
2265             Self::PIPELINE_LAYOUT => Some("PIPELINE_LAYOUT"),
2266             Self::RENDER_PASS => Some("RENDER_PASS"),
2267             Self::PIPELINE => Some("PIPELINE"),
2268             Self::DESCRIPTOR_SET_LAYOUT => Some("DESCRIPTOR_SET_LAYOUT"),
2269             Self::SAMPLER => Some("SAMPLER"),
2270             Self::DESCRIPTOR_POOL => Some("DESCRIPTOR_POOL"),
2271             Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"),
2272             Self::FRAMEBUFFER => Some("FRAMEBUFFER"),
2273             Self::COMMAND_POOL => Some("COMMAND_POOL"),
2274             Self::SURFACE_KHR => Some("SURFACE_KHR"),
2275             Self::SWAPCHAIN_KHR => Some("SWAPCHAIN_KHR"),
2276             Self::DISPLAY_KHR => Some("DISPLAY_KHR"),
2277             Self::DISPLAY_MODE_KHR => Some("DISPLAY_MODE_KHR"),
2278             Self::DEBUG_REPORT_CALLBACK_EXT => Some("DEBUG_REPORT_CALLBACK_EXT"),
2279             Self::VIDEO_SESSION_KHR => Some("VIDEO_SESSION_KHR"),
2280             Self::VIDEO_SESSION_PARAMETERS_KHR => Some("VIDEO_SESSION_PARAMETERS_KHR"),
2281             Self::CU_MODULE_NVX => Some("CU_MODULE_NVX"),
2282             Self::CU_FUNCTION_NVX => Some("CU_FUNCTION_NVX"),
2283             Self::DEBUG_UTILS_MESSENGER_EXT => Some("DEBUG_UTILS_MESSENGER_EXT"),
2284             Self::ACCELERATION_STRUCTURE_KHR => Some("ACCELERATION_STRUCTURE_KHR"),
2285             Self::VALIDATION_CACHE_EXT => Some("VALIDATION_CACHE_EXT"),
2286             Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"),
2287             Self::PERFORMANCE_CONFIGURATION_INTEL => Some("PERFORMANCE_CONFIGURATION_INTEL"),
2288             Self::DEFERRED_OPERATION_KHR => Some("DEFERRED_OPERATION_KHR"),
2289             Self::INDIRECT_COMMANDS_LAYOUT_NV => Some("INDIRECT_COMMANDS_LAYOUT_NV"),
2290             Self::PRIVATE_DATA_SLOT_EXT => Some("PRIVATE_DATA_SLOT_EXT"),
2291             Self::BUFFER_COLLECTION_FUCHSIA => Some("BUFFER_COLLECTION_FUCHSIA"),
2292             Self::SAMPLER_YCBCR_CONVERSION => Some("SAMPLER_YCBCR_CONVERSION"),
2293             Self::DESCRIPTOR_UPDATE_TEMPLATE => Some("DESCRIPTOR_UPDATE_TEMPLATE"),
2294             _ => None,
2295         };
2296         if let Some(x) = name {
2297             f.write_str(x)
2298         } else {
2299             self.0.fmt(f)
2300         }
2301     }
2302 }
2303 impl fmt::Debug for Result {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2304     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2305         let name = match *self {
2306             Self::SUCCESS => Some("SUCCESS"),
2307             Self::NOT_READY => Some("NOT_READY"),
2308             Self::TIMEOUT => Some("TIMEOUT"),
2309             Self::EVENT_SET => Some("EVENT_SET"),
2310             Self::EVENT_RESET => Some("EVENT_RESET"),
2311             Self::INCOMPLETE => Some("INCOMPLETE"),
2312             Self::ERROR_OUT_OF_HOST_MEMORY => Some("ERROR_OUT_OF_HOST_MEMORY"),
2313             Self::ERROR_OUT_OF_DEVICE_MEMORY => Some("ERROR_OUT_OF_DEVICE_MEMORY"),
2314             Self::ERROR_INITIALIZATION_FAILED => Some("ERROR_INITIALIZATION_FAILED"),
2315             Self::ERROR_DEVICE_LOST => Some("ERROR_DEVICE_LOST"),
2316             Self::ERROR_MEMORY_MAP_FAILED => Some("ERROR_MEMORY_MAP_FAILED"),
2317             Self::ERROR_LAYER_NOT_PRESENT => Some("ERROR_LAYER_NOT_PRESENT"),
2318             Self::ERROR_EXTENSION_NOT_PRESENT => Some("ERROR_EXTENSION_NOT_PRESENT"),
2319             Self::ERROR_FEATURE_NOT_PRESENT => Some("ERROR_FEATURE_NOT_PRESENT"),
2320             Self::ERROR_INCOMPATIBLE_DRIVER => Some("ERROR_INCOMPATIBLE_DRIVER"),
2321             Self::ERROR_TOO_MANY_OBJECTS => Some("ERROR_TOO_MANY_OBJECTS"),
2322             Self::ERROR_FORMAT_NOT_SUPPORTED => Some("ERROR_FORMAT_NOT_SUPPORTED"),
2323             Self::ERROR_FRAGMENTED_POOL => Some("ERROR_FRAGMENTED_POOL"),
2324             Self::ERROR_UNKNOWN => Some("ERROR_UNKNOWN"),
2325             Self::ERROR_SURFACE_LOST_KHR => Some("ERROR_SURFACE_LOST_KHR"),
2326             Self::ERROR_NATIVE_WINDOW_IN_USE_KHR => Some("ERROR_NATIVE_WINDOW_IN_USE_KHR"),
2327             Self::SUBOPTIMAL_KHR => Some("SUBOPTIMAL_KHR"),
2328             Self::ERROR_OUT_OF_DATE_KHR => Some("ERROR_OUT_OF_DATE_KHR"),
2329             Self::ERROR_INCOMPATIBLE_DISPLAY_KHR => Some("ERROR_INCOMPATIBLE_DISPLAY_KHR"),
2330             Self::ERROR_VALIDATION_FAILED_EXT => Some("ERROR_VALIDATION_FAILED_EXT"),
2331             Self::ERROR_INVALID_SHADER_NV => Some("ERROR_INVALID_SHADER_NV"),
2332             Self::ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT => {
2333                 Some("ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT")
2334             }
2335             Self::ERROR_NOT_PERMITTED_EXT => Some("ERROR_NOT_PERMITTED_EXT"),
2336             Self::ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT => {
2337                 Some("ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT")
2338             }
2339             Self::THREAD_IDLE_KHR => Some("THREAD_IDLE_KHR"),
2340             Self::THREAD_DONE_KHR => Some("THREAD_DONE_KHR"),
2341             Self::OPERATION_DEFERRED_KHR => Some("OPERATION_DEFERRED_KHR"),
2342             Self::OPERATION_NOT_DEFERRED_KHR => Some("OPERATION_NOT_DEFERRED_KHR"),
2343             Self::PIPELINE_COMPILE_REQUIRED_EXT => Some("PIPELINE_COMPILE_REQUIRED_EXT"),
2344             Self::ERROR_OUT_OF_POOL_MEMORY => Some("ERROR_OUT_OF_POOL_MEMORY"),
2345             Self::ERROR_INVALID_EXTERNAL_HANDLE => Some("ERROR_INVALID_EXTERNAL_HANDLE"),
2346             Self::ERROR_FRAGMENTATION => Some("ERROR_FRAGMENTATION"),
2347             Self::ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS => {
2348                 Some("ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS")
2349             }
2350             _ => None,
2351         };
2352         if let Some(x) = name {
2353             f.write_str(x)
2354         } else {
2355             self.0.fmt(f)
2356         }
2357     }
2358 }
2359