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