diff --git a/ash/src/vk.rs b/ash/src/vk.rs index f5cdadb..9434089 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -6,13 +6,29 @@ pub trait Handle { fn from_raw(u64) -> Self; } #[macro_export] -macro_rules ! vk_make_version { ( $ major : expr , $ minor : expr , $ patch : expr ) => { ( ( $ major as u32 ) << 22 ) | ( ( $ minor as u32 ) << 12 ) | $ patch as u32 } ; } +macro_rules! vk_make_version { + ( $ major : expr , $ minor : expr , $ patch : expr ) => { + (($major as u32) << 22) | (($minor as u32) << 12) | $patch as u32 + }; +} #[macro_export] -macro_rules ! vk_version_major { ( $ major : expr ) => { ( $ major as u32 ) >> 22 } ; } +macro_rules! vk_version_major { + ( $ major : expr ) => { + ($major as u32) >> 22 + }; +} #[macro_export] -macro_rules ! vk_version_minor { ( $ minor : expr ) => { ( ( $ minor as u32 ) >> 12 ) & 0x3ff } ; } +macro_rules! vk_version_minor { + ( $ minor : expr ) => { + (($minor as u32) >> 12) & 0x3ff + }; +} #[macro_export] -macro_rules ! vk_version_patch { ( $ minor : expr ) => { ( $ minor as u32 ) & 0xfff } ; } +macro_rules! vk_version_patch { + ( $ minor : expr ) => { + ($minor as u32) & 0xfff + }; +} pub type RROutput = c_ulong; pub type VisualID = c_uint; pub type Display = *const c_void; @@ -39,11 +55,185 @@ pub type SECURITY_ATTRIBUTES = (); pub type ANativeWindow = c_void; pub type AHardwareBuffer = c_void; #[macro_export] -macro_rules ! vk_bitflags_wrapped { ( $ name : ident , $ all : expr , $ flag_type : ty ) => { impl Default for $ name { fn default ( ) -> $ name { $ name ( 0 ) } } impl fmt :: Debug for $ name { fn fmt ( & self , f : & mut fmt :: Formatter ) -> fmt :: Result { write ! ( f , "{}({:b})" , stringify ! ( $ name ) , self . 0 ) } } impl $ name { # [ inline ] pub fn empty ( ) -> $ name { $ name ( 0 ) } # [ inline ] pub fn all ( ) -> $ name { $ name ( $ all ) } # [ inline ] pub fn from_raw ( x : $ flag_type ) -> Self { $ name ( x ) } # [ inline ] pub fn as_raw ( self ) -> $ flag_type { self . 0 } # [ inline ] pub fn is_empty ( self ) -> bool { self == $ name :: empty ( ) } # [ inline ] pub fn is_all ( self ) -> bool { self & $ name :: all ( ) == $ name :: all ( ) } # [ inline ] pub fn intersects ( self , other : $ name ) -> bool { self & other != $ name :: empty ( ) } # [ doc = r" Returns whether `other` is a subset of `self`" ] # [ inline ] pub fn contains ( self , other : $ name ) -> bool { self & other == other } } impl :: std :: ops :: BitOr for $ name { type Output = $ name ; # [ inline ] fn bitor ( self , rhs : $ name ) -> $ name { $ name ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for $ name { # [ inline ] fn bitor_assign ( & mut self , rhs : $ name ) { * self = * self | rhs } } impl :: std :: ops :: BitAnd for $ name { type Output = $ name ; # [ inline ] fn bitand ( self , rhs : $ name ) -> $ name { $ name ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for $ name { # [ inline ] fn bitand_assign ( & mut self , rhs : $ name ) { * self = * self & rhs } } impl :: std :: ops :: BitXor for $ name { type Output = $ name ; # [ inline ] fn bitxor ( self , rhs : $ name ) -> $ name { $ name ( self . 0 ^ rhs . 0 ) } } impl :: std :: ops :: BitXorAssign for $ name { # [ inline ] fn bitxor_assign ( & mut self , rhs : $ name ) { * self = * self ^ rhs } } impl :: std :: ops :: Sub for $ name { type Output = $ name ; # [ inline ] fn sub ( self , rhs : $ name ) -> $ name { self & ! rhs } } impl :: std :: ops :: SubAssign for $ name { # [ inline ] fn sub_assign ( & mut self , rhs : $ name ) { * self = * self - rhs } } impl :: std :: ops :: Not for $ name { type Output = $ name ; # [ inline ] fn not ( self ) -> $ name { self ^ $ name :: all ( ) } } } } +macro_rules! vk_bitflags_wrapped { + ( $ name : ident , $ all : expr , $ flag_type : ty ) => { + impl Default for $name { + fn default() -> $name { + $name(0) + } + } + impl fmt::Debug for $name { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}({:b})", stringify!($name), self.0) + } + } + impl $name { + #[inline] + pub fn empty() -> $name { + $name(0) + } + #[inline] + pub fn all() -> $name { + $name($all) + } + #[inline] + pub fn from_raw(x: $flag_type) -> Self { + $name(x) + } + #[inline] + pub fn as_raw(self) -> $flag_type { + self.0 + } + #[inline] + pub fn is_empty(self) -> bool { + self == $name::empty() + } + #[inline] + pub fn is_all(self) -> bool { + self & $name::all() == $name::all() + } + #[inline] + pub fn intersects(self, other: $name) -> bool { + self & other != $name::empty() + } + #[doc = r" Returns whether `other` is a subset of `self`"] + #[inline] + pub fn contains(self, other: $name) -> bool { + self & other == other + } + } + impl ::std::ops::BitOr for $name { + type Output = $name; + #[inline] + fn bitor(self, rhs: $name) -> $name { + $name(self.0 | rhs.0) + } + } + impl ::std::ops::BitOrAssign for $name { + #[inline] + fn bitor_assign(&mut self, rhs: $name) { + *self = *self | rhs + } + } + impl ::std::ops::BitAnd for $name { + type Output = $name; + #[inline] + fn bitand(self, rhs: $name) -> $name { + $name(self.0 & rhs.0) + } + } + impl ::std::ops::BitAndAssign for $name { + #[inline] + fn bitand_assign(&mut self, rhs: $name) { + *self = *self & rhs + } + } + impl ::std::ops::BitXor for $name { + type Output = $name; + #[inline] + fn bitxor(self, rhs: $name) -> $name { + $name(self.0 ^ rhs.0) + } + } + impl ::std::ops::BitXorAssign for $name { + #[inline] + fn bitxor_assign(&mut self, rhs: $name) { + *self = *self ^ rhs + } + } + impl ::std::ops::Sub for $name { + type Output = $name; + #[inline] + fn sub(self, rhs: $name) -> $name { + self & !rhs + } + } + impl ::std::ops::SubAssign for $name { + #[inline] + fn sub_assign(&mut self, rhs: $name) { + *self = *self - rhs + } + } + impl ::std::ops::Not for $name { + type Output = $name; + #[inline] + fn not(self) -> $name { + self ^ $name::all() + } + } + }; +} #[macro_export] -macro_rules ! handle_nondispatchable { ( $ name : ident , $ ty : ident ) => { # [ repr ( transparent ) ] # [ derive ( Eq , PartialEq , Ord , PartialOrd , Clone , Copy , Hash , Default ) ] pub struct $ name ( u64 ) ; impl Handle for $ name { const TYPE : ObjectType = ObjectType :: $ ty ; fn as_raw ( self ) -> u64 { self . 0 as u64 } fn from_raw ( x : u64 ) -> Self { $ name ( x as _ ) } } impl $ name { pub fn null ( ) -> $ name { $ name ( 0 ) } } impl fmt :: Pointer for $ name { fn fmt ( & self , f : & mut fmt :: Formatter ) -> fmt :: Result { write ! ( f , "0x{:x}" , self . 0 ) } } impl fmt :: Debug for $ name { fn fmt ( & self , f : & mut fmt :: Formatter ) -> fmt :: Result { write ! ( f , "0x{:x}" , self . 0 ) } } } } +macro_rules! handle_nondispatchable { + ( $ name : ident , $ ty : ident ) => { + #[repr(transparent)] + #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash, Default)] + pub struct $name(u64); + impl Handle for $name { + const TYPE: ObjectType = ObjectType::$ty; + fn as_raw(self) -> u64 { + self.0 as u64 + } + fn from_raw(x: u64) -> Self { + $name(x as _) + } + } + impl $name { + pub fn null() -> $name { + $name(0) + } + } + impl fmt::Pointer for $name { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "0x{:x}", self.0) + } + } + impl fmt::Debug for $name { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "0x{:x}", self.0) + } + } + }; +} #[macro_export] -macro_rules ! define_handle { ( $ name : ident , $ ty : ident ) => { # [ repr ( transparent ) ] # [ derive ( Eq , PartialEq , Ord , PartialOrd , Clone , Copy , Hash ) ] pub struct $ name ( * mut u8 ) ; impl Default for $ name { fn default ( ) -> $ name { $ name :: null ( ) } } impl Handle for $ name { const TYPE : ObjectType = ObjectType :: $ ty ; fn as_raw ( self ) -> u64 { self . 0 as u64 } fn from_raw ( x : u64 ) -> Self { $ name ( x as _ ) } } unsafe impl Send for $ name { } unsafe impl Sync for $ name { } impl $ name { pub fn null ( ) -> Self { $ name ( :: std :: ptr :: null_mut ( ) ) } } impl fmt :: Pointer for $ name { fn fmt ( & self , f : & mut fmt :: Formatter ) -> fmt :: Result { fmt :: Pointer :: fmt ( & self . 0 , f ) } } impl fmt :: Debug for $ name { fn fmt ( & self , f : & mut fmt :: Formatter ) -> fmt :: Result { fmt :: Debug :: fmt ( & self . 0 , f ) } } } } +macro_rules! define_handle { + ( $ name : ident , $ ty : ident ) => { + #[repr(transparent)] + #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash)] + pub struct $name(*mut u8); + impl Default for $name { + fn default() -> $name { + $name::null() + } + } + impl Handle for $name { + const TYPE: ObjectType = ObjectType::$ty; + fn as_raw(self) -> u64 { + self.0 as u64 + } + fn from_raw(x: u64) -> Self { + $name(x as _) + } + } + unsafe impl Send for $name {} + unsafe impl Sync for $name {} + impl $name { + pub fn null() -> Self { + $name(::std::ptr::null_mut()) + } + } + impl fmt::Pointer for $name { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Pointer::fmt(&self.0, f) + } + } + impl fmt::Debug for $name { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(&self.0, f) + } + } + }; +} #[allow(non_camel_case_types)] pub type PFN_vkGetInstanceProcAddr = extern "system" fn(instance: Instance, p_name: *const c_char) -> PFN_vkVoidFunction; @@ -398,18 +588,18 @@ impl ::std::clone::Clone for InstanceFnV1_0 { enumerate_physical_devices: self.enumerate_physical_devices, get_physical_device_features: self.get_physical_device_features, get_physical_device_format_properties: self.get_physical_device_format_properties, - get_physical_device_image_format_properties: - self.get_physical_device_image_format_properties, + get_physical_device_image_format_properties: self + .get_physical_device_image_format_properties, get_physical_device_properties: self.get_physical_device_properties, - get_physical_device_queue_family_properties: - self.get_physical_device_queue_family_properties, + get_physical_device_queue_family_properties: self + .get_physical_device_queue_family_properties, get_physical_device_memory_properties: self.get_physical_device_memory_properties, get_device_proc_addr: self.get_device_proc_addr, create_device: self.create_device, enumerate_device_extension_properties: self.enumerate_device_extension_properties, enumerate_device_layer_properties: self.enumerate_device_layer_properties, - get_physical_device_sparse_image_format_properties: - self.get_physical_device_sparse_image_format_properties, + get_physical_device_sparse_image_format_properties: self + .get_physical_device_sparse_image_format_properties, } } } @@ -6044,19 +6234,19 @@ impl ::std::clone::Clone for InstanceFnV1_1 { get_physical_device_features2: self.get_physical_device_features2, get_physical_device_properties2: self.get_physical_device_properties2, get_physical_device_format_properties2: self.get_physical_device_format_properties2, - get_physical_device_image_format_properties2: - self.get_physical_device_image_format_properties2, - get_physical_device_queue_family_properties2: - self.get_physical_device_queue_family_properties2, + get_physical_device_image_format_properties2: self + .get_physical_device_image_format_properties2, + get_physical_device_queue_family_properties2: self + .get_physical_device_queue_family_properties2, get_physical_device_memory_properties2: self.get_physical_device_memory_properties2, - get_physical_device_sparse_image_format_properties2: - self.get_physical_device_sparse_image_format_properties2, - get_physical_device_external_buffer_properties: - self.get_physical_device_external_buffer_properties, - get_physical_device_external_fence_properties: - self.get_physical_device_external_fence_properties, - get_physical_device_external_semaphore_properties: - self.get_physical_device_external_semaphore_properties, + get_physical_device_sparse_image_format_properties2: self + .get_physical_device_sparse_image_format_properties2, + get_physical_device_external_buffer_properties: self + .get_physical_device_external_buffer_properties, + get_physical_device_external_fence_properties: self + .get_physical_device_external_fence_properties, + get_physical_device_external_semaphore_properties: self + .get_physical_device_external_semaphore_properties, } } } @@ -7852,8 +8042,7 @@ impl fmt::Debug for PhysicalDeviceProperties { .field("device_type", &self.device_type) .field("device_name", &unsafe { ::std::ffi::CStr::from_ptr(self.device_name.as_ptr() as *const i8) - }) - .field("pipeline_cache_uuid", &self.pipeline_cache_uuid) + }).field("pipeline_cache_uuid", &self.pipeline_cache_uuid) .field("limits", &self.limits) .field("sparse_properties", &self.sparse_properties) .finish() @@ -7956,8 +8145,7 @@ impl fmt::Debug for ExtensionProperties { fmt.debug_struct("ExtensionProperties") .field("extension_name", &unsafe { ::std::ffi::CStr::from_ptr(self.extension_name.as_ptr() as *const i8) - }) - .field("spec_version", &self.spec_version) + }).field("spec_version", &self.spec_version) .finish() } } @@ -8016,13 +8204,11 @@ impl fmt::Debug for LayerProperties { fmt.debug_struct("LayerProperties") .field("layer_name", &unsafe { ::std::ffi::CStr::from_ptr(self.layer_name.as_ptr() as *const i8) - }) - .field("spec_version", &self.spec_version) + }).field("spec_version", &self.spec_version) .field("implementation_version", &self.implementation_version) .field("description", &unsafe { ::std::ffi::CStr::from_ptr(self.description.as_ptr() as *const i8) - }) - .finish() + }).finish() } } impl ::std::default::Default for LayerProperties { @@ -8170,21 +8356,17 @@ impl fmt::Debug for AllocationCallbacks { .field( "pfn_allocation", &(self.pfn_allocation.map(|x| x as *const ())), - ) - .field( + ).field( "pfn_reallocation", &(self.pfn_reallocation.map(|x| x as *const ())), - ) - .field("pfn_free", &(self.pfn_free.map(|x| x as *const ()))) + ).field("pfn_free", &(self.pfn_free.map(|x| x as *const ()))) .field( "pfn_internal_allocation", &(self.pfn_internal_allocation.map(|x| x as *const ())), - ) - .field( + ).field( "pfn_internal_free", &(self.pfn_internal_free.map(|x| x as *const ())), - ) - .finish() + ).finish() } } impl ::std::default::Default for AllocationCallbacks { @@ -26911,8 +27093,7 @@ impl fmt::Debug for DebugUtilsMessengerCreateInfoEXT { .field( "pfn_user_callback", &(self.pfn_user_callback.map(|x| x as *const ())), - ) - .field("p_user_data", &self.p_user_data) + ).field("p_user_data", &self.p_user_data) .finish() } } @@ -28756,7 +28937,7 @@ impl ImageLayout { } } impl ImageLayout { - # [ doc = "Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)" ] + #[doc = "Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)"] pub const UNDEFINED: Self = ImageLayout(0); #[doc = "General layout when image can be used for any kind of access"] pub const GENERAL: Self = ImageLayout(1); @@ -28764,7 +28945,7 @@ impl ImageLayout { pub const COLOR_ATTACHMENT_OPTIMAL: Self = ImageLayout(2); #[doc = "Optimal layout when image is only used for depth/stencil attachment read/write"] pub const DEPTH_STENCIL_ATTACHMENT_OPTIMAL: Self = ImageLayout(3); - # [ doc = "Optimal layout when image is used for read only depth/stencil attachment and shader access" ] + #[doc = "Optimal layout when image is used for read only depth/stencil attachment and shader access"] pub const DEPTH_STENCIL_READ_ONLY_OPTIMAL: Self = ImageLayout(4); #[doc = "Optimal layout when image is used for read only shader access"] pub const SHADER_READ_ONLY_OPTIMAL: Self = ImageLayout(5); @@ -30284,7 +30465,7 @@ impl MemoryPropertyFlags { pub const DEVICE_LOCAL: Self = MemoryPropertyFlags(0b1); #[doc = "Memory is mappable by host"] pub const HOST_VISIBLE: Self = MemoryPropertyFlags(0b10); - # [ doc = "Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache" ] + #[doc = "Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache"] pub const HOST_COHERENT: Self = MemoryPropertyFlags(0b100); #[doc = "Memory will be cached by the host"] pub const HOST_CACHED: Self = MemoryPropertyFlags(0b1000); @@ -30372,7 +30553,7 @@ impl BufferCreateFlags { pub const SPARSE_BINDING: Self = BufferCreateFlags(0b1); #[doc = "Buffer should support sparse backing with partial residency"] pub const SPARSE_RESIDENCY: Self = BufferCreateFlags(0b10); - # [ doc = "Buffer should support constent data access to physical memory ranges mapped into multiple locations of sparse buffers" ] + #[doc = "Buffer should support constent data access to physical memory ranges mapped into multiple locations of sparse buffers"] pub const SPARSE_ALIASED: Self = BufferCreateFlags(0b100); } #[repr(transparent)] @@ -30420,7 +30601,7 @@ impl ImageCreateFlags { pub const SPARSE_BINDING: Self = ImageCreateFlags(0b1); #[doc = "Image should support sparse backing with partial residency"] pub const SPARSE_RESIDENCY: Self = ImageCreateFlags(0b10); - # [ doc = "Image should support constent data access to physical memory ranges mapped into multiple locations of sparse images" ] + #[doc = "Image should support constent data access to physical memory ranges mapped into multiple locations of sparse images"] pub const SPARSE_ALIASED: Self = ImageCreateFlags(0b100); #[doc = "Allows image views to have different format than the base image"] pub const MUTABLE_FORMAT: Self = ImageCreateFlags(0b1000); @@ -30458,7 +30639,7 @@ impl FenceCreateFlags { pub struct FormatFeatureFlags(pub(crate) Flags); vk_bitflags_wrapped!(FormatFeatureFlags, 0b1111111111111, Flags); impl FormatFeatureFlags { - # [ doc = "Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)" ] + #[doc = "Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"] pub const SAMPLED_IMAGE: Self = FormatFeatureFlags(0b1); #[doc = "Format can be used for storage images (STORAGE_IMAGE descriptor type)"] pub const STORAGE_IMAGE: Self = FormatFeatureFlags(0b10); @@ -30563,7 +30744,7 @@ vk_bitflags_wrapped!(SparseImageFormatFlags, 0b111, Flags); impl SparseImageFormatFlags { #[doc = "Image uses a single mip tail region for all array layers"] pub const SINGLE_MIPTAIL: Self = SparseImageFormatFlags(0b1); - # [ doc = "Image requires mip level dimensions to be an integer multiple of the sparse image block dimensions for non-tail mip levels." ] + #[doc = "Image requires mip level dimensions to be an integer multiple of the sparse image block dimensions for non-tail mip levels."] pub const ALIGNED_MIP_SIZE: Self = SparseImageFormatFlags(0b10); #[doc = "Image uses a non-standard sparse image block dimensions"] pub const NONSTANDARD_BLOCK_SIZE: Self = SparseImageFormatFlags(0b100); @@ -31074,11 +31255,11 @@ impl ::std::clone::Clone for KhrSurfaceFn { KhrSurfaceFn { destroy_surface_khr: self.destroy_surface_khr, get_physical_device_surface_support_khr: self.get_physical_device_surface_support_khr, - get_physical_device_surface_capabilities_khr: - self.get_physical_device_surface_capabilities_khr, + get_physical_device_surface_capabilities_khr: self + .get_physical_device_surface_capabilities_khr, get_physical_device_surface_formats_khr: self.get_physical_device_surface_formats_khr, - get_physical_device_surface_present_modes_khr: - self.get_physical_device_surface_present_modes_khr, + get_physical_device_surface_present_modes_khr: self + .get_physical_device_surface_present_modes_khr, } } } @@ -31337,12 +31518,12 @@ impl ::std::clone::Clone for KhrSwapchainFn { get_swapchain_images_khr: self.get_swapchain_images_khr, acquire_next_image_khr: self.acquire_next_image_khr, queue_present_khr: self.queue_present_khr, - get_device_group_present_capabilities_khr: - self.get_device_group_present_capabilities_khr, - get_device_group_surface_present_modes_khr: - self.get_device_group_surface_present_modes_khr, - get_physical_device_present_rectangles_khr: - self.get_physical_device_present_rectangles_khr, + get_device_group_present_capabilities_khr: self + .get_device_group_present_capabilities_khr, + get_device_group_surface_present_modes_khr: self + .get_device_group_surface_present_modes_khr, + get_physical_device_present_rectangles_khr: self + .get_physical_device_present_rectangles_khr, acquire_next_image2_khr: self.acquire_next_image2_khr, } } @@ -31787,10 +31968,10 @@ unsafe impl Sync for KhrDisplayFn {} impl ::std::clone::Clone for KhrDisplayFn { fn clone(&self) -> Self { KhrDisplayFn { - get_physical_device_display_properties_khr: - self.get_physical_device_display_properties_khr, - get_physical_device_display_plane_properties_khr: - self.get_physical_device_display_plane_properties_khr, + get_physical_device_display_properties_khr: self + .get_physical_device_display_properties_khr, + get_physical_device_display_plane_properties_khr: self + .get_physical_device_display_plane_properties_khr, get_display_plane_supported_displays_khr: self.get_display_plane_supported_displays_khr, get_display_mode_properties_khr: self.get_display_mode_properties_khr, create_display_mode_khr: self.create_display_mode_khr, @@ -32174,8 +32355,8 @@ impl ::std::clone::Clone for KhrXlibSurfaceFn { fn clone(&self) -> Self { KhrXlibSurfaceFn { create_xlib_surface_khr: self.create_xlib_surface_khr, - get_physical_device_xlib_presentation_support_khr: - self.get_physical_device_xlib_presentation_support_khr, + get_physical_device_xlib_presentation_support_khr: self + .get_physical_device_xlib_presentation_support_khr, } } } @@ -32294,8 +32475,8 @@ impl ::std::clone::Clone for KhrXcbSurfaceFn { fn clone(&self) -> Self { KhrXcbSurfaceFn { create_xcb_surface_khr: self.create_xcb_surface_khr, - get_physical_device_xcb_presentation_support_khr: - self.get_physical_device_xcb_presentation_support_khr, + get_physical_device_xcb_presentation_support_khr: self + .get_physical_device_xcb_presentation_support_khr, } } } @@ -32413,8 +32594,8 @@ impl ::std::clone::Clone for KhrWaylandSurfaceFn { fn clone(&self) -> Self { KhrWaylandSurfaceFn { create_wayland_surface_khr: self.create_wayland_surface_khr, - get_physical_device_wayland_presentation_support_khr: - self.get_physical_device_wayland_presentation_support_khr, + get_physical_device_wayland_presentation_support_khr: self + .get_physical_device_wayland_presentation_support_khr, } } } @@ -32528,8 +32709,8 @@ impl ::std::clone::Clone for KhrMirSurfaceFn { fn clone(&self) -> Self { KhrMirSurfaceFn { create_mir_surface_khr: self.create_mir_surface_khr, - get_physical_device_mir_presentation_support_khr: - self.get_physical_device_mir_presentation_support_khr, + get_physical_device_mir_presentation_support_khr: self + .get_physical_device_mir_presentation_support_khr, } } } @@ -32704,8 +32885,8 @@ impl ::std::clone::Clone for KhrWin32SurfaceFn { fn clone(&self) -> Self { KhrWin32SurfaceFn { create_win32_surface_khr: self.create_win32_surface_khr, - get_physical_device_win32_presentation_support_khr: - self.get_physical_device_win32_presentation_support_khr, + get_physical_device_win32_presentation_support_khr: self + .get_physical_device_win32_presentation_support_khr, } } } @@ -34287,8 +34468,8 @@ unsafe impl Sync for NvExternalMemoryCapabilitiesFn {} impl ::std::clone::Clone for NvExternalMemoryCapabilitiesFn { fn clone(&self) -> Self { NvExternalMemoryCapabilitiesFn { - get_physical_device_external_image_format_properties_nv: - self.get_physical_device_external_image_format_properties_nv, + get_physical_device_external_image_format_properties_nv: self + .get_physical_device_external_image_format_properties_nv, } } } @@ -34486,12 +34667,12 @@ unsafe impl Sync for KhrDeviceGroupFn {} impl ::std::clone::Clone for KhrDeviceGroupFn { fn clone(&self) -> Self { KhrDeviceGroupFn { - get_device_group_present_capabilities_khr: - self.get_device_group_present_capabilities_khr, - get_device_group_surface_present_modes_khr: - self.get_device_group_surface_present_modes_khr, - get_physical_device_present_rectangles_khr: - self.get_physical_device_present_rectangles_khr, + get_device_group_present_capabilities_khr: self + .get_device_group_present_capabilities_khr, + get_device_group_surface_present_modes_khr: self + .get_device_group_surface_present_modes_khr, + get_physical_device_present_rectangles_khr: self + .get_physical_device_present_rectangles_khr, acquire_next_image2_khr: self.acquire_next_image2_khr, } } @@ -35403,8 +35584,8 @@ impl ::std::clone::Clone for KhrPushDescriptorFn { fn clone(&self) -> Self { KhrPushDescriptorFn { cmd_push_descriptor_set_khr: self.cmd_push_descriptor_set_khr, - cmd_push_descriptor_set_with_template_khr: - self.cmd_push_descriptor_set_with_template_khr, + cmd_push_descriptor_set_with_template_khr: self + .cmd_push_descriptor_set_with_template_khr, } } } @@ -35587,8 +35768,8 @@ unsafe impl Sync for KhrDescriptorUpdateTemplateFn {} impl ::std::clone::Clone for KhrDescriptorUpdateTemplateFn { fn clone(&self) -> Self { KhrDescriptorUpdateTemplateFn { - cmd_push_descriptor_set_with_template_khr: - self.cmd_push_descriptor_set_with_template_khr, + cmd_push_descriptor_set_with_template_khr: self + .cmd_push_descriptor_set_with_template_khr, } } } @@ -35775,8 +35956,8 @@ impl ::std::clone::Clone for NvxDeviceGeneratedCommandsFn { destroy_object_table_nvx: self.destroy_object_table_nvx, register_objects_nvx: self.register_objects_nvx, unregister_objects_nvx: self.unregister_objects_nvx, - get_physical_device_generated_commands_properties_nvx: - self.get_physical_device_generated_commands_properties_nvx, + get_physical_device_generated_commands_properties_nvx: self + .get_physical_device_generated_commands_properties_nvx, } } } @@ -36356,8 +36537,8 @@ unsafe impl Sync for ExtDisplaySurfaceCounterFn {} impl ::std::clone::Clone for ExtDisplaySurfaceCounterFn { fn clone(&self) -> Self { ExtDisplaySurfaceCounterFn { - get_physical_device_surface_capabilities2_ext: - self.get_physical_device_surface_capabilities2_ext, + get_physical_device_surface_capabilities2_ext: self + .get_physical_device_surface_capabilities2_ext, } } } @@ -37595,8 +37776,8 @@ unsafe impl Sync for KhrGetSurfaceCapabilities2Fn {} impl ::std::clone::Clone for KhrGetSurfaceCapabilities2Fn { fn clone(&self) -> Self { KhrGetSurfaceCapabilities2Fn { - get_physical_device_surface_capabilities2_khr: - self.get_physical_device_surface_capabilities2_khr, + get_physical_device_surface_capabilities2_khr: self + .get_physical_device_surface_capabilities2_khr, get_physical_device_surface_formats2_khr: self.get_physical_device_surface_formats2_khr, } } @@ -37766,10 +37947,10 @@ unsafe impl Sync for KhrGetDisplayProperties2Fn {} impl ::std::clone::Clone for KhrGetDisplayProperties2Fn { fn clone(&self) -> Self { KhrGetDisplayProperties2Fn { - get_physical_device_display_properties2_khr: - self.get_physical_device_display_properties2_khr, - get_physical_device_display_plane_properties2_khr: - self.get_physical_device_display_plane_properties2_khr, + get_physical_device_display_properties2_khr: self + .get_physical_device_display_properties2_khr, + get_physical_device_display_plane_properties2_khr: self + .get_physical_device_display_plane_properties2_khr, get_display_mode_properties2_khr: self.get_display_mode_properties2_khr, get_display_plane_capabilities2_khr: self.get_display_plane_capabilities2_khr, } @@ -38600,10 +38781,10 @@ unsafe impl Sync for AndroidExternalMemoryAndroidHardwareBufferFn {} impl ::std::clone::Clone for AndroidExternalMemoryAndroidHardwareBufferFn { fn clone(&self) -> Self { AndroidExternalMemoryAndroidHardwareBufferFn { - get_android_hardware_buffer_properties_android: - self.get_android_hardware_buffer_properties_android, - get_memory_android_hardware_buffer_android: - self.get_memory_android_hardware_buffer_android, + get_android_hardware_buffer_properties_android: self + .get_android_hardware_buffer_properties_android, + get_memory_android_hardware_buffer_android: self + .get_memory_android_hardware_buffer_android, } } } @@ -38954,8 +39135,8 @@ impl ::std::clone::Clone for ExtSampleLocationsFn { fn clone(&self) -> Self { ExtSampleLocationsFn { cmd_set_sample_locations_ext: self.cmd_set_sample_locations_ext, - get_physical_device_multisample_properties_ext: - self.get_physical_device_multisample_properties_ext, + get_physical_device_multisample_properties_ext: self + .get_physical_device_multisample_properties_ext, } } } @@ -41773,12 +41954,10 @@ impl fmt::Display for Format { } impl fmt::Display for CommandPoolResetFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - CommandPoolResetFlags::RELEASE_RESOURCES.0, - "RELEASE_RESOURCES", - ), - ]; + const KNOWN: &[(Flags, &str)] = &[( + CommandPoolResetFlags::RELEASE_RESOURCES.0, + "RELEASE_RESOURCES", + )]; display_flags(f, KNOWN, self.0) } } @@ -41862,12 +42041,10 @@ impl fmt::Display for BlendOp { } impl fmt::Display for CommandBufferResetFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - CommandBufferResetFlags::RELEASE_RESOURCES.0, - "RELEASE_RESOURCES", - ), - ]; + const KNOWN: &[(Flags, &str)] = &[( + CommandBufferResetFlags::RELEASE_RESOURCES.0, + "RELEASE_RESOURCES", + )]; display_flags(f, KNOWN, self.0) } }