1#![allow(
9 non_camel_case_types,
10 non_snake_case,
11 clippy::bad_bit_mask,
12 clippy::let_unit_value,
13 clippy::missing_safety_doc,
14 clippy::missing_transmute_annotations,
15 clippy::needless_lifetimes,
16 clippy::too_many_arguments,
17 clippy::type_complexity,
18 clippy::unnecessary_cast,
19 clippy::upper_case_acronyms,
20 clippy::useless_transmute
21)]
22
23use core::ffi::c_void;
24use core::fmt;
25use core::hash::Hash;
26
27use crate::*;
28
29pub trait Handle: Copy + Clone + fmt::Debug + PartialEq + Eq + Hash + Default + Sized {
31 type Repr;
33
34 const TYPE: ObjectType;
36
37 fn null() -> Self;
39
40 fn from_raw(value: Self::Repr) -> Self;
42
43 fn as_raw(self) -> Self::Repr;
45
46 fn is_null(self) -> bool;
48}
49
50pub trait DispatchableHandle: Handle<Repr = usize> {
54 unsafe fn dispatch_key(self) -> usize {
72 *(self.as_raw() as *mut *mut c_void) as usize
73 }
74}
75
76impl<H: Handle<Repr = usize>> DispatchableHandle for H {}
77
78pub trait NonDispatchableHandle: Handle<Repr = u64> {}
82
83impl<H: Handle<Repr = u64>> NonDispatchableHandle for H {}
84
85#[repr(transparent)]
87#[derive(Copy, Clone, PartialEq, Eq, Hash)]
88pub struct AccelerationStructureKHR(u64);
89
90impl Handle for AccelerationStructureKHR {
91 type Repr = u64;
92
93 const TYPE: ObjectType = ObjectType::ACCELERATION_STRUCTURE_KHR;
94
95 #[inline]
96 fn null() -> Self {
97 Self(0)
98 }
99
100 #[inline]
101 fn from_raw(value: Self::Repr) -> Self {
102 Self(value)
103 }
104
105 #[inline]
106 fn as_raw(self) -> Self::Repr {
107 self.0
108 }
109
110 #[inline]
111 fn is_null(self) -> bool {
112 self.0 == 0
113 }
114}
115
116impl Default for AccelerationStructureKHR {
117 #[inline]
118 fn default() -> Self {
119 Self::null()
120 }
121}
122
123impl fmt::Debug for AccelerationStructureKHR {
124 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
125 write!(f, "AccelerationStructureKHR({:p})", self.0 as *const u8)
126 }
127}
128
129#[repr(transparent)]
131#[derive(Copy, Clone, PartialEq, Eq, Hash)]
132pub struct AccelerationStructureNV(u64);
133
134impl Handle for AccelerationStructureNV {
135 type Repr = u64;
136
137 const TYPE: ObjectType = ObjectType::ACCELERATION_STRUCTURE_NV;
138
139 #[inline]
140 fn null() -> Self {
141 Self(0)
142 }
143
144 #[inline]
145 fn from_raw(value: Self::Repr) -> Self {
146 Self(value)
147 }
148
149 #[inline]
150 fn as_raw(self) -> Self::Repr {
151 self.0
152 }
153
154 #[inline]
155 fn is_null(self) -> bool {
156 self.0 == 0
157 }
158}
159
160impl Default for AccelerationStructureNV {
161 #[inline]
162 fn default() -> Self {
163 Self::null()
164 }
165}
166
167impl fmt::Debug for AccelerationStructureNV {
168 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
169 write!(f, "AccelerationStructureNV({:p})", self.0 as *const u8)
170 }
171}
172
173#[repr(transparent)]
175#[derive(Copy, Clone, PartialEq, Eq, Hash)]
176pub struct Buffer(u64);
177
178impl Handle for Buffer {
179 type Repr = u64;
180
181 const TYPE: ObjectType = ObjectType::BUFFER;
182
183 #[inline]
184 fn null() -> Self {
185 Self(0)
186 }
187
188 #[inline]
189 fn from_raw(value: Self::Repr) -> Self {
190 Self(value)
191 }
192
193 #[inline]
194 fn as_raw(self) -> Self::Repr {
195 self.0
196 }
197
198 #[inline]
199 fn is_null(self) -> bool {
200 self.0 == 0
201 }
202}
203
204impl Default for Buffer {
205 #[inline]
206 fn default() -> Self {
207 Self::null()
208 }
209}
210
211impl fmt::Debug for Buffer {
212 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
213 write!(f, "Buffer({:p})", self.0 as *const u8)
214 }
215}
216
217#[repr(transparent)]
219#[derive(Copy, Clone, PartialEq, Eq, Hash)]
220pub struct BufferCollectionFUCHSIA(u64);
221
222impl Handle for BufferCollectionFUCHSIA {
223 type Repr = u64;
224
225 const TYPE: ObjectType = ObjectType::BUFFER_COLLECTION_FUCHSIA;
226
227 #[inline]
228 fn null() -> Self {
229 Self(0)
230 }
231
232 #[inline]
233 fn from_raw(value: Self::Repr) -> Self {
234 Self(value)
235 }
236
237 #[inline]
238 fn as_raw(self) -> Self::Repr {
239 self.0
240 }
241
242 #[inline]
243 fn is_null(self) -> bool {
244 self.0 == 0
245 }
246}
247
248impl Default for BufferCollectionFUCHSIA {
249 #[inline]
250 fn default() -> Self {
251 Self::null()
252 }
253}
254
255impl fmt::Debug for BufferCollectionFUCHSIA {
256 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
257 write!(f, "BufferCollectionFUCHSIA({:p})", self.0 as *const u8)
258 }
259}
260
261#[repr(transparent)]
263#[derive(Copy, Clone, PartialEq, Eq, Hash)]
264pub struct BufferView(u64);
265
266impl Handle for BufferView {
267 type Repr = u64;
268
269 const TYPE: ObjectType = ObjectType::BUFFER_VIEW;
270
271 #[inline]
272 fn null() -> Self {
273 Self(0)
274 }
275
276 #[inline]
277 fn from_raw(value: Self::Repr) -> Self {
278 Self(value)
279 }
280
281 #[inline]
282 fn as_raw(self) -> Self::Repr {
283 self.0
284 }
285
286 #[inline]
287 fn is_null(self) -> bool {
288 self.0 == 0
289 }
290}
291
292impl Default for BufferView {
293 #[inline]
294 fn default() -> Self {
295 Self::null()
296 }
297}
298
299impl fmt::Debug for BufferView {
300 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
301 write!(f, "BufferView({:p})", self.0 as *const u8)
302 }
303}
304
305#[repr(transparent)]
307#[derive(Copy, Clone, PartialEq, Eq, Hash)]
308pub struct CommandBuffer(usize);
309
310impl Handle for CommandBuffer {
311 type Repr = usize;
312
313 const TYPE: ObjectType = ObjectType::COMMAND_BUFFER;
314
315 #[inline]
316 fn null() -> Self {
317 Self(0)
318 }
319
320 #[inline]
321 fn from_raw(value: Self::Repr) -> Self {
322 Self(value)
323 }
324
325 #[inline]
326 fn as_raw(self) -> Self::Repr {
327 self.0
328 }
329
330 #[inline]
331 fn is_null(self) -> bool {
332 self.0 == 0
333 }
334}
335
336impl Default for CommandBuffer {
337 #[inline]
338 fn default() -> Self {
339 Self::null()
340 }
341}
342
343impl fmt::Debug for CommandBuffer {
344 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
345 write!(f, "CommandBuffer({:p})", self.0 as *const u8)
346 }
347}
348
349#[repr(transparent)]
351#[derive(Copy, Clone, PartialEq, Eq, Hash)]
352pub struct CommandPool(u64);
353
354impl Handle for CommandPool {
355 type Repr = u64;
356
357 const TYPE: ObjectType = ObjectType::COMMAND_POOL;
358
359 #[inline]
360 fn null() -> Self {
361 Self(0)
362 }
363
364 #[inline]
365 fn from_raw(value: Self::Repr) -> Self {
366 Self(value)
367 }
368
369 #[inline]
370 fn as_raw(self) -> Self::Repr {
371 self.0
372 }
373
374 #[inline]
375 fn is_null(self) -> bool {
376 self.0 == 0
377 }
378}
379
380impl Default for CommandPool {
381 #[inline]
382 fn default() -> Self {
383 Self::null()
384 }
385}
386
387impl fmt::Debug for CommandPool {
388 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
389 write!(f, "CommandPool({:p})", self.0 as *const u8)
390 }
391}
392
393#[repr(transparent)]
395#[derive(Copy, Clone, PartialEq, Eq, Hash)]
396pub struct CuFunctionNVX(u64);
397
398impl Handle for CuFunctionNVX {
399 type Repr = u64;
400
401 const TYPE: ObjectType = ObjectType::CU_FUNCTION_NVX;
402
403 #[inline]
404 fn null() -> Self {
405 Self(0)
406 }
407
408 #[inline]
409 fn from_raw(value: Self::Repr) -> Self {
410 Self(value)
411 }
412
413 #[inline]
414 fn as_raw(self) -> Self::Repr {
415 self.0
416 }
417
418 #[inline]
419 fn is_null(self) -> bool {
420 self.0 == 0
421 }
422}
423
424impl Default for CuFunctionNVX {
425 #[inline]
426 fn default() -> Self {
427 Self::null()
428 }
429}
430
431impl fmt::Debug for CuFunctionNVX {
432 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
433 write!(f, "CuFunctionNVX({:p})", self.0 as *const u8)
434 }
435}
436
437#[repr(transparent)]
439#[derive(Copy, Clone, PartialEq, Eq, Hash)]
440pub struct CuModuleNVX(u64);
441
442impl Handle for CuModuleNVX {
443 type Repr = u64;
444
445 const TYPE: ObjectType = ObjectType::CU_MODULE_NVX;
446
447 #[inline]
448 fn null() -> Self {
449 Self(0)
450 }
451
452 #[inline]
453 fn from_raw(value: Self::Repr) -> Self {
454 Self(value)
455 }
456
457 #[inline]
458 fn as_raw(self) -> Self::Repr {
459 self.0
460 }
461
462 #[inline]
463 fn is_null(self) -> bool {
464 self.0 == 0
465 }
466}
467
468impl Default for CuModuleNVX {
469 #[inline]
470 fn default() -> Self {
471 Self::null()
472 }
473}
474
475impl fmt::Debug for CuModuleNVX {
476 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
477 write!(f, "CuModuleNVX({:p})", self.0 as *const u8)
478 }
479}
480
481#[repr(transparent)]
483#[derive(Copy, Clone, PartialEq, Eq, Hash)]
484pub struct CudaFunctionNV(u64);
485
486impl Handle for CudaFunctionNV {
487 type Repr = u64;
488
489 const TYPE: ObjectType = ObjectType::CUDA_FUNCTION_NV;
490
491 #[inline]
492 fn null() -> Self {
493 Self(0)
494 }
495
496 #[inline]
497 fn from_raw(value: Self::Repr) -> Self {
498 Self(value)
499 }
500
501 #[inline]
502 fn as_raw(self) -> Self::Repr {
503 self.0
504 }
505
506 #[inline]
507 fn is_null(self) -> bool {
508 self.0 == 0
509 }
510}
511
512impl Default for CudaFunctionNV {
513 #[inline]
514 fn default() -> Self {
515 Self::null()
516 }
517}
518
519impl fmt::Debug for CudaFunctionNV {
520 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
521 write!(f, "CudaFunctionNV({:p})", self.0 as *const u8)
522 }
523}
524
525#[repr(transparent)]
527#[derive(Copy, Clone, PartialEq, Eq, Hash)]
528pub struct CudaModuleNV(u64);
529
530impl Handle for CudaModuleNV {
531 type Repr = u64;
532
533 const TYPE: ObjectType = ObjectType::CUDA_MODULE_NV;
534
535 #[inline]
536 fn null() -> Self {
537 Self(0)
538 }
539
540 #[inline]
541 fn from_raw(value: Self::Repr) -> Self {
542 Self(value)
543 }
544
545 #[inline]
546 fn as_raw(self) -> Self::Repr {
547 self.0
548 }
549
550 #[inline]
551 fn is_null(self) -> bool {
552 self.0 == 0
553 }
554}
555
556impl Default for CudaModuleNV {
557 #[inline]
558 fn default() -> Self {
559 Self::null()
560 }
561}
562
563impl fmt::Debug for CudaModuleNV {
564 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
565 write!(f, "CudaModuleNV({:p})", self.0 as *const u8)
566 }
567}
568
569#[repr(transparent)]
571#[derive(Copy, Clone, PartialEq, Eq, Hash)]
572pub struct DataGraphPipelineSessionARM(u64);
573
574impl Handle for DataGraphPipelineSessionARM {
575 type Repr = u64;
576
577 const TYPE: ObjectType = ObjectType::DATA_GRAPH_PIPELINE_SESSION_ARM;
578
579 #[inline]
580 fn null() -> Self {
581 Self(0)
582 }
583
584 #[inline]
585 fn from_raw(value: Self::Repr) -> Self {
586 Self(value)
587 }
588
589 #[inline]
590 fn as_raw(self) -> Self::Repr {
591 self.0
592 }
593
594 #[inline]
595 fn is_null(self) -> bool {
596 self.0 == 0
597 }
598}
599
600impl Default for DataGraphPipelineSessionARM {
601 #[inline]
602 fn default() -> Self {
603 Self::null()
604 }
605}
606
607impl fmt::Debug for DataGraphPipelineSessionARM {
608 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
609 write!(f, "DataGraphPipelineSessionARM({:p})", self.0 as *const u8)
610 }
611}
612
613#[repr(transparent)]
615#[derive(Copy, Clone, PartialEq, Eq, Hash)]
616pub struct DebugReportCallbackEXT(u64);
617
618impl Handle for DebugReportCallbackEXT {
619 type Repr = u64;
620
621 const TYPE: ObjectType = ObjectType::DEBUG_REPORT_CALLBACK_EXT;
622
623 #[inline]
624 fn null() -> Self {
625 Self(0)
626 }
627
628 #[inline]
629 fn from_raw(value: Self::Repr) -> Self {
630 Self(value)
631 }
632
633 #[inline]
634 fn as_raw(self) -> Self::Repr {
635 self.0
636 }
637
638 #[inline]
639 fn is_null(self) -> bool {
640 self.0 == 0
641 }
642}
643
644impl Default for DebugReportCallbackEXT {
645 #[inline]
646 fn default() -> Self {
647 Self::null()
648 }
649}
650
651impl fmt::Debug for DebugReportCallbackEXT {
652 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
653 write!(f, "DebugReportCallbackEXT({:p})", self.0 as *const u8)
654 }
655}
656
657#[repr(transparent)]
659#[derive(Copy, Clone, PartialEq, Eq, Hash)]
660pub struct DebugUtilsMessengerEXT(u64);
661
662impl Handle for DebugUtilsMessengerEXT {
663 type Repr = u64;
664
665 const TYPE: ObjectType = ObjectType::DEBUG_UTILS_MESSENGER_EXT;
666
667 #[inline]
668 fn null() -> Self {
669 Self(0)
670 }
671
672 #[inline]
673 fn from_raw(value: Self::Repr) -> Self {
674 Self(value)
675 }
676
677 #[inline]
678 fn as_raw(self) -> Self::Repr {
679 self.0
680 }
681
682 #[inline]
683 fn is_null(self) -> bool {
684 self.0 == 0
685 }
686}
687
688impl Default for DebugUtilsMessengerEXT {
689 #[inline]
690 fn default() -> Self {
691 Self::null()
692 }
693}
694
695impl fmt::Debug for DebugUtilsMessengerEXT {
696 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
697 write!(f, "DebugUtilsMessengerEXT({:p})", self.0 as *const u8)
698 }
699}
700
701#[repr(transparent)]
703#[derive(Copy, Clone, PartialEq, Eq, Hash)]
704pub struct DeferredOperationKHR(u64);
705
706impl Handle for DeferredOperationKHR {
707 type Repr = u64;
708
709 const TYPE: ObjectType = ObjectType::DEFERRED_OPERATION_KHR;
710
711 #[inline]
712 fn null() -> Self {
713 Self(0)
714 }
715
716 #[inline]
717 fn from_raw(value: Self::Repr) -> Self {
718 Self(value)
719 }
720
721 #[inline]
722 fn as_raw(self) -> Self::Repr {
723 self.0
724 }
725
726 #[inline]
727 fn is_null(self) -> bool {
728 self.0 == 0
729 }
730}
731
732impl Default for DeferredOperationKHR {
733 #[inline]
734 fn default() -> Self {
735 Self::null()
736 }
737}
738
739impl fmt::Debug for DeferredOperationKHR {
740 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
741 write!(f, "DeferredOperationKHR({:p})", self.0 as *const u8)
742 }
743}
744
745#[repr(transparent)]
747#[derive(Copy, Clone, PartialEq, Eq, Hash)]
748pub struct DescriptorPool(u64);
749
750impl Handle for DescriptorPool {
751 type Repr = u64;
752
753 const TYPE: ObjectType = ObjectType::DESCRIPTOR_POOL;
754
755 #[inline]
756 fn null() -> Self {
757 Self(0)
758 }
759
760 #[inline]
761 fn from_raw(value: Self::Repr) -> Self {
762 Self(value)
763 }
764
765 #[inline]
766 fn as_raw(self) -> Self::Repr {
767 self.0
768 }
769
770 #[inline]
771 fn is_null(self) -> bool {
772 self.0 == 0
773 }
774}
775
776impl Default for DescriptorPool {
777 #[inline]
778 fn default() -> Self {
779 Self::null()
780 }
781}
782
783impl fmt::Debug for DescriptorPool {
784 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
785 write!(f, "DescriptorPool({:p})", self.0 as *const u8)
786 }
787}
788
789#[repr(transparent)]
791#[derive(Copy, Clone, PartialEq, Eq, Hash)]
792pub struct DescriptorSet(u64);
793
794impl Handle for DescriptorSet {
795 type Repr = u64;
796
797 const TYPE: ObjectType = ObjectType::DESCRIPTOR_SET;
798
799 #[inline]
800 fn null() -> Self {
801 Self(0)
802 }
803
804 #[inline]
805 fn from_raw(value: Self::Repr) -> Self {
806 Self(value)
807 }
808
809 #[inline]
810 fn as_raw(self) -> Self::Repr {
811 self.0
812 }
813
814 #[inline]
815 fn is_null(self) -> bool {
816 self.0 == 0
817 }
818}
819
820impl Default for DescriptorSet {
821 #[inline]
822 fn default() -> Self {
823 Self::null()
824 }
825}
826
827impl fmt::Debug for DescriptorSet {
828 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
829 write!(f, "DescriptorSet({:p})", self.0 as *const u8)
830 }
831}
832
833#[repr(transparent)]
835#[derive(Copy, Clone, PartialEq, Eq, Hash)]
836pub struct DescriptorSetLayout(u64);
837
838impl Handle for DescriptorSetLayout {
839 type Repr = u64;
840
841 const TYPE: ObjectType = ObjectType::DESCRIPTOR_SET_LAYOUT;
842
843 #[inline]
844 fn null() -> Self {
845 Self(0)
846 }
847
848 #[inline]
849 fn from_raw(value: Self::Repr) -> Self {
850 Self(value)
851 }
852
853 #[inline]
854 fn as_raw(self) -> Self::Repr {
855 self.0
856 }
857
858 #[inline]
859 fn is_null(self) -> bool {
860 self.0 == 0
861 }
862}
863
864impl Default for DescriptorSetLayout {
865 #[inline]
866 fn default() -> Self {
867 Self::null()
868 }
869}
870
871impl fmt::Debug for DescriptorSetLayout {
872 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
873 write!(f, "DescriptorSetLayout({:p})", self.0 as *const u8)
874 }
875}
876
877#[repr(transparent)]
879#[derive(Copy, Clone, PartialEq, Eq, Hash)]
880pub struct DescriptorUpdateTemplate(u64);
881
882impl Handle for DescriptorUpdateTemplate {
883 type Repr = u64;
884
885 const TYPE: ObjectType = ObjectType::DESCRIPTOR_UPDATE_TEMPLATE;
886
887 #[inline]
888 fn null() -> Self {
889 Self(0)
890 }
891
892 #[inline]
893 fn from_raw(value: Self::Repr) -> Self {
894 Self(value)
895 }
896
897 #[inline]
898 fn as_raw(self) -> Self::Repr {
899 self.0
900 }
901
902 #[inline]
903 fn is_null(self) -> bool {
904 self.0 == 0
905 }
906}
907
908impl Default for DescriptorUpdateTemplate {
909 #[inline]
910 fn default() -> Self {
911 Self::null()
912 }
913}
914
915impl fmt::Debug for DescriptorUpdateTemplate {
916 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
917 write!(f, "DescriptorUpdateTemplate({:p})", self.0 as *const u8)
918 }
919}
920
921#[repr(transparent)]
923#[derive(Copy, Clone, PartialEq, Eq, Hash)]
924pub struct Device(usize);
925
926impl Handle for Device {
927 type Repr = usize;
928
929 const TYPE: ObjectType = ObjectType::DEVICE;
930
931 #[inline]
932 fn null() -> Self {
933 Self(0)
934 }
935
936 #[inline]
937 fn from_raw(value: Self::Repr) -> Self {
938 Self(value)
939 }
940
941 #[inline]
942 fn as_raw(self) -> Self::Repr {
943 self.0
944 }
945
946 #[inline]
947 fn is_null(self) -> bool {
948 self.0 == 0
949 }
950}
951
952impl Default for Device {
953 #[inline]
954 fn default() -> Self {
955 Self::null()
956 }
957}
958
959impl fmt::Debug for Device {
960 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
961 write!(f, "Device({:p})", self.0 as *const u8)
962 }
963}
964
965#[repr(transparent)]
967#[derive(Copy, Clone, PartialEq, Eq, Hash)]
968pub struct DeviceMemory(u64);
969
970impl Handle for DeviceMemory {
971 type Repr = u64;
972
973 const TYPE: ObjectType = ObjectType::DEVICE_MEMORY;
974
975 #[inline]
976 fn null() -> Self {
977 Self(0)
978 }
979
980 #[inline]
981 fn from_raw(value: Self::Repr) -> Self {
982 Self(value)
983 }
984
985 #[inline]
986 fn as_raw(self) -> Self::Repr {
987 self.0
988 }
989
990 #[inline]
991 fn is_null(self) -> bool {
992 self.0 == 0
993 }
994}
995
996impl Default for DeviceMemory {
997 #[inline]
998 fn default() -> Self {
999 Self::null()
1000 }
1001}
1002
1003impl fmt::Debug for DeviceMemory {
1004 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1005 write!(f, "DeviceMemory({:p})", self.0 as *const u8)
1006 }
1007}
1008
1009#[repr(transparent)]
1011#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1012pub struct DisplayKHR(u64);
1013
1014impl Handle for DisplayKHR {
1015 type Repr = u64;
1016
1017 const TYPE: ObjectType = ObjectType::DISPLAY_KHR;
1018
1019 #[inline]
1020 fn null() -> Self {
1021 Self(0)
1022 }
1023
1024 #[inline]
1025 fn from_raw(value: Self::Repr) -> Self {
1026 Self(value)
1027 }
1028
1029 #[inline]
1030 fn as_raw(self) -> Self::Repr {
1031 self.0
1032 }
1033
1034 #[inline]
1035 fn is_null(self) -> bool {
1036 self.0 == 0
1037 }
1038}
1039
1040impl Default for DisplayKHR {
1041 #[inline]
1042 fn default() -> Self {
1043 Self::null()
1044 }
1045}
1046
1047impl fmt::Debug for DisplayKHR {
1048 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1049 write!(f, "DisplayKHR({:p})", self.0 as *const u8)
1050 }
1051}
1052
1053#[repr(transparent)]
1055#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1056pub struct DisplayModeKHR(u64);
1057
1058impl Handle for DisplayModeKHR {
1059 type Repr = u64;
1060
1061 const TYPE: ObjectType = ObjectType::DISPLAY_MODE_KHR;
1062
1063 #[inline]
1064 fn null() -> Self {
1065 Self(0)
1066 }
1067
1068 #[inline]
1069 fn from_raw(value: Self::Repr) -> Self {
1070 Self(value)
1071 }
1072
1073 #[inline]
1074 fn as_raw(self) -> Self::Repr {
1075 self.0
1076 }
1077
1078 #[inline]
1079 fn is_null(self) -> bool {
1080 self.0 == 0
1081 }
1082}
1083
1084impl Default for DisplayModeKHR {
1085 #[inline]
1086 fn default() -> Self {
1087 Self::null()
1088 }
1089}
1090
1091impl fmt::Debug for DisplayModeKHR {
1092 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1093 write!(f, "DisplayModeKHR({:p})", self.0 as *const u8)
1094 }
1095}
1096
1097#[repr(transparent)]
1099#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1100pub struct Event(u64);
1101
1102impl Handle for Event {
1103 type Repr = u64;
1104
1105 const TYPE: ObjectType = ObjectType::EVENT;
1106
1107 #[inline]
1108 fn null() -> Self {
1109 Self(0)
1110 }
1111
1112 #[inline]
1113 fn from_raw(value: Self::Repr) -> Self {
1114 Self(value)
1115 }
1116
1117 #[inline]
1118 fn as_raw(self) -> Self::Repr {
1119 self.0
1120 }
1121
1122 #[inline]
1123 fn is_null(self) -> bool {
1124 self.0 == 0
1125 }
1126}
1127
1128impl Default for Event {
1129 #[inline]
1130 fn default() -> Self {
1131 Self::null()
1132 }
1133}
1134
1135impl fmt::Debug for Event {
1136 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1137 write!(f, "Event({:p})", self.0 as *const u8)
1138 }
1139}
1140
1141#[repr(transparent)]
1143#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1144pub struct ExternalComputeQueueNV(usize);
1145
1146impl Handle for ExternalComputeQueueNV {
1147 type Repr = usize;
1148
1149 const TYPE: ObjectType = ObjectType::EXTERNAL_COMPUTE_QUEUE_NV;
1150
1151 #[inline]
1152 fn null() -> Self {
1153 Self(0)
1154 }
1155
1156 #[inline]
1157 fn from_raw(value: Self::Repr) -> Self {
1158 Self(value)
1159 }
1160
1161 #[inline]
1162 fn as_raw(self) -> Self::Repr {
1163 self.0
1164 }
1165
1166 #[inline]
1167 fn is_null(self) -> bool {
1168 self.0 == 0
1169 }
1170}
1171
1172impl Default for ExternalComputeQueueNV {
1173 #[inline]
1174 fn default() -> Self {
1175 Self::null()
1176 }
1177}
1178
1179impl fmt::Debug for ExternalComputeQueueNV {
1180 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1181 write!(f, "ExternalComputeQueueNV({:p})", self.0 as *const u8)
1182 }
1183}
1184
1185#[repr(transparent)]
1187#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1188pub struct Fence(u64);
1189
1190impl Handle for Fence {
1191 type Repr = u64;
1192
1193 const TYPE: ObjectType = ObjectType::FENCE;
1194
1195 #[inline]
1196 fn null() -> Self {
1197 Self(0)
1198 }
1199
1200 #[inline]
1201 fn from_raw(value: Self::Repr) -> Self {
1202 Self(value)
1203 }
1204
1205 #[inline]
1206 fn as_raw(self) -> Self::Repr {
1207 self.0
1208 }
1209
1210 #[inline]
1211 fn is_null(self) -> bool {
1212 self.0 == 0
1213 }
1214}
1215
1216impl Default for Fence {
1217 #[inline]
1218 fn default() -> Self {
1219 Self::null()
1220 }
1221}
1222
1223impl fmt::Debug for Fence {
1224 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1225 write!(f, "Fence({:p})", self.0 as *const u8)
1226 }
1227}
1228
1229#[repr(transparent)]
1231#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1232pub struct Framebuffer(u64);
1233
1234impl Handle for Framebuffer {
1235 type Repr = u64;
1236
1237 const TYPE: ObjectType = ObjectType::FRAMEBUFFER;
1238
1239 #[inline]
1240 fn null() -> Self {
1241 Self(0)
1242 }
1243
1244 #[inline]
1245 fn from_raw(value: Self::Repr) -> Self {
1246 Self(value)
1247 }
1248
1249 #[inline]
1250 fn as_raw(self) -> Self::Repr {
1251 self.0
1252 }
1253
1254 #[inline]
1255 fn is_null(self) -> bool {
1256 self.0 == 0
1257 }
1258}
1259
1260impl Default for Framebuffer {
1261 #[inline]
1262 fn default() -> Self {
1263 Self::null()
1264 }
1265}
1266
1267impl fmt::Debug for Framebuffer {
1268 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1269 write!(f, "Framebuffer({:p})", self.0 as *const u8)
1270 }
1271}
1272
1273#[repr(transparent)]
1275#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1276pub struct Image(u64);
1277
1278impl Handle for Image {
1279 type Repr = u64;
1280
1281 const TYPE: ObjectType = ObjectType::IMAGE;
1282
1283 #[inline]
1284 fn null() -> Self {
1285 Self(0)
1286 }
1287
1288 #[inline]
1289 fn from_raw(value: Self::Repr) -> Self {
1290 Self(value)
1291 }
1292
1293 #[inline]
1294 fn as_raw(self) -> Self::Repr {
1295 self.0
1296 }
1297
1298 #[inline]
1299 fn is_null(self) -> bool {
1300 self.0 == 0
1301 }
1302}
1303
1304impl Default for Image {
1305 #[inline]
1306 fn default() -> Self {
1307 Self::null()
1308 }
1309}
1310
1311impl fmt::Debug for Image {
1312 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1313 write!(f, "Image({:p})", self.0 as *const u8)
1314 }
1315}
1316
1317#[repr(transparent)]
1319#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1320pub struct ImageView(u64);
1321
1322impl Handle for ImageView {
1323 type Repr = u64;
1324
1325 const TYPE: ObjectType = ObjectType::IMAGE_VIEW;
1326
1327 #[inline]
1328 fn null() -> Self {
1329 Self(0)
1330 }
1331
1332 #[inline]
1333 fn from_raw(value: Self::Repr) -> Self {
1334 Self(value)
1335 }
1336
1337 #[inline]
1338 fn as_raw(self) -> Self::Repr {
1339 self.0
1340 }
1341
1342 #[inline]
1343 fn is_null(self) -> bool {
1344 self.0 == 0
1345 }
1346}
1347
1348impl Default for ImageView {
1349 #[inline]
1350 fn default() -> Self {
1351 Self::null()
1352 }
1353}
1354
1355impl fmt::Debug for ImageView {
1356 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1357 write!(f, "ImageView({:p})", self.0 as *const u8)
1358 }
1359}
1360
1361#[repr(transparent)]
1363#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1364pub struct IndirectCommandsLayoutEXT(u64);
1365
1366impl Handle for IndirectCommandsLayoutEXT {
1367 type Repr = u64;
1368
1369 const TYPE: ObjectType = ObjectType::INDIRECT_COMMANDS_LAYOUT_EXT;
1370
1371 #[inline]
1372 fn null() -> Self {
1373 Self(0)
1374 }
1375
1376 #[inline]
1377 fn from_raw(value: Self::Repr) -> Self {
1378 Self(value)
1379 }
1380
1381 #[inline]
1382 fn as_raw(self) -> Self::Repr {
1383 self.0
1384 }
1385
1386 #[inline]
1387 fn is_null(self) -> bool {
1388 self.0 == 0
1389 }
1390}
1391
1392impl Default for IndirectCommandsLayoutEXT {
1393 #[inline]
1394 fn default() -> Self {
1395 Self::null()
1396 }
1397}
1398
1399impl fmt::Debug for IndirectCommandsLayoutEXT {
1400 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1401 write!(f, "IndirectCommandsLayoutEXT({:p})", self.0 as *const u8)
1402 }
1403}
1404
1405#[repr(transparent)]
1407#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1408pub struct IndirectCommandsLayoutNV(u64);
1409
1410impl Handle for IndirectCommandsLayoutNV {
1411 type Repr = u64;
1412
1413 const TYPE: ObjectType = ObjectType::INDIRECT_COMMANDS_LAYOUT_NV;
1414
1415 #[inline]
1416 fn null() -> Self {
1417 Self(0)
1418 }
1419
1420 #[inline]
1421 fn from_raw(value: Self::Repr) -> Self {
1422 Self(value)
1423 }
1424
1425 #[inline]
1426 fn as_raw(self) -> Self::Repr {
1427 self.0
1428 }
1429
1430 #[inline]
1431 fn is_null(self) -> bool {
1432 self.0 == 0
1433 }
1434}
1435
1436impl Default for IndirectCommandsLayoutNV {
1437 #[inline]
1438 fn default() -> Self {
1439 Self::null()
1440 }
1441}
1442
1443impl fmt::Debug for IndirectCommandsLayoutNV {
1444 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1445 write!(f, "IndirectCommandsLayoutNV({:p})", self.0 as *const u8)
1446 }
1447}
1448
1449#[repr(transparent)]
1451#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1452pub struct IndirectExecutionSetEXT(u64);
1453
1454impl Handle for IndirectExecutionSetEXT {
1455 type Repr = u64;
1456
1457 const TYPE: ObjectType = ObjectType::INDIRECT_EXECUTION_SET_EXT;
1458
1459 #[inline]
1460 fn null() -> Self {
1461 Self(0)
1462 }
1463
1464 #[inline]
1465 fn from_raw(value: Self::Repr) -> Self {
1466 Self(value)
1467 }
1468
1469 #[inline]
1470 fn as_raw(self) -> Self::Repr {
1471 self.0
1472 }
1473
1474 #[inline]
1475 fn is_null(self) -> bool {
1476 self.0 == 0
1477 }
1478}
1479
1480impl Default for IndirectExecutionSetEXT {
1481 #[inline]
1482 fn default() -> Self {
1483 Self::null()
1484 }
1485}
1486
1487impl fmt::Debug for IndirectExecutionSetEXT {
1488 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1489 write!(f, "IndirectExecutionSetEXT({:p})", self.0 as *const u8)
1490 }
1491}
1492
1493#[repr(transparent)]
1495#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1496pub struct Instance(usize);
1497
1498impl Handle for Instance {
1499 type Repr = usize;
1500
1501 const TYPE: ObjectType = ObjectType::INSTANCE;
1502
1503 #[inline]
1504 fn null() -> Self {
1505 Self(0)
1506 }
1507
1508 #[inline]
1509 fn from_raw(value: Self::Repr) -> Self {
1510 Self(value)
1511 }
1512
1513 #[inline]
1514 fn as_raw(self) -> Self::Repr {
1515 self.0
1516 }
1517
1518 #[inline]
1519 fn is_null(self) -> bool {
1520 self.0 == 0
1521 }
1522}
1523
1524impl Default for Instance {
1525 #[inline]
1526 fn default() -> Self {
1527 Self::null()
1528 }
1529}
1530
1531impl fmt::Debug for Instance {
1532 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1533 write!(f, "Instance({:p})", self.0 as *const u8)
1534 }
1535}
1536
1537#[repr(transparent)]
1539#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1540pub struct MicromapEXT(u64);
1541
1542impl Handle for MicromapEXT {
1543 type Repr = u64;
1544
1545 const TYPE: ObjectType = ObjectType::MICROMAP_EXT;
1546
1547 #[inline]
1548 fn null() -> Self {
1549 Self(0)
1550 }
1551
1552 #[inline]
1553 fn from_raw(value: Self::Repr) -> Self {
1554 Self(value)
1555 }
1556
1557 #[inline]
1558 fn as_raw(self) -> Self::Repr {
1559 self.0
1560 }
1561
1562 #[inline]
1563 fn is_null(self) -> bool {
1564 self.0 == 0
1565 }
1566}
1567
1568impl Default for MicromapEXT {
1569 #[inline]
1570 fn default() -> Self {
1571 Self::null()
1572 }
1573}
1574
1575impl fmt::Debug for MicromapEXT {
1576 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1577 write!(f, "MicromapEXT({:p})", self.0 as *const u8)
1578 }
1579}
1580
1581#[repr(transparent)]
1583#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1584pub struct OpticalFlowSessionNV(u64);
1585
1586impl Handle for OpticalFlowSessionNV {
1587 type Repr = u64;
1588
1589 const TYPE: ObjectType = ObjectType::OPTICAL_FLOW_SESSION_NV;
1590
1591 #[inline]
1592 fn null() -> Self {
1593 Self(0)
1594 }
1595
1596 #[inline]
1597 fn from_raw(value: Self::Repr) -> Self {
1598 Self(value)
1599 }
1600
1601 #[inline]
1602 fn as_raw(self) -> Self::Repr {
1603 self.0
1604 }
1605
1606 #[inline]
1607 fn is_null(self) -> bool {
1608 self.0 == 0
1609 }
1610}
1611
1612impl Default for OpticalFlowSessionNV {
1613 #[inline]
1614 fn default() -> Self {
1615 Self::null()
1616 }
1617}
1618
1619impl fmt::Debug for OpticalFlowSessionNV {
1620 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1621 write!(f, "OpticalFlowSessionNV({:p})", self.0 as *const u8)
1622 }
1623}
1624
1625#[repr(transparent)]
1627#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1628pub struct PerformanceConfigurationINTEL(u64);
1629
1630impl Handle for PerformanceConfigurationINTEL {
1631 type Repr = u64;
1632
1633 const TYPE: ObjectType = ObjectType::PERFORMANCE_CONFIGURATION_INTEL;
1634
1635 #[inline]
1636 fn null() -> Self {
1637 Self(0)
1638 }
1639
1640 #[inline]
1641 fn from_raw(value: Self::Repr) -> Self {
1642 Self(value)
1643 }
1644
1645 #[inline]
1646 fn as_raw(self) -> Self::Repr {
1647 self.0
1648 }
1649
1650 #[inline]
1651 fn is_null(self) -> bool {
1652 self.0 == 0
1653 }
1654}
1655
1656impl Default for PerformanceConfigurationINTEL {
1657 #[inline]
1658 fn default() -> Self {
1659 Self::null()
1660 }
1661}
1662
1663impl fmt::Debug for PerformanceConfigurationINTEL {
1664 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1665 write!(
1666 f,
1667 "PerformanceConfigurationINTEL({:p})",
1668 self.0 as *const u8
1669 )
1670 }
1671}
1672
1673#[repr(transparent)]
1675#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1676pub struct PhysicalDevice(usize);
1677
1678impl Handle for PhysicalDevice {
1679 type Repr = usize;
1680
1681 const TYPE: ObjectType = ObjectType::PHYSICAL_DEVICE;
1682
1683 #[inline]
1684 fn null() -> Self {
1685 Self(0)
1686 }
1687
1688 #[inline]
1689 fn from_raw(value: Self::Repr) -> Self {
1690 Self(value)
1691 }
1692
1693 #[inline]
1694 fn as_raw(self) -> Self::Repr {
1695 self.0
1696 }
1697
1698 #[inline]
1699 fn is_null(self) -> bool {
1700 self.0 == 0
1701 }
1702}
1703
1704impl Default for PhysicalDevice {
1705 #[inline]
1706 fn default() -> Self {
1707 Self::null()
1708 }
1709}
1710
1711impl fmt::Debug for PhysicalDevice {
1712 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1713 write!(f, "PhysicalDevice({:p})", self.0 as *const u8)
1714 }
1715}
1716
1717#[repr(transparent)]
1719#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1720pub struct Pipeline(u64);
1721
1722impl Handle for Pipeline {
1723 type Repr = u64;
1724
1725 const TYPE: ObjectType = ObjectType::PIPELINE;
1726
1727 #[inline]
1728 fn null() -> Self {
1729 Self(0)
1730 }
1731
1732 #[inline]
1733 fn from_raw(value: Self::Repr) -> Self {
1734 Self(value)
1735 }
1736
1737 #[inline]
1738 fn as_raw(self) -> Self::Repr {
1739 self.0
1740 }
1741
1742 #[inline]
1743 fn is_null(self) -> bool {
1744 self.0 == 0
1745 }
1746}
1747
1748impl Default for Pipeline {
1749 #[inline]
1750 fn default() -> Self {
1751 Self::null()
1752 }
1753}
1754
1755impl fmt::Debug for Pipeline {
1756 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1757 write!(f, "Pipeline({:p})", self.0 as *const u8)
1758 }
1759}
1760
1761#[repr(transparent)]
1763#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1764pub struct PipelineBinaryKHR(u64);
1765
1766impl Handle for PipelineBinaryKHR {
1767 type Repr = u64;
1768
1769 const TYPE: ObjectType = ObjectType::PIPELINE_BINARY_KHR;
1770
1771 #[inline]
1772 fn null() -> Self {
1773 Self(0)
1774 }
1775
1776 #[inline]
1777 fn from_raw(value: Self::Repr) -> Self {
1778 Self(value)
1779 }
1780
1781 #[inline]
1782 fn as_raw(self) -> Self::Repr {
1783 self.0
1784 }
1785
1786 #[inline]
1787 fn is_null(self) -> bool {
1788 self.0 == 0
1789 }
1790}
1791
1792impl Default for PipelineBinaryKHR {
1793 #[inline]
1794 fn default() -> Self {
1795 Self::null()
1796 }
1797}
1798
1799impl fmt::Debug for PipelineBinaryKHR {
1800 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1801 write!(f, "PipelineBinaryKHR({:p})", self.0 as *const u8)
1802 }
1803}
1804
1805#[repr(transparent)]
1807#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1808pub struct PipelineCache(u64);
1809
1810impl Handle for PipelineCache {
1811 type Repr = u64;
1812
1813 const TYPE: ObjectType = ObjectType::PIPELINE_CACHE;
1814
1815 #[inline]
1816 fn null() -> Self {
1817 Self(0)
1818 }
1819
1820 #[inline]
1821 fn from_raw(value: Self::Repr) -> Self {
1822 Self(value)
1823 }
1824
1825 #[inline]
1826 fn as_raw(self) -> Self::Repr {
1827 self.0
1828 }
1829
1830 #[inline]
1831 fn is_null(self) -> bool {
1832 self.0 == 0
1833 }
1834}
1835
1836impl Default for PipelineCache {
1837 #[inline]
1838 fn default() -> Self {
1839 Self::null()
1840 }
1841}
1842
1843impl fmt::Debug for PipelineCache {
1844 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1845 write!(f, "PipelineCache({:p})", self.0 as *const u8)
1846 }
1847}
1848
1849#[repr(transparent)]
1851#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1852pub struct PipelineLayout(u64);
1853
1854impl Handle for PipelineLayout {
1855 type Repr = u64;
1856
1857 const TYPE: ObjectType = ObjectType::PIPELINE_LAYOUT;
1858
1859 #[inline]
1860 fn null() -> Self {
1861 Self(0)
1862 }
1863
1864 #[inline]
1865 fn from_raw(value: Self::Repr) -> Self {
1866 Self(value)
1867 }
1868
1869 #[inline]
1870 fn as_raw(self) -> Self::Repr {
1871 self.0
1872 }
1873
1874 #[inline]
1875 fn is_null(self) -> bool {
1876 self.0 == 0
1877 }
1878}
1879
1880impl Default for PipelineLayout {
1881 #[inline]
1882 fn default() -> Self {
1883 Self::null()
1884 }
1885}
1886
1887impl fmt::Debug for PipelineLayout {
1888 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1889 write!(f, "PipelineLayout({:p})", self.0 as *const u8)
1890 }
1891}
1892
1893#[repr(transparent)]
1895#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1896pub struct PrivateDataSlot(u64);
1897
1898impl Handle for PrivateDataSlot {
1899 type Repr = u64;
1900
1901 const TYPE: ObjectType = ObjectType::PRIVATE_DATA_SLOT;
1902
1903 #[inline]
1904 fn null() -> Self {
1905 Self(0)
1906 }
1907
1908 #[inline]
1909 fn from_raw(value: Self::Repr) -> Self {
1910 Self(value)
1911 }
1912
1913 #[inline]
1914 fn as_raw(self) -> Self::Repr {
1915 self.0
1916 }
1917
1918 #[inline]
1919 fn is_null(self) -> bool {
1920 self.0 == 0
1921 }
1922}
1923
1924impl Default for PrivateDataSlot {
1925 #[inline]
1926 fn default() -> Self {
1927 Self::null()
1928 }
1929}
1930
1931impl fmt::Debug for PrivateDataSlot {
1932 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1933 write!(f, "PrivateDataSlot({:p})", self.0 as *const u8)
1934 }
1935}
1936
1937#[repr(transparent)]
1939#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1940pub struct QueryPool(u64);
1941
1942impl Handle for QueryPool {
1943 type Repr = u64;
1944
1945 const TYPE: ObjectType = ObjectType::QUERY_POOL;
1946
1947 #[inline]
1948 fn null() -> Self {
1949 Self(0)
1950 }
1951
1952 #[inline]
1953 fn from_raw(value: Self::Repr) -> Self {
1954 Self(value)
1955 }
1956
1957 #[inline]
1958 fn as_raw(self) -> Self::Repr {
1959 self.0
1960 }
1961
1962 #[inline]
1963 fn is_null(self) -> bool {
1964 self.0 == 0
1965 }
1966}
1967
1968impl Default for QueryPool {
1969 #[inline]
1970 fn default() -> Self {
1971 Self::null()
1972 }
1973}
1974
1975impl fmt::Debug for QueryPool {
1976 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1977 write!(f, "QueryPool({:p})", self.0 as *const u8)
1978 }
1979}
1980
1981#[repr(transparent)]
1983#[derive(Copy, Clone, PartialEq, Eq, Hash)]
1984pub struct Queue(usize);
1985
1986impl Handle for Queue {
1987 type Repr = usize;
1988
1989 const TYPE: ObjectType = ObjectType::QUEUE;
1990
1991 #[inline]
1992 fn null() -> Self {
1993 Self(0)
1994 }
1995
1996 #[inline]
1997 fn from_raw(value: Self::Repr) -> Self {
1998 Self(value)
1999 }
2000
2001 #[inline]
2002 fn as_raw(self) -> Self::Repr {
2003 self.0
2004 }
2005
2006 #[inline]
2007 fn is_null(self) -> bool {
2008 self.0 == 0
2009 }
2010}
2011
2012impl Default for Queue {
2013 #[inline]
2014 fn default() -> Self {
2015 Self::null()
2016 }
2017}
2018
2019impl fmt::Debug for Queue {
2020 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2021 write!(f, "Queue({:p})", self.0 as *const u8)
2022 }
2023}
2024
2025#[repr(transparent)]
2027#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2028pub struct RenderPass(u64);
2029
2030impl Handle for RenderPass {
2031 type Repr = u64;
2032
2033 const TYPE: ObjectType = ObjectType::RENDER_PASS;
2034
2035 #[inline]
2036 fn null() -> Self {
2037 Self(0)
2038 }
2039
2040 #[inline]
2041 fn from_raw(value: Self::Repr) -> Self {
2042 Self(value)
2043 }
2044
2045 #[inline]
2046 fn as_raw(self) -> Self::Repr {
2047 self.0
2048 }
2049
2050 #[inline]
2051 fn is_null(self) -> bool {
2052 self.0 == 0
2053 }
2054}
2055
2056impl Default for RenderPass {
2057 #[inline]
2058 fn default() -> Self {
2059 Self::null()
2060 }
2061}
2062
2063impl fmt::Debug for RenderPass {
2064 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2065 write!(f, "RenderPass({:p})", self.0 as *const u8)
2066 }
2067}
2068
2069#[repr(transparent)]
2071#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2072pub struct Sampler(u64);
2073
2074impl Handle for Sampler {
2075 type Repr = u64;
2076
2077 const TYPE: ObjectType = ObjectType::SAMPLER;
2078
2079 #[inline]
2080 fn null() -> Self {
2081 Self(0)
2082 }
2083
2084 #[inline]
2085 fn from_raw(value: Self::Repr) -> Self {
2086 Self(value)
2087 }
2088
2089 #[inline]
2090 fn as_raw(self) -> Self::Repr {
2091 self.0
2092 }
2093
2094 #[inline]
2095 fn is_null(self) -> bool {
2096 self.0 == 0
2097 }
2098}
2099
2100impl Default for Sampler {
2101 #[inline]
2102 fn default() -> Self {
2103 Self::null()
2104 }
2105}
2106
2107impl fmt::Debug for Sampler {
2108 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2109 write!(f, "Sampler({:p})", self.0 as *const u8)
2110 }
2111}
2112
2113#[repr(transparent)]
2115#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2116pub struct SamplerYcbcrConversion(u64);
2117
2118impl Handle for SamplerYcbcrConversion {
2119 type Repr = u64;
2120
2121 const TYPE: ObjectType = ObjectType::SAMPLER_YCBCR_CONVERSION;
2122
2123 #[inline]
2124 fn null() -> Self {
2125 Self(0)
2126 }
2127
2128 #[inline]
2129 fn from_raw(value: Self::Repr) -> Self {
2130 Self(value)
2131 }
2132
2133 #[inline]
2134 fn as_raw(self) -> Self::Repr {
2135 self.0
2136 }
2137
2138 #[inline]
2139 fn is_null(self) -> bool {
2140 self.0 == 0
2141 }
2142}
2143
2144impl Default for SamplerYcbcrConversion {
2145 #[inline]
2146 fn default() -> Self {
2147 Self::null()
2148 }
2149}
2150
2151impl fmt::Debug for SamplerYcbcrConversion {
2152 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2153 write!(f, "SamplerYcbcrConversion({:p})", self.0 as *const u8)
2154 }
2155}
2156
2157#[repr(transparent)]
2159#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2160pub struct Semaphore(u64);
2161
2162impl Handle for Semaphore {
2163 type Repr = u64;
2164
2165 const TYPE: ObjectType = ObjectType::SEMAPHORE;
2166
2167 #[inline]
2168 fn null() -> Self {
2169 Self(0)
2170 }
2171
2172 #[inline]
2173 fn from_raw(value: Self::Repr) -> Self {
2174 Self(value)
2175 }
2176
2177 #[inline]
2178 fn as_raw(self) -> Self::Repr {
2179 self.0
2180 }
2181
2182 #[inline]
2183 fn is_null(self) -> bool {
2184 self.0 == 0
2185 }
2186}
2187
2188impl Default for Semaphore {
2189 #[inline]
2190 fn default() -> Self {
2191 Self::null()
2192 }
2193}
2194
2195impl fmt::Debug for Semaphore {
2196 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2197 write!(f, "Semaphore({:p})", self.0 as *const u8)
2198 }
2199}
2200
2201#[repr(transparent)]
2203#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2204pub struct SemaphoreSciSyncPoolNV(u64);
2205
2206impl Handle for SemaphoreSciSyncPoolNV {
2207 type Repr = u64;
2208
2209 const TYPE: ObjectType = ObjectType::SEMAPHORE_SCI_SYNC_POOL_NV;
2210
2211 #[inline]
2212 fn null() -> Self {
2213 Self(0)
2214 }
2215
2216 #[inline]
2217 fn from_raw(value: Self::Repr) -> Self {
2218 Self(value)
2219 }
2220
2221 #[inline]
2222 fn as_raw(self) -> Self::Repr {
2223 self.0
2224 }
2225
2226 #[inline]
2227 fn is_null(self) -> bool {
2228 self.0 == 0
2229 }
2230}
2231
2232impl Default for SemaphoreSciSyncPoolNV {
2233 #[inline]
2234 fn default() -> Self {
2235 Self::null()
2236 }
2237}
2238
2239impl fmt::Debug for SemaphoreSciSyncPoolNV {
2240 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2241 write!(f, "SemaphoreSciSyncPoolNV({:p})", self.0 as *const u8)
2242 }
2243}
2244
2245#[repr(transparent)]
2247#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2248pub struct ShaderEXT(u64);
2249
2250impl Handle for ShaderEXT {
2251 type Repr = u64;
2252
2253 const TYPE: ObjectType = ObjectType::SHADER_EXT;
2254
2255 #[inline]
2256 fn null() -> Self {
2257 Self(0)
2258 }
2259
2260 #[inline]
2261 fn from_raw(value: Self::Repr) -> Self {
2262 Self(value)
2263 }
2264
2265 #[inline]
2266 fn as_raw(self) -> Self::Repr {
2267 self.0
2268 }
2269
2270 #[inline]
2271 fn is_null(self) -> bool {
2272 self.0 == 0
2273 }
2274}
2275
2276impl Default for ShaderEXT {
2277 #[inline]
2278 fn default() -> Self {
2279 Self::null()
2280 }
2281}
2282
2283impl fmt::Debug for ShaderEXT {
2284 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2285 write!(f, "ShaderEXT({:p})", self.0 as *const u8)
2286 }
2287}
2288
2289#[repr(transparent)]
2291#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2292pub struct ShaderModule(u64);
2293
2294impl Handle for ShaderModule {
2295 type Repr = u64;
2296
2297 const TYPE: ObjectType = ObjectType::SHADER_MODULE;
2298
2299 #[inline]
2300 fn null() -> Self {
2301 Self(0)
2302 }
2303
2304 #[inline]
2305 fn from_raw(value: Self::Repr) -> Self {
2306 Self(value)
2307 }
2308
2309 #[inline]
2310 fn as_raw(self) -> Self::Repr {
2311 self.0
2312 }
2313
2314 #[inline]
2315 fn is_null(self) -> bool {
2316 self.0 == 0
2317 }
2318}
2319
2320impl Default for ShaderModule {
2321 #[inline]
2322 fn default() -> Self {
2323 Self::null()
2324 }
2325}
2326
2327impl fmt::Debug for ShaderModule {
2328 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2329 write!(f, "ShaderModule({:p})", self.0 as *const u8)
2330 }
2331}
2332
2333#[repr(transparent)]
2335#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2336pub struct SurfaceKHR(u64);
2337
2338impl Handle for SurfaceKHR {
2339 type Repr = u64;
2340
2341 const TYPE: ObjectType = ObjectType::SURFACE_KHR;
2342
2343 #[inline]
2344 fn null() -> Self {
2345 Self(0)
2346 }
2347
2348 #[inline]
2349 fn from_raw(value: Self::Repr) -> Self {
2350 Self(value)
2351 }
2352
2353 #[inline]
2354 fn as_raw(self) -> Self::Repr {
2355 self.0
2356 }
2357
2358 #[inline]
2359 fn is_null(self) -> bool {
2360 self.0 == 0
2361 }
2362}
2363
2364impl Default for SurfaceKHR {
2365 #[inline]
2366 fn default() -> Self {
2367 Self::null()
2368 }
2369}
2370
2371impl fmt::Debug for SurfaceKHR {
2372 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2373 write!(f, "SurfaceKHR({:p})", self.0 as *const u8)
2374 }
2375}
2376
2377#[repr(transparent)]
2379#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2380pub struct SwapchainKHR(u64);
2381
2382impl Handle for SwapchainKHR {
2383 type Repr = u64;
2384
2385 const TYPE: ObjectType = ObjectType::SWAPCHAIN_KHR;
2386
2387 #[inline]
2388 fn null() -> Self {
2389 Self(0)
2390 }
2391
2392 #[inline]
2393 fn from_raw(value: Self::Repr) -> Self {
2394 Self(value)
2395 }
2396
2397 #[inline]
2398 fn as_raw(self) -> Self::Repr {
2399 self.0
2400 }
2401
2402 #[inline]
2403 fn is_null(self) -> bool {
2404 self.0 == 0
2405 }
2406}
2407
2408impl Default for SwapchainKHR {
2409 #[inline]
2410 fn default() -> Self {
2411 Self::null()
2412 }
2413}
2414
2415impl fmt::Debug for SwapchainKHR {
2416 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2417 write!(f, "SwapchainKHR({:p})", self.0 as *const u8)
2418 }
2419}
2420
2421#[repr(transparent)]
2423#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2424pub struct TensorARM(u64);
2425
2426impl Handle for TensorARM {
2427 type Repr = u64;
2428
2429 const TYPE: ObjectType = ObjectType::TENSOR_ARM;
2430
2431 #[inline]
2432 fn null() -> Self {
2433 Self(0)
2434 }
2435
2436 #[inline]
2437 fn from_raw(value: Self::Repr) -> Self {
2438 Self(value)
2439 }
2440
2441 #[inline]
2442 fn as_raw(self) -> Self::Repr {
2443 self.0
2444 }
2445
2446 #[inline]
2447 fn is_null(self) -> bool {
2448 self.0 == 0
2449 }
2450}
2451
2452impl Default for TensorARM {
2453 #[inline]
2454 fn default() -> Self {
2455 Self::null()
2456 }
2457}
2458
2459impl fmt::Debug for TensorARM {
2460 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2461 write!(f, "TensorARM({:p})", self.0 as *const u8)
2462 }
2463}
2464
2465#[repr(transparent)]
2467#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2468pub struct TensorViewARM(u64);
2469
2470impl Handle for TensorViewARM {
2471 type Repr = u64;
2472
2473 const TYPE: ObjectType = ObjectType::TENSOR_VIEW_ARM;
2474
2475 #[inline]
2476 fn null() -> Self {
2477 Self(0)
2478 }
2479
2480 #[inline]
2481 fn from_raw(value: Self::Repr) -> Self {
2482 Self(value)
2483 }
2484
2485 #[inline]
2486 fn as_raw(self) -> Self::Repr {
2487 self.0
2488 }
2489
2490 #[inline]
2491 fn is_null(self) -> bool {
2492 self.0 == 0
2493 }
2494}
2495
2496impl Default for TensorViewARM {
2497 #[inline]
2498 fn default() -> Self {
2499 Self::null()
2500 }
2501}
2502
2503impl fmt::Debug for TensorViewARM {
2504 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2505 write!(f, "TensorViewARM({:p})", self.0 as *const u8)
2506 }
2507}
2508
2509#[repr(transparent)]
2511#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2512pub struct ValidationCacheEXT(u64);
2513
2514impl Handle for ValidationCacheEXT {
2515 type Repr = u64;
2516
2517 const TYPE: ObjectType = ObjectType::VALIDATION_CACHE_EXT;
2518
2519 #[inline]
2520 fn null() -> Self {
2521 Self(0)
2522 }
2523
2524 #[inline]
2525 fn from_raw(value: Self::Repr) -> Self {
2526 Self(value)
2527 }
2528
2529 #[inline]
2530 fn as_raw(self) -> Self::Repr {
2531 self.0
2532 }
2533
2534 #[inline]
2535 fn is_null(self) -> bool {
2536 self.0 == 0
2537 }
2538}
2539
2540impl Default for ValidationCacheEXT {
2541 #[inline]
2542 fn default() -> Self {
2543 Self::null()
2544 }
2545}
2546
2547impl fmt::Debug for ValidationCacheEXT {
2548 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2549 write!(f, "ValidationCacheEXT({:p})", self.0 as *const u8)
2550 }
2551}
2552
2553#[repr(transparent)]
2555#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2556pub struct VideoSessionKHR(u64);
2557
2558impl Handle for VideoSessionKHR {
2559 type Repr = u64;
2560
2561 const TYPE: ObjectType = ObjectType::VIDEO_SESSION_KHR;
2562
2563 #[inline]
2564 fn null() -> Self {
2565 Self(0)
2566 }
2567
2568 #[inline]
2569 fn from_raw(value: Self::Repr) -> Self {
2570 Self(value)
2571 }
2572
2573 #[inline]
2574 fn as_raw(self) -> Self::Repr {
2575 self.0
2576 }
2577
2578 #[inline]
2579 fn is_null(self) -> bool {
2580 self.0 == 0
2581 }
2582}
2583
2584impl Default for VideoSessionKHR {
2585 #[inline]
2586 fn default() -> Self {
2587 Self::null()
2588 }
2589}
2590
2591impl fmt::Debug for VideoSessionKHR {
2592 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2593 write!(f, "VideoSessionKHR({:p})", self.0 as *const u8)
2594 }
2595}
2596
2597#[repr(transparent)]
2599#[derive(Copy, Clone, PartialEq, Eq, Hash)]
2600pub struct VideoSessionParametersKHR(u64);
2601
2602impl Handle for VideoSessionParametersKHR {
2603 type Repr = u64;
2604
2605 const TYPE: ObjectType = ObjectType::VIDEO_SESSION_PARAMETERS_KHR;
2606
2607 #[inline]
2608 fn null() -> Self {
2609 Self(0)
2610 }
2611
2612 #[inline]
2613 fn from_raw(value: Self::Repr) -> Self {
2614 Self(value)
2615 }
2616
2617 #[inline]
2618 fn as_raw(self) -> Self::Repr {
2619 self.0
2620 }
2621
2622 #[inline]
2623 fn is_null(self) -> bool {
2624 self.0 == 0
2625 }
2626}
2627
2628impl Default for VideoSessionParametersKHR {
2629 #[inline]
2630 fn default() -> Self {
2631 Self::null()
2632 }
2633}
2634
2635impl fmt::Debug for VideoSessionParametersKHR {
2636 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2637 write!(f, "VideoSessionParametersKHR({:p})", self.0 as *const u8)
2638 }
2639}
2640
2641pub type DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate;
2643pub type PrivateDataSlotEXT = PrivateDataSlot;
2645pub type SamplerYcbcrConversionKHR = SamplerYcbcrConversion;