From 4546b267363a3cac2eef6f4b5333f8a5914a11e4 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Fri, 7 Dec 2018 00:59:06 -0800 Subject: [PATCH 1/5] SPIR-V reading helper --- ash/src/lib.rs | 1 + ash/src/util.rs | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/ash/src/lib.rs b/ash/src/lib.rs index a3addf6..d984711 100644 --- a/ash/src/lib.rs +++ b/ash/src/lib.rs @@ -1,6 +1,7 @@ #[macro_use] extern crate lazy_static; extern crate shared_library; + pub use device::Device; pub use entry::{Entry, InstanceError, LoadingError}; pub use instance::Instance; diff --git a/ash/src/util.rs b/ash/src/util.rs index 8abd572..178da36 100644 --- a/ash/src/util.rs +++ b/ash/src/util.rs @@ -2,6 +2,7 @@ use std::iter::Iterator; use std::marker::PhantomData; use std::mem::size_of; use std::os::raw::c_void; +use std::{io, slice}; use vk; /// `Align` handles dynamic alignment. The is useful for dynamic uniform buffers where @@ -80,3 +81,58 @@ impl<'a, T: Copy + 'a> Iterator for AlignIter<'a, T> { } } } + +/// Decode SPIR-V from bytes. +/// +/// This function handles SPIR-V of arbitrary endianness gracefully, and returns correctly aligned +/// storage. +/// +/// # Examples +/// ```no_run +/// // Decode SPIR-V from a file +/// let mut file = std::fs::File::open("/path/to/shader.spv").unwrap(); +/// let words = ash::util::read_spv(&mut file).unwrap(); +/// ``` +/// ``` +/// // Decode SPIR-V from memory +/// const SPIRV: &[u8] = &[ +/// // ... +/// # 0x03, 0x02, 0x23, 0x07, +/// ]; +/// let words = ash::util::read_spv(&mut std::io::Cursor::new(&SPIRV[..])).unwrap(); +/// ``` +pub fn read_spv(x: &mut R) -> io::Result> { + let size = x.seek(io::SeekFrom::End(0))?; + if size % 4 != 0 { + return Err(io::Error::new( + io::ErrorKind::InvalidData, + "input length not divisible by 4", + )); + } + if size > usize::max_value() as u64 { + return Err(io::Error::new(io::ErrorKind::InvalidData, "input too long")); + } + let words = (size / 4) as usize; + let mut result = Vec::::with_capacity(words); + x.seek(io::SeekFrom::Start(0))?; + unsafe { + x.read_exact(slice::from_raw_parts_mut( + result.as_mut_ptr() as *mut u8, + words * 4, + ))?; + result.set_len(words); + } + const MAGIC_NUMBER: u32 = 0x07230203; + if result.len() > 0 && result[0] == MAGIC_NUMBER.swap_bytes() { + for word in &mut result { + *word = word.swap_bytes(); + } + } + if result.len() == 0 || result[0] != MAGIC_NUMBER { + return Err(io::Error::new( + io::ErrorKind::InvalidData, + "input missing SPIR-V magic number", + )); + } + Ok(result) +} From 06b9599e167f1964f1fc2252b2e442616c031dcc Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Fri, 7 Dec 2018 01:33:36 -0800 Subject: [PATCH 2/5] Update to latest rustfmt --- .travis.yml | 2 +- ash/src/entry.rs | 6 +- ash/src/vk.rs | 3739 +++++++++++++++++----------------- examples/src/bin/texture.rs | 33 +- examples/src/bin/triangle.rs | 18 +- examples/src/lib.rs | 21 +- generator/src/lib.rs | 253 ++- 7 files changed, 2026 insertions(+), 2046 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2169ccd..9941370 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ os: language: rust before_script: -- rustup component add rustfmt-preview +- rustup component add rustfmt rust: - stable diff --git a/ash/src/entry.rs b/ash/src/entry.rs index 643c972..e8cefd7 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -17,11 +17,7 @@ const LIB_PATH: &'static str = "vulkan-1.dll"; #[cfg(all( unix, - not(any( - target_os = "macos", - target_os = "ios", - target_os = "android" - )) + not(any(target_os = "macos", target_os = "ios", target_os = "android")) ))] const LIB_PATH: &'static str = "libvulkan.so.1"; diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 3d655b9..9865a9a 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -294,12 +294,11 @@ pub type PFN_vkCreateInstance = extern "system" fn( p_instance: *mut Instance, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkEnumerateInstanceExtensionProperties = - extern "system" fn( - p_layer_name: *const c_char, - p_property_count: *mut u32, - p_properties: *mut ExtensionProperties, - ) -> Result; +pub type PFN_vkEnumerateInstanceExtensionProperties = extern "system" fn( + p_layer_name: *const c_char, + p_property_count: *mut u32, + p_properties: *mut ExtensionProperties, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkEnumerateInstanceLayerProperties = extern "system" fn(p_property_count: *mut u32, p_properties: *mut LayerProperties) -> Result; @@ -309,15 +308,15 @@ pub struct EntryFnV1_0 { p_allocator: *const AllocationCallbacks, p_instance: *mut Instance, ) -> Result, - pub enumerate_instance_extension_properties: - extern "system" fn( - p_layer_name: *const c_char, - p_property_count: *mut u32, - p_properties: *mut ExtensionProperties, - ) -> Result, - pub enumerate_instance_layer_properties: - extern "system" fn(p_property_count: *mut u32, p_properties: *mut LayerProperties) - -> Result, + pub enumerate_instance_extension_properties: extern "system" fn( + p_layer_name: *const c_char, + p_property_count: *mut u32, + p_properties: *mut ExtensionProperties, + ) -> Result, + pub enumerate_instance_layer_properties: extern "system" fn( + p_property_count: *mut u32, + p_properties: *mut LayerProperties, + ) -> Result, } unsafe impl Send for EntryFnV1_0 {} unsafe impl Sync for EntryFnV1_0 {} @@ -422,53 +421,48 @@ impl EntryFnV1_0 { pub type PFN_vkDestroyInstance = extern "system" fn(instance: Instance, p_allocator: *const AllocationCallbacks) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkEnumeratePhysicalDevices = - extern "system" fn( - instance: Instance, - p_physical_device_count: *mut u32, - p_physical_devices: *mut PhysicalDevice, - ) -> Result; +pub type PFN_vkEnumeratePhysicalDevices = extern "system" fn( + instance: Instance, + p_physical_device_count: *mut u32, + p_physical_devices: *mut PhysicalDevice, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceFeatures = - extern "system" fn(physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures) - -> c_void; +pub type PFN_vkGetPhysicalDeviceFeatures = extern "system" fn( + physical_device: PhysicalDevice, + p_features: *mut PhysicalDeviceFeatures, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceFormatProperties = - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - p_format_properties: *mut FormatProperties, - ) -> c_void; +pub type PFN_vkGetPhysicalDeviceFormatProperties = extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + p_format_properties: *mut FormatProperties, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceImageFormatProperties = - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - ty: ImageType, - tiling: ImageTiling, - usage: ImageUsageFlags, - flags: ImageCreateFlags, - p_image_format_properties: *mut ImageFormatProperties, - ) -> Result; +pub type PFN_vkGetPhysicalDeviceImageFormatProperties = extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + ty: ImageType, + tiling: ImageTiling, + usage: ImageUsageFlags, + flags: ImageCreateFlags, + p_image_format_properties: *mut ImageFormatProperties, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_properties: *mut PhysicalDeviceProperties, - ) -> c_void; +pub type PFN_vkGetPhysicalDeviceProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_properties: *mut PhysicalDeviceProperties, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceQueueFamilyProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_queue_family_property_count: *mut u32, - p_queue_family_properties: *mut QueueFamilyProperties, - ) -> c_void; +pub type PFN_vkGetPhysicalDeviceQueueFamilyProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_queue_family_property_count: *mut u32, + p_queue_family_properties: *mut QueueFamilyProperties, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceMemoryProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_memory_properties: *mut PhysicalDeviceMemoryProperties, - ) -> c_void; +pub type PFN_vkGetPhysicalDeviceMemoryProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_memory_properties: *mut PhysicalDeviceMemoryProperties, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceProcAddr = extern "system" fn(device: Device, p_name: *const c_char) -> PFN_vkVoidFunction; @@ -480,32 +474,29 @@ pub type PFN_vkCreateDevice = extern "system" fn( p_device: *mut Device, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkEnumerateDeviceExtensionProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_layer_name: *const c_char, - p_property_count: *mut u32, - p_properties: *mut ExtensionProperties, - ) -> Result; +pub type PFN_vkEnumerateDeviceExtensionProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_layer_name: *const c_char, + p_property_count: *mut u32, + p_properties: *mut ExtensionProperties, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkEnumerateDeviceLayerProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut LayerProperties, - ) -> Result; +pub type PFN_vkEnumerateDeviceLayerProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_property_count: *mut u32, + p_properties: *mut LayerProperties, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties = - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - ty: ImageType, - samples: SampleCountFlags, - usage: ImageUsageFlags, - tiling: ImageTiling, - p_property_count: *mut u32, - p_properties: *mut SparseImageFormatProperties, - ) -> c_void; +pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties = extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + ty: ImageType, + samples: SampleCountFlags, + usage: ImageUsageFlags, + tiling: ImageTiling, + p_property_count: *mut u32, + p_properties: *mut SparseImageFormatProperties, +) -> c_void; pub struct InstanceFnV1_0 { pub destroy_instance: extern "system" fn(instance: Instance, p_allocator: *const AllocationCallbacks) -> c_void, @@ -518,38 +509,33 @@ pub struct InstanceFnV1_0 { physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures, ) -> c_void, - pub get_physical_device_format_properties: - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - p_format_properties: *mut FormatProperties, - ) -> c_void, - pub get_physical_device_image_format_properties: - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - ty: ImageType, - tiling: ImageTiling, - usage: ImageUsageFlags, - flags: ImageCreateFlags, - p_image_format_properties: *mut ImageFormatProperties, - ) -> Result, - pub get_physical_device_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_properties: *mut PhysicalDeviceProperties, - ) -> c_void, - pub get_physical_device_queue_family_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_queue_family_property_count: *mut u32, - p_queue_family_properties: *mut QueueFamilyProperties, - ) -> c_void, - pub get_physical_device_memory_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_memory_properties: *mut PhysicalDeviceMemoryProperties, - ) -> c_void, + pub get_physical_device_format_properties: extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + p_format_properties: *mut FormatProperties, + ) -> c_void, + pub get_physical_device_image_format_properties: extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + ty: ImageType, + tiling: ImageTiling, + usage: ImageUsageFlags, + flags: ImageCreateFlags, + p_image_format_properties: *mut ImageFormatProperties, + ) -> Result, + pub get_physical_device_properties: extern "system" fn( + physical_device: PhysicalDevice, + p_properties: *mut PhysicalDeviceProperties, + ) -> c_void, + pub get_physical_device_queue_family_properties: extern "system" fn( + physical_device: PhysicalDevice, + p_queue_family_property_count: *mut u32, + p_queue_family_properties: *mut QueueFamilyProperties, + ) -> c_void, + pub get_physical_device_memory_properties: extern "system" fn( + physical_device: PhysicalDevice, + p_memory_properties: *mut PhysicalDeviceMemoryProperties, + ) -> c_void, pub get_device_proc_addr: extern "system" fn(device: Device, p_name: *const c_char) -> PFN_vkVoidFunction, pub create_device: extern "system" fn( @@ -558,29 +544,27 @@ pub struct InstanceFnV1_0 { p_allocator: *const AllocationCallbacks, p_device: *mut Device, ) -> Result, - pub enumerate_device_extension_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_layer_name: *const c_char, - p_property_count: *mut u32, - p_properties: *mut ExtensionProperties, - ) -> Result, + pub enumerate_device_extension_properties: extern "system" fn( + physical_device: PhysicalDevice, + p_layer_name: *const c_char, + p_property_count: *mut u32, + p_properties: *mut ExtensionProperties, + ) -> Result, pub enumerate_device_layer_properties: extern "system" fn( physical_device: PhysicalDevice, p_property_count: *mut u32, p_properties: *mut LayerProperties, ) -> Result, - pub get_physical_device_sparse_image_format_properties: - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - ty: ImageType, - samples: SampleCountFlags, - usage: ImageUsageFlags, - tiling: ImageTiling, - p_property_count: *mut u32, - p_properties: *mut SparseImageFormatProperties, - ) -> c_void, + pub get_physical_device_sparse_image_format_properties: extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + ty: ImageType, + samples: SampleCountFlags, + usage: ImageUsageFlags, + tiling: ImageTiling, + p_property_count: *mut u32, + p_properties: *mut SparseImageFormatProperties, + ) -> c_void, } unsafe impl Send for InstanceFnV1_0 {} unsafe impl Sync for InstanceFnV1_0 {} @@ -1019,9 +1003,12 @@ pub type PFN_vkGetDeviceQueue = extern "system" fn( p_queue: *mut Queue, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkQueueSubmit = - extern "system" fn(queue: Queue, submit_count: u32, p_submits: *const SubmitInfo, fence: Fence) - -> Result; +pub type PFN_vkQueueSubmit = extern "system" fn( + queue: Queue, + submit_count: u32, + p_submits: *const SubmitInfo, + fence: Fence, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkQueueWaitIdle = extern "system" fn(queue: Queue) -> Result; #[allow(non_camel_case_types)] @@ -1051,26 +1038,23 @@ pub type PFN_vkMapMemory = extern "system" fn( #[allow(non_camel_case_types)] pub type PFN_vkUnmapMemory = extern "system" fn(device: Device, memory: DeviceMemory) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkFlushMappedMemoryRanges = - extern "system" fn( - device: Device, - memory_range_count: u32, - p_memory_ranges: *const MappedMemoryRange, - ) -> Result; +pub type PFN_vkFlushMappedMemoryRanges = extern "system" fn( + device: Device, + memory_range_count: u32, + p_memory_ranges: *const MappedMemoryRange, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkInvalidateMappedMemoryRanges = - extern "system" fn( - device: Device, - memory_range_count: u32, - p_memory_ranges: *const MappedMemoryRange, - ) -> Result; +pub type PFN_vkInvalidateMappedMemoryRanges = extern "system" fn( + device: Device, + memory_range_count: u32, + p_memory_ranges: *const MappedMemoryRange, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetDeviceMemoryCommitment = - extern "system" fn( - device: Device, - memory: DeviceMemory, - p_committed_memory_in_bytes: *mut DeviceSize, - ) -> c_void; +pub type PFN_vkGetDeviceMemoryCommitment = extern "system" fn( + device: Device, + memory: DeviceMemory, + p_committed_memory_in_bytes: *mut DeviceSize, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkBindBufferMemory = extern "system" fn( device: Device, @@ -1086,27 +1070,24 @@ pub type PFN_vkBindImageMemory = extern "system" fn( memory_offset: DeviceSize, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetBufferMemoryRequirements = - extern "system" fn( - device: Device, - buffer: Buffer, - p_memory_requirements: *mut MemoryRequirements, - ) -> c_void; +pub type PFN_vkGetBufferMemoryRequirements = extern "system" fn( + device: Device, + buffer: Buffer, + p_memory_requirements: *mut MemoryRequirements, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetImageMemoryRequirements = - extern "system" fn( - device: Device, - image: Image, - p_memory_requirements: *mut MemoryRequirements, - ) -> c_void; +pub type PFN_vkGetImageMemoryRequirements = extern "system" fn( + device: Device, + image: Image, + p_memory_requirements: *mut MemoryRequirements, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetImageSparseMemoryRequirements = - extern "system" fn( - device: Device, - image: Image, - p_sparse_memory_requirement_count: *mut u32, - p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, - ) -> c_void; +pub type PFN_vkGetImageSparseMemoryRequirements = extern "system" fn( + device: Device, + image: Image, + p_sparse_memory_requirement_count: *mut u32, + p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkQueueBindSparse = extern "system" fn( queue: Queue, @@ -1122,9 +1103,11 @@ pub type PFN_vkCreateFence = extern "system" fn( p_fence: *mut Fence, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyFence = - extern "system" fn(device: Device, fence: Fence, p_allocator: *const AllocationCallbacks) - -> c_void; +pub type PFN_vkDestroyFence = extern "system" fn( + device: Device, + fence: Fence, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkResetFences = extern "system" fn(device: Device, fence_count: u32, p_fences: *const Fence) -> Result; @@ -1159,9 +1142,11 @@ pub type PFN_vkCreateEvent = extern "system" fn( p_event: *mut Event, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyEvent = - extern "system" fn(device: Device, event: Event, p_allocator: *const AllocationCallbacks) - -> c_void; +pub type PFN_vkDestroyEvent = extern "system" fn( + device: Device, + event: Event, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkGetEventStatus = extern "system" fn(device: Device, event: Event) -> Result; #[allow(non_camel_case_types)] @@ -1200,9 +1185,11 @@ pub type PFN_vkCreateBuffer = extern "system" fn( p_buffer: *mut Buffer, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyBuffer = - extern "system" fn(device: Device, buffer: Buffer, p_allocator: *const AllocationCallbacks) - -> c_void; +pub type PFN_vkDestroyBuffer = extern "system" fn( + device: Device, + buffer: Buffer, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCreateBufferView = extern "system" fn( device: Device, @@ -1224,17 +1211,18 @@ pub type PFN_vkCreateImage = extern "system" fn( p_image: *mut Image, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyImage = - extern "system" fn(device: Device, image: Image, p_allocator: *const AllocationCallbacks) - -> c_void; +pub type PFN_vkDestroyImage = extern "system" fn( + device: Device, + image: Image, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetImageSubresourceLayout = - extern "system" fn( - device: Device, - image: Image, - p_subresource: *const ImageSubresource, - p_layout: *mut SubresourceLayout, - ) -> c_void; +pub type PFN_vkGetImageSubresourceLayout = extern "system" fn( + device: Device, + image: Image, + p_subresource: *const ImageSubresource, + p_layout: *mut SubresourceLayout, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCreateImageView = extern "system" fn( device: Device, @@ -1249,13 +1237,12 @@ pub type PFN_vkDestroyImageView = extern "system" fn( p_allocator: *const AllocationCallbacks, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateShaderModule = - extern "system" fn( - device: Device, - p_create_info: *const ShaderModuleCreateInfo, - p_allocator: *const AllocationCallbacks, - p_shader_module: *mut ShaderModule, - ) -> Result; +pub type PFN_vkCreateShaderModule = extern "system" fn( + device: Device, + p_create_info: *const ShaderModuleCreateInfo, + p_allocator: *const AllocationCallbacks, + p_shader_module: *mut ShaderModule, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyShaderModule = extern "system" fn( device: Device, @@ -1263,13 +1250,12 @@ pub type PFN_vkDestroyShaderModule = extern "system" fn( p_allocator: *const AllocationCallbacks, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreatePipelineCache = - extern "system" fn( - device: Device, - p_create_info: *const PipelineCacheCreateInfo, - p_allocator: *const AllocationCallbacks, - p_pipeline_cache: *mut PipelineCache, - ) -> Result; +pub type PFN_vkCreatePipelineCache = extern "system" fn( + device: Device, + p_create_info: *const PipelineCacheCreateInfo, + p_allocator: *const AllocationCallbacks, + p_pipeline_cache: *mut PipelineCache, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyPipelineCache = extern "system" fn( device: Device, @@ -1291,37 +1277,36 @@ pub type PFN_vkMergePipelineCaches = extern "system" fn( p_src_caches: *const PipelineCache, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCreateGraphicsPipelines = - extern "system" fn( - device: Device, - pipeline_cache: PipelineCache, - create_info_count: u32, - p_create_infos: *const GraphicsPipelineCreateInfo, - p_allocator: *const AllocationCallbacks, - p_pipelines: *mut Pipeline, - ) -> Result; +pub type PFN_vkCreateGraphicsPipelines = extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + create_info_count: u32, + p_create_infos: *const GraphicsPipelineCreateInfo, + p_allocator: *const AllocationCallbacks, + p_pipelines: *mut Pipeline, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCreateComputePipelines = - extern "system" fn( - device: Device, - pipeline_cache: PipelineCache, - create_info_count: u32, - p_create_infos: *const ComputePipelineCreateInfo, - p_allocator: *const AllocationCallbacks, - p_pipelines: *mut Pipeline, - ) -> Result; +pub type PFN_vkCreateComputePipelines = extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + create_info_count: u32, + p_create_infos: *const ComputePipelineCreateInfo, + p_allocator: *const AllocationCallbacks, + p_pipelines: *mut Pipeline, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyPipeline = - extern "system" fn(device: Device, pipeline: Pipeline, p_allocator: *const AllocationCallbacks) - -> c_void; +pub type PFN_vkDestroyPipeline = extern "system" fn( + device: Device, + pipeline: Pipeline, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreatePipelineLayout = - extern "system" fn( - device: Device, - p_create_info: *const PipelineLayoutCreateInfo, - p_allocator: *const AllocationCallbacks, - p_pipeline_layout: *mut PipelineLayout, - ) -> Result; +pub type PFN_vkCreatePipelineLayout = extern "system" fn( + device: Device, + p_create_info: *const PipelineLayoutCreateInfo, + p_allocator: *const AllocationCallbacks, + p_pipeline_layout: *mut PipelineLayout, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyPipelineLayout = extern "system" fn( device: Device, @@ -1336,32 +1321,31 @@ pub type PFN_vkCreateSampler = extern "system" fn( p_sampler: *mut Sampler, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroySampler = - extern "system" fn(device: Device, sampler: Sampler, p_allocator: *const AllocationCallbacks) - -> c_void; +pub type PFN_vkDestroySampler = extern "system" fn( + device: Device, + sampler: Sampler, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateDescriptorSetLayout = - extern "system" fn( - device: Device, - p_create_info: *const DescriptorSetLayoutCreateInfo, - p_allocator: *const AllocationCallbacks, - p_set_layout: *mut DescriptorSetLayout, - ) -> Result; +pub type PFN_vkCreateDescriptorSetLayout = extern "system" fn( + device: Device, + p_create_info: *const DescriptorSetLayoutCreateInfo, + p_allocator: *const AllocationCallbacks, + p_set_layout: *mut DescriptorSetLayout, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyDescriptorSetLayout = - extern "system" fn( - device: Device, - descriptor_set_layout: DescriptorSetLayout, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroyDescriptorSetLayout = extern "system" fn( + device: Device, + descriptor_set_layout: DescriptorSetLayout, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateDescriptorPool = - extern "system" fn( - device: Device, - p_create_info: *const DescriptorPoolCreateInfo, - p_allocator: *const AllocationCallbacks, - p_descriptor_pool: *mut DescriptorPool, - ) -> Result; +pub type PFN_vkCreateDescriptorPool = extern "system" fn( + device: Device, + p_create_info: *const DescriptorPoolCreateInfo, + p_allocator: *const AllocationCallbacks, + p_descriptor_pool: *mut DescriptorPool, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyDescriptorPool = extern "system" fn( device: Device, @@ -1375,12 +1359,11 @@ pub type PFN_vkResetDescriptorPool = extern "system" fn( flags: DescriptorPoolResetFlags, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkAllocateDescriptorSets = - extern "system" fn( - device: Device, - p_allocate_info: *const DescriptorSetAllocateInfo, - p_descriptor_sets: *mut DescriptorSet, - ) -> Result; +pub type PFN_vkAllocateDescriptorSets = extern "system" fn( + device: Device, + p_allocate_info: *const DescriptorSetAllocateInfo, + p_descriptor_sets: *mut DescriptorSet, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkFreeDescriptorSets = extern "system" fn( device: Device, @@ -1389,14 +1372,13 @@ pub type PFN_vkFreeDescriptorSets = extern "system" fn( p_descriptor_sets: *const DescriptorSet, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkUpdateDescriptorSets = - extern "system" fn( - device: Device, - descriptor_write_count: u32, - p_descriptor_writes: *const WriteDescriptorSet, - descriptor_copy_count: u32, - p_descriptor_copies: *const CopyDescriptorSet, - ) -> c_void; +pub type PFN_vkUpdateDescriptorSets = extern "system" fn( + device: Device, + descriptor_write_count: u32, + p_descriptor_writes: *const WriteDescriptorSet, + descriptor_copy_count: u32, + p_descriptor_copies: *const CopyDescriptorSet, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCreateFramebuffer = extern "system" fn( device: Device, @@ -1424,9 +1406,11 @@ pub type PFN_vkDestroyRenderPass = extern "system" fn( p_allocator: *const AllocationCallbacks, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetRenderAreaGranularity = - extern "system" fn(device: Device, render_pass: RenderPass, p_granularity: *mut Extent2D) - -> c_void; +pub type PFN_vkGetRenderAreaGranularity = extern "system" fn( + device: Device, + render_pass: RenderPass, + p_granularity: *mut Extent2D, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCreateCommandPool = extern "system" fn( device: Device, @@ -1441,16 +1425,17 @@ pub type PFN_vkDestroyCommandPool = extern "system" fn( p_allocator: *const AllocationCallbacks, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkResetCommandPool = - extern "system" fn(device: Device, command_pool: CommandPool, flags: CommandPoolResetFlags) - -> Result; +pub type PFN_vkResetCommandPool = extern "system" fn( + device: Device, + command_pool: CommandPool, + flags: CommandPoolResetFlags, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkAllocateCommandBuffers = - extern "system" fn( - device: Device, - p_allocate_info: *const CommandBufferAllocateInfo, - p_command_buffers: *mut CommandBuffer, - ) -> Result; +pub type PFN_vkAllocateCommandBuffers = extern "system" fn( + device: Device, + p_allocate_info: *const CommandBufferAllocateInfo, + p_command_buffers: *mut CommandBuffer, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkFreeCommandBuffers = extern "system" fn( device: Device, @@ -1459,9 +1444,10 @@ pub type PFN_vkFreeCommandBuffers = extern "system" fn( p_command_buffers: *const CommandBuffer, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkBeginCommandBuffer = - extern "system" fn(command_buffer: CommandBuffer, p_begin_info: *const CommandBufferBeginInfo) - -> Result; +pub type PFN_vkBeginCommandBuffer = extern "system" fn( + command_buffer: CommandBuffer, + p_begin_info: *const CommandBufferBeginInfo, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkEndCommandBuffer = extern "system" fn(command_buffer: CommandBuffer) -> Result; #[allow(non_camel_case_types)] @@ -1501,9 +1487,11 @@ pub type PFN_vkCmdSetDepthBias = extern "system" fn( pub type PFN_vkCmdSetBlendConstants = extern "system" fn(command_buffer: CommandBuffer, blend_constants: [f32; 4]) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetDepthBounds = - extern "system" fn(command_buffer: CommandBuffer, min_depth_bounds: f32, max_depth_bounds: f32) - -> c_void; +pub type PFN_vkCmdSetDepthBounds = extern "system" fn( + command_buffer: CommandBuffer, + min_depth_bounds: f32, + max_depth_bounds: f32, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdSetStencilCompareMask = extern "system" fn( command_buffer: CommandBuffer, @@ -1511,13 +1499,17 @@ pub type PFN_vkCmdSetStencilCompareMask = extern "system" fn( compare_mask: u32, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetStencilWriteMask = - extern "system" fn(command_buffer: CommandBuffer, face_mask: StencilFaceFlags, write_mask: u32) - -> c_void; +pub type PFN_vkCmdSetStencilWriteMask = extern "system" fn( + command_buffer: CommandBuffer, + face_mask: StencilFaceFlags, + write_mask: u32, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetStencilReference = - extern "system" fn(command_buffer: CommandBuffer, face_mask: StencilFaceFlags, reference: u32) - -> c_void; +pub type PFN_vkCmdSetStencilReference = extern "system" fn( + command_buffer: CommandBuffer, + face_mask: StencilFaceFlags, + reference: u32, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdBindDescriptorSets = extern "system" fn( command_buffer: CommandBuffer, @@ -1660,15 +1652,14 @@ pub type PFN_vkCmdClearColorImage = extern "system" fn( p_ranges: *const ImageSubresourceRange, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdClearDepthStencilImage = - extern "system" fn( - command_buffer: CommandBuffer, - image: Image, - image_layout: ImageLayout, - p_depth_stencil: *const ClearDepthStencilValue, - range_count: u32, - p_ranges: *const ImageSubresourceRange, - ) -> c_void; +pub type PFN_vkCmdClearDepthStencilImage = extern "system" fn( + command_buffer: CommandBuffer, + image: Image, + image_layout: ImageLayout, + p_depth_stencil: *const ClearDepthStencilValue, + range_count: u32, + p_ranges: *const ImageSubresourceRange, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdClearAttachments = extern "system" fn( command_buffer: CommandBuffer, @@ -1688,42 +1679,44 @@ pub type PFN_vkCmdResolveImage = extern "system" fn( p_regions: *const ImageResolve, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetEvent = - extern "system" fn(command_buffer: CommandBuffer, event: Event, stage_mask: PipelineStageFlags) - -> c_void; +pub type PFN_vkCmdSetEvent = extern "system" fn( + command_buffer: CommandBuffer, + event: Event, + stage_mask: PipelineStageFlags, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdResetEvent = - extern "system" fn(command_buffer: CommandBuffer, event: Event, stage_mask: PipelineStageFlags) - -> c_void; +pub type PFN_vkCmdResetEvent = extern "system" fn( + command_buffer: CommandBuffer, + event: Event, + stage_mask: PipelineStageFlags, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdWaitEvents = - extern "system" fn( - command_buffer: CommandBuffer, - event_count: u32, - p_events: *const Event, - src_stage_mask: PipelineStageFlags, - dst_stage_mask: PipelineStageFlags, - memory_barrier_count: u32, - p_memory_barriers: *const MemoryBarrier, - buffer_memory_barrier_count: u32, - p_buffer_memory_barriers: *const BufferMemoryBarrier, - image_memory_barrier_count: u32, - p_image_memory_barriers: *const ImageMemoryBarrier, - ) -> c_void; +pub type PFN_vkCmdWaitEvents = extern "system" fn( + command_buffer: CommandBuffer, + event_count: u32, + p_events: *const Event, + src_stage_mask: PipelineStageFlags, + dst_stage_mask: PipelineStageFlags, + memory_barrier_count: u32, + p_memory_barriers: *const MemoryBarrier, + buffer_memory_barrier_count: u32, + p_buffer_memory_barriers: *const BufferMemoryBarrier, + image_memory_barrier_count: u32, + p_image_memory_barriers: *const ImageMemoryBarrier, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdPipelineBarrier = - extern "system" fn( - command_buffer: CommandBuffer, - src_stage_mask: PipelineStageFlags, - dst_stage_mask: PipelineStageFlags, - dependency_flags: DependencyFlags, - memory_barrier_count: u32, - p_memory_barriers: *const MemoryBarrier, - buffer_memory_barrier_count: u32, - p_buffer_memory_barriers: *const BufferMemoryBarrier, - image_memory_barrier_count: u32, - p_image_memory_barriers: *const ImageMemoryBarrier, - ) -> c_void; +pub type PFN_vkCmdPipelineBarrier = extern "system" fn( + command_buffer: CommandBuffer, + src_stage_mask: PipelineStageFlags, + dst_stage_mask: PipelineStageFlags, + dependency_flags: DependencyFlags, + memory_barrier_count: u32, + p_memory_barriers: *const MemoryBarrier, + buffer_memory_barrier_count: u32, + p_buffer_memory_barriers: *const BufferMemoryBarrier, + image_memory_barrier_count: u32, + p_image_memory_barriers: *const ImageMemoryBarrier, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdBeginQuery = extern "system" fn( command_buffer: CommandBuffer, @@ -1769,12 +1762,11 @@ pub type PFN_vkCmdPushConstants = extern "system" fn( p_values: *const c_void, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdBeginRenderPass = - extern "system" fn( - command_buffer: CommandBuffer, - p_render_pass_begin: *const RenderPassBeginInfo, - contents: SubpassContents, - ) -> c_void; +pub type PFN_vkCmdBeginRenderPass = extern "system" fn( + command_buffer: CommandBuffer, + p_render_pass_begin: *const RenderPassBeginInfo, + contents: SubpassContents, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdNextSubpass = extern "system" fn(command_buffer: CommandBuffer, contents: SubpassContents) -> c_void; @@ -1828,18 +1820,16 @@ pub struct DeviceFnV1_0 { memory_range_count: u32, p_memory_ranges: *const MappedMemoryRange, ) -> Result, - pub invalidate_mapped_memory_ranges: - extern "system" fn( - device: Device, - memory_range_count: u32, - p_memory_ranges: *const MappedMemoryRange, - ) -> Result, - pub get_device_memory_commitment: - extern "system" fn( - device: Device, - memory: DeviceMemory, - p_committed_memory_in_bytes: *mut DeviceSize, - ) -> c_void, + pub invalidate_mapped_memory_ranges: extern "system" fn( + device: Device, + memory_range_count: u32, + p_memory_ranges: *const MappedMemoryRange, + ) -> Result, + pub get_device_memory_commitment: extern "system" fn( + device: Device, + memory: DeviceMemory, + p_committed_memory_in_bytes: *mut DeviceSize, + ) -> c_void, pub bind_buffer_memory: extern "system" fn( device: Device, buffer: Buffer, @@ -1852,25 +1842,22 @@ pub struct DeviceFnV1_0 { memory: DeviceMemory, memory_offset: DeviceSize, ) -> Result, - pub get_buffer_memory_requirements: - extern "system" fn( - device: Device, - buffer: Buffer, - p_memory_requirements: *mut MemoryRequirements, - ) -> c_void, - pub get_image_memory_requirements: - extern "system" fn( - device: Device, - image: Image, - p_memory_requirements: *mut MemoryRequirements, - ) -> c_void, - pub get_image_sparse_memory_requirements: - extern "system" fn( - device: Device, - image: Image, - p_sparse_memory_requirement_count: *mut u32, - p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, - ) -> c_void, + pub get_buffer_memory_requirements: extern "system" fn( + device: Device, + buffer: Buffer, + p_memory_requirements: *mut MemoryRequirements, + ) -> c_void, + pub get_image_memory_requirements: extern "system" fn( + device: Device, + image: Image, + p_memory_requirements: *mut MemoryRequirements, + ) -> c_void, + pub get_image_sparse_memory_requirements: extern "system" fn( + device: Device, + image: Image, + p_sparse_memory_requirement_count: *mut u32, + p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, + ) -> c_void, pub queue_bind_sparse: extern "system" fn( queue: Queue, bind_info_count: u32, @@ -1883,9 +1870,11 @@ pub struct DeviceFnV1_0 { p_allocator: *const AllocationCallbacks, p_fence: *mut Fence, ) -> Result, - pub destroy_fence: - extern "system" fn(device: Device, fence: Fence, p_allocator: *const AllocationCallbacks) - -> c_void, + pub destroy_fence: extern "system" fn( + device: Device, + fence: Fence, + p_allocator: *const AllocationCallbacks, + ) -> c_void, pub reset_fences: extern "system" fn(device: Device, fence_count: u32, p_fences: *const Fence) -> Result, pub get_fence_status: extern "system" fn(device: Device, fence: Fence) -> Result, @@ -1913,9 +1902,11 @@ pub struct DeviceFnV1_0 { p_allocator: *const AllocationCallbacks, p_event: *mut Event, ) -> Result, - pub destroy_event: - extern "system" fn(device: Device, event: Event, p_allocator: *const AllocationCallbacks) - -> c_void, + pub destroy_event: extern "system" fn( + device: Device, + event: Event, + p_allocator: *const AllocationCallbacks, + ) -> c_void, pub get_event_status: extern "system" fn(device: Device, event: Event) -> Result, pub set_event: extern "system" fn(device: Device, event: Event) -> Result, pub reset_event: extern "system" fn(device: Device, event: Event) -> Result, @@ -1946,9 +1937,11 @@ pub struct DeviceFnV1_0 { p_allocator: *const AllocationCallbacks, p_buffer: *mut Buffer, ) -> Result, - pub destroy_buffer: - extern "system" fn(device: Device, buffer: Buffer, p_allocator: *const AllocationCallbacks) - -> c_void, + pub destroy_buffer: extern "system" fn( + device: Device, + buffer: Buffer, + p_allocator: *const AllocationCallbacks, + ) -> c_void, pub create_buffer_view: extern "system" fn( device: Device, p_create_info: *const BufferViewCreateInfo, @@ -1966,9 +1959,11 @@ pub struct DeviceFnV1_0 { p_allocator: *const AllocationCallbacks, p_image: *mut Image, ) -> Result, - pub destroy_image: - extern "system" fn(device: Device, image: Image, p_allocator: *const AllocationCallbacks) - -> c_void, + pub destroy_image: extern "system" fn( + device: Device, + image: Image, + p_allocator: *const AllocationCallbacks, + ) -> c_void, pub get_image_subresource_layout: extern "system" fn( device: Device, image: Image, @@ -2020,24 +2015,22 @@ pub struct DeviceFnV1_0 { src_cache_count: u32, p_src_caches: *const PipelineCache, ) -> Result, - pub create_graphics_pipelines: - extern "system" fn( - device: Device, - pipeline_cache: PipelineCache, - create_info_count: u32, - p_create_infos: *const GraphicsPipelineCreateInfo, - p_allocator: *const AllocationCallbacks, - p_pipelines: *mut Pipeline, - ) -> Result, - pub create_compute_pipelines: - extern "system" fn( - device: Device, - pipeline_cache: PipelineCache, - create_info_count: u32, - p_create_infos: *const ComputePipelineCreateInfo, - p_allocator: *const AllocationCallbacks, - p_pipelines: *mut Pipeline, - ) -> Result, + pub create_graphics_pipelines: extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + create_info_count: u32, + p_create_infos: *const GraphicsPipelineCreateInfo, + p_allocator: *const AllocationCallbacks, + p_pipelines: *mut Pipeline, + ) -> Result, + pub create_compute_pipelines: extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + create_info_count: u32, + p_create_infos: *const ComputePipelineCreateInfo, + p_allocator: *const AllocationCallbacks, + p_pipelines: *mut Pipeline, + ) -> Result, pub destroy_pipeline: extern "system" fn( device: Device, pipeline: Pipeline, @@ -2065,19 +2058,17 @@ pub struct DeviceFnV1_0 { sampler: Sampler, p_allocator: *const AllocationCallbacks, ) -> c_void, - pub create_descriptor_set_layout: - extern "system" fn( - device: Device, - p_create_info: *const DescriptorSetLayoutCreateInfo, - p_allocator: *const AllocationCallbacks, - p_set_layout: *mut DescriptorSetLayout, - ) -> Result, - pub destroy_descriptor_set_layout: - extern "system" fn( - device: Device, - descriptor_set_layout: DescriptorSetLayout, - p_allocator: *const AllocationCallbacks, - ) -> c_void, + pub create_descriptor_set_layout: extern "system" fn( + device: Device, + p_create_info: *const DescriptorSetLayoutCreateInfo, + p_allocator: *const AllocationCallbacks, + p_set_layout: *mut DescriptorSetLayout, + ) -> Result, + pub destroy_descriptor_set_layout: extern "system" fn( + device: Device, + descriptor_set_layout: DescriptorSetLayout, + p_allocator: *const AllocationCallbacks, + ) -> c_void, pub create_descriptor_pool: extern "system" fn( device: Device, p_create_info: *const DescriptorPoolCreateInfo, @@ -2094,12 +2085,11 @@ pub struct DeviceFnV1_0 { descriptor_pool: DescriptorPool, flags: DescriptorPoolResetFlags, ) -> Result, - pub allocate_descriptor_sets: - extern "system" fn( - device: Device, - p_allocate_info: *const DescriptorSetAllocateInfo, - p_descriptor_sets: *mut DescriptorSet, - ) -> Result, + pub allocate_descriptor_sets: extern "system" fn( + device: Device, + p_allocate_info: *const DescriptorSetAllocateInfo, + p_descriptor_sets: *mut DescriptorSet, + ) -> Result, pub free_descriptor_sets: extern "system" fn( device: Device, descriptor_pool: DescriptorPool, @@ -2135,9 +2125,11 @@ pub struct DeviceFnV1_0 { render_pass: RenderPass, p_allocator: *const AllocationCallbacks, ) -> c_void, - pub get_render_area_granularity: - extern "system" fn(device: Device, render_pass: RenderPass, p_granularity: *mut Extent2D) - -> c_void, + pub get_render_area_granularity: extern "system" fn( + device: Device, + render_pass: RenderPass, + p_granularity: *mut Extent2D, + ) -> c_void, pub create_command_pool: extern "system" fn( device: Device, p_create_info: *const CommandPoolCreateInfo, @@ -2149,15 +2141,16 @@ pub struct DeviceFnV1_0 { command_pool: CommandPool, p_allocator: *const AllocationCallbacks, ) -> c_void, - pub reset_command_pool: - extern "system" fn(device: Device, command_pool: CommandPool, flags: CommandPoolResetFlags) - -> Result, - pub allocate_command_buffers: - extern "system" fn( - device: Device, - p_allocate_info: *const CommandBufferAllocateInfo, - p_command_buffers: *mut CommandBuffer, - ) -> Result, + pub reset_command_pool: extern "system" fn( + device: Device, + command_pool: CommandPool, + flags: CommandPoolResetFlags, + ) -> Result, + pub allocate_command_buffers: extern "system" fn( + device: Device, + p_allocate_info: *const CommandBufferAllocateInfo, + p_command_buffers: *mut CommandBuffer, + ) -> Result, pub free_command_buffers: extern "system" fn( device: Device, command_pool: CommandPool, @@ -2276,9 +2269,11 @@ pub struct DeviceFnV1_0 { group_count_y: u32, group_count_z: u32, ) -> c_void, - pub cmd_dispatch_indirect: - extern "system" fn(command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize) - -> c_void, + pub cmd_dispatch_indirect: extern "system" fn( + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + ) -> c_void, pub cmd_copy_buffer: extern "system" fn( command_buffer: CommandBuffer, src_buffer: Buffer, @@ -2343,15 +2338,14 @@ pub struct DeviceFnV1_0 { range_count: u32, p_ranges: *const ImageSubresourceRange, ) -> c_void, - pub cmd_clear_depth_stencil_image: - extern "system" fn( - command_buffer: CommandBuffer, - image: Image, - image_layout: ImageLayout, - p_depth_stencil: *const ClearDepthStencilValue, - range_count: u32, - p_ranges: *const ImageSubresourceRange, - ) -> c_void, + pub cmd_clear_depth_stencil_image: extern "system" fn( + command_buffer: CommandBuffer, + image: Image, + image_layout: ImageLayout, + p_depth_stencil: *const ClearDepthStencilValue, + range_count: u32, + p_ranges: *const ImageSubresourceRange, + ) -> c_void, pub cmd_clear_attachments: extern "system" fn( command_buffer: CommandBuffer, attachment_count: u32, @@ -2391,28 +2385,29 @@ pub struct DeviceFnV1_0 { image_memory_barrier_count: u32, p_image_memory_barriers: *const ImageMemoryBarrier, ) -> c_void, - pub cmd_pipeline_barrier: - extern "system" fn( - command_buffer: CommandBuffer, - src_stage_mask: PipelineStageFlags, - dst_stage_mask: PipelineStageFlags, - dependency_flags: DependencyFlags, - memory_barrier_count: u32, - p_memory_barriers: *const MemoryBarrier, - buffer_memory_barrier_count: u32, - p_buffer_memory_barriers: *const BufferMemoryBarrier, - image_memory_barrier_count: u32, - p_image_memory_barriers: *const ImageMemoryBarrier, - ) -> c_void, + pub cmd_pipeline_barrier: extern "system" fn( + command_buffer: CommandBuffer, + src_stage_mask: PipelineStageFlags, + dst_stage_mask: PipelineStageFlags, + dependency_flags: DependencyFlags, + memory_barrier_count: u32, + p_memory_barriers: *const MemoryBarrier, + buffer_memory_barrier_count: u32, + p_buffer_memory_barriers: *const BufferMemoryBarrier, + image_memory_barrier_count: u32, + p_image_memory_barriers: *const ImageMemoryBarrier, + ) -> c_void, pub cmd_begin_query: extern "system" fn( command_buffer: CommandBuffer, query_pool: QueryPool, query: u32, flags: QueryControlFlags, ) -> c_void, - pub cmd_end_query: - extern "system" fn(command_buffer: CommandBuffer, query_pool: QueryPool, query: u32) - -> c_void, + pub cmd_end_query: extern "system" fn( + command_buffer: CommandBuffer, + query_pool: QueryPool, + query: u32, + ) -> c_void, pub cmd_reset_query_pool: extern "system" fn( command_buffer: CommandBuffer, query_pool: QueryPool, @@ -6098,142 +6093,123 @@ impl EntryFnV1_1 { } } #[allow(non_camel_case_types)] -pub type PFN_vkEnumeratePhysicalDeviceGroups = - extern "system" fn( +pub type PFN_vkEnumeratePhysicalDeviceGroups = extern "system" fn( + instance: Instance, + p_physical_device_group_count: *mut u32, + p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceFeatures2 = extern "system" fn( + physical_device: PhysicalDevice, + p_features: *mut PhysicalDeviceFeatures2, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceProperties2 = extern "system" fn( + physical_device: PhysicalDevice, + p_properties: *mut PhysicalDeviceProperties2, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceFormatProperties2 = extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + p_format_properties: *mut FormatProperties2, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceImageFormatProperties2 = extern "system" fn( + physical_device: PhysicalDevice, + p_image_format_info: *const PhysicalDeviceImageFormatInfo2, + p_image_format_properties: *mut ImageFormatProperties2, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceQueueFamilyProperties2 = extern "system" fn( + physical_device: PhysicalDevice, + p_queue_family_property_count: *mut u32, + p_queue_family_properties: *mut QueueFamilyProperties2, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceMemoryProperties2 = extern "system" fn( + physical_device: PhysicalDevice, + p_memory_properties: *mut PhysicalDeviceMemoryProperties2, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 = extern "system" fn( + physical_device: PhysicalDevice, + p_format_info: *const PhysicalDeviceSparseImageFormatInfo2, + p_property_count: *mut u32, + p_properties: *mut SparseImageFormatProperties2, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceExternalBufferProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo, + p_external_buffer_properties: *mut ExternalBufferProperties, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceExternalFenceProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_external_fence_info: *const PhysicalDeviceExternalFenceInfo, + p_external_fence_properties: *mut ExternalFenceProperties, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceExternalSemaphoreProperties = extern "system" fn( + physical_device: PhysicalDevice, + p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo, + p_external_semaphore_properties: *mut ExternalSemaphoreProperties, +) -> c_void; +pub struct InstanceFnV1_1 { + pub enumerate_physical_device_groups: extern "system" fn( instance: Instance, p_physical_device_group_count: *mut u32, p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceFeatures2 = - extern "system" fn(physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures2) - -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceProperties2 = - extern "system" fn( - physical_device: PhysicalDevice, - p_properties: *mut PhysicalDeviceProperties2, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceFormatProperties2 = - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - p_format_properties: *mut FormatProperties2, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceImageFormatProperties2 = - extern "system" fn( - physical_device: PhysicalDevice, - p_image_format_info: *const PhysicalDeviceImageFormatInfo2, - p_image_format_properties: *mut ImageFormatProperties2, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceQueueFamilyProperties2 = - extern "system" fn( - physical_device: PhysicalDevice, - p_queue_family_property_count: *mut u32, - p_queue_family_properties: *mut QueueFamilyProperties2, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceMemoryProperties2 = - extern "system" fn( - physical_device: PhysicalDevice, - p_memory_properties: *mut PhysicalDeviceMemoryProperties2, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 = - extern "system" fn( - physical_device: PhysicalDevice, - p_format_info: *const PhysicalDeviceSparseImageFormatInfo2, - p_property_count: *mut u32, - p_properties: *mut SparseImageFormatProperties2, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceExternalBufferProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo, - p_external_buffer_properties: *mut ExternalBufferProperties, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceExternalFenceProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_external_fence_info: *const PhysicalDeviceExternalFenceInfo, - p_external_fence_properties: *mut ExternalFenceProperties, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceExternalSemaphoreProperties = - extern "system" fn( - physical_device: PhysicalDevice, - p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo, - p_external_semaphore_properties: *mut ExternalSemaphoreProperties, - ) -> c_void; -pub struct InstanceFnV1_1 { - pub enumerate_physical_device_groups: - extern "system" fn( - instance: Instance, - p_physical_device_group_count: *mut u32, - p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties, - ) -> Result, + ) -> Result, pub get_physical_device_features2: extern "system" fn( physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures2, ) -> c_void, - pub get_physical_device_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - p_properties: *mut PhysicalDeviceProperties2, - ) -> c_void, - pub get_physical_device_format_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - p_format_properties: *mut FormatProperties2, - ) -> c_void, - pub get_physical_device_image_format_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - p_image_format_info: *const PhysicalDeviceImageFormatInfo2, - p_image_format_properties: *mut ImageFormatProperties2, - ) -> Result, - pub get_physical_device_queue_family_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - p_queue_family_property_count: *mut u32, - p_queue_family_properties: *mut QueueFamilyProperties2, - ) -> c_void, - pub get_physical_device_memory_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - p_memory_properties: *mut PhysicalDeviceMemoryProperties2, - ) -> c_void, - pub get_physical_device_sparse_image_format_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - p_format_info: *const PhysicalDeviceSparseImageFormatInfo2, - p_property_count: *mut u32, - p_properties: *mut SparseImageFormatProperties2, - ) -> c_void, - pub get_physical_device_external_buffer_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo, - p_external_buffer_properties: *mut ExternalBufferProperties, - ) -> c_void, - pub get_physical_device_external_fence_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_external_fence_info: *const PhysicalDeviceExternalFenceInfo, - p_external_fence_properties: *mut ExternalFenceProperties, - ) -> c_void, - pub get_physical_device_external_semaphore_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo, - p_external_semaphore_properties: *mut ExternalSemaphoreProperties, - ) -> c_void, + pub get_physical_device_properties2: extern "system" fn( + physical_device: PhysicalDevice, + p_properties: *mut PhysicalDeviceProperties2, + ) -> c_void, + pub get_physical_device_format_properties2: extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + p_format_properties: *mut FormatProperties2, + ) -> c_void, + pub get_physical_device_image_format_properties2: extern "system" fn( + physical_device: PhysicalDevice, + p_image_format_info: *const PhysicalDeviceImageFormatInfo2, + p_image_format_properties: *mut ImageFormatProperties2, + ) -> Result, + pub get_physical_device_queue_family_properties2: extern "system" fn( + physical_device: PhysicalDevice, + p_queue_family_property_count: *mut u32, + p_queue_family_properties: *mut QueueFamilyProperties2, + ) -> c_void, + pub get_physical_device_memory_properties2: extern "system" fn( + physical_device: PhysicalDevice, + p_memory_properties: *mut PhysicalDeviceMemoryProperties2, + ) -> c_void, + pub get_physical_device_sparse_image_format_properties2: extern "system" fn( + physical_device: PhysicalDevice, + p_format_info: *const PhysicalDeviceSparseImageFormatInfo2, + p_property_count: *mut u32, + p_properties: *mut SparseImageFormatProperties2, + ) -> c_void, + pub get_physical_device_external_buffer_properties: extern "system" fn( + physical_device: PhysicalDevice, + p_external_buffer_info: *const PhysicalDeviceExternalBufferInfo, + p_external_buffer_properties: *mut ExternalBufferProperties, + ) -> c_void, + pub get_physical_device_external_fence_properties: extern "system" fn( + physical_device: PhysicalDevice, + p_external_fence_info: *const PhysicalDeviceExternalFenceInfo, + p_external_fence_properties: *mut ExternalFenceProperties, + ) -> c_void, + pub get_physical_device_external_semaphore_properties: extern "system" fn( + physical_device: PhysicalDevice, + p_external_semaphore_info: *const PhysicalDeviceExternalSemaphoreInfo, + p_external_semaphore_properties: *mut ExternalSemaphoreProperties, + ) -> c_void, } unsafe impl Send for InstanceFnV1_1 {} unsafe impl Sync for InstanceFnV1_1 {} @@ -6615,14 +6591,13 @@ pub type PFN_vkBindImageMemory2 = extern "system" fn( p_bind_infos: *const BindImageMemoryInfo, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetDeviceGroupPeerMemoryFeatures = - extern "system" fn( - device: Device, - heap_index: u32, - local_device_index: u32, - remote_device_index: u32, - p_peer_memory_features: *mut PeerMemoryFeatureFlags, - ) -> c_void; +pub type PFN_vkGetDeviceGroupPeerMemoryFeatures = extern "system" fn( + device: Device, + heap_index: u32, + local_device_index: u32, + remote_device_index: u32, + p_peer_memory_features: *mut PeerMemoryFeatureFlags, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdSetDeviceMask = extern "system" fn(command_buffer: CommandBuffer, device_mask: u32) -> c_void; @@ -6637,80 +6612,75 @@ pub type PFN_vkCmdDispatchBase = extern "system" fn( group_count_z: u32, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetImageMemoryRequirements2 = - extern "system" fn( - device: Device, - p_info: *const ImageMemoryRequirementsInfo2, - p_memory_requirements: *mut MemoryRequirements2, - ) -> c_void; +pub type PFN_vkGetImageMemoryRequirements2 = extern "system" fn( + device: Device, + p_info: *const ImageMemoryRequirementsInfo2, + p_memory_requirements: *mut MemoryRequirements2, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetBufferMemoryRequirements2 = - extern "system" fn( - device: Device, - p_info: *const BufferMemoryRequirementsInfo2, - p_memory_requirements: *mut MemoryRequirements2, - ) -> c_void; +pub type PFN_vkGetBufferMemoryRequirements2 = extern "system" fn( + device: Device, + p_info: *const BufferMemoryRequirementsInfo2, + p_memory_requirements: *mut MemoryRequirements2, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetImageSparseMemoryRequirements2 = - extern "system" fn( - device: Device, - p_info: *const ImageSparseMemoryRequirementsInfo2, - p_sparse_memory_requirement_count: *mut u32, - p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2, - ) -> c_void; +pub type PFN_vkGetImageSparseMemoryRequirements2 = extern "system" fn( + device: Device, + p_info: *const ImageSparseMemoryRequirementsInfo2, + p_sparse_memory_requirement_count: *mut u32, + p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkTrimCommandPool = - extern "system" fn(device: Device, command_pool: CommandPool, flags: CommandPoolTrimFlags) - -> c_void; +pub type PFN_vkTrimCommandPool = extern "system" fn( + device: Device, + command_pool: CommandPool, + flags: CommandPoolTrimFlags, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetDeviceQueue2 = - extern "system" fn(device: Device, p_queue_info: *const DeviceQueueInfo2, p_queue: *mut Queue) - -> c_void; +pub type PFN_vkGetDeviceQueue2 = extern "system" fn( + device: Device, + p_queue_info: *const DeviceQueueInfo2, + p_queue: *mut Queue, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateSamplerYcbcrConversion = - extern "system" fn( - device: Device, - p_create_info: *const SamplerYcbcrConversionCreateInfo, - p_allocator: *const AllocationCallbacks, - p_ycbcr_conversion: *mut SamplerYcbcrConversion, - ) -> Result; +pub type PFN_vkCreateSamplerYcbcrConversion = extern "system" fn( + device: Device, + p_create_info: *const SamplerYcbcrConversionCreateInfo, + p_allocator: *const AllocationCallbacks, + p_ycbcr_conversion: *mut SamplerYcbcrConversion, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroySamplerYcbcrConversion = - extern "system" fn( - device: Device, - ycbcr_conversion: SamplerYcbcrConversion, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroySamplerYcbcrConversion = extern "system" fn( + device: Device, + ycbcr_conversion: SamplerYcbcrConversion, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateDescriptorUpdateTemplate = - extern "system" fn( - device: Device, - p_create_info: *const DescriptorUpdateTemplateCreateInfo, - p_allocator: *const AllocationCallbacks, - p_descriptor_update_template: *mut DescriptorUpdateTemplate, - ) -> Result; +pub type PFN_vkCreateDescriptorUpdateTemplate = extern "system" fn( + device: Device, + p_create_info: *const DescriptorUpdateTemplateCreateInfo, + p_allocator: *const AllocationCallbacks, + p_descriptor_update_template: *mut DescriptorUpdateTemplate, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyDescriptorUpdateTemplate = - extern "system" fn( - device: Device, - descriptor_update_template: DescriptorUpdateTemplate, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroyDescriptorUpdateTemplate = extern "system" fn( + device: Device, + descriptor_update_template: DescriptorUpdateTemplate, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkUpdateDescriptorSetWithTemplate = - extern "system" fn( - device: Device, - descriptor_set: DescriptorSet, - descriptor_update_template: DescriptorUpdateTemplate, - p_data: *const c_void, - ) -> c_void; +pub type PFN_vkUpdateDescriptorSetWithTemplate = extern "system" fn( + device: Device, + descriptor_set: DescriptorSet, + descriptor_update_template: DescriptorUpdateTemplate, + p_data: *const c_void, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetDescriptorSetLayoutSupport = - extern "system" fn( - device: Device, - p_create_info: *const DescriptorSetLayoutCreateInfo, - p_support: *mut DescriptorSetLayoutSupport, - ) -> c_void; +pub type PFN_vkGetDescriptorSetLayoutSupport = extern "system" fn( + device: Device, + p_create_info: *const DescriptorSetLayoutCreateInfo, + p_support: *mut DescriptorSetLayoutSupport, +) -> c_void; pub struct DeviceFnV1_1 { pub bind_buffer_memory2: extern "system" fn( device: Device, @@ -6722,14 +6692,13 @@ pub struct DeviceFnV1_1 { bind_info_count: u32, p_bind_infos: *const BindImageMemoryInfo, ) -> Result, - pub get_device_group_peer_memory_features: - extern "system" fn( - device: Device, - heap_index: u32, - local_device_index: u32, - remote_device_index: u32, - p_peer_memory_features: *mut PeerMemoryFeatureFlags, - ) -> c_void, + pub get_device_group_peer_memory_features: extern "system" fn( + device: Device, + heap_index: u32, + local_device_index: u32, + remote_device_index: u32, + p_peer_memory_features: *mut PeerMemoryFeatureFlags, + ) -> c_void, pub cmd_set_device_mask: extern "system" fn(command_buffer: CommandBuffer, device_mask: u32) -> c_void, pub cmd_dispatch_base: extern "system" fn( @@ -6741,72 +6710,65 @@ pub struct DeviceFnV1_1 { group_count_y: u32, group_count_z: u32, ) -> c_void, - pub get_image_memory_requirements2: - extern "system" fn( - device: Device, - p_info: *const ImageMemoryRequirementsInfo2, - p_memory_requirements: *mut MemoryRequirements2, - ) -> c_void, - pub get_buffer_memory_requirements2: - extern "system" fn( - device: Device, - p_info: *const BufferMemoryRequirementsInfo2, - p_memory_requirements: *mut MemoryRequirements2, - ) -> c_void, - pub get_image_sparse_memory_requirements2: - extern "system" fn( - device: Device, - p_info: *const ImageSparseMemoryRequirementsInfo2, - p_sparse_memory_requirement_count: *mut u32, - p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2, - ) -> c_void, - pub trim_command_pool: - extern "system" fn(device: Device, command_pool: CommandPool, flags: CommandPoolTrimFlags) - -> c_void, + pub get_image_memory_requirements2: extern "system" fn( + device: Device, + p_info: *const ImageMemoryRequirementsInfo2, + p_memory_requirements: *mut MemoryRequirements2, + ) -> c_void, + pub get_buffer_memory_requirements2: extern "system" fn( + device: Device, + p_info: *const BufferMemoryRequirementsInfo2, + p_memory_requirements: *mut MemoryRequirements2, + ) -> c_void, + pub get_image_sparse_memory_requirements2: extern "system" fn( + device: Device, + p_info: *const ImageSparseMemoryRequirementsInfo2, + p_sparse_memory_requirement_count: *mut u32, + p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2, + ) -> c_void, + pub trim_command_pool: extern "system" fn( + device: Device, + command_pool: CommandPool, + flags: CommandPoolTrimFlags, + ) -> c_void, pub get_device_queue2: extern "system" fn( device: Device, p_queue_info: *const DeviceQueueInfo2, p_queue: *mut Queue, ) -> c_void, - pub create_sampler_ycbcr_conversion: - extern "system" fn( - device: Device, - p_create_info: *const SamplerYcbcrConversionCreateInfo, - p_allocator: *const AllocationCallbacks, - p_ycbcr_conversion: *mut SamplerYcbcrConversion, - ) -> Result, - pub destroy_sampler_ycbcr_conversion: - extern "system" fn( - device: Device, - ycbcr_conversion: SamplerYcbcrConversion, - p_allocator: *const AllocationCallbacks, - ) -> c_void, - pub create_descriptor_update_template: - extern "system" fn( - device: Device, - p_create_info: *const DescriptorUpdateTemplateCreateInfo, - p_allocator: *const AllocationCallbacks, - p_descriptor_update_template: *mut DescriptorUpdateTemplate, - ) -> Result, - pub destroy_descriptor_update_template: - extern "system" fn( - device: Device, - descriptor_update_template: DescriptorUpdateTemplate, - p_allocator: *const AllocationCallbacks, - ) -> c_void, - pub update_descriptor_set_with_template: - extern "system" fn( - device: Device, - descriptor_set: DescriptorSet, - descriptor_update_template: DescriptorUpdateTemplate, - p_data: *const c_void, - ) -> c_void, - pub get_descriptor_set_layout_support: - extern "system" fn( - device: Device, - p_create_info: *const DescriptorSetLayoutCreateInfo, - p_support: *mut DescriptorSetLayoutSupport, - ) -> c_void, + pub create_sampler_ycbcr_conversion: extern "system" fn( + device: Device, + p_create_info: *const SamplerYcbcrConversionCreateInfo, + p_allocator: *const AllocationCallbacks, + p_ycbcr_conversion: *mut SamplerYcbcrConversion, + ) -> Result, + pub destroy_sampler_ycbcr_conversion: extern "system" fn( + device: Device, + ycbcr_conversion: SamplerYcbcrConversion, + p_allocator: *const AllocationCallbacks, + ) -> c_void, + pub create_descriptor_update_template: extern "system" fn( + device: Device, + p_create_info: *const DescriptorUpdateTemplateCreateInfo, + p_allocator: *const AllocationCallbacks, + p_descriptor_update_template: *mut DescriptorUpdateTemplate, + ) -> Result, + pub destroy_descriptor_update_template: extern "system" fn( + device: Device, + descriptor_update_template: DescriptorUpdateTemplate, + p_allocator: *const AllocationCallbacks, + ) -> c_void, + pub update_descriptor_set_with_template: extern "system" fn( + device: Device, + descriptor_set: DescriptorSet, + descriptor_update_template: DescriptorUpdateTemplate, + p_data: *const c_void, + ) -> c_void, + pub get_descriptor_set_layout_support: extern "system" fn( + device: Device, + p_create_info: *const DescriptorSetLayoutCreateInfo, + p_support: *mut DescriptorSetLayoutSupport, + ) -> c_void, } unsafe impl Send for DeviceFnV1_1 {} unsafe impl Sync for DeviceFnV1_1 {} @@ -8008,7 +7970,8 @@ 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() @@ -8111,7 +8074,8 @@ 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() } } @@ -8170,11 +8134,13 @@ 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 { @@ -8330,17 +8296,21 @@ 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 { @@ -17683,7 +17653,8 @@ pub struct PipelineRasterizationStateRasterizationOrderAMDBuilder<'a> { pub unsafe trait ExtendsPipelineRasterizationStateRasterizationOrderAMD {} unsafe impl ExtendsPipelineRasterizationStateCreateInfo for PipelineRasterizationStateRasterizationOrderAMD -{} +{ +} impl<'a> ::std::ops::Deref for PipelineRasterizationStateRasterizationOrderAMDBuilder<'a> { type Target = PipelineRasterizationStateRasterizationOrderAMD; fn deref(&self) -> &Self::Target { @@ -20072,9 +20043,11 @@ impl fmt::Debug for PhysicalDeviceDriverPropertiesKHR { .field("driver_id", &self.driver_id) .field("driver_name", &unsafe { ::std::ffi::CStr::from_ptr(self.driver_name.as_ptr() as *const i8) - }).field("driver_info", &unsafe { + }) + .field("driver_info", &unsafe { ::std::ffi::CStr::from_ptr(self.driver_info.as_ptr() as *const i8) - }).field("conformance_version", &self.conformance_version) + }) + .field("conformance_version", &self.conformance_version) .finish() } } @@ -25182,7 +25155,8 @@ pub struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVXBuilder<'a> { pub unsafe trait ExtendsPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX {} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX -{} +{ +} impl<'a> ::std::ops::Deref for PhysicalDeviceMultiviewPerViewAttributesPropertiesNVXBuilder<'a> { type Target = PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; fn deref(&self) -> &Self::Target { @@ -26491,7 +26465,8 @@ pub struct PipelineTessellationDomainOriginStateCreateInfoBuilder<'a> { pub unsafe trait ExtendsPipelineTessellationDomainOriginStateCreateInfo {} unsafe impl ExtendsPipelineTessellationStateCreateInfo for PipelineTessellationDomainOriginStateCreateInfo -{} +{ +} impl<'a> ::std::ops::Deref for PipelineTessellationDomainOriginStateCreateInfoBuilder<'a> { type Target = PipelineTessellationDomainOriginStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -27709,7 +27684,8 @@ pub struct PipelineSampleLocationsStateCreateInfoEXTBuilder<'a> { pub unsafe trait ExtendsPipelineSampleLocationsStateCreateInfoEXT {} unsafe impl ExtendsPipelineMultisampleStateCreateInfo for PipelineSampleLocationsStateCreateInfoEXT -{} +{ +} impl<'a> ::std::ops::Deref for PipelineSampleLocationsStateCreateInfoEXTBuilder<'a> { type Target = PipelineSampleLocationsStateCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -28144,7 +28120,8 @@ pub struct PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> { pub unsafe trait ExtendsPipelineColorBlendAdvancedStateCreateInfoEXT {} unsafe impl ExtendsPipelineColorBlendStateCreateInfo for PipelineColorBlendAdvancedStateCreateInfoEXT -{} +{ +} impl<'a> ::std::ops::Deref for PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> { type Target = PipelineColorBlendAdvancedStateCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -28509,7 +28486,8 @@ pub struct PipelineCoverageModulationStateCreateInfoNVBuilder<'a> { pub unsafe trait ExtendsPipelineCoverageModulationStateCreateInfoNV {} unsafe impl ExtendsPipelineMultisampleStateCreateInfo for PipelineCoverageModulationStateCreateInfoNV -{} +{ +} impl<'a> ::std::ops::Deref for PipelineCoverageModulationStateCreateInfoNVBuilder<'a> { type Target = PipelineCoverageModulationStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -29412,7 +29390,8 @@ 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() } } @@ -29836,7 +29815,8 @@ pub struct PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { pub unsafe trait ExtendsPhysicalDeviceConservativeRasterizationPropertiesEXT {} unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceConservativeRasterizationPropertiesEXT -{} +{ +} impl<'a> ::std::ops::Deref for PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { type Target = PhysicalDeviceConservativeRasterizationPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -30187,7 +30167,8 @@ pub struct PipelineRasterizationConservativeStateCreateInfoEXTBuilder<'a> { pub unsafe trait ExtendsPipelineRasterizationConservativeStateCreateInfoEXT {} unsafe impl ExtendsPipelineRasterizationStateCreateInfo for PipelineRasterizationConservativeStateCreateInfoEXT -{} +{ +} impl<'a> ::std::ops::Deref for PipelineRasterizationConservativeStateCreateInfoEXTBuilder<'a> { type Target = PipelineRasterizationConservativeStateCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -30876,7 +30857,8 @@ pub struct DescriptorSetVariableDescriptorCountAllocateInfoEXTBuilder<'a> { pub unsafe trait ExtendsDescriptorSetVariableDescriptorCountAllocateInfoEXT {} unsafe impl ExtendsDescriptorSetAllocateInfo for DescriptorSetVariableDescriptorCountAllocateInfoEXT -{} +{ +} impl<'a> ::std::ops::Deref for DescriptorSetVariableDescriptorCountAllocateInfoEXTBuilder<'a> { type Target = DescriptorSetVariableDescriptorCountAllocateInfoEXT; fn deref(&self) -> &Self::Target { @@ -30937,7 +30919,8 @@ pub struct DescriptorSetVariableDescriptorCountLayoutSupportEXTBuilder<'a> { pub unsafe trait ExtendsDescriptorSetVariableDescriptorCountLayoutSupportEXT {} unsafe impl ExtendsDescriptorSetLayoutSupport for DescriptorSetVariableDescriptorCountLayoutSupportEXT -{} +{ +} impl<'a> ::std::ops::Deref for DescriptorSetVariableDescriptorCountLayoutSupportEXTBuilder<'a> { type Target = DescriptorSetVariableDescriptorCountLayoutSupportEXT; fn deref(&self) -> &Self::Target { @@ -31640,7 +31623,8 @@ pub struct PipelineVertexInputDivisorStateCreateInfoEXTBuilder<'a> { pub unsafe trait ExtendsPipelineVertexInputDivisorStateCreateInfoEXT {} unsafe impl ExtendsPipelineVertexInputStateCreateInfo for PipelineVertexInputDivisorStateCreateInfoEXT -{} +{ +} impl<'a> ::std::ops::Deref for PipelineVertexInputDivisorStateCreateInfoEXTBuilder<'a> { type Target = PipelineVertexInputDivisorStateCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -32076,7 +32060,8 @@ pub struct AndroidHardwareBufferFormatPropertiesANDROIDBuilder<'a> { pub unsafe trait ExtendsAndroidHardwareBufferFormatPropertiesANDROID {} unsafe impl ExtendsAndroidHardwareBufferPropertiesANDROID for AndroidHardwareBufferFormatPropertiesANDROID -{} +{ +} impl<'a> ::std::ops::Deref for AndroidHardwareBufferFormatPropertiesANDROIDBuilder<'a> { type Target = AndroidHardwareBufferFormatPropertiesANDROID; fn deref(&self) -> &Self::Target { @@ -32185,7 +32170,8 @@ pub struct CommandBufferInheritanceConditionalRenderingInfoEXTBuilder<'a> { pub unsafe trait ExtendsCommandBufferInheritanceConditionalRenderingInfoEXT {} unsafe impl ExtendsCommandBufferInheritanceInfo for CommandBufferInheritanceConditionalRenderingInfoEXT -{} +{ +} impl<'a> ::std::ops::Deref for CommandBufferInheritanceConditionalRenderingInfoEXTBuilder<'a> { type Target = CommandBufferInheritanceConditionalRenderingInfoEXT; fn deref(&self) -> &Self::Target { @@ -33084,7 +33070,8 @@ pub struct PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> { pub unsafe trait ExtendsPipelineRasterizationStateStreamCreateInfoEXT {} unsafe impl ExtendsPipelineRasterizationStateCreateInfo for PipelineRasterizationStateStreamCreateInfoEXT -{} +{ +} impl<'a> ::std::ops::Deref for PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> { type Target = PipelineRasterizationStateStreamCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -33210,7 +33197,8 @@ pub struct PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder<'a> { pub unsafe trait ExtendsPipelineRepresentativeFragmentTestStateCreateInfoNV {} unsafe impl ExtendsGraphicsPipelineCreateInfo for PipelineRepresentativeFragmentTestStateCreateInfoNV -{} +{ +} impl<'a> ::std::ops::Deref for PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder<'a> { type Target = PipelineRepresentativeFragmentTestStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -33328,7 +33316,8 @@ pub struct PipelineViewportExclusiveScissorStateCreateInfoNVBuilder<'a> { pub unsafe trait ExtendsPipelineViewportExclusiveScissorStateCreateInfoNV {} unsafe impl ExtendsPipelineViewportStateCreateInfo for PipelineViewportExclusiveScissorStateCreateInfoNV -{} +{ +} impl<'a> ::std::ops::Deref for PipelineViewportExclusiveScissorStateCreateInfoNVBuilder<'a> { type Target = PipelineViewportExclusiveScissorStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -33683,7 +33672,8 @@ pub struct PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> { pub unsafe trait ExtendsPipelineViewportShadingRateImageStateCreateInfoNV {} unsafe impl ExtendsPipelineViewportStateCreateInfo for PipelineViewportShadingRateImageStateCreateInfoNV -{} +{ +} impl<'a> ::std::ops::Deref for PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> { type Target = PipelineViewportShadingRateImageStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -33998,7 +33988,8 @@ pub struct PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> { pub unsafe trait ExtendsPipelineViewportCoarseSampleOrderStateCreateInfoNV {} unsafe impl ExtendsPipelineViewportStateCreateInfo for PipelineViewportCoarseSampleOrderStateCreateInfoNV -{} +{ +} impl<'a> ::std::ops::Deref for PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> { type Target = PipelineViewportCoarseSampleOrderStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -38158,69 +38149,61 @@ pub type PFN_vkDestroySurfaceKHR = extern "system" fn( p_allocator: *const AllocationCallbacks, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSurfaceSupportKHR = - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - surface: SurfaceKHR, - p_supported: *mut Bool32, - ) -> Result; +pub type PFN_vkGetPhysicalDeviceSurfaceSupportKHR = extern "system" fn( + physical_device: PhysicalDevice, + queue_family_index: u32, + surface: SurfaceKHR, + p_supported: *mut Bool32, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_surface_capabilities: *mut SurfaceCapabilitiesKHR, - ) -> Result; +pub type PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR = extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_surface_capabilities: *mut SurfaceCapabilitiesKHR, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSurfaceFormatsKHR = - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_surface_format_count: *mut u32, - p_surface_formats: *mut SurfaceFormatKHR, - ) -> Result; +pub type PFN_vkGetPhysicalDeviceSurfaceFormatsKHR = extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_surface_format_count: *mut u32, + p_surface_formats: *mut SurfaceFormatKHR, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSurfacePresentModesKHR = - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_present_mode_count: *mut u32, - p_present_modes: *mut PresentModeKHR, - ) -> Result; +pub type PFN_vkGetPhysicalDeviceSurfacePresentModesKHR = extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_present_mode_count: *mut u32, + p_present_modes: *mut PresentModeKHR, +) -> Result; pub struct KhrSurfaceFn { pub destroy_surface_khr: extern "system" fn( instance: Instance, surface: SurfaceKHR, p_allocator: *const AllocationCallbacks, ) -> c_void, - pub get_physical_device_surface_support_khr: - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - surface: SurfaceKHR, - p_supported: *mut Bool32, - ) -> Result, - pub get_physical_device_surface_capabilities_khr: - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_surface_capabilities: *mut SurfaceCapabilitiesKHR, - ) -> Result, - pub get_physical_device_surface_formats_khr: - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_surface_format_count: *mut u32, - p_surface_formats: *mut SurfaceFormatKHR, - ) -> Result, - pub get_physical_device_surface_present_modes_khr: - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_present_mode_count: *mut u32, - p_present_modes: *mut PresentModeKHR, - ) -> Result, + pub get_physical_device_surface_support_khr: extern "system" fn( + physical_device: PhysicalDevice, + queue_family_index: u32, + surface: SurfaceKHR, + p_supported: *mut Bool32, + ) -> Result, + pub get_physical_device_surface_capabilities_khr: extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_surface_capabilities: *mut SurfaceCapabilitiesKHR, + ) -> Result, + pub get_physical_device_surface_formats_khr: extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_surface_format_count: *mut u32, + p_surface_formats: *mut SurfaceFormatKHR, + ) -> Result, + pub get_physical_device_surface_present_modes_khr: extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_present_mode_count: *mut u32, + p_present_modes: *mut PresentModeKHR, + ) -> Result, } unsafe impl Send for KhrSurfaceFn {} unsafe impl Sync for KhrSurfaceFn {} @@ -38421,13 +38404,12 @@ impl ObjectType { pub const SURFACE_KHR: Self = ObjectType(1000000000); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateSwapchainKHR = - extern "system" fn( - device: Device, - p_create_info: *const SwapchainCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_swapchain: *mut SwapchainKHR, - ) -> Result; +pub type PFN_vkCreateSwapchainKHR = extern "system" fn( + device: Device, + p_create_info: *const SwapchainCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_swapchain: *mut SwapchainKHR, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroySwapchainKHR = extern "system" fn( device: Device, @@ -38454,34 +38436,78 @@ pub type PFN_vkAcquireNextImageKHR = extern "system" fn( pub type PFN_vkQueuePresentKHR = extern "system" fn(queue: Queue, p_present_info: *const PresentInfoKHR) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetDeviceGroupPresentCapabilitiesKHR = - extern "system" fn( +pub type PFN_vkGetDeviceGroupPresentCapabilitiesKHR = extern "system" fn( + device: Device, + p_device_group_present_capabilities: *mut DeviceGroupPresentCapabilitiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDeviceGroupSurfacePresentModesKHR = extern "system" fn( + device: Device, + surface: SurfaceKHR, + p_modes: *mut DeviceGroupPresentModeFlagsKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDevicePresentRectanglesKHR = extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_rect_count: *mut u32, + p_rects: *mut Rect2D, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkAcquireNextImage2KHR = extern "system" fn( + device: Device, + p_acquire_info: *const AcquireNextImageInfoKHR, + p_image_index: *mut u32, +) -> Result; +pub struct KhrSwapchainFn { + pub create_swapchain_khr: extern "system" fn( + device: Device, + p_create_info: *const SwapchainCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_swapchain: *mut SwapchainKHR, + ) -> Result, + pub destroy_swapchain_khr: extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_allocator: *const AllocationCallbacks, + ) -> c_void, + pub get_swapchain_images_khr: extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_swapchain_image_count: *mut u32, + p_swapchain_images: *mut Image, + ) -> Result, + pub acquire_next_image_khr: extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + timeout: u64, + semaphore: Semaphore, + fence: Fence, + p_image_index: *mut u32, + ) -> Result, + pub queue_present_khr: + extern "system" fn(queue: Queue, p_present_info: *const PresentInfoKHR) -> Result, + pub get_device_group_present_capabilities_khr: extern "system" fn( device: Device, p_device_group_present_capabilities: *mut DeviceGroupPresentCapabilitiesKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetDeviceGroupSurfacePresentModesKHR = - extern "system" fn( + ) -> Result, + pub get_device_group_surface_present_modes_khr: extern "system" fn( device: Device, surface: SurfaceKHR, p_modes: *mut DeviceGroupPresentModeFlagsKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDevicePresentRectanglesKHR = - extern "system" fn( + ) -> Result, + pub get_physical_device_present_rectangles_khr: extern "system" fn( physical_device: PhysicalDevice, surface: SurfaceKHR, p_rect_count: *mut u32, p_rects: *mut Rect2D, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkAcquireNextImage2KHR = - extern "system" fn( + ) -> Result, + pub acquire_next_image2_khr: extern "system" fn( device: Device, p_acquire_info: *const AcquireNextImageInfoKHR, p_image_index: *mut u32, - ) -> Result; -pub struct KhrSwapchainFn { pub create_swapchain_khr : extern "system" fn ( device : Device , p_create_info : *const SwapchainCreateInfoKHR , p_allocator : *const AllocationCallbacks , p_swapchain : *mut SwapchainKHR , ) -> Result , pub destroy_swapchain_khr : extern "system" fn ( device : Device , swapchain : SwapchainKHR , p_allocator : *const AllocationCallbacks , ) -> c_void , pub get_swapchain_images_khr : extern "system" fn ( device : Device , swapchain : SwapchainKHR , p_swapchain_image_count : *mut u32 , p_swapchain_images : *mut Image , ) -> Result , pub acquire_next_image_khr : extern "system" fn ( device : Device , swapchain : SwapchainKHR , timeout : u64 , semaphore : Semaphore , fence : Fence , p_image_index : *mut u32 , ) -> Result , pub queue_present_khr : extern "system" fn ( queue : Queue , p_present_info : *const PresentInfoKHR , ) -> Result , pub get_device_group_present_capabilities_khr : extern "system" fn ( device : Device , p_device_group_present_capabilities : *mut DeviceGroupPresentCapabilitiesKHR , ) -> Result , pub get_device_group_surface_present_modes_khr : extern "system" fn ( device : Device , surface : SurfaceKHR , p_modes : *mut DeviceGroupPresentModeFlagsKHR , ) -> Result , pub get_physical_device_present_rectangles_khr : extern "system" fn ( physical_device : PhysicalDevice , surface : SurfaceKHR , p_rect_count : *mut u32 , p_rects : *mut Rect2D , ) -> Result , pub acquire_next_image2_khr : extern "system" fn ( device : Device , p_acquire_info : *const AcquireNextImageInfoKHR , p_image_index : *mut u32 , ) -> Result , } + ) -> Result, +} unsafe impl Send for KhrSwapchainFn {} unsafe impl Sync for KhrSwapchainFn {} impl ::std::clone::Clone for KhrSwapchainFn { @@ -38835,87 +38861,76 @@ impl SwapchainCreateFlagsKHR { pub const PROTECTED: Self = SwapchainCreateFlagsKHR(0b10); } #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceDisplayPropertiesKHR = - extern "system" fn( +pub type PFN_vkGetPhysicalDeviceDisplayPropertiesKHR = extern "system" fn( + physical_device: PhysicalDevice, + p_property_count: *mut u32, + p_properties: *mut DisplayPropertiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = extern "system" fn( + physical_device: PhysicalDevice, + p_property_count: *mut u32, + p_properties: *mut DisplayPlanePropertiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDisplayPlaneSupportedDisplaysKHR = extern "system" fn( + physical_device: PhysicalDevice, + plane_index: u32, + p_display_count: *mut u32, + p_displays: *mut DisplayKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDisplayModePropertiesKHR = extern "system" fn( + physical_device: PhysicalDevice, + display: DisplayKHR, + p_property_count: *mut u32, + p_properties: *mut DisplayModePropertiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateDisplayModeKHR = extern "system" fn( + physical_device: PhysicalDevice, + display: DisplayKHR, + p_create_info: *const DisplayModeCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_mode: *mut DisplayModeKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDisplayPlaneCapabilitiesKHR = extern "system" fn( + physical_device: PhysicalDevice, + mode: DisplayModeKHR, + plane_index: u32, + p_capabilities: *mut DisplayPlaneCapabilitiesKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateDisplayPlaneSurfaceKHR = extern "system" fn( + instance: Instance, + p_create_info: *const DisplaySurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; +pub struct KhrDisplayFn { + pub get_physical_device_display_properties_khr: extern "system" fn( physical_device: PhysicalDevice, p_property_count: *mut u32, p_properties: *mut DisplayPropertiesKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR = - extern "system" fn( + ) -> Result, + pub get_physical_device_display_plane_properties_khr: extern "system" fn( physical_device: PhysicalDevice, p_property_count: *mut u32, p_properties: *mut DisplayPlanePropertiesKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetDisplayPlaneSupportedDisplaysKHR = - extern "system" fn( + ) -> Result, + pub get_display_plane_supported_displays_khr: extern "system" fn( physical_device: PhysicalDevice, plane_index: u32, p_display_count: *mut u32, p_displays: *mut DisplayKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetDisplayModePropertiesKHR = - extern "system" fn( + ) -> Result, + pub get_display_mode_properties_khr: extern "system" fn( physical_device: PhysicalDevice, display: DisplayKHR, p_property_count: *mut u32, p_properties: *mut DisplayModePropertiesKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkCreateDisplayModeKHR = - extern "system" fn( - physical_device: PhysicalDevice, - display: DisplayKHR, - p_create_info: *const DisplayModeCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_mode: *mut DisplayModeKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetDisplayPlaneCapabilitiesKHR = - extern "system" fn( - physical_device: PhysicalDevice, - mode: DisplayModeKHR, - plane_index: u32, - p_capabilities: *mut DisplayPlaneCapabilitiesKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkCreateDisplayPlaneSurfaceKHR = - extern "system" fn( - instance: Instance, - p_create_info: *const DisplaySurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result; -pub struct KhrDisplayFn { - pub get_physical_device_display_properties_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayPropertiesKHR, - ) -> Result, - pub get_physical_device_display_plane_properties_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayPlanePropertiesKHR, - ) -> Result, - pub get_display_plane_supported_displays_khr: - extern "system" fn( - physical_device: PhysicalDevice, - plane_index: u32, - p_display_count: *mut u32, - p_displays: *mut DisplayKHR, - ) -> Result, - pub get_display_mode_properties_khr: - extern "system" fn( - physical_device: PhysicalDevice, - display: DisplayKHR, - p_property_count: *mut u32, - p_properties: *mut DisplayModePropertiesKHR, - ) -> Result, + ) -> Result, pub create_display_mode_khr: extern "system" fn( physical_device: PhysicalDevice, display: DisplayKHR, @@ -38923,20 +38938,18 @@ pub struct KhrDisplayFn { p_allocator: *const AllocationCallbacks, p_mode: *mut DisplayModeKHR, ) -> Result, - pub get_display_plane_capabilities_khr: - extern "system" fn( - physical_device: PhysicalDevice, - mode: DisplayModeKHR, - plane_index: u32, - p_capabilities: *mut DisplayPlaneCapabilitiesKHR, - ) -> Result, - pub create_display_plane_surface_khr: - extern "system" fn( - instance: Instance, - p_create_info: *const DisplaySurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, + pub get_display_plane_capabilities_khr: extern "system" fn( + physical_device: PhysicalDevice, + mode: DisplayModeKHR, + plane_index: u32, + p_capabilities: *mut DisplayPlaneCapabilitiesKHR, + ) -> Result, + pub create_display_plane_surface_khr: extern "system" fn( + instance: Instance, + p_create_info: *const DisplaySurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, + ) -> Result, } unsafe impl Send for KhrDisplayFn {} unsafe impl Sync for KhrDisplayFn {} @@ -39212,23 +39225,21 @@ impl ObjectType { pub const DISPLAY_MODE_KHR: Self = ObjectType(1000002001); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateSharedSwapchainsKHR = - extern "system" fn( +pub type PFN_vkCreateSharedSwapchainsKHR = extern "system" fn( + device: Device, + swapchain_count: u32, + p_create_infos: *const SwapchainCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_swapchains: *mut SwapchainKHR, +) -> Result; +pub struct KhrDisplaySwapchainFn { + pub create_shared_swapchains_khr: extern "system" fn( device: Device, swapchain_count: u32, p_create_infos: *const SwapchainCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_swapchains: *mut SwapchainKHR, - ) -> Result; -pub struct KhrDisplaySwapchainFn { - pub create_shared_swapchains_khr: - extern "system" fn( - device: Device, - swapchain_count: u32, - p_create_infos: *const SwapchainCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_swapchains: *mut SwapchainKHR, - ) -> Result, + ) -> Result, } unsafe impl Send for KhrDisplaySwapchainFn {} unsafe impl Sync for KhrDisplaySwapchainFn {} @@ -39295,21 +39306,19 @@ impl Result { pub const ERROR_INCOMPATIBLE_DISPLAY_KHR: Self = Result(-1000003001); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateXlibSurfaceKHR = - extern "system" fn( - instance: Instance, - p_create_info: *const XlibSurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result; +pub type PFN_vkCreateXlibSurfaceKHR = extern "system" fn( + instance: Instance, + p_create_info: *const XlibSurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR = - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - dpy: *mut Display, - visual_id: VisualID, - ) -> Bool32; +pub type PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR = extern "system" fn( + physical_device: PhysicalDevice, + queue_family_index: u32, + dpy: *mut Display, + visual_id: VisualID, +) -> Bool32; pub struct KhrXlibSurfaceFn { pub create_xlib_surface_khr: extern "system" fn( instance: Instance, @@ -39317,13 +39326,12 @@ pub struct KhrXlibSurfaceFn { p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, ) -> Result, - pub get_physical_device_xlib_presentation_support_khr: - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - dpy: *mut Display, - visual_id: VisualID, - ) -> Bool32, + pub get_physical_device_xlib_presentation_support_khr: extern "system" fn( + physical_device: PhysicalDevice, + queue_family_index: u32, + dpy: *mut Display, + visual_id: VisualID, + ) -> Bool32, } unsafe impl Send for KhrXlibSurfaceFn {} unsafe impl Sync for KhrXlibSurfaceFn {} @@ -39415,21 +39423,19 @@ impl StructureType { pub const XLIB_SURFACE_CREATE_INFO_KHR: Self = StructureType(1000004000); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateXcbSurfaceKHR = - extern "system" fn( - instance: Instance, - p_create_info: *const XcbSurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result; +pub type PFN_vkCreateXcbSurfaceKHR = extern "system" fn( + instance: Instance, + p_create_info: *const XcbSurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR = - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - connection: *mut xcb_connection_t, - visual_id: xcb_visualid_t, - ) -> Bool32; +pub type PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR = extern "system" fn( + physical_device: PhysicalDevice, + queue_family_index: u32, + connection: *mut xcb_connection_t, + visual_id: xcb_visualid_t, +) -> Bool32; pub struct KhrXcbSurfaceFn { pub create_xcb_surface_khr: extern "system" fn( instance: Instance, @@ -39437,13 +39443,12 @@ pub struct KhrXcbSurfaceFn { p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, ) -> Result, - pub get_physical_device_xcb_presentation_support_khr: - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - connection: *mut xcb_connection_t, - visual_id: xcb_visualid_t, - ) -> Bool32, + pub get_physical_device_xcb_presentation_support_khr: extern "system" fn( + physical_device: PhysicalDevice, + queue_family_index: u32, + connection: *mut xcb_connection_t, + visual_id: xcb_visualid_t, + ) -> Bool32, } unsafe impl Send for KhrXcbSurfaceFn {} unsafe impl Sync for KhrXcbSurfaceFn {} @@ -39535,34 +39540,30 @@ impl StructureType { pub const XCB_SURFACE_CREATE_INFO_KHR: Self = StructureType(1000005000); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateWaylandSurfaceKHR = - extern "system" fn( +pub type PFN_vkCreateWaylandSurfaceKHR = extern "system" fn( + instance: Instance, + p_create_info: *const WaylandSurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR = extern "system" fn( + physical_device: PhysicalDevice, + queue_family_index: u32, + display: *mut wl_display, +) -> Bool32; +pub struct KhrWaylandSurfaceFn { + pub create_wayland_surface_khr: extern "system" fn( instance: Instance, p_create_info: *const WaylandSurfaceCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR = - extern "system" fn( + ) -> Result, + pub get_physical_device_wayland_presentation_support_khr: extern "system" fn( physical_device: PhysicalDevice, queue_family_index: u32, display: *mut wl_display, - ) -> Bool32; -pub struct KhrWaylandSurfaceFn { - pub create_wayland_surface_khr: - extern "system" fn( - instance: Instance, - p_create_info: *const WaylandSurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, - pub get_physical_device_wayland_presentation_support_khr: - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - display: *mut wl_display, - ) -> Bool32, + ) -> Bool32, } unsafe impl Send for KhrWaylandSurfaceFn {} unsafe impl Sync for KhrWaylandSurfaceFn {} @@ -39667,21 +39668,19 @@ impl KhrMirSurfaceFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkCreateAndroidSurfaceKHR = - extern "system" fn( +pub type PFN_vkCreateAndroidSurfaceKHR = extern "system" fn( + instance: Instance, + p_create_info: *const AndroidSurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; +pub struct KhrAndroidSurfaceFn { + pub create_android_surface_khr: extern "system" fn( instance: Instance, p_create_info: *const AndroidSurfaceCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, - ) -> Result; -pub struct KhrAndroidSurfaceFn { - pub create_android_surface_khr: - extern "system" fn( - instance: Instance, - p_create_info: *const AndroidSurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, + ) -> Result, } unsafe impl Send for KhrAndroidSurfaceFn {} unsafe impl Sync for KhrAndroidSurfaceFn {} @@ -39736,24 +39735,22 @@ impl StructureType { pub const ANDROID_SURFACE_CREATE_INFO_KHR: Self = StructureType(1000008000); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateWin32SurfaceKHR = - extern "system" fn( - instance: Instance, - p_create_info: *const Win32SurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result; +pub type PFN_vkCreateWin32SurfaceKHR = extern "system" fn( + instance: Instance, + p_create_info: *const Win32SurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR = extern "system" fn(physical_device: PhysicalDevice, queue_family_index: u32) -> Bool32; pub struct KhrWin32SurfaceFn { - pub create_win32_surface_khr: - extern "system" fn( - instance: Instance, - p_create_info: *const Win32SurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, + pub create_win32_surface_khr: extern "system" fn( + instance: Instance, + p_create_info: *const Win32SurfaceCreateInfoKHR, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, + ) -> Result, pub get_physical_device_win32_presentation_support_khr: extern "system" fn(physical_device: PhysicalDevice, queue_family_index: u32) -> Bool32, } @@ -39856,14 +39853,13 @@ pub type PFN_vkAcquireImageANDROID = extern "system" fn( fence: Fence, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkQueueSignalReleaseImageANDROID = - extern "system" fn( - queue: Queue, - wait_semaphore_count: u32, - p_wait_semaphores: *const Semaphore, - image: Image, - p_native_fence_fd: *mut c_int, - ) -> Result; +pub type PFN_vkQueueSignalReleaseImageANDROID = extern "system" fn( + queue: Queue, + wait_semaphore_count: u32, + p_wait_semaphores: *const Semaphore, + image: Image, + p_native_fence_fd: *mut c_int, +) -> Result; pub struct AndroidNativeBufferFn { pub get_swapchain_gralloc_usage_android: extern "system" fn( device: Device, @@ -40011,20 +40007,18 @@ impl StructureType { pub const NATIVE_BUFFER_ANDROID: Self = StructureType(1000010000); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateDebugReportCallbackEXT = - extern "system" fn( - instance: Instance, - p_create_info: *const DebugReportCallbackCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_callback: *mut DebugReportCallbackEXT, - ) -> Result; +pub type PFN_vkCreateDebugReportCallbackEXT = extern "system" fn( + instance: Instance, + p_create_info: *const DebugReportCallbackCreateInfoEXT, + p_allocator: *const AllocationCallbacks, + p_callback: *mut DebugReportCallbackEXT, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyDebugReportCallbackEXT = - extern "system" fn( - instance: Instance, - callback: DebugReportCallbackEXT, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroyDebugReportCallbackEXT = extern "system" fn( + instance: Instance, + callback: DebugReportCallbackEXT, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkDebugReportMessageEXT = extern "system" fn( instance: Instance, @@ -40037,19 +40031,17 @@ pub type PFN_vkDebugReportMessageEXT = extern "system" fn( p_message: *const c_char, ) -> c_void; pub struct ExtDebugReportFn { - pub create_debug_report_callback_ext: - extern "system" fn( - instance: Instance, - p_create_info: *const DebugReportCallbackCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_callback: *mut DebugReportCallbackEXT, - ) -> Result, - pub destroy_debug_report_callback_ext: - extern "system" fn( - instance: Instance, - callback: DebugReportCallbackEXT, - p_allocator: *const AllocationCallbacks, - ) -> c_void, + pub create_debug_report_callback_ext: extern "system" fn( + instance: Instance, + p_create_info: *const DebugReportCallbackCreateInfoEXT, + p_allocator: *const AllocationCallbacks, + p_callback: *mut DebugReportCallbackEXT, + ) -> Result, + pub destroy_debug_report_callback_ext: extern "system" fn( + instance: Instance, + callback: DebugReportCallbackEXT, + p_allocator: *const AllocationCallbacks, + ) -> c_void, pub debug_report_message_ext: extern "system" fn( instance: Instance, flags: DebugReportFlagsEXT, @@ -40390,37 +40382,35 @@ pub type PFN_vkDebugMarkerSetObjectTagEXT = pub type PFN_vkDebugMarkerSetObjectNameEXT = extern "system" fn(device: Device, p_name_info: *const DebugMarkerObjectNameInfoEXT) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdDebugMarkerBeginEXT = - extern "system" fn( - command_buffer: CommandBuffer, - p_marker_info: *const DebugMarkerMarkerInfoEXT, - ) -> c_void; +pub type PFN_vkCmdDebugMarkerBeginEXT = extern "system" fn( + command_buffer: CommandBuffer, + p_marker_info: *const DebugMarkerMarkerInfoEXT, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdDebugMarkerEndEXT = extern "system" fn(command_buffer: CommandBuffer) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdDebugMarkerInsertEXT = - extern "system" fn( +pub type PFN_vkCmdDebugMarkerInsertEXT = extern "system" fn( + command_buffer: CommandBuffer, + p_marker_info: *const DebugMarkerMarkerInfoEXT, +) -> c_void; +pub struct ExtDebugMarkerFn { + pub debug_marker_set_object_tag_ext: extern "system" fn( + device: Device, + p_tag_info: *const DebugMarkerObjectTagInfoEXT, + ) -> Result, + pub debug_marker_set_object_name_ext: extern "system" fn( + device: Device, + p_name_info: *const DebugMarkerObjectNameInfoEXT, + ) -> Result, + pub cmd_debug_marker_begin_ext: extern "system" fn( command_buffer: CommandBuffer, p_marker_info: *const DebugMarkerMarkerInfoEXT, - ) -> c_void; -pub struct ExtDebugMarkerFn { - pub debug_marker_set_object_tag_ext: - extern "system" fn(device: Device, p_tag_info: *const DebugMarkerObjectTagInfoEXT) - -> Result, - pub debug_marker_set_object_name_ext: - extern "system" fn(device: Device, p_name_info: *const DebugMarkerObjectNameInfoEXT) - -> Result, - pub cmd_debug_marker_begin_ext: - extern "system" fn( - command_buffer: CommandBuffer, - p_marker_info: *const DebugMarkerMarkerInfoEXT, - ) -> c_void, + ) -> c_void, pub cmd_debug_marker_end_ext: extern "system" fn(command_buffer: CommandBuffer) -> c_void, - pub cmd_debug_marker_insert_ext: - extern "system" fn( - command_buffer: CommandBuffer, - p_marker_info: *const DebugMarkerMarkerInfoEXT, - ) -> c_void, + pub cmd_debug_marker_insert_ext: extern "system" fn( + command_buffer: CommandBuffer, + p_marker_info: *const DebugMarkerMarkerInfoEXT, + ) -> c_void, } unsafe impl Send for ExtDebugMarkerFn {} unsafe impl Sync for ExtDebugMarkerFn {} @@ -40674,33 +40664,30 @@ impl ExtExtension28Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkCmdBindTransformFeedbackBuffersEXT = - extern "system" fn( - command_buffer: CommandBuffer, - first_binding: u32, - binding_count: u32, - p_buffers: *const Buffer, - p_offsets: *const DeviceSize, - p_sizes: *const DeviceSize, - ) -> c_void; +pub type PFN_vkCmdBindTransformFeedbackBuffersEXT = extern "system" fn( + command_buffer: CommandBuffer, + first_binding: u32, + binding_count: u32, + p_buffers: *const Buffer, + p_offsets: *const DeviceSize, + p_sizes: *const DeviceSize, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdBeginTransformFeedbackEXT = - extern "system" fn( - command_buffer: CommandBuffer, - first_counter_buffer: u32, - counter_buffer_count: u32, - p_counter_buffers: *const Buffer, - p_counter_buffer_offsets: *const DeviceSize, - ) -> c_void; +pub type PFN_vkCmdBeginTransformFeedbackEXT = extern "system" fn( + command_buffer: CommandBuffer, + first_counter_buffer: u32, + counter_buffer_count: u32, + p_counter_buffers: *const Buffer, + p_counter_buffer_offsets: *const DeviceSize, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdEndTransformFeedbackEXT = - extern "system" fn( - command_buffer: CommandBuffer, - first_counter_buffer: u32, - counter_buffer_count: u32, - p_counter_buffers: *const Buffer, - p_counter_buffer_offsets: *const DeviceSize, - ) -> c_void; +pub type PFN_vkCmdEndTransformFeedbackEXT = extern "system" fn( + command_buffer: CommandBuffer, + first_counter_buffer: u32, + counter_buffer_count: u32, + p_counter_buffers: *const Buffer, + p_counter_buffer_offsets: *const DeviceSize, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdBeginQueryIndexedEXT = extern "system" fn( command_buffer: CommandBuffer, @@ -40735,22 +40722,20 @@ pub struct ExtTransformFeedbackFn { p_offsets: *const DeviceSize, p_sizes: *const DeviceSize, ) -> c_void, - pub cmd_begin_transform_feedback_ext: - extern "system" fn( - command_buffer: CommandBuffer, - first_counter_buffer: u32, - counter_buffer_count: u32, - p_counter_buffers: *const Buffer, - p_counter_buffer_offsets: *const DeviceSize, - ) -> c_void, - pub cmd_end_transform_feedback_ext: - extern "system" fn( - command_buffer: CommandBuffer, - first_counter_buffer: u32, - counter_buffer_count: u32, - p_counter_buffers: *const Buffer, - p_counter_buffer_offsets: *const DeviceSize, - ) -> c_void, + pub cmd_begin_transform_feedback_ext: extern "system" fn( + command_buffer: CommandBuffer, + first_counter_buffer: u32, + counter_buffer_count: u32, + p_counter_buffers: *const Buffer, + p_counter_buffer_offsets: *const DeviceSize, + ) -> c_void, + pub cmd_end_transform_feedback_ext: extern "system" fn( + command_buffer: CommandBuffer, + first_counter_buffer: u32, + counter_buffer_count: u32, + p_counter_buffers: *const Buffer, + p_counter_buffer_offsets: *const DeviceSize, + ) -> c_void, pub cmd_begin_query_indexed_ext: extern "system" fn( command_buffer: CommandBuffer, query_pool: QueryPool, @@ -41713,8 +41698,18 @@ impl Format { pub const PVRTC2_4BPP_SRGB_BLOCK_IMG: Self = Format(1000054007); } #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = - extern "system" fn( +pub type PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = extern "system" fn( + physical_device: PhysicalDevice, + format: Format, + ty: ImageType, + tiling: ImageTiling, + usage: ImageUsageFlags, + flags: ImageCreateFlags, + external_handle_type: ExternalMemoryHandleTypeFlagsNV, + p_external_image_format_properties: *mut ExternalImageFormatPropertiesNV, +) -> Result; +pub struct NvExternalMemoryCapabilitiesFn { + pub get_physical_device_external_image_format_properties_nv: extern "system" fn( physical_device: PhysicalDevice, format: Format, ty: ImageType, @@ -41723,8 +41718,8 @@ pub type PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV = flags: ImageCreateFlags, external_handle_type: ExternalMemoryHandleTypeFlagsNV, p_external_image_format_properties: *mut ExternalImageFormatPropertiesNV, - ) -> Result; -pub struct NvExternalMemoryCapabilitiesFn { pub get_physical_device_external_image_format_properties_nv : extern "system" fn ( physical_device : PhysicalDevice , format : Format , ty : ImageType , tiling : ImageTiling , usage : ImageUsageFlags , flags : ImageCreateFlags , external_handle_type : ExternalMemoryHandleTypeFlagsNV , p_external_image_format_properties : *mut ExternalImageFormatPropertiesNV , ) -> Result , } + ) -> Result, +} unsafe impl Send for NvExternalMemoryCapabilitiesFn {} unsafe impl Sync for NvExternalMemoryCapabilitiesFn {} impl ::std::clone::Clone for NvExternalMemoryCapabilitiesFn { @@ -41816,21 +41811,19 @@ impl StructureType { pub const EXPORT_MEMORY_ALLOCATE_INFO_NV: Self = StructureType(1000056001); } #[allow(non_camel_case_types)] -pub type PFN_vkGetMemoryWin32HandleNV = - extern "system" fn( +pub type PFN_vkGetMemoryWin32HandleNV = extern "system" fn( + device: Device, + memory: DeviceMemory, + handle_type: ExternalMemoryHandleTypeFlagsNV, + p_handle: *mut HANDLE, +) -> Result; +pub struct NvExternalMemoryWin32Fn { + pub get_memory_win32_handle_nv: extern "system" fn( device: Device, memory: DeviceMemory, handle_type: ExternalMemoryHandleTypeFlagsNV, p_handle: *mut HANDLE, - ) -> Result; -pub struct NvExternalMemoryWin32Fn { - pub get_memory_win32_handle_nv: - extern "system" fn( - device: Device, - memory: DeviceMemory, - handle_type: ExternalMemoryHandleTypeFlagsNV, - p_handle: *mut HANDLE, - ) -> Result, + ) -> Result, } unsafe impl Send for NvExternalMemoryWin32Fn {} unsafe impl Sync for NvExternalMemoryWin32Fn {} @@ -41924,7 +41917,28 @@ impl KhrGetPhysicalDeviceProperties2Fn { KhrGetPhysicalDeviceProperties2Fn {} } } -pub struct KhrDeviceGroupFn { pub get_device_group_present_capabilities_khr : extern "system" fn ( device : Device , p_device_group_present_capabilities : *mut DeviceGroupPresentCapabilitiesKHR , ) -> Result , pub get_device_group_surface_present_modes_khr : extern "system" fn ( device : Device , surface : SurfaceKHR , p_modes : *mut DeviceGroupPresentModeFlagsKHR , ) -> Result , pub get_physical_device_present_rectangles_khr : extern "system" fn ( physical_device : PhysicalDevice , surface : SurfaceKHR , p_rect_count : *mut u32 , p_rects : *mut Rect2D , ) -> Result , pub acquire_next_image2_khr : extern "system" fn ( device : Device , p_acquire_info : *const AcquireNextImageInfoKHR , p_image_index : *mut u32 , ) -> Result , } +pub struct KhrDeviceGroupFn { + pub get_device_group_present_capabilities_khr: extern "system" fn( + device: Device, + p_device_group_present_capabilities: *mut DeviceGroupPresentCapabilitiesKHR, + ) -> Result, + pub get_device_group_surface_present_modes_khr: extern "system" fn( + device: Device, + surface: SurfaceKHR, + p_modes: *mut DeviceGroupPresentModeFlagsKHR, + ) -> Result, + pub get_physical_device_present_rectangles_khr: extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_rect_count: *mut u32, + p_rects: *mut Rect2D, + ) -> Result, + pub acquire_next_image2_khr: extern "system" fn( + device: Device, + p_acquire_info: *const AcquireNextImageInfoKHR, + p_image_index: *mut u32, + ) -> Result, +} unsafe impl Send for KhrDeviceGroupFn {} unsafe impl Sync for KhrDeviceGroupFn {} impl ::std::clone::Clone for KhrDeviceGroupFn { @@ -42322,34 +42336,30 @@ impl KhrExternalMemoryFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkGetMemoryWin32HandleKHR = - extern "system" fn( +pub type PFN_vkGetMemoryWin32HandleKHR = extern "system" fn( + device: Device, + p_get_win32_handle_info: *const MemoryGetWin32HandleInfoKHR, + p_handle: *mut HANDLE, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetMemoryWin32HandlePropertiesKHR = extern "system" fn( + device: Device, + handle_type: ExternalMemoryHandleTypeFlags, + handle: HANDLE, + p_memory_win32_handle_properties: *mut MemoryWin32HandlePropertiesKHR, +) -> Result; +pub struct KhrExternalMemoryWin32Fn { + pub get_memory_win32_handle_khr: extern "system" fn( device: Device, p_get_win32_handle_info: *const MemoryGetWin32HandleInfoKHR, p_handle: *mut HANDLE, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetMemoryWin32HandlePropertiesKHR = - extern "system" fn( + ) -> Result, + pub get_memory_win32_handle_properties_khr: extern "system" fn( device: Device, handle_type: ExternalMemoryHandleTypeFlags, handle: HANDLE, p_memory_win32_handle_properties: *mut MemoryWin32HandlePropertiesKHR, - ) -> Result; -pub struct KhrExternalMemoryWin32Fn { - pub get_memory_win32_handle_khr: - extern "system" fn( - device: Device, - p_get_win32_handle_info: *const MemoryGetWin32HandleInfoKHR, - p_handle: *mut HANDLE, - ) -> Result, - pub get_memory_win32_handle_properties_khr: - extern "system" fn( - device: Device, - handle_type: ExternalMemoryHandleTypeFlags, - handle: HANDLE, - p_memory_win32_handle_properties: *mut MemoryWin32HandlePropertiesKHR, - ) -> Result, + ) -> Result, } unsafe impl Send for KhrExternalMemoryWin32Fn {} unsafe impl Sync for KhrExternalMemoryWin32Fn {} @@ -42450,30 +42460,30 @@ impl StructureType { pub const MEMORY_GET_WIN32_HANDLE_INFO_KHR: Self = StructureType(1000073003); } #[allow(non_camel_case_types)] -pub type PFN_vkGetMemoryFdKHR = - extern "system" fn(device: Device, p_get_fd_info: *const MemoryGetFdInfoKHR, p_fd: *mut c_int) - -> Result; +pub type PFN_vkGetMemoryFdKHR = extern "system" fn( + device: Device, + p_get_fd_info: *const MemoryGetFdInfoKHR, + p_fd: *mut c_int, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetMemoryFdPropertiesKHR = - extern "system" fn( - device: Device, - handle_type: ExternalMemoryHandleTypeFlags, - fd: c_int, - p_memory_fd_properties: *mut MemoryFdPropertiesKHR, - ) -> Result; +pub type PFN_vkGetMemoryFdPropertiesKHR = extern "system" fn( + device: Device, + handle_type: ExternalMemoryHandleTypeFlags, + fd: c_int, + p_memory_fd_properties: *mut MemoryFdPropertiesKHR, +) -> Result; pub struct KhrExternalMemoryFdFn { pub get_memory_fd_khr: extern "system" fn( device: Device, p_get_fd_info: *const MemoryGetFdInfoKHR, p_fd: *mut c_int, ) -> Result, - pub get_memory_fd_properties_khr: - extern "system" fn( - device: Device, - handle_type: ExternalMemoryHandleTypeFlags, - fd: c_int, - p_memory_fd_properties: *mut MemoryFdPropertiesKHR, - ) -> Result, + pub get_memory_fd_properties_khr: extern "system" fn( + device: Device, + handle_type: ExternalMemoryHandleTypeFlags, + fd: c_int, + p_memory_fd_properties: *mut MemoryFdPropertiesKHR, + ) -> Result, } unsafe impl Send for KhrExternalMemoryFdFn {} unsafe impl Sync for KhrExternalMemoryFdFn {} @@ -42614,15 +42624,27 @@ impl KhrExternalSemaphoreFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkImportSemaphoreWin32HandleKHR = extern "system" fn ( device : Device , p_import_semaphore_win32_handle_info : *const ImportSemaphoreWin32HandleInfoKHR ) -> Result ; +pub type PFN_vkImportSemaphoreWin32HandleKHR = extern "system" fn( + device: Device, + p_import_semaphore_win32_handle_info: *const ImportSemaphoreWin32HandleInfoKHR, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetSemaphoreWin32HandleKHR = - extern "system" fn( +pub type PFN_vkGetSemaphoreWin32HandleKHR = extern "system" fn( + device: Device, + p_get_win32_handle_info: *const SemaphoreGetWin32HandleInfoKHR, + p_handle: *mut HANDLE, +) -> Result; +pub struct KhrExternalSemaphoreWin32Fn { + pub import_semaphore_win32_handle_khr: extern "system" fn( + device: Device, + p_import_semaphore_win32_handle_info: *const ImportSemaphoreWin32HandleInfoKHR, + ) -> Result, + pub get_semaphore_win32_handle_khr: extern "system" fn( device: Device, p_get_win32_handle_info: *const SemaphoreGetWin32HandleInfoKHR, p_handle: *mut HANDLE, - ) -> Result; -pub struct KhrExternalSemaphoreWin32Fn { pub import_semaphore_win32_handle_khr : extern "system" fn ( device : Device , p_import_semaphore_win32_handle_info : *const ImportSemaphoreWin32HandleInfoKHR , ) -> Result , pub get_semaphore_win32_handle_khr : extern "system" fn ( device : Device , p_get_win32_handle_info : *const SemaphoreGetWin32HandleInfoKHR , p_handle : *mut HANDLE , ) -> Result , } + ) -> Result, +} unsafe impl Send for KhrExternalSemaphoreWin32Fn {} unsafe impl Sync for KhrExternalSemaphoreWin32Fn {} impl ::std::clone::Clone for KhrExternalSemaphoreWin32Fn { @@ -42713,9 +42735,10 @@ impl StructureType { pub const SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR: Self = StructureType(1000078003); } #[allow(non_camel_case_types)] -pub type PFN_vkImportSemaphoreFdKHR = - extern "system" fn(device: Device, p_import_semaphore_fd_info: *const ImportSemaphoreFdInfoKHR) - -> Result; +pub type PFN_vkImportSemaphoreFdKHR = extern "system" fn( + device: Device, + p_import_semaphore_fd_info: *const ImportSemaphoreFdInfoKHR, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSemaphoreFdKHR = extern "system" fn( device: Device, @@ -42723,11 +42746,10 @@ pub type PFN_vkGetSemaphoreFdKHR = extern "system" fn( p_fd: *mut c_int, ) -> Result; pub struct KhrExternalSemaphoreFdFn { - pub import_semaphore_fd_khr: - extern "system" fn( - device: Device, - p_import_semaphore_fd_info: *const ImportSemaphoreFdInfoKHR, - ) -> Result, + pub import_semaphore_fd_khr: extern "system" fn( + device: Device, + p_import_semaphore_fd_info: *const ImportSemaphoreFdInfoKHR, + ) -> Result, pub get_semaphore_fd_khr: extern "system" fn( device: Device, p_get_fd_info: *const SemaphoreGetFdInfoKHR, @@ -42813,42 +42835,38 @@ impl StructureType { pub const SEMAPHORE_GET_FD_INFO_KHR: Self = StructureType(1000079001); } #[allow(non_camel_case_types)] -pub type PFN_vkCmdPushDescriptorSetKHR = - extern "system" fn( +pub type PFN_vkCmdPushDescriptorSetKHR = extern "system" fn( + command_buffer: CommandBuffer, + pipeline_bind_point: PipelineBindPoint, + layout: PipelineLayout, + set: u32, + descriptor_write_count: u32, + p_descriptor_writes: *const WriteDescriptorSet, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdPushDescriptorSetWithTemplateKHR = extern "system" fn( + command_buffer: CommandBuffer, + descriptor_update_template: DescriptorUpdateTemplate, + layout: PipelineLayout, + set: u32, + p_data: *const c_void, +) -> c_void; +pub struct KhrPushDescriptorFn { + pub cmd_push_descriptor_set_khr: extern "system" fn( command_buffer: CommandBuffer, pipeline_bind_point: PipelineBindPoint, layout: PipelineLayout, set: u32, descriptor_write_count: u32, p_descriptor_writes: *const WriteDescriptorSet, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkCmdPushDescriptorSetWithTemplateKHR = - extern "system" fn( + ) -> c_void, + pub cmd_push_descriptor_set_with_template_khr: extern "system" fn( command_buffer: CommandBuffer, descriptor_update_template: DescriptorUpdateTemplate, layout: PipelineLayout, set: u32, p_data: *const c_void, - ) -> c_void; -pub struct KhrPushDescriptorFn { - pub cmd_push_descriptor_set_khr: - extern "system" fn( - command_buffer: CommandBuffer, - pipeline_bind_point: PipelineBindPoint, - layout: PipelineLayout, - set: u32, - descriptor_write_count: u32, - p_descriptor_writes: *const WriteDescriptorSet, - ) -> c_void, - pub cmd_push_descriptor_set_with_template_khr: - extern "system" fn( - command_buffer: CommandBuffer, - descriptor_update_template: DescriptorUpdateTemplate, - layout: PipelineLayout, - set: u32, - p_data: *const c_void, - ) -> c_void, + ) -> c_void, } unsafe impl Send for KhrPushDescriptorFn {} unsafe impl Sync for KhrPushDescriptorFn {} @@ -42958,20 +42976,18 @@ impl DescriptorSetLayoutCreateFlags { pub const PUSH_DESCRIPTOR_KHR: Self = DescriptorSetLayoutCreateFlags(0b1); } #[allow(non_camel_case_types)] -pub type PFN_vkCmdBeginConditionalRenderingEXT = - extern "system" fn( - command_buffer: CommandBuffer, - p_conditional_rendering_begin: *const ConditionalRenderingBeginInfoEXT, - ) -> c_void; +pub type PFN_vkCmdBeginConditionalRenderingEXT = extern "system" fn( + command_buffer: CommandBuffer, + p_conditional_rendering_begin: *const ConditionalRenderingBeginInfoEXT, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdEndConditionalRenderingEXT = extern "system" fn(command_buffer: CommandBuffer) -> c_void; pub struct ExtConditionalRenderingFn { - pub cmd_begin_conditional_rendering_ext: - extern "system" fn( - command_buffer: CommandBuffer, - p_conditional_rendering_begin: *const ConditionalRenderingBeginInfoEXT, - ) -> c_void, + pub cmd_begin_conditional_rendering_ext: extern "system" fn( + command_buffer: CommandBuffer, + p_conditional_rendering_begin: *const ConditionalRenderingBeginInfoEXT, + ) -> c_void, pub cmd_end_conditional_rendering_ext: extern "system" fn(command_buffer: CommandBuffer) -> c_void, } @@ -43122,14 +43138,13 @@ impl StructureType { pub const PRESENT_REGIONS_KHR: Self = StructureType(1000084000); } pub struct KhrDescriptorUpdateTemplateFn { - pub cmd_push_descriptor_set_with_template_khr: - extern "system" fn( - command_buffer: CommandBuffer, - descriptor_update_template: DescriptorUpdateTemplate, - layout: PipelineLayout, - set: u32, - p_data: *const c_void, - ) -> c_void, + pub cmd_push_descriptor_set_with_template_khr: extern "system" fn( + command_buffer: CommandBuffer, + descriptor_update_template: DescriptorUpdateTemplate, + layout: PipelineLayout, + set: u32, + p_data: *const c_void, + ) -> c_void, } unsafe impl Send for KhrDescriptorUpdateTemplateFn {} unsafe impl Sync for KhrDescriptorUpdateTemplateFn {} @@ -43189,40 +43204,35 @@ impl KhrDescriptorUpdateTemplateFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkCmdProcessCommandsNVX = - extern "system" fn( - command_buffer: CommandBuffer, - p_process_commands_info: *const CmdProcessCommandsInfoNVX, - ) -> c_void; +pub type PFN_vkCmdProcessCommandsNVX = extern "system" fn( + command_buffer: CommandBuffer, + p_process_commands_info: *const CmdProcessCommandsInfoNVX, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdReserveSpaceForCommandsNVX = - extern "system" fn( - command_buffer: CommandBuffer, - p_reserve_space_info: *const CmdReserveSpaceForCommandsInfoNVX, - ) -> c_void; +pub type PFN_vkCmdReserveSpaceForCommandsNVX = extern "system" fn( + command_buffer: CommandBuffer, + p_reserve_space_info: *const CmdReserveSpaceForCommandsInfoNVX, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateIndirectCommandsLayoutNVX = - extern "system" fn( - device: Device, - p_create_info: *const IndirectCommandsLayoutCreateInfoNVX, - p_allocator: *const AllocationCallbacks, - p_indirect_commands_layout: *mut IndirectCommandsLayoutNVX, - ) -> Result; +pub type PFN_vkCreateIndirectCommandsLayoutNVX = extern "system" fn( + device: Device, + p_create_info: *const IndirectCommandsLayoutCreateInfoNVX, + p_allocator: *const AllocationCallbacks, + p_indirect_commands_layout: *mut IndirectCommandsLayoutNVX, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyIndirectCommandsLayoutNVX = - extern "system" fn( - device: Device, - indirect_commands_layout: IndirectCommandsLayoutNVX, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroyIndirectCommandsLayoutNVX = extern "system" fn( + device: Device, + indirect_commands_layout: IndirectCommandsLayoutNVX, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateObjectTableNVX = - extern "system" fn( - device: Device, - p_create_info: *const ObjectTableCreateInfoNVX, - p_allocator: *const AllocationCallbacks, - p_object_table: *mut ObjectTableNVX, - ) -> Result; +pub type PFN_vkCreateObjectTableNVX = extern "system" fn( + device: Device, + p_create_info: *const ObjectTableCreateInfoNVX, + p_allocator: *const AllocationCallbacks, + p_object_table: *mut ObjectTableNVX, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyObjectTableNVX = extern "system" fn( device: Device, @@ -43230,54 +43240,47 @@ pub type PFN_vkDestroyObjectTableNVX = extern "system" fn( p_allocator: *const AllocationCallbacks, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkRegisterObjectsNVX = - extern "system" fn( - device: Device, - object_table: ObjectTableNVX, - object_count: u32, - pp_object_table_entries: *const *const ObjectTableEntryNVX, - p_object_indices: *const u32, - ) -> Result; +pub type PFN_vkRegisterObjectsNVX = extern "system" fn( + device: Device, + object_table: ObjectTableNVX, + object_count: u32, + pp_object_table_entries: *const *const ObjectTableEntryNVX, + p_object_indices: *const u32, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkUnregisterObjectsNVX = - extern "system" fn( - device: Device, - object_table: ObjectTableNVX, - object_count: u32, - p_object_entry_types: *const ObjectEntryTypeNVX, - p_object_indices: *const u32, - ) -> Result; +pub type PFN_vkUnregisterObjectsNVX = extern "system" fn( + device: Device, + object_table: ObjectTableNVX, + object_count: u32, + p_object_entry_types: *const ObjectEntryTypeNVX, + p_object_indices: *const u32, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = - extern "system" fn( - physical_device: PhysicalDevice, - p_features: *mut DeviceGeneratedCommandsFeaturesNVX, - p_limits: *mut DeviceGeneratedCommandsLimitsNVX, - ) -> c_void; +pub type PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = extern "system" fn( + physical_device: PhysicalDevice, + p_features: *mut DeviceGeneratedCommandsFeaturesNVX, + p_limits: *mut DeviceGeneratedCommandsLimitsNVX, +) -> c_void; pub struct NvxDeviceGeneratedCommandsFn { - pub cmd_process_commands_nvx: - extern "system" fn( - command_buffer: CommandBuffer, - p_process_commands_info: *const CmdProcessCommandsInfoNVX, - ) -> c_void, - pub cmd_reserve_space_for_commands_nvx: - extern "system" fn( - command_buffer: CommandBuffer, - p_reserve_space_info: *const CmdReserveSpaceForCommandsInfoNVX, - ) -> c_void, - pub create_indirect_commands_layout_nvx: - extern "system" fn( - device: Device, - p_create_info: *const IndirectCommandsLayoutCreateInfoNVX, - p_allocator: *const AllocationCallbacks, - p_indirect_commands_layout: *mut IndirectCommandsLayoutNVX, - ) -> Result, - pub destroy_indirect_commands_layout_nvx: - extern "system" fn( - device: Device, - indirect_commands_layout: IndirectCommandsLayoutNVX, - p_allocator: *const AllocationCallbacks, - ) -> c_void, + pub cmd_process_commands_nvx: extern "system" fn( + command_buffer: CommandBuffer, + p_process_commands_info: *const CmdProcessCommandsInfoNVX, + ) -> c_void, + pub cmd_reserve_space_for_commands_nvx: extern "system" fn( + command_buffer: CommandBuffer, + p_reserve_space_info: *const CmdReserveSpaceForCommandsInfoNVX, + ) -> c_void, + pub create_indirect_commands_layout_nvx: extern "system" fn( + device: Device, + p_create_info: *const IndirectCommandsLayoutCreateInfoNVX, + p_allocator: *const AllocationCallbacks, + p_indirect_commands_layout: *mut IndirectCommandsLayoutNVX, + ) -> Result, + pub destroy_indirect_commands_layout_nvx: extern "system" fn( + device: Device, + indirect_commands_layout: IndirectCommandsLayoutNVX, + p_allocator: *const AllocationCallbacks, + ) -> c_void, pub create_object_table_nvx: extern "system" fn( device: Device, p_create_info: *const ObjectTableCreateInfoNVX, @@ -43289,14 +43292,13 @@ pub struct NvxDeviceGeneratedCommandsFn { object_table: ObjectTableNVX, p_allocator: *const AllocationCallbacks, ) -> c_void, - pub register_objects_nvx: - extern "system" fn( - device: Device, - object_table: ObjectTableNVX, - object_count: u32, - pp_object_table_entries: *const *const ObjectTableEntryNVX, - p_object_indices: *const u32, - ) -> Result, + pub register_objects_nvx: extern "system" fn( + device: Device, + object_table: ObjectTableNVX, + object_count: u32, + pp_object_table_entries: *const *const ObjectTableEntryNVX, + p_object_indices: *const u32, + ) -> Result, pub unregister_objects_nvx: extern "system" fn( device: Device, object_table: ObjectTableNVX, @@ -43304,12 +43306,11 @@ pub struct NvxDeviceGeneratedCommandsFn { p_object_entry_types: *const ObjectEntryTypeNVX, p_object_indices: *const u32, ) -> Result, - pub get_physical_device_generated_commands_properties_nvx: - extern "system" fn( - physical_device: PhysicalDevice, - p_features: *mut DeviceGeneratedCommandsFeaturesNVX, - p_limits: *mut DeviceGeneratedCommandsLimitsNVX, - ) -> c_void, + pub get_physical_device_generated_commands_properties_nvx: extern "system" fn( + physical_device: PhysicalDevice, + p_features: *mut DeviceGeneratedCommandsFeaturesNVX, + p_limits: *mut DeviceGeneratedCommandsLimitsNVX, + ) -> c_void, } unsafe impl Send for NvxDeviceGeneratedCommandsFn {} unsafe impl Sync for NvxDeviceGeneratedCommandsFn {} @@ -43661,21 +43662,19 @@ impl ObjectType { pub const INDIRECT_COMMANDS_LAYOUT_NVX: Self = ObjectType(1000086001); } #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetViewportWScalingNV = - extern "system" fn( +pub type PFN_vkCmdSetViewportWScalingNV = extern "system" fn( + command_buffer: CommandBuffer, + first_viewport: u32, + viewport_count: u32, + p_viewport_w_scalings: *const ViewportWScalingNV, +) -> c_void; +pub struct NvClipSpaceWScalingFn { + pub cmd_set_viewport_w_scaling_nv: extern "system" fn( command_buffer: CommandBuffer, first_viewport: u32, viewport_count: u32, p_viewport_w_scalings: *const ViewportWScalingNV, - ) -> c_void; -pub struct NvClipSpaceWScalingFn { - pub cmd_set_viewport_w_scaling_nv: - extern "system" fn( - command_buffer: CommandBuffer, - first_viewport: u32, - viewport_count: u32, - p_viewport_w_scalings: *const ViewportWScalingNV, - ) -> c_void, + ) -> c_void, } unsafe impl Send for NvClipSpaceWScalingFn {} unsafe impl Sync for NvClipSpaceWScalingFn {} @@ -43787,9 +43786,11 @@ impl ExtDirectModeDisplayFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkAcquireXlibDisplayEXT = - extern "system" fn(physical_device: PhysicalDevice, dpy: *mut Display, display: DisplayKHR) - -> Result; +pub type PFN_vkAcquireXlibDisplayEXT = extern "system" fn( + physical_device: PhysicalDevice, + dpy: *mut Display, + display: DisplayKHR, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetRandROutputDisplayEXT = extern "system" fn( physical_device: PhysicalDevice, @@ -43798,9 +43799,11 @@ pub type PFN_vkGetRandROutputDisplayEXT = extern "system" fn( p_display: *mut DisplayKHR, ) -> Result; pub struct ExtAcquireXlibDisplayFn { - pub acquire_xlib_display_ext: - extern "system" fn(physical_device: PhysicalDevice, dpy: *mut Display, display: DisplayKHR) - -> Result, + pub acquire_xlib_display_ext: extern "system" fn( + physical_device: PhysicalDevice, + dpy: *mut Display, + display: DisplayKHR, + ) -> Result, pub get_rand_r_output_display_ext: extern "system" fn( physical_device: PhysicalDevice, dpy: *mut Display, @@ -43886,19 +43889,17 @@ impl ExtAcquireXlibDisplayFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT = - extern "system" fn( +pub type PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT = extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_surface_capabilities: *mut SurfaceCapabilities2EXT, +) -> Result; +pub struct ExtDisplaySurfaceCounterFn { + pub get_physical_device_surface_capabilities2_ext: extern "system" fn( physical_device: PhysicalDevice, surface: SurfaceKHR, p_surface_capabilities: *mut SurfaceCapabilities2EXT, - ) -> Result; -pub struct ExtDisplaySurfaceCounterFn { - pub get_physical_device_surface_capabilities2_ext: - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_surface_capabilities: *mut SurfaceCapabilities2EXT, - ) -> Result, + ) -> Result, } unsafe impl Send for ExtDisplaySurfaceCounterFn {} unsafe impl Sync for ExtDisplaySurfaceCounterFn {} @@ -43956,29 +43957,26 @@ impl StructureType { pub const SURFACE_CAPABILITIES_2_EXT: Self = StructureType(1000090000); } #[allow(non_camel_case_types)] -pub type PFN_vkDisplayPowerControlEXT = - extern "system" fn( - device: Device, - display: DisplayKHR, - p_display_power_info: *const DisplayPowerInfoEXT, - ) -> Result; +pub type PFN_vkDisplayPowerControlEXT = extern "system" fn( + device: Device, + display: DisplayKHR, + p_display_power_info: *const DisplayPowerInfoEXT, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkRegisterDeviceEventEXT = - extern "system" fn( - device: Device, - p_device_event_info: *const DeviceEventInfoEXT, - p_allocator: *const AllocationCallbacks, - p_fence: *mut Fence, - ) -> Result; +pub type PFN_vkRegisterDeviceEventEXT = extern "system" fn( + device: Device, + p_device_event_info: *const DeviceEventInfoEXT, + p_allocator: *const AllocationCallbacks, + p_fence: *mut Fence, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkRegisterDisplayEventEXT = - extern "system" fn( - device: Device, - display: DisplayKHR, - p_display_event_info: *const DisplayEventInfoEXT, - p_allocator: *const AllocationCallbacks, - p_fence: *mut Fence, - ) -> Result; +pub type PFN_vkRegisterDisplayEventEXT = extern "system" fn( + device: Device, + display: DisplayKHR, + p_display_event_info: *const DisplayEventInfoEXT, + p_allocator: *const AllocationCallbacks, + p_fence: *mut Fence, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSwapchainCounterEXT = extern "system" fn( device: Device, @@ -43987,27 +43985,24 @@ pub type PFN_vkGetSwapchainCounterEXT = extern "system" fn( p_counter_value: *mut u64, ) -> Result; pub struct ExtDisplayControlFn { - pub display_power_control_ext: - extern "system" fn( - device: Device, - display: DisplayKHR, - p_display_power_info: *const DisplayPowerInfoEXT, - ) -> Result, - pub register_device_event_ext: - extern "system" fn( - device: Device, - p_device_event_info: *const DeviceEventInfoEXT, - p_allocator: *const AllocationCallbacks, - p_fence: *mut Fence, - ) -> Result, - pub register_display_event_ext: - extern "system" fn( - device: Device, - display: DisplayKHR, - p_display_event_info: *const DisplayEventInfoEXT, - p_allocator: *const AllocationCallbacks, - p_fence: *mut Fence, - ) -> Result, + pub display_power_control_ext: extern "system" fn( + device: Device, + display: DisplayKHR, + p_display_power_info: *const DisplayPowerInfoEXT, + ) -> Result, + pub register_device_event_ext: extern "system" fn( + device: Device, + p_device_event_info: *const DeviceEventInfoEXT, + p_allocator: *const AllocationCallbacks, + p_fence: *mut Fence, + ) -> Result, + pub register_display_event_ext: extern "system" fn( + device: Device, + display: DisplayKHR, + p_display_event_info: *const DisplayEventInfoEXT, + p_allocator: *const AllocationCallbacks, + p_fence: *mut Fence, + ) -> Result, pub get_swapchain_counter_ext: extern "system" fn( device: Device, swapchain: SwapchainKHR, @@ -44179,34 +44174,30 @@ impl StructureType { pub const SWAPCHAIN_COUNTER_CREATE_INFO_EXT: Self = StructureType(1000091003); } #[allow(non_camel_case_types)] -pub type PFN_vkGetRefreshCycleDurationGOOGLE = - extern "system" fn( +pub type PFN_vkGetRefreshCycleDurationGOOGLE = extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_display_timing_properties: *mut RefreshCycleDurationGOOGLE, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPastPresentationTimingGOOGLE = extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_presentation_timing_count: *mut u32, + p_presentation_timings: *mut PastPresentationTimingGOOGLE, +) -> Result; +pub struct GoogleDisplayTimingFn { + pub get_refresh_cycle_duration_google: extern "system" fn( device: Device, swapchain: SwapchainKHR, p_display_timing_properties: *mut RefreshCycleDurationGOOGLE, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPastPresentationTimingGOOGLE = - extern "system" fn( + ) -> Result, + pub get_past_presentation_timing_google: extern "system" fn( device: Device, swapchain: SwapchainKHR, p_presentation_timing_count: *mut u32, p_presentation_timings: *mut PastPresentationTimingGOOGLE, - ) -> Result; -pub struct GoogleDisplayTimingFn { - pub get_refresh_cycle_duration_google: - extern "system" fn( - device: Device, - swapchain: SwapchainKHR, - p_display_timing_properties: *mut RefreshCycleDurationGOOGLE, - ) -> Result, - pub get_past_presentation_timing_google: - extern "system" fn( - device: Device, - swapchain: SwapchainKHR, - p_presentation_timing_count: *mut u32, - p_presentation_timings: *mut PastPresentationTimingGOOGLE, - ) -> Result, + ) -> Result, } unsafe impl Send for GoogleDisplayTimingFn {} unsafe impl Sync for GoogleDisplayTimingFn {} @@ -44730,31 +44721,29 @@ impl ImgExtension109Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkCreateRenderPass2KHR = - extern "system" fn( - device: Device, - p_create_info: *const RenderPassCreateInfo2KHR, - p_allocator: *const AllocationCallbacks, - p_render_pass: *mut RenderPass, - ) -> Result; +pub type PFN_vkCreateRenderPass2KHR = extern "system" fn( + device: Device, + p_create_info: *const RenderPassCreateInfo2KHR, + p_allocator: *const AllocationCallbacks, + p_render_pass: *mut RenderPass, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdBeginRenderPass2KHR = - extern "system" fn( - command_buffer: CommandBuffer, - p_render_pass_begin: *const RenderPassBeginInfo, - p_subpass_begin_info: *const SubpassBeginInfoKHR, - ) -> c_void; +pub type PFN_vkCmdBeginRenderPass2KHR = extern "system" fn( + command_buffer: CommandBuffer, + p_render_pass_begin: *const RenderPassBeginInfo, + p_subpass_begin_info: *const SubpassBeginInfoKHR, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdNextSubpass2KHR = - extern "system" fn( - command_buffer: CommandBuffer, - p_subpass_begin_info: *const SubpassBeginInfoKHR, - p_subpass_end_info: *const SubpassEndInfoKHR, - ) -> c_void; +pub type PFN_vkCmdNextSubpass2KHR = extern "system" fn( + command_buffer: CommandBuffer, + p_subpass_begin_info: *const SubpassBeginInfoKHR, + p_subpass_end_info: *const SubpassEndInfoKHR, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdEndRenderPass2KHR = - extern "system" fn(command_buffer: CommandBuffer, p_subpass_end_info: *const SubpassEndInfoKHR) - -> c_void; +pub type PFN_vkCmdEndRenderPass2KHR = extern "system" fn( + command_buffer: CommandBuffer, + p_subpass_end_info: *const SubpassEndInfoKHR, +) -> c_void; pub struct KhrCreateRenderpass2Fn { pub create_render_pass2_khr: extern "system" fn( device: Device, @@ -44762,12 +44751,11 @@ pub struct KhrCreateRenderpass2Fn { p_allocator: *const AllocationCallbacks, p_render_pass: *mut RenderPass, ) -> Result, - pub cmd_begin_render_pass2_khr: - extern "system" fn( - command_buffer: CommandBuffer, - p_render_pass_begin: *const RenderPassBeginInfo, - p_subpass_begin_info: *const SubpassBeginInfoKHR, - ) -> c_void, + pub cmd_begin_render_pass2_khr: extern "system" fn( + command_buffer: CommandBuffer, + p_render_pass_begin: *const RenderPassBeginInfo, + p_subpass_begin_info: *const SubpassBeginInfoKHR, + ) -> c_void, pub cmd_next_subpass2_khr: extern "system" fn( command_buffer: CommandBuffer, p_subpass_begin_info: *const SubpassBeginInfoKHR, @@ -45055,30 +45043,26 @@ impl KhrExternalFenceFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkImportFenceWin32HandleKHR = - extern "system" fn( +pub type PFN_vkImportFenceWin32HandleKHR = extern "system" fn( + device: Device, + p_import_fence_win32_handle_info: *const ImportFenceWin32HandleInfoKHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetFenceWin32HandleKHR = extern "system" fn( + device: Device, + p_get_win32_handle_info: *const FenceGetWin32HandleInfoKHR, + p_handle: *mut HANDLE, +) -> Result; +pub struct KhrExternalFenceWin32Fn { + pub import_fence_win32_handle_khr: extern "system" fn( device: Device, p_import_fence_win32_handle_info: *const ImportFenceWin32HandleInfoKHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetFenceWin32HandleKHR = - extern "system" fn( + ) -> Result, + pub get_fence_win32_handle_khr: extern "system" fn( device: Device, p_get_win32_handle_info: *const FenceGetWin32HandleInfoKHR, p_handle: *mut HANDLE, - ) -> Result; -pub struct KhrExternalFenceWin32Fn { - pub import_fence_win32_handle_khr: - extern "system" fn( - device: Device, - p_import_fence_win32_handle_info: *const ImportFenceWin32HandleInfoKHR, - ) -> Result, - pub get_fence_win32_handle_khr: - extern "system" fn( - device: Device, - p_get_win32_handle_info: *const FenceGetWin32HandleInfoKHR, - p_handle: *mut HANDLE, - ) -> Result, + ) -> Result, } unsafe impl Send for KhrExternalFenceWin32Fn {} unsafe impl Sync for KhrExternalFenceWin32Fn {} @@ -45166,17 +45150,21 @@ impl StructureType { pub const FENCE_GET_WIN32_HANDLE_INFO_KHR: Self = StructureType(1000114002); } #[allow(non_camel_case_types)] -pub type PFN_vkImportFenceFdKHR = - extern "system" fn(device: Device, p_import_fence_fd_info: *const ImportFenceFdInfoKHR) - -> Result; +pub type PFN_vkImportFenceFdKHR = extern "system" fn( + device: Device, + p_import_fence_fd_info: *const ImportFenceFdInfoKHR, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetFenceFdKHR = - extern "system" fn(device: Device, p_get_fd_info: *const FenceGetFdInfoKHR, p_fd: *mut c_int) - -> Result; +pub type PFN_vkGetFenceFdKHR = extern "system" fn( + device: Device, + p_get_fd_info: *const FenceGetFdInfoKHR, + p_fd: *mut c_int, +) -> Result; pub struct KhrExternalFenceFdFn { - pub import_fence_fd_khr: - extern "system" fn(device: Device, p_import_fence_fd_info: *const ImportFenceFdInfoKHR) - -> Result, + pub import_fence_fd_khr: extern "system" fn( + device: Device, + p_import_fence_fd_info: *const ImportFenceFdInfoKHR, + ) -> Result, pub get_fence_fd_khr: extern "system" fn( device: Device, p_get_fd_info: *const FenceGetFdInfoKHR, @@ -45307,34 +45295,30 @@ impl KhrExtension119Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR = - extern "system" fn( +pub type PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR = extern "system" fn( + physical_device: PhysicalDevice, + p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR, + p_surface_capabilities: *mut SurfaceCapabilities2KHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceSurfaceFormats2KHR = extern "system" fn( + physical_device: PhysicalDevice, + p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR, + p_surface_format_count: *mut u32, + p_surface_formats: *mut SurfaceFormat2KHR, +) -> Result; +pub struct KhrGetSurfaceCapabilities2Fn { + pub get_physical_device_surface_capabilities2_khr: extern "system" fn( physical_device: PhysicalDevice, p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR, p_surface_capabilities: *mut SurfaceCapabilities2KHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceSurfaceFormats2KHR = - extern "system" fn( + ) -> Result, + pub get_physical_device_surface_formats2_khr: extern "system" fn( physical_device: PhysicalDevice, p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR, p_surface_format_count: *mut u32, p_surface_formats: *mut SurfaceFormat2KHR, - ) -> Result; -pub struct KhrGetSurfaceCapabilities2Fn { - pub get_physical_device_surface_capabilities2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR, - p_surface_capabilities: *mut SurfaceCapabilities2KHR, - ) -> Result, - pub get_physical_device_surface_formats2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR, - p_surface_format_count: *mut u32, - p_surface_formats: *mut SurfaceFormat2KHR, - ) -> Result, + ) -> Result, } unsafe impl Send for KhrGetSurfaceCapabilities2Fn {} unsafe impl Sync for KhrGetSurfaceCapabilities2Fn {} @@ -45452,60 +45436,52 @@ impl KhrVariablePointersFn { } } #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceDisplayProperties2KHR = - extern "system" fn( +pub type PFN_vkGetPhysicalDeviceDisplayProperties2KHR = extern "system" fn( + physical_device: PhysicalDevice, + p_property_count: *mut u32, + p_properties: *mut DisplayProperties2KHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = extern "system" fn( + physical_device: PhysicalDevice, + p_property_count: *mut u32, + p_properties: *mut DisplayPlaneProperties2KHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDisplayModeProperties2KHR = extern "system" fn( + physical_device: PhysicalDevice, + display: DisplayKHR, + p_property_count: *mut u32, + p_properties: *mut DisplayModeProperties2KHR, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDisplayPlaneCapabilities2KHR = extern "system" fn( + physical_device: PhysicalDevice, + p_display_plane_info: *const DisplayPlaneInfo2KHR, + p_capabilities: *mut DisplayPlaneCapabilities2KHR, +) -> Result; +pub struct KhrGetDisplayProperties2Fn { + pub get_physical_device_display_properties2_khr: extern "system" fn( physical_device: PhysicalDevice, p_property_count: *mut u32, p_properties: *mut DisplayProperties2KHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR = - extern "system" fn( + ) -> Result, + pub get_physical_device_display_plane_properties2_khr: extern "system" fn( physical_device: PhysicalDevice, p_property_count: *mut u32, p_properties: *mut DisplayPlaneProperties2KHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetDisplayModeProperties2KHR = - extern "system" fn( + ) -> Result, + pub get_display_mode_properties2_khr: extern "system" fn( physical_device: PhysicalDevice, display: DisplayKHR, p_property_count: *mut u32, p_properties: *mut DisplayModeProperties2KHR, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetDisplayPlaneCapabilities2KHR = - extern "system" fn( + ) -> Result, + pub get_display_plane_capabilities2_khr: extern "system" fn( physical_device: PhysicalDevice, p_display_plane_info: *const DisplayPlaneInfo2KHR, p_capabilities: *mut DisplayPlaneCapabilities2KHR, - ) -> Result; -pub struct KhrGetDisplayProperties2Fn { - pub get_physical_device_display_properties2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayProperties2KHR, - ) -> Result, - pub get_physical_device_display_plane_properties2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayPlaneProperties2KHR, - ) -> Result, - pub get_display_mode_properties2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - display: DisplayKHR, - p_property_count: *mut u32, - p_properties: *mut DisplayModeProperties2KHR, - ) -> Result, - pub get_display_plane_capabilities2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_display_plane_info: *const DisplayPlaneInfo2KHR, - p_capabilities: *mut DisplayPlaneCapabilities2KHR, - ) -> Result, + ) -> Result, } unsafe impl Send for KhrGetDisplayProperties2Fn {} unsafe impl Sync for KhrGetDisplayProperties2Fn {} @@ -45682,13 +45658,12 @@ impl StructureType { pub const DISPLAY_PLANE_CAPABILITIES_2_KHR: Self = StructureType(1000121004); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateIOSSurfaceMVK = - extern "system" fn( - instance: Instance, - p_create_info: *const IOSSurfaceCreateInfoMVK, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result; +pub type PFN_vkCreateIOSSurfaceMVK = extern "system" fn( + instance: Instance, + p_create_info: *const IOSSurfaceCreateInfoMVK, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; pub struct MvkIosSurfaceFn { pub create_ios_surface_mvk: extern "system" fn( instance: Instance, @@ -45750,21 +45725,19 @@ impl StructureType { pub const IOS_SURFACE_CREATE_INFO_M: Self = StructureType(1000122000); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateMacOSSurfaceMVK = - extern "system" fn( +pub type PFN_vkCreateMacOSSurfaceMVK = extern "system" fn( + instance: Instance, + p_create_info: *const MacOSSurfaceCreateInfoMVK, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; +pub struct MvkMacosSurfaceFn { + pub create_mac_os_surface_mvk: extern "system" fn( instance: Instance, p_create_info: *const MacOSSurfaceCreateInfoMVK, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, - ) -> Result; -pub struct MvkMacosSurfaceFn { - pub create_mac_os_surface_mvk: - extern "system" fn( - instance: Instance, - p_create_info: *const MacOSSurfaceCreateInfoMVK, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, + ) -> Result, } unsafe impl Send for MvkMacosSurfaceFn {} unsafe impl Sync for MvkMacosSurfaceFn {} @@ -45902,43 +45875,43 @@ pub type PFN_vkQueueEndDebugUtilsLabelEXT = extern "system" fn(queue: Queue) -> pub type PFN_vkQueueInsertDebugUtilsLabelEXT = extern "system" fn(queue: Queue, p_label_info: *const DebugUtilsLabelEXT) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdBeginDebugUtilsLabelEXT = - extern "system" fn(command_buffer: CommandBuffer, p_label_info: *const DebugUtilsLabelEXT) - -> c_void; +pub type PFN_vkCmdBeginDebugUtilsLabelEXT = extern "system" fn( + command_buffer: CommandBuffer, + p_label_info: *const DebugUtilsLabelEXT, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdEndDebugUtilsLabelEXT = extern "system" fn(command_buffer: CommandBuffer) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdInsertDebugUtilsLabelEXT = - extern "system" fn(command_buffer: CommandBuffer, p_label_info: *const DebugUtilsLabelEXT) - -> c_void; +pub type PFN_vkCmdInsertDebugUtilsLabelEXT = extern "system" fn( + command_buffer: CommandBuffer, + p_label_info: *const DebugUtilsLabelEXT, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateDebugUtilsMessengerEXT = - extern "system" fn( - instance: Instance, - p_create_info: *const DebugUtilsMessengerCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_messenger: *mut DebugUtilsMessengerEXT, - ) -> Result; +pub type PFN_vkCreateDebugUtilsMessengerEXT = extern "system" fn( + instance: Instance, + p_create_info: *const DebugUtilsMessengerCreateInfoEXT, + p_allocator: *const AllocationCallbacks, + p_messenger: *mut DebugUtilsMessengerEXT, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyDebugUtilsMessengerEXT = - extern "system" fn( - instance: Instance, - messenger: DebugUtilsMessengerEXT, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroyDebugUtilsMessengerEXT = extern "system" fn( + instance: Instance, + messenger: DebugUtilsMessengerEXT, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkSubmitDebugUtilsMessageEXT = - extern "system" fn( - instance: Instance, - message_severity: DebugUtilsMessageSeverityFlagsEXT, - message_types: DebugUtilsMessageTypeFlagsEXT, - p_callback_data: *const DebugUtilsMessengerCallbackDataEXT, - ) -> c_void; +pub type PFN_vkSubmitDebugUtilsMessageEXT = extern "system" fn( + instance: Instance, + message_severity: DebugUtilsMessageSeverityFlagsEXT, + message_types: DebugUtilsMessageTypeFlagsEXT, + p_callback_data: *const DebugUtilsMessengerCallbackDataEXT, +) -> c_void; pub struct ExtDebugUtilsFn { - pub set_debug_utils_object_name_ext: - extern "system" fn(device: Device, p_name_info: *const DebugUtilsObjectNameInfoEXT) - -> Result, + pub set_debug_utils_object_name_ext: extern "system" fn( + device: Device, + p_name_info: *const DebugUtilsObjectNameInfoEXT, + ) -> Result, pub set_debug_utils_object_tag_ext: extern "system" fn(device: Device, p_tag_info: *const DebugUtilsObjectTagInfoEXT) -> Result, pub queue_begin_debug_utils_label_ext: @@ -45946,33 +45919,32 @@ pub struct ExtDebugUtilsFn { pub queue_end_debug_utils_label_ext: extern "system" fn(queue: Queue) -> c_void, pub queue_insert_debug_utils_label_ext: extern "system" fn(queue: Queue, p_label_info: *const DebugUtilsLabelEXT) -> c_void, - pub cmd_begin_debug_utils_label_ext: - extern "system" fn(command_buffer: CommandBuffer, p_label_info: *const DebugUtilsLabelEXT) - -> c_void, + pub cmd_begin_debug_utils_label_ext: extern "system" fn( + command_buffer: CommandBuffer, + p_label_info: *const DebugUtilsLabelEXT, + ) -> c_void, pub cmd_end_debug_utils_label_ext: extern "system" fn(command_buffer: CommandBuffer) -> c_void, - pub cmd_insert_debug_utils_label_ext: - extern "system" fn(command_buffer: CommandBuffer, p_label_info: *const DebugUtilsLabelEXT) - -> c_void, - pub create_debug_utils_messenger_ext: - extern "system" fn( - instance: Instance, - p_create_info: *const DebugUtilsMessengerCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_messenger: *mut DebugUtilsMessengerEXT, - ) -> Result, - pub destroy_debug_utils_messenger_ext: - extern "system" fn( - instance: Instance, - messenger: DebugUtilsMessengerEXT, - p_allocator: *const AllocationCallbacks, - ) -> c_void, - pub submit_debug_utils_message_ext: - extern "system" fn( - instance: Instance, - message_severity: DebugUtilsMessageSeverityFlagsEXT, - message_types: DebugUtilsMessageTypeFlagsEXT, - p_callback_data: *const DebugUtilsMessengerCallbackDataEXT, - ) -> c_void, + pub cmd_insert_debug_utils_label_ext: extern "system" fn( + command_buffer: CommandBuffer, + p_label_info: *const DebugUtilsLabelEXT, + ) -> c_void, + pub create_debug_utils_messenger_ext: extern "system" fn( + instance: Instance, + p_create_info: *const DebugUtilsMessengerCreateInfoEXT, + p_allocator: *const AllocationCallbacks, + p_messenger: *mut DebugUtilsMessengerEXT, + ) -> Result, + pub destroy_debug_utils_messenger_ext: extern "system" fn( + instance: Instance, + messenger: DebugUtilsMessengerEXT, + p_allocator: *const AllocationCallbacks, + ) -> c_void, + pub submit_debug_utils_message_ext: extern "system" fn( + instance: Instance, + message_severity: DebugUtilsMessageSeverityFlagsEXT, + message_types: DebugUtilsMessageTypeFlagsEXT, + p_callback_data: *const DebugUtilsMessengerCallbackDataEXT, + ) -> c_void, } unsafe impl Send for ExtDebugUtilsFn {} unsafe impl Sync for ExtDebugUtilsFn {} @@ -46316,32 +46288,28 @@ impl ObjectType { pub const DEBUG_UTILS_MESSENGER_EXT: Self = ObjectType(1000128000); } #[allow(non_camel_case_types)] -pub type PFN_vkGetAndroidHardwareBufferPropertiesANDROID = - extern "system" fn( +pub type PFN_vkGetAndroidHardwareBufferPropertiesANDROID = extern "system" fn( + device: Device, + buffer: *const AHardwareBuffer, + p_properties: *mut AndroidHardwareBufferPropertiesANDROID, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetMemoryAndroidHardwareBufferANDROID = extern "system" fn( + device: Device, + p_info: *const MemoryGetAndroidHardwareBufferInfoANDROID, + p_buffer: *mut *mut AHardwareBuffer, +) -> Result; +pub struct AndroidExternalMemoryAndroidHardwareBufferFn { + pub get_android_hardware_buffer_properties_android: extern "system" fn( device: Device, buffer: *const AHardwareBuffer, p_properties: *mut AndroidHardwareBufferPropertiesANDROID, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetMemoryAndroidHardwareBufferANDROID = - extern "system" fn( + ) -> Result, + pub get_memory_android_hardware_buffer_android: extern "system" fn( device: Device, p_info: *const MemoryGetAndroidHardwareBufferInfoANDROID, p_buffer: *mut *mut AHardwareBuffer, - ) -> Result; -pub struct AndroidExternalMemoryAndroidHardwareBufferFn { - pub get_android_hardware_buffer_properties_android: - extern "system" fn( - device: Device, - buffer: *const AHardwareBuffer, - p_properties: *mut AndroidHardwareBufferPropertiesANDROID, - ) -> Result, - pub get_memory_android_hardware_buffer_android: - extern "system" fn( - device: Device, - p_info: *const MemoryGetAndroidHardwareBufferInfoANDROID, - p_buffer: *mut *mut AHardwareBuffer, - ) -> Result, + ) -> Result, } unsafe impl Send for AndroidExternalMemoryAndroidHardwareBufferFn {} unsafe impl Sync for AndroidExternalMemoryAndroidHardwareBufferFn {} @@ -46692,30 +46660,26 @@ impl AmdExtension143Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetSampleLocationsEXT = - extern "system" fn( +pub type PFN_vkCmdSetSampleLocationsEXT = extern "system" fn( + command_buffer: CommandBuffer, + p_sample_locations_info: *const SampleLocationsInfoEXT, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT = extern "system" fn( + physical_device: PhysicalDevice, + samples: SampleCountFlags, + p_multisample_properties: *mut MultisamplePropertiesEXT, +) -> c_void; +pub struct ExtSampleLocationsFn { + pub cmd_set_sample_locations_ext: extern "system" fn( command_buffer: CommandBuffer, p_sample_locations_info: *const SampleLocationsInfoEXT, - ) -> c_void; -#[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT = - extern "system" fn( + ) -> c_void, + pub get_physical_device_multisample_properties_ext: extern "system" fn( physical_device: PhysicalDevice, samples: SampleCountFlags, p_multisample_properties: *mut MultisamplePropertiesEXT, - ) -> c_void; -pub struct ExtSampleLocationsFn { - pub cmd_set_sample_locations_ext: - extern "system" fn( - command_buffer: CommandBuffer, - p_sample_locations_info: *const SampleLocationsInfoEXT, - ) -> c_void, - pub get_physical_device_multisample_properties_ext: - extern "system" fn( - physical_device: PhysicalDevice, - samples: SampleCountFlags, - p_multisample_properties: *mut MultisamplePropertiesEXT, - ) -> c_void, + ) -> c_void, } unsafe impl Send for ExtSampleLocationsFn {} unsafe impl Sync for ExtSampleLocationsFn {} @@ -47250,19 +47214,17 @@ impl KhrBindMemory2Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkGetImageDrmFormatModifierPropertiesEXT = - extern "system" fn( +pub type PFN_vkGetImageDrmFormatModifierPropertiesEXT = extern "system" fn( + device: Device, + image: Image, + p_properties: *mut ImageDrmFormatModifierPropertiesEXT, +) -> Result; +pub struct ExtImageDrmFormatModifierFn { + pub get_image_drm_format_modifier_properties_ext: extern "system" fn( device: Device, image: Image, p_properties: *mut ImageDrmFormatModifierPropertiesEXT, - ) -> Result; -pub struct ExtImageDrmFormatModifierFn { - pub get_image_drm_format_modifier_properties_ext: - extern "system" fn( - device: Device, - image: Image, - p_properties: *mut ImageDrmFormatModifierPropertiesEXT, - ) -> Result, + ) -> Result, } unsafe impl Send for ExtImageDrmFormatModifierFn {} unsafe impl Sync for ExtImageDrmFormatModifierFn {} @@ -47376,28 +47338,25 @@ impl ExtExtension160Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkCreateValidationCacheEXT = - extern "system" fn( - device: Device, - p_create_info: *const ValidationCacheCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_validation_cache: *mut ValidationCacheEXT, - ) -> Result; +pub type PFN_vkCreateValidationCacheEXT = extern "system" fn( + device: Device, + p_create_info: *const ValidationCacheCreateInfoEXT, + p_allocator: *const AllocationCallbacks, + p_validation_cache: *mut ValidationCacheEXT, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyValidationCacheEXT = - extern "system" fn( - device: Device, - validation_cache: ValidationCacheEXT, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroyValidationCacheEXT = extern "system" fn( + device: Device, + validation_cache: ValidationCacheEXT, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkMergeValidationCachesEXT = - extern "system" fn( - device: Device, - dst_cache: ValidationCacheEXT, - src_cache_count: u32, - p_src_caches: *const ValidationCacheEXT, - ) -> Result; +pub type PFN_vkMergeValidationCachesEXT = extern "system" fn( + device: Device, + dst_cache: ValidationCacheEXT, + src_cache_count: u32, + p_src_caches: *const ValidationCacheEXT, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetValidationCacheDataEXT = extern "system" fn( device: Device, @@ -47406,13 +47365,12 @@ pub type PFN_vkGetValidationCacheDataEXT = extern "system" fn( p_data: *mut c_void, ) -> Result; pub struct ExtValidationCacheFn { - pub create_validation_cache_ext: - extern "system" fn( - device: Device, - p_create_info: *const ValidationCacheCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_validation_cache: *mut ValidationCacheEXT, - ) -> Result, + pub create_validation_cache_ext: extern "system" fn( + device: Device, + p_create_info: *const ValidationCacheCreateInfoEXT, + p_allocator: *const AllocationCallbacks, + p_validation_cache: *mut ValidationCacheEXT, + ) -> Result, pub destroy_validation_cache_ext: extern "system" fn( device: Device, validation_cache: ValidationCacheEXT, @@ -47671,41 +47629,37 @@ pub type PFN_vkCmdBindShadingRateImageNV = extern "system" fn( image_layout: ImageLayout, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetViewportShadingRatePaletteNV = - extern "system" fn( - command_buffer: CommandBuffer, - first_viewport: u32, - viewport_count: u32, - p_shading_rate_palettes: *const ShadingRatePaletteNV, - ) -> c_void; +pub type PFN_vkCmdSetViewportShadingRatePaletteNV = extern "system" fn( + command_buffer: CommandBuffer, + first_viewport: u32, + viewport_count: u32, + p_shading_rate_palettes: *const ShadingRatePaletteNV, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdSetCoarseSampleOrderNV = - extern "system" fn( - command_buffer: CommandBuffer, - sample_order_type: CoarseSampleOrderTypeNV, - custom_sample_order_count: u32, - p_custom_sample_orders: *const CoarseSampleOrderCustomNV, - ) -> c_void; +pub type PFN_vkCmdSetCoarseSampleOrderNV = extern "system" fn( + command_buffer: CommandBuffer, + sample_order_type: CoarseSampleOrderTypeNV, + custom_sample_order_count: u32, + p_custom_sample_orders: *const CoarseSampleOrderCustomNV, +) -> c_void; pub struct NvShadingRateImageFn { pub cmd_bind_shading_rate_image_nv: extern "system" fn( command_buffer: CommandBuffer, image_view: ImageView, image_layout: ImageLayout, ) -> c_void, - pub cmd_set_viewport_shading_rate_palette_nv: - extern "system" fn( - command_buffer: CommandBuffer, - first_viewport: u32, - viewport_count: u32, - p_shading_rate_palettes: *const ShadingRatePaletteNV, - ) -> c_void, - pub cmd_set_coarse_sample_order_nv: - extern "system" fn( - command_buffer: CommandBuffer, - sample_order_type: CoarseSampleOrderTypeNV, - custom_sample_order_count: u32, - p_custom_sample_orders: *const CoarseSampleOrderCustomNV, - ) -> c_void, + pub cmd_set_viewport_shading_rate_palette_nv: extern "system" fn( + command_buffer: CommandBuffer, + first_viewport: u32, + viewport_count: u32, + p_shading_rate_palettes: *const ShadingRatePaletteNV, + ) -> c_void, + pub cmd_set_coarse_sample_order_nv: extern "system" fn( + command_buffer: CommandBuffer, + sample_order_type: CoarseSampleOrderTypeNV, + custom_sample_order_count: u32, + p_custom_sample_orders: *const CoarseSampleOrderCustomNV, + ) -> c_void, } unsafe impl Send for NvShadingRateImageFn {} unsafe impl Sync for NvShadingRateImageFn {} @@ -47868,55 +47822,49 @@ impl DynamicState { pub const VIEWPORT_COARSE_SAMPLE_ORDER_NV: Self = DynamicState(1000164006); } #[allow(non_camel_case_types)] -pub type PFN_vkCreateAccelerationStructureNV = - extern "system" fn( - device: Device, - p_create_info: *const AccelerationStructureCreateInfoNV, - p_allocator: *const AllocationCallbacks, - p_acceleration_structure: *mut AccelerationStructureNV, - ) -> Result; +pub type PFN_vkCreateAccelerationStructureNV = extern "system" fn( + device: Device, + p_create_info: *const AccelerationStructureCreateInfoNV, + p_allocator: *const AllocationCallbacks, + p_acceleration_structure: *mut AccelerationStructureNV, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDestroyAccelerationStructureNV = - extern "system" fn( - device: Device, - acceleration_structure: AccelerationStructureNV, - p_allocator: *const AllocationCallbacks, - ) -> c_void; +pub type PFN_vkDestroyAccelerationStructureNV = extern "system" fn( + device: Device, + acceleration_structure: AccelerationStructureNV, + p_allocator: *const AllocationCallbacks, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetAccelerationStructureMemoryRequirementsNV = - extern "system" fn( - device: Device, - p_info: *const AccelerationStructureMemoryRequirementsInfoNV, - p_memory_requirements: *mut MemoryRequirements2KHR, - ) -> c_void; +pub type PFN_vkGetAccelerationStructureMemoryRequirementsNV = extern "system" fn( + device: Device, + p_info: *const AccelerationStructureMemoryRequirementsInfoNV, + p_memory_requirements: *mut MemoryRequirements2KHR, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkBindAccelerationStructureMemoryNV = - extern "system" fn( - device: Device, - bind_info_count: u32, - p_bind_infos: *const BindAccelerationStructureMemoryInfoNV, - ) -> Result; +pub type PFN_vkBindAccelerationStructureMemoryNV = extern "system" fn( + device: Device, + bind_info_count: u32, + p_bind_infos: *const BindAccelerationStructureMemoryInfoNV, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdBuildAccelerationStructureNV = - extern "system" fn( - command_buffer: CommandBuffer, - p_info: *const AccelerationStructureInfoNV, - instance_data: Buffer, - instance_offset: DeviceSize, - update: Bool32, - dst: AccelerationStructureNV, - src: AccelerationStructureNV, - scratch: Buffer, - scratch_offset: DeviceSize, - ) -> c_void; +pub type PFN_vkCmdBuildAccelerationStructureNV = extern "system" fn( + command_buffer: CommandBuffer, + p_info: *const AccelerationStructureInfoNV, + instance_data: Buffer, + instance_offset: DeviceSize, + update: Bool32, + dst: AccelerationStructureNV, + src: AccelerationStructureNV, + scratch: Buffer, + scratch_offset: DeviceSize, +) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdCopyAccelerationStructureNV = - extern "system" fn( - command_buffer: CommandBuffer, - dst: AccelerationStructureNV, - src: AccelerationStructureNV, - mode: CopyAccelerationStructureModeNV, - ) -> c_void; +pub type PFN_vkCmdCopyAccelerationStructureNV = extern "system" fn( + command_buffer: CommandBuffer, + dst: AccelerationStructureNV, + src: AccelerationStructureNV, + mode: CopyAccelerationStructureModeNV, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCmdTraceRaysNV = extern "system" fn( command_buffer: CommandBuffer, @@ -47936,15 +47884,14 @@ pub type PFN_vkCmdTraceRaysNV = extern "system" fn( depth: u32, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCreateRayTracingPipelinesNV = - extern "system" fn( - device: Device, - pipeline_cache: PipelineCache, - create_info_count: u32, - p_create_infos: *const RayTracingPipelineCreateInfoNV, - p_allocator: *const AllocationCallbacks, - p_pipelines: *mut Pipeline, - ) -> Result; +pub type PFN_vkCreateRayTracingPipelinesNV = extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + create_info_count: u32, + p_create_infos: *const RayTracingPipelineCreateInfoNV, + p_allocator: *const AllocationCallbacks, + p_pipelines: *mut Pipeline, +) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetRayTracingShaderGroupHandlesNV = extern "system" fn( device: Device, @@ -47955,71 +47902,63 @@ pub type PFN_vkGetRayTracingShaderGroupHandlesNV = extern "system" fn( p_data: *mut c_void, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetAccelerationStructureHandleNV = - extern "system" fn( - device: Device, - acceleration_structure: AccelerationStructureNV, - data_size: usize, - p_data: *mut c_void, - ) -> Result; +pub type PFN_vkGetAccelerationStructureHandleNV = extern "system" fn( + device: Device, + acceleration_structure: AccelerationStructureNV, + data_size: usize, + p_data: *mut c_void, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkCmdWriteAccelerationStructuresPropertiesNV = - extern "system" fn( - command_buffer: CommandBuffer, - acceleration_structure_count: u32, - p_acceleration_structures: *const AccelerationStructureNV, - query_type: QueryType, - query_pool: QueryPool, - first_query: u32, - ) -> c_void; +pub type PFN_vkCmdWriteAccelerationStructuresPropertiesNV = extern "system" fn( + command_buffer: CommandBuffer, + acceleration_structure_count: u32, + p_acceleration_structures: *const AccelerationStructureNV, + query_type: QueryType, + query_pool: QueryPool, + first_query: u32, +) -> c_void; #[allow(non_camel_case_types)] pub type PFN_vkCompileDeferredNV = extern "system" fn(device: Device, pipeline: Pipeline, shader: u32) -> Result; pub struct NvRayTracingFn { - pub create_acceleration_structure_nv: - extern "system" fn( - device: Device, - p_create_info: *const AccelerationStructureCreateInfoNV, - p_allocator: *const AllocationCallbacks, - p_acceleration_structure: *mut AccelerationStructureNV, - ) -> Result, - pub destroy_acceleration_structure_nv: - extern "system" fn( - device: Device, - acceleration_structure: AccelerationStructureNV, - p_allocator: *const AllocationCallbacks, - ) -> c_void, - pub get_acceleration_structure_memory_requirements_nv: - extern "system" fn( - device: Device, - p_info: *const AccelerationStructureMemoryRequirementsInfoNV, - p_memory_requirements: *mut MemoryRequirements2KHR, - ) -> c_void, - pub bind_acceleration_structure_memory_nv: - extern "system" fn( - device: Device, - bind_info_count: u32, - p_bind_infos: *const BindAccelerationStructureMemoryInfoNV, - ) -> Result, - pub cmd_build_acceleration_structure_nv: - extern "system" fn( - command_buffer: CommandBuffer, - p_info: *const AccelerationStructureInfoNV, - instance_data: Buffer, - instance_offset: DeviceSize, - update: Bool32, - dst: AccelerationStructureNV, - src: AccelerationStructureNV, - scratch: Buffer, - scratch_offset: DeviceSize, - ) -> c_void, - pub cmd_copy_acceleration_structure_nv: - extern "system" fn( - command_buffer: CommandBuffer, - dst: AccelerationStructureNV, - src: AccelerationStructureNV, - mode: CopyAccelerationStructureModeNV, - ) -> c_void, + pub create_acceleration_structure_nv: extern "system" fn( + device: Device, + p_create_info: *const AccelerationStructureCreateInfoNV, + p_allocator: *const AllocationCallbacks, + p_acceleration_structure: *mut AccelerationStructureNV, + ) -> Result, + pub destroy_acceleration_structure_nv: extern "system" fn( + device: Device, + acceleration_structure: AccelerationStructureNV, + p_allocator: *const AllocationCallbacks, + ) -> c_void, + pub get_acceleration_structure_memory_requirements_nv: extern "system" fn( + device: Device, + p_info: *const AccelerationStructureMemoryRequirementsInfoNV, + p_memory_requirements: *mut MemoryRequirements2KHR, + ) -> c_void, + pub bind_acceleration_structure_memory_nv: extern "system" fn( + device: Device, + bind_info_count: u32, + p_bind_infos: *const BindAccelerationStructureMemoryInfoNV, + ) -> Result, + pub cmd_build_acceleration_structure_nv: extern "system" fn( + command_buffer: CommandBuffer, + p_info: *const AccelerationStructureInfoNV, + instance_data: Buffer, + instance_offset: DeviceSize, + update: Bool32, + dst: AccelerationStructureNV, + src: AccelerationStructureNV, + scratch: Buffer, + scratch_offset: DeviceSize, + ) -> c_void, + pub cmd_copy_acceleration_structure_nv: extern "system" fn( + command_buffer: CommandBuffer, + dst: AccelerationStructureNV, + src: AccelerationStructureNV, + mode: CopyAccelerationStructureModeNV, + ) -> c_void, pub cmd_trace_rays_nv: extern "system" fn( command_buffer: CommandBuffer, raygen_shader_binding_table_buffer: Buffer, @@ -48037,15 +47976,14 @@ pub struct NvRayTracingFn { height: u32, depth: u32, ) -> c_void, - pub create_ray_tracing_pipelines_nv: - extern "system" fn( - device: Device, - pipeline_cache: PipelineCache, - create_info_count: u32, - p_create_infos: *const RayTracingPipelineCreateInfoNV, - p_allocator: *const AllocationCallbacks, - p_pipelines: *mut Pipeline, - ) -> Result, + pub create_ray_tracing_pipelines_nv: extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + create_info_count: u32, + p_create_infos: *const RayTracingPipelineCreateInfoNV, + p_allocator: *const AllocationCallbacks, + p_pipelines: *mut Pipeline, + ) -> Result, pub get_ray_tracing_shader_group_handles_nv: extern "system" fn( device: Device, pipeline: Pipeline, @@ -48054,22 +47992,20 @@ pub struct NvRayTracingFn { data_size: usize, p_data: *mut c_void, ) -> Result, - pub get_acceleration_structure_handle_nv: - extern "system" fn( - device: Device, - acceleration_structure: AccelerationStructureNV, - data_size: usize, - p_data: *mut c_void, - ) -> Result, - pub cmd_write_acceleration_structures_properties_nv: - extern "system" fn( - command_buffer: CommandBuffer, - acceleration_structure_count: u32, - p_acceleration_structures: *const AccelerationStructureNV, - query_type: QueryType, - query_pool: QueryPool, - first_query: u32, - ) -> c_void, + pub get_acceleration_structure_handle_nv: extern "system" fn( + device: Device, + acceleration_structure: AccelerationStructureNV, + data_size: usize, + p_data: *mut c_void, + ) -> Result, + pub cmd_write_acceleration_structures_properties_nv: extern "system" fn( + command_buffer: CommandBuffer, + acceleration_structure_count: u32, + p_acceleration_structures: *const AccelerationStructureNV, + query_type: QueryType, + query_pool: QueryPool, + first_query: u32, + ) -> c_void, pub compile_deferred_nv: extern "system" fn(device: Device, pipeline: Pipeline, shader: u32) -> Result, } @@ -49018,21 +48954,19 @@ impl StructureType { pub const PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR: Self = StructureType(1000177000); } #[allow(non_camel_case_types)] -pub type PFN_vkGetMemoryHostPointerPropertiesEXT = - extern "system" fn( +pub type PFN_vkGetMemoryHostPointerPropertiesEXT = extern "system" fn( + device: Device, + handle_type: ExternalMemoryHandleTypeFlags, + p_host_pointer: *const c_void, + p_memory_host_pointer_properties: *mut MemoryHostPointerPropertiesEXT, +) -> Result; +pub struct ExtExternalMemoryHostFn { + pub get_memory_host_pointer_properties_ext: extern "system" fn( device: Device, handle_type: ExternalMemoryHandleTypeFlags, p_host_pointer: *const c_void, p_memory_host_pointer_properties: *mut MemoryHostPointerPropertiesEXT, - ) -> Result; -pub struct ExtExternalMemoryHostFn { - pub get_memory_host_pointer_properties_ext: - extern "system" fn( - device: Device, - handle_type: ExternalMemoryHandleTypeFlags, - p_host_pointer: *const c_void, - p_memory_host_pointer_properties: *mut MemoryHostPointerPropertiesEXT, - ) -> Result, + ) -> Result, } unsafe impl Send for ExtExternalMemoryHostFn {} unsafe impl Sync for ExtExternalMemoryHostFn {} @@ -49251,36 +49185,32 @@ impl AmdExtension184Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = - extern "system" fn( +pub type PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = extern "system" fn( + physical_device: PhysicalDevice, + p_time_domain_count: *mut u32, + p_time_domains: *mut TimeDomainEXT, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetCalibratedTimestampsEXT = extern "system" fn( + device: Device, + timestamp_count: u32, + p_timestamp_infos: *const CalibratedTimestampInfoEXT, + p_timestamps: *mut u64, + p_max_deviation: *mut u64, +) -> Result; +pub struct ExtCalibratedTimestampsFn { + pub get_physical_device_calibrateable_time_domains_ext: extern "system" fn( physical_device: PhysicalDevice, p_time_domain_count: *mut u32, p_time_domains: *mut TimeDomainEXT, - ) -> Result; -#[allow(non_camel_case_types)] -pub type PFN_vkGetCalibratedTimestampsEXT = - extern "system" fn( + ) -> Result, + pub get_calibrated_timestamps_ext: extern "system" fn( device: Device, timestamp_count: u32, p_timestamp_infos: *const CalibratedTimestampInfoEXT, p_timestamps: *mut u64, p_max_deviation: *mut u64, - ) -> Result; -pub struct ExtCalibratedTimestampsFn { - pub get_physical_device_calibrateable_time_domains_ext: - extern "system" fn( - physical_device: PhysicalDevice, - p_time_domain_count: *mut u32, - p_time_domains: *mut TimeDomainEXT, - ) -> Result, - pub get_calibrated_timestamps_ext: - extern "system" fn( - device: Device, - timestamp_count: u32, - p_timestamp_infos: *const CalibratedTimestampInfoEXT, - p_timestamps: *mut u64, - p_max_deviation: *mut u64, - ) -> Result, + ) -> Result, } unsafe impl Send for ExtCalibratedTimestampsFn {} unsafe impl Sync for ExtCalibratedTimestampsFn {} @@ -49695,20 +49625,21 @@ pub type PFN_vkCmdDrawMeshTasksIndirectNV = extern "system" fn( stride: u32, ) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkCmdDrawMeshTasksIndirectCountNV = - extern "system" fn( - command_buffer: CommandBuffer, - buffer: Buffer, - offset: DeviceSize, - count_buffer: Buffer, - count_buffer_offset: DeviceSize, - max_draw_count: u32, - stride: u32, - ) -> c_void; +pub type PFN_vkCmdDrawMeshTasksIndirectCountNV = extern "system" fn( + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + count_buffer: Buffer, + count_buffer_offset: DeviceSize, + max_draw_count: u32, + stride: u32, +) -> c_void; pub struct NvMeshShaderFn { - pub cmd_draw_mesh_tasks_nv: - extern "system" fn(command_buffer: CommandBuffer, task_count: u32, first_task: u32) - -> c_void, + pub cmd_draw_mesh_tasks_nv: extern "system" fn( + command_buffer: CommandBuffer, + task_count: u32, + first_task: u32, + ) -> c_void, pub cmd_draw_mesh_tasks_indirect_nv: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, @@ -50000,16 +49931,16 @@ impl StructureType { pub type PFN_vkCmdSetCheckpointNV = extern "system" fn(command_buffer: CommandBuffer, p_checkpoint_marker: *const c_void) -> c_void; #[allow(non_camel_case_types)] -pub type PFN_vkGetQueueCheckpointDataNV = - extern "system" fn( - queue: Queue, - p_checkpoint_data_count: *mut u32, - p_checkpoint_data: *mut CheckpointDataNV, - ) -> c_void; +pub type PFN_vkGetQueueCheckpointDataNV = extern "system" fn( + queue: Queue, + p_checkpoint_data_count: *mut u32, + p_checkpoint_data: *mut CheckpointDataNV, +) -> c_void; pub struct NvDeviceDiagnosticCheckpointsFn { - pub cmd_set_checkpoint_nv: - extern "system" fn(command_buffer: CommandBuffer, p_checkpoint_marker: *const c_void) - -> c_void, + pub cmd_set_checkpoint_nv: extern "system" fn( + command_buffer: CommandBuffer, + p_checkpoint_marker: *const c_void, + ) -> c_void, pub get_queue_checkpoint_data_nv: extern "system" fn( queue: Queue, p_checkpoint_data_count: *mut u32, @@ -50218,21 +50149,19 @@ impl AmdExtension214Fn { } } #[allow(non_camel_case_types)] -pub type PFN_vkCreateImagePipeSurfaceFUCHSIA = - extern "system" fn( +pub type PFN_vkCreateImagePipeSurfaceFUCHSIA = extern "system" fn( + instance: Instance, + p_create_info: *const ImagePipeSurfaceCreateInfoFUCHSIA, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; +pub struct FuchsiaImagepipeSurfaceFn { + pub create_image_pipe_surface_fuchsia: extern "system" fn( instance: Instance, p_create_info: *const ImagePipeSurfaceCreateInfoFUCHSIA, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, - ) -> Result; -pub struct FuchsiaImagepipeSurfaceFn { - pub create_image_pipe_surface_fuchsia: - extern "system" fn( - instance: Instance, - p_create_info: *const ImagePipeSurfaceCreateInfoFUCHSIA, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, + ) -> Result, } unsafe impl Send for FuchsiaImagepipeSurfaceFn {} unsafe impl Sync for FuchsiaImagepipeSurfaceFn {} diff --git a/examples/src/bin/texture.rs b/examples/src/bin/texture.rs index db7dedd..61239c1 100644 --- a/examples/src/bin/texture.rs +++ b/examples/src/bin/texture.rs @@ -121,7 +121,8 @@ fn main() { base.device .create_framebuffer(&frame_buffer_create_info, None) .unwrap() - }).collect(); + }) + .collect(); let index_buffer_data = [0u32, 1, 2, 2, 3, 0]; let index_buffer_info = vk::BufferCreateInfo { s_type: vk::StructureType::BUFFER_CREATE_INFO, @@ -139,7 +140,8 @@ fn main() { &index_buffer_memory_req, &base.device_memory_properties, vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the index buffer."); + ) + .expect("Unable to find suitable memorytype for the index buffer."); let index_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, p_next: ptr::null(), @@ -157,7 +159,8 @@ fn main() { 0, index_buffer_memory_req.size, vk::MemoryMapFlags::empty(), - ).unwrap(); + ) + .unwrap(); let mut index_slice = Align::new( index_ptr, align_of::() as u64, @@ -208,7 +211,8 @@ fn main() { &vertex_input_buffer_memory_req, &base.device_memory_properties, vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + ) + .expect("Unable to find suitable memorytype for the vertex buffer."); let vertex_buffer_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, @@ -227,7 +231,8 @@ fn main() { 0, vertex_input_buffer_memory_req.size, vk::MemoryMapFlags::empty(), - ).unwrap(); + ) + .unwrap(); let mut slice = Align::new( vert_ptr, align_of::() as u64, @@ -266,7 +271,8 @@ fn main() { &uniform_color_buffer_memory_req, &base.device_memory_properties, vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + ) + .expect("Unable to find suitable memorytype for the vertex buffer."); let uniform_color_buffer_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, @@ -285,7 +291,8 @@ fn main() { 0, uniform_color_buffer_memory_req.size, vk::MemoryMapFlags::empty(), - ).unwrap(); + ) + .unwrap(); let mut uniform_aligned_slice = Align::new( uniform_ptr, align_of::() as u64, @@ -316,7 +323,8 @@ fn main() { &image_buffer_memory_req, &base.device_memory_properties, vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + ) + .expect("Unable to find suitable memorytype for the vertex buffer."); let image_buffer_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, @@ -335,7 +343,8 @@ fn main() { 0, image_buffer_memory_req.size, vk::MemoryMapFlags::empty(), - ).unwrap(); + ) + .unwrap(); let mut image_slice = Align::new( image_ptr, std::mem::align_of::() as u64, @@ -377,7 +386,8 @@ fn main() { &texture_memory_req, &base.device_memory_properties, vk::MemoryPropertyFlags::DEVICE_LOCAL, - ).expect("Unable to find suitable memory index for depth image."); + ) + .expect("Unable to find suitable memory index for depth image."); let texture_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, @@ -872,7 +882,8 @@ fn main() { std::u64::MAX, base.present_complete_semaphore, vk::Fence::null(), - ).unwrap(); + ) + .unwrap(); let clear_values = [ vk::ClearValue { color: vk::ClearColorValue { diff --git a/examples/src/bin/triangle.rs b/examples/src/bin/triangle.rs index 733d83f..aa5e2fe 100644 --- a/examples/src/bin/triangle.rs +++ b/examples/src/bin/triangle.rs @@ -110,7 +110,8 @@ fn main() { base.device .create_framebuffer(&frame_buffer_create_info, None) .unwrap() - }).collect(); + }) + .collect(); let index_buffer_data = [0u32, 1, 2]; let index_buffer_info = vk::BufferCreateInfo { s_type: vk::StructureType::BUFFER_CREATE_INFO, @@ -128,7 +129,8 @@ fn main() { &index_buffer_memory_req, &base.device_memory_properties, vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the index buffer."); + ) + .expect("Unable to find suitable memorytype for the index buffer."); let index_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, p_next: ptr::null(), @@ -146,7 +148,8 @@ fn main() { 0, index_buffer_memory_req.size, vk::MemoryMapFlags::empty(), - ).unwrap(); + ) + .unwrap(); let mut index_slice = Align::new( index_ptr, align_of::() as u64, @@ -179,7 +182,8 @@ fn main() { &vertex_input_buffer_memory_req, &base.device_memory_properties, vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + ) + .expect("Unable to find suitable memorytype for the vertex buffer."); let vertex_buffer_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, @@ -212,7 +216,8 @@ fn main() { 0, vertex_input_buffer_memory_req.size, vk::MemoryMapFlags::empty(), - ).unwrap(); + ) + .unwrap(); let mut vert_align = Align::new( vert_ptr, align_of::() as u64, @@ -462,7 +467,8 @@ fn main() { std::u64::MAX, base.present_complete_semaphore, vk::Fence::null(), - ).unwrap(); + ) + .unwrap(); let clear_values = [ vk::ClearValue { color: vk::ClearColorValue { diff --git a/examples/src/lib.rs b/examples/src/lib.rs index a548bc3..b2ad2f1 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs @@ -67,7 +67,8 @@ pub fn record_submit_commandbuffer Some((*pdevice, index)), _ => None, } - }).nth(0) - }).filter_map(|v| v) + }) + .nth(0) + }) + .filter_map(|v| v) .nth(0) .expect("Couldn't find suitable device."); let queue_family_index = queue_family_index as u32; @@ -449,7 +453,8 @@ impl ExampleBase { color_space: sfmt.color_space, }, _ => sfmt.clone(), - }).nth(0) + }) + .nth(0) .expect("Unable to find suitable surface format."); let surface_capabilities = surface_loader .get_physical_device_surface_capabilities(pdevice, surface) @@ -553,7 +558,8 @@ impl ExampleBase { image: image, }; device.create_image_view(&create_view_info, None).unwrap() - }).collect(); + }) + .collect(); let device_memory_properties = instance.get_physical_device_memory_properties(pdevice); let depth_image_create_info = vk::ImageCreateInfo { s_type: vk::StructureType::IMAGE_CREATE_INFO, @@ -582,7 +588,8 @@ impl ExampleBase { &depth_image_memory_req, &device_memory_properties, vk::MemoryPropertyFlags::DEVICE_LOCAL, - ).expect("Unable to find suitable memory index for depth image."); + ) + .expect("Unable to find suitable memory index for depth image."); let depth_image_allocate_info = vk::MemoryAllocateInfo { s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 04ebb77..8ff92aa 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -36,7 +36,7 @@ impl CType { CType::Float => Term::intern("f32"), CType::Bool32 => Term::intern("Bool32"), }; - quote!{#term} + quote! {#term} } } @@ -131,7 +131,7 @@ pub fn define_handle_macro() -> Tokens { } pub fn handle_nondispatchable_macro() -> Tokens { - quote!{ + quote! { #[macro_export] macro_rules! handle_nondispatchable { ($name: ident, $ty: ident) => { @@ -167,7 +167,7 @@ pub fn handle_nondispatchable_macro() -> Tokens { } } pub fn vk_version_macros() -> Tokens { - quote!{ + quote! { #[macro_export] macro_rules! vk_make_version { ($major:expr, $minor:expr, $patch:expr) => { @@ -198,7 +198,7 @@ pub fn vk_version_macros() -> Tokens { } } pub fn vk_bitflags_wrapped_macro() -> Tokens { - quote!{ + quote! { #[macro_export] macro_rules! vk_bitflags_wrapped { ($name: ident, $all: expr, $flag_type: ty) => { @@ -454,24 +454,24 @@ impl Constant { match *self { Constant::Number(n) => { let term = Term::intern(&n.to_string()); - quote!{#term} + quote! {#term} } Constant::Hex(ref s) => { let term = Term::intern(&format!("0x{}", s)); - quote!{#term} + quote! {#term} } Constant::Text(ref text) => { - quote!{#text} + quote! {#text} } Constant::CExpr(ref expr) => { let (_, (_, rexpr)) = cexpr(expr).expect("Unable to parse cexpr"); let term = Term::intern(rexpr.as_str()); - quote!{#term} + quote! {#term} } Constant::BitPos(pos) => { let value = 1 << pos; let term = Term::intern(&format!("0b{:b}", value)); - quote!{#term} + quote! {#term} } } } @@ -539,7 +539,8 @@ impl CommandExt for vkxml::Command { .map(|field| match field.basetype.as_str() { "VkDevice" | "VkCommandBuffer" | "VkQueue" => true, _ => false, - }).unwrap_or(false); + }) + .unwrap_or(false); match self.name.as_str() { "vkGetInstanceProcAddr" => FunctionType::Static, "vkCreateInstance" @@ -592,7 +593,7 @@ impl ToTokens for vkxml::ReferenceType { } }; let ident = Term::intern(ptr_name); - quote!{ + quote! { #ident } } @@ -626,8 +627,8 @@ fn name_to_tokens(type_name: &str) -> Ident { } fn to_type_tokens(type_name: &str, reference: Option<&vkxml::ReferenceType>) -> Tokens { let new_name = name_to_tokens(type_name); - let ptr_name = reference.map(|r| r.to_tokens(false)).unwrap_or(quote!{}); - quote!{#ptr_name #new_name} + let ptr_name = reference.map(|r| r.to_tokens(false)).unwrap_or(quote! {}); + quote! {#ptr_name #new_name} } impl FieldExt for vkxml::Field { @@ -649,8 +650,8 @@ impl FieldExt for vkxml::Field { .reference .as_ref() .map(|r| r.to_tokens(self.is_const)) - .unwrap_or(quote!{}); - let pointer_ty = quote!{ + .unwrap_or(quote! {}); + let pointer_ty = quote! { #pointer #ty }; let array = self.array.as_ref().and_then(|arraytype| match arraytype { @@ -664,7 +665,7 @@ impl FieldExt for vkxml::Field { // used inside the static array let size = constant_name(size); let size = Term::intern(&size); - Some(quote!{ + Some(quote! { [#ty; #size] }) } @@ -704,7 +705,8 @@ fn generate_function_pointers<'a>( } else { return false; } - }).collect(); + }) + .collect(); let params: Vec> = commands .iter() @@ -716,9 +718,11 @@ fn generate_function_pointers<'a>( let name = field.param_ident(); let ty = field.type_tokens(); (name, ty) - }).collect(); + }) + .collect(); params - }).collect(); + }) + .collect(); let params_names: Vec> = params .iter() @@ -727,29 +731,32 @@ fn generate_function_pointers<'a>( .iter() .map(|&(param_name, _)| param_name) .collect() - }).collect(); + }) + .collect(); let param_names_ref = ¶ms_names; let expanded_params: Vec<_> = params .iter() .map(|inner_params| { let inner_params_iter = inner_params.iter().map(|&(ref param_name, ref param_ty)| { - quote!{#param_name: #param_ty} + quote! {#param_name: #param_ty} }); - quote!{ + quote! { #(#inner_params_iter,)* } - }).collect(); + }) + .collect(); let expanded_params_unused: Vec<_> = params .iter() .map(|inner_params| { let inner_params_iter = inner_params.iter().map(|&(ref param_name, ref param_ty)| { let unused_name = Ident::from(format!("_{}", param_name).as_str()); - quote!{#unused_name: #param_ty} + quote! {#unused_name: #param_ty} }); - quote!{ + quote! { #(#inner_params_iter,)* } - }).collect(); + }) + .collect(); let expanded_params_ref = &expanded_params; let return_types: Vec<_> = commands @@ -774,9 +781,11 @@ fn generate_function_pointers<'a>( let name = field.param_ident(); let ty = field.type_tokens(); quote! { #name: #ty } - }).collect(); + }) + .collect(); params - }).collect(); + }) + .collect(); let signature_params_ref = &signature_params; let pfn_return_types: Vec<_> = pfn_commands @@ -785,7 +794,7 @@ fn generate_function_pointers<'a>( .collect(); let pfn_return_types_ref = &pfn_return_types; - quote!{ + quote! { #( #[allow(non_camel_case_types)] pub type #pfn_names_ref = extern "system" fn(#(#signature_params_ref),*) -> #pfn_return_types_ref; @@ -867,7 +876,8 @@ pub fn generate_extension_constants<'a>( .filter_map(|item| match item { vk_parse::ExtensionChild::Require { items, .. } => Some(items.iter()), _ => None, - }).flat_map(|iter| iter); + }) + .flat_map(|iter| iter); let enum_tokens = items.filter_map(|item| match item { vk_parse::InterfaceItem::Enum(_enum) => { use vk_parse::EnumSpec; @@ -905,7 +915,7 @@ pub fn generate_extension_constants<'a>( .push(ext_constant.variant_ident(&extends)); let impl_block = bitflags_impl_block(ident, &extends, &[&ext_constant]); let doc_string = format!("Generated from '{}'", extension_name); - let q = quote!{ + let q = quote! { #[doc = #doc_string] #impl_block }; @@ -915,7 +925,7 @@ pub fn generate_extension_constants<'a>( } _ => None, }); - quote!{ + quote! { #(#enum_tokens)* } } @@ -937,7 +947,8 @@ pub fn generate_extension_commands<'a>( })) } _ => None, - }).flat_map(|iter| iter) + }) + .flat_map(|iter| iter) .collect_vec(); let name = format!("{}Fn", extension_name.to_camel_case()); let ident = Ident::from(&name[2..]); @@ -964,7 +975,7 @@ pub fn generate_extension<'a>( const_values, ); let fp = generate_extension_commands(&extension.name, &extension.children, cmd_map, fn_cache); - let q = quote!{ + let q = quote! { #fp #extension_tokens }; @@ -973,7 +984,7 @@ pub fn generate_extension<'a>( pub fn generate_typedef(typedef: &vkxml::Typedef) -> Tokens { let typedef_name = to_type_tokens(&typedef.name, None); let typedef_ty = to_type_tokens(&typedef.basetype, None); - quote!{ + quote! { pub type #typedef_name = #typedef_ty; } } @@ -996,7 +1007,7 @@ pub fn generate_bitmask( return None; }; bitflags_cache.insert(ident.clone()); - Some(quote!{ + Some(quote! { #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct #ident(Flags); @@ -1051,11 +1062,12 @@ pub fn bitflags_impl_block( let variant_ident = constant.variant_ident(enum_name); let tokens = constant.to_tokens(); (variant_ident, tokens) - }).collect_vec(); + }) + .collect_vec(); let notations = constants.iter().map(|constant| { constant.notation().map(|n| { - quote!{ + quote! { #[doc = #n] } }) @@ -1066,12 +1078,12 @@ pub fn bitflags_impl_block( .iter() .zip(notations.clone()) .map(|((variant_ident, value), ref notation)| { - quote!{ + quote! { #notation pub const #variant_ident: Self = #ident(#value); } }); - quote!{ + quote! { impl #ident { #(#variants)* } @@ -1093,7 +1105,8 @@ pub fn generate_enum<'a>( .filter_map(|elem| match *elem { vkxml::EnumerationElement::Enum(ref constant) => Some(constant), _ => None, - }).collect_vec(); + }) + .collect_vec(); let values = const_values.entry(ident.clone()).or_insert_with(Vec::new); for constant in &constants { const_cache.insert(constant.name.as_str()); @@ -1110,10 +1123,10 @@ pub fn generate_enum<'a>( let impl_bitflags = bitflags_impl_block(ident, &_enum.name, &constants); if bitflags_cache.contains(&ident) { - EnumType::Bitflags(quote!{}) + EnumType::Bitflags(quote! {}) } else { bitflags_cache.insert(ident.clone()); - let q = quote!{ + let q = quote! { #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct #ident(pub(crate) Flags); @@ -1124,7 +1137,7 @@ pub fn generate_enum<'a>( } } else { let impl_block = bitflags_impl_block(ident, &_enum.name, &constants); - let enum_quote = quote!{ + let enum_quote = quote! { #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] pub struct #ident(pub(crate) i32); @@ -1138,10 +1151,10 @@ pub fn generate_enum<'a>( //"StructureType" => generate_structure_type(&_name, _enum, create_info_constants), "Result" => generate_result(ident, _enum), _ => { - quote!{} + quote! {} } }; - let q = quote!{ + let q = quote! { #enum_quote #special_quote @@ -1163,13 +1176,13 @@ pub fn generate_result(ident: Ident, _enum: &vkxml::Enumeration) -> Tokens { }; let variant_ident = variant_ident(&_enum.name, variant_name); - Some(quote!{ + Some(quote! { #ident::#variant_ident => Some(#notation) }) }); let notation2 = notation.clone(); - quote!{ + quote! { impl ::std::error::Error for #ident { fn description(&self) -> &str { let name = match *self { @@ -1202,7 +1215,8 @@ fn is_static_array(field: &vkxml::Field) -> bool { .map(|ty| match ty { vkxml::ArrayType::Static => true, _ => false, - }).unwrap_or(false) + }) + .unwrap_or(false) } pub fn derive_default(_struct: &vkxml::Struct) -> Option { let name = name_to_tokens(&_struct.name); @@ -1231,11 +1245,11 @@ pub fn derive_default(_struct: &vkxml::Struct) -> Option { if let Some(variant) = ty { let variant_ident = variant_ident("VkStructureType", variant); - quote!{ + quote! { #param_ident: StructureType::#variant_ident } } else { - quote!{ + quote! { #param_ident: unsafe { ::std::mem::zeroed() } } } @@ -1243,44 +1257,44 @@ pub fn derive_default(_struct: &vkxml::Struct) -> Option { match reference { vkxml::ReferenceType::Pointer => { if field.is_const { - quote!{ + quote! { #param_ident: ::std::ptr::null() } } else { - quote!{ + quote! { #param_ident: ::std::ptr::null_mut() } } } vkxml::ReferenceType::PointerToPointer => { - quote!{ + quote! { #param_ident: ::std::ptr::null_mut() } } vkxml::ReferenceType::PointerToConstPointer => { if field.is_const { - quote!{ + quote! { #param_ident: ::std::ptr::null() } } else { - quote!{ + quote! { #param_ident: ::std::ptr::null_mut() } } } } } else if is_static_array(field) || handles.contains(&field.basetype.as_str()) { - quote!{ + quote! { #param_ident: unsafe { ::std::mem::zeroed() } } } else { let ty = field.type_tokens(); - quote!{ + quote! { #param_ident: #ty::default() } } }); - let q = quote!{ + let q = quote! { impl ::std::default::Default for #name { fn default() -> #name { #name { @@ -1319,28 +1333,28 @@ pub fn derive_debug(_struct: &vkxml::Struct, union_types: &HashSet<&str>) -> Opt let param_ident = field.param_ident(); let param_str = param_ident.as_ref(); let debug_value = if is_static_array(field) && field.basetype == "char" { - quote!{ + quote! { &unsafe { ::std::ffi::CStr::from_ptr(self.#param_ident.as_ptr() as *const i8) } } } else if param_ident.as_ref().contains("pfn") { - quote!{ + quote! { &(self.#param_ident.map(|x| x as *const ())) } } else if union_types.contains(field.basetype.as_str()) { quote!(&"union") } else { - quote!{ + quote! { &self.#param_ident } }; - quote!{ + quote! { .field(#param_str, #debug_value) } }); let name_str = name.as_ref(); - let q = quote!{ + let q = quote! { impl fmt::Debug for #name { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { fmt.debug_struct(#name_str) @@ -1369,11 +1383,13 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { .clone() .find(|field| field.param_ident().to_string() == "p_next") { - Some(p_next) => if p_next.type_tokens().to_string().starts_with("*const") { - (true, true) - } else { - (true, false) - }, + Some(p_next) => { + if p_next.type_tokens().to_string().starts_with("*const") { + (true, true) + } else { + (true, false) + } + } None => (false, false), }; @@ -1390,9 +1406,10 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { // Associated _count members if field.array.is_some() { if let Some(ref array_size) = field.size { - if !array_size.starts_with("latexmath") && !nofilter_count_members - .iter() - .any(|n| *n == &(_struct.name.clone() + "." + field_name)) + if !array_size.starts_with("latexmath") + && !nofilter_count_members + .iter() + .any(|n| *n == &(_struct.name.clone() + "." + field_name)) { return Some((*array_size).clone()); } @@ -1405,7 +1422,8 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { } None - }).collect(); + }) + .collect(); let setters = members.clone().filter_map(|field| { let param_ident = field.param_ident(); @@ -1556,14 +1574,14 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { let next_function = if has_next { if is_next_const { - quote!{ + quote! { pub fn next(mut self, next: &'a T) -> #name_builder<'a> where T: #extends_name { self.inner.p_next = next as *const T as *const c_void; self } } } else { - quote!{ + quote! { pub fn next(mut self, next: &'a mut T) -> #name_builder<'a> where T: #extends_name { self.inner.p_next = next as *mut T as *mut c_void; self @@ -1571,18 +1589,18 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { } } } else { - quote!{} + quote! {} }; let next_trait = if has_next { - quote!{ + quote! { pub unsafe trait #extends_name {} } } else { - quote!{} + quote! {} }; - let q = quote!{ + let q = quote! { impl #name { pub fn builder<'a>() -> #name_builder<'a> { #name_builder { @@ -1629,8 +1647,8 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { /// require and add the missing derives yourself. pub fn manual_derives(_struct: &vkxml::Struct) -> Tokens { match _struct.name.as_str() { - "VkExtent3D" | "VKExtent2D" => quote!{PartialEq, Eq, Hash,}, - _ => quote!{}, + "VkExtent3D" | "VKExtent2D" => quote! {PartialEq, Eq, Hash,}, + _ => quote! {}, } } pub fn generate_struct(_struct: &vkxml::Struct, union_types: &HashSet<&str>) -> Tokens { @@ -1643,7 +1661,7 @@ pub fn generate_struct(_struct: &vkxml::Struct, union_types: &HashSet<&str>) -> let params = members.clone().map(|field| { let param_ident = field.param_ident(); let param_ty_tokens = field.type_tokens(); - quote!{pub #param_ident: #param_ty_tokens} + quote! {pub #param_ident: #param_ty_tokens} }); let debug_tokens = derive_debug(_struct, union_types); @@ -1660,7 +1678,7 @@ pub fn generate_struct(_struct: &vkxml::Struct, union_types: &HashSet<&str>) -> } else { quote!() }; - quote!{ + quote! { #[repr(C)] #[derive(Copy, Clone, #default_str #dbg_str #manual_derive_tokens)] pub struct #name { @@ -1702,11 +1720,11 @@ fn generate_funcptr(fnptr: &vkxml::FunctionPointer) -> Tokens { let params = fnptr.param.iter().map(|field| { let ident = field.param_ident(); let type_tokens = field.type_tokens(); - quote!{ + quote! { #ident: #type_tokens } }); - quote!{ + quote! { #[allow(non_camel_case_types)] pub type #name = Option #ret_ty_tokens>; } @@ -1717,11 +1735,11 @@ fn generate_union(union: &vkxml::Union) -> Tokens { let fields = union.elements.iter().map(|field| { let name = field.param_ident(); let ty = field.type_tokens(); - quote!{ + quote! { pub #name: #ty } }); - quote!{ + quote! { #[repr(C)] #[derive(Copy, Clone)] pub union #name { @@ -1770,11 +1788,13 @@ pub fn generate_feature<'a>( } else { None } - }).collect() + }) + .collect() } else { vec![] } - }).filter_map(|cmd_ref| commands.get(&cmd_ref.name)) + }) + .filter_map(|cmd_ref| commands.get(&cmd_ref.name)) .fold( (Vec::new(), Vec::new(), Vec::new(), Vec::new()), |mut acc, &cmd_ref| { @@ -1799,7 +1819,7 @@ pub fn generate_feature<'a>( let static_fn = if feature.version == 1.0 { generate_function_pointers(Ident::from("StaticFn"), &static_commands, fn_cache) } else { - quote!{} + quote! {} }; let entry = generate_function_pointers( Ident::from(format!("EntryFnV{}", version).as_str()), @@ -1842,7 +1862,7 @@ pub fn generate_constant<'a>( c.ty() }; let ty = ty.to_tokens(); - quote!{ + quote! { pub const #ident: #ty = #value; } } @@ -1862,7 +1882,7 @@ pub fn generate_feature_extension<'a>( )), _ => None, }); - quote!{ + quote! { #(#constants)* } } @@ -1875,9 +1895,9 @@ pub fn generate_const_displays<'a>(const_values: &HashMap>) -> if ty.to_string().contains("Flags") { let cases = values.iter().map(|value| { let name = value.to_string(); - quote!{ (#ty::#value.0, #name) } + quote! { (#ty::#value.0, #name) } }); - quote!{ + quote! { impl fmt::Display for #ty { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[#(#cases),*]; @@ -1888,9 +1908,9 @@ pub fn generate_const_displays<'a>(const_values: &HashMap>) -> } else { let cases = values.iter().map(|value| { let name = value.to_string(); - quote!{ Self::#value => Some(#name), } + quote! { Self::#value => Some(#name), } }); - quote!{ + quote! { impl fmt::Display for #ty { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -1907,7 +1927,7 @@ pub fn generate_const_displays<'a>(const_values: &HashMap>) -> } } }); - quote!{ + quote! { fn display_flags(f: &mut fmt::Formatter, known: &[(Flags, &'static str)], value: Flags) -> fmt::Result { let mut first = true; let mut accum = value; @@ -1939,19 +1959,20 @@ pub fn generate_aliases_of_types<'a>( .filter_map(|child| match child { vk_parse::TypesChild::Type(ty) => Some((ty.name.as_ref()?, ty.alias.as_ref()?)), _ => None, - }).filter_map(|(name, alias)| { + }) + .filter_map(|(name, alias)| { let name_ident = name_to_tokens(name); if ty_cache.contains(&name_ident) { return None; }; ty_cache.insert(name_ident.clone()); let alias_ident = name_to_tokens(alias); - let tokens = quote!{ + let tokens = quote! { pub type #name_ident = #alias_ident; }; Some(tokens) }); - quote!{ + quote! { #(#aliases)* } } @@ -1965,7 +1986,8 @@ pub fn write_source_code(path: &Path) { .filter_map(|item| match item { vk_parse::RegistryChild::Extensions(ref ext) => Some(&ext.children), _ => None, - }).nth(0) + }) + .nth(0) .expect("extension"); let mut ty_cache = HashSet::new(); let aliases: Vec<_> = spec2 @@ -1976,7 +1998,8 @@ pub fn write_source_code(path: &Path) { Some(generate_aliases_of_types(ty, &mut ty_cache)) } _ => None, - }).collect(); + }) + .collect(); let spec = vk_parse::parse_file_as_vkxml(path); let commands: HashMap = spec @@ -1985,7 +2008,8 @@ pub fn write_source_code(path: &Path) { .filter_map(|elem| match elem { vkxml::RegistryElement::Commands(ref cmds) => Some(cmds), _ => None, - }).flat_map(|cmds| cmds.elements.iter().map(|cmd| (cmd.name.clone(), cmd))) + }) + .flat_map(|cmds| cmds.elements.iter().map(|cmd| (cmd.name.clone(), cmd))) .collect(); let features: Vec<&vkxml::Feature> = spec @@ -1994,7 +2018,8 @@ pub fn write_source_code(path: &Path) { .filter_map(|elem| match elem { vkxml::RegistryElement::Features(ref features) => Some(features), _ => None, - }).flat_map(|features| features.elements.iter()) + }) + .flat_map(|features| features.elements.iter()) .collect(); let definitions: Vec<&vkxml::DefinitionsElement> = spec @@ -2003,7 +2028,8 @@ pub fn write_source_code(path: &Path) { .filter_map(|elem| match elem { vkxml::RegistryElement::Definitions(ref definitions) => Some(definitions), _ => None, - }).flat_map(|definitions| definitions.elements.iter()) + }) + .flat_map(|definitions| definitions.elements.iter()) .collect(); let enums: Vec<&vkxml::Enumeration> = spec @@ -2012,12 +2038,14 @@ pub fn write_source_code(path: &Path) { .filter_map(|elem| match elem { vkxml::RegistryElement::Enums(ref enums) => Some(enums), _ => None, - }).flat_map(|enums| { + }) + .flat_map(|enums| { enums.elements.iter().filter_map(|_enum| match *_enum { vkxml::EnumsElement::Enumeration(ref e) => Some(e), _ => None, }) - }).collect(); + }) + .collect(); let constants: Vec<&vkxml::Constant> = spec .elements @@ -2025,7 +2053,8 @@ pub fn write_source_code(path: &Path) { .filter_map(|elem| match elem { vkxml::RegistryElement::Constants(ref constants) => Some(constants), _ => None, - }).flat_map(|constants| constants.elements.iter()) + }) + .flat_map(|constants| constants.elements.iter()) .collect(); let mut fn_cache = HashSet::new(); @@ -2059,14 +2088,16 @@ pub fn write_source_code(path: &Path) { &mut const_values, &mut fn_cache, ) - }).collect_vec(); + }) + .collect_vec(); let union_types = definitions .iter() .filter_map(|def| match def { vkxml::DefinitionsElement::Union(ref union) => Some(union.name.as_str()), _ => None, - }).collect::>(); + }) + .collect::>(); let definition_code: Vec<_> = definitions .into_iter() @@ -2088,7 +2119,7 @@ pub fn write_source_code(path: &Path) { let define_handle_macro = define_handle_macro(); let version_macros = vk_version_macros(); let platform_specific_types = platform_specific_types(); - let source_code = quote!{ + let source_code = quote! { use std::fmt; use std::os::raw::*; From 7800cc5efc23a338d10ecd417135975109a12993 Mon Sep 17 00:00:00 2001 From: Maik Klein Date: Sun, 9 Dec 2018 09:05:18 +0100 Subject: [PATCH 3/5] Add bors --- bors.toml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 bors.toml diff --git a/bors.toml b/bors.toml new file mode 100644 index 0000000..954e4e6 --- /dev/null +++ b/bors.toml @@ -0,0 +1,6 @@ +status = [ + "continuous-integration/travis-ci/push", + "continuous-integration/appveyor/branch" +] + +timeout_sec = 18000 # 5 hours From 813c33d3d1de827025343adfccb329263de1539d Mon Sep 17 00:00:00 2001 From: Maik Klein Date: Sun, 9 Dec 2018 09:11:19 +0100 Subject: [PATCH 4/5] Don't build tmp branches --- .travis.yml | 10 ++++++++++ appveyor.yml | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9941370..1de3d32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,3 +15,13 @@ script: - cargo build --manifest-path ash/Cargo.toml - cargo build --manifest-path examples/Cargo.toml - cargo build --manifest-path generator/Cargo.toml + +branches: + only: + # This is where pull requests from "bors r+" are built. + - staging + # This is where pull requests from "bors try" are built. + - trying + # Uncomment this to enable building pull requests. + - master + diff --git a/appveyor.yml b/appveyor.yml index 5b005a3..59336ff 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,3 +13,12 @@ install: build_script: - cargo build --manifest-path ash/Cargo.toml - cargo build --manifest-path examples/Cargo.toml + +branches: + only: + # This is where pull requests from "bors r+" are built. + - staging + # This is where pull requests from "bors try" are built. + - trying + # Uncomment this to enable building pull requests. + - master From 6497e2f58c3f02629dafd164ba0d812e4c93fdc7 Mon Sep 17 00:00:00 2001 From: Matus Talcik Date: Sun, 9 Dec 2018 11:52:28 +0100 Subject: [PATCH 5/5] Builder: fix [c_void] --- ash/src/vk.rs | 4304 +++++++++++++++++++++--------------------- generator/src/lib.rs | 28 +- 2 files changed, 2168 insertions(+), 2164 deletions(-) diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 9865a9a..f867110 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -11434,9 +11434,9 @@ impl<'a> SpecializationInfoBuilder<'a> { self.inner.p_map_entries = map_entries.as_ptr(); self } - pub fn data(mut self, data: &'a [c_void]) -> SpecializationInfoBuilder<'a> { + pub fn data(mut self, data: &'a [u8]) -> SpecializationInfoBuilder<'a> { self.inner.data_size = data.len() as _; - self.inner.p_data = data.as_ptr(); + self.inner.p_data = data.as_ptr() as *const c_void; self } pub fn build(self) -> SpecializationInfo { @@ -12922,12 +12922,9 @@ impl<'a> PipelineCacheCreateInfoBuilder<'a> { self.inner.flags = flags; self } - pub fn initial_data( - mut self, - initial_data: &'a [c_void], - ) -> PipelineCacheCreateInfoBuilder<'a> { + pub fn initial_data(mut self, initial_data: &'a [u8]) -> PipelineCacheCreateInfoBuilder<'a> { self.inner.initial_data_size = initial_data.len() as _; - self.inner.p_initial_data = initial_data.as_ptr(); + self.inner.p_initial_data = initial_data.as_ptr() as *const c_void; self } pub fn next(mut self, next: &'a T) -> PipelineCacheCreateInfoBuilder<'a> @@ -17811,9 +17808,9 @@ impl<'a> DebugMarkerObjectTagInfoEXTBuilder<'a> { self.inner.tag_name = tag_name; self } - pub fn tag(mut self, tag: &'a [c_void]) -> DebugMarkerObjectTagInfoEXTBuilder<'a> { + pub fn tag(mut self, tag: &'a [u8]) -> DebugMarkerObjectTagInfoEXTBuilder<'a> { self.inner.tag_size = tag.len() as _; - self.inner.p_tag = tag.as_ptr(); + self.inner.p_tag = tag.as_ptr() as *const c_void; self } pub fn next(mut self, next: &'a T) -> DebugMarkerObjectTagInfoEXTBuilder<'a> @@ -28370,12 +28367,9 @@ impl<'a> ::std::ops::Deref for WriteDescriptorSetInlineUniformBlockEXTBuilder<'a } } impl<'a> WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> { - pub fn data( - mut self, - data: &'a [c_void], - ) -> WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> { + pub fn data(mut self, data: &'a [u8]) -> WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> { self.inner.data_size = data.len() as _; - self.inner.p_data = data.as_ptr(); + self.inner.p_data = data.as_ptr() as *const c_void; self } pub fn next(mut self, next: &'a T) -> WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> @@ -28643,10 +28637,10 @@ impl<'a> ValidationCacheCreateInfoEXTBuilder<'a> { } pub fn initial_data( mut self, - initial_data: &'a [c_void], + initial_data: &'a [u8], ) -> ValidationCacheCreateInfoEXTBuilder<'a> { self.inner.initial_data_size = initial_data.len() as _; - self.inner.p_initial_data = initial_data.as_ptr(); + self.inner.p_initial_data = initial_data.as_ptr() as *const c_void; self } pub fn next(mut self, next: &'a T) -> ValidationCacheCreateInfoEXTBuilder<'a> @@ -29295,9 +29289,9 @@ impl<'a> DebugUtilsObjectTagInfoEXTBuilder<'a> { self.inner.tag_name = tag_name; self } - pub fn tag(mut self, tag: &'a [c_void]) -> DebugUtilsObjectTagInfoEXTBuilder<'a> { + pub fn tag(mut self, tag: &'a [u8]) -> DebugUtilsObjectTagInfoEXTBuilder<'a> { self.inner.tag_size = tag.len() as _; - self.inner.p_tag = tag.as_ptr(); + self.inner.p_tag = tag.as_ptr() as *const c_void; self } pub fn next(mut self, next: &'a T) -> DebugUtilsObjectTagInfoEXTBuilder<'a> @@ -51333,107 +51327,6 @@ fn display_flags( } Ok(()) } -impl fmt::Display for AttachmentDescriptionFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(AttachmentDescriptionFlags::MAY_ALIAS.0, "MAY_ALIAS")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for QueryControlFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(QueryControlFlags::PRECISE.0, "PRECISE")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for AttachmentLoadOp { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::LOAD => Some("LOAD"), - Self::CLEAR => Some("CLEAR"), - Self::DONT_CARE => Some("DONT_CARE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ExternalMemoryHandleTypeFlagsNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_NV.0, - "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_NV", - ), - ( - ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_NV.0, - "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_NV", - ), - ( - ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_NV.0, - "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_NV", - ), - ( - ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_NV.0, - "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_NV", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for BlendOverlapEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::UNCORRELATED => Some("UNCORRELATED"), - Self::DISJOINT => Some("DISJOINT"), - Self::CONJOINT => Some("CONJOINT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for FenceImportFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(FenceImportFlags::TEMPORARY.0, "TEMPORARY")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for SubgroupFeatureFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (SubgroupFeatureFlags::BASIC.0, "BASIC"), - (SubgroupFeatureFlags::VOTE.0, "VOTE"), - (SubgroupFeatureFlags::ARITHMETIC.0, "ARITHMETIC"), - (SubgroupFeatureFlags::BALLOT.0, "BALLOT"), - (SubgroupFeatureFlags::SHUFFLE.0, "SHUFFLE"), - (SubgroupFeatureFlags::SHUFFLE_RELATIVE.0, "SHUFFLE_RELATIVE"), - (SubgroupFeatureFlags::CLUSTERED.0, "CLUSTERED"), - (SubgroupFeatureFlags::QUAD.0, "QUAD"), - (SubgroupFeatureFlags::PARTITIONED_NV.0, "PARTITIONED_NV"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for VertexInputRate { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::VERTEX => Some("VERTEX"), - Self::INSTANCE => Some("INSTANCE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} impl fmt::Display for ImageLayout { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -51464,11 +51357,11 @@ impl fmt::Display for ImageLayout { } } } -impl fmt::Display for AccelerationStructureTypeNV { +impl fmt::Display for ValidationCheckEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::TOP_LEVEL => Some("TOP_LEVEL"), - Self::BOTTOM_LEVEL => Some("BOTTOM_LEVEL"), + Self::ALL => Some("ALL"), + Self::SHADERS => Some("SHADERS"), _ => None, }; if let Some(x) = name { @@ -51478,436 +51371,52 @@ impl fmt::Display for AccelerationStructureTypeNV { } } } -impl fmt::Display for SampleCountFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (SampleCountFlags::TYPE_1.0, "TYPE_1"), - (SampleCountFlags::TYPE_2.0, "TYPE_2"), - (SampleCountFlags::TYPE_4.0, "TYPE_4"), - (SampleCountFlags::TYPE_8.0, "TYPE_8"), - (SampleCountFlags::TYPE_16.0, "TYPE_16"), - (SampleCountFlags::TYPE_32.0, "TYPE_32"), - (SampleCountFlags::TYPE_64.0, "TYPE_64"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for SamplerMipmapMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::NEAREST => Some("NEAREST"), - Self::LINEAR => Some("LINEAR"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DebugReportFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (DebugReportFlagsEXT::INFORMATION.0, "INFORMATION"), - (DebugReportFlagsEXT::WARNING.0, "WARNING"), - ( - DebugReportFlagsEXT::PERFORMANCE_WARNING.0, - "PERFORMANCE_WARNING", - ), - (DebugReportFlagsEXT::ERROR.0, "ERROR"), - (DebugReportFlagsEXT::DEBUG.0, "DEBUG"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for QueryResultFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (QueryResultFlags::TYPE_64.0, "TYPE_64"), - (QueryResultFlags::WAIT.0, "WAIT"), - (QueryResultFlags::WITH_AVAILABILITY.0, "WITH_AVAILABILITY"), - (QueryResultFlags::PARTIAL.0, "PARTIAL"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DescriptorPoolCreateFlags { +impl fmt::Display for QueryPipelineStatisticFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ ( - DescriptorPoolCreateFlags::FREE_DESCRIPTOR_SET.0, - "FREE_DESCRIPTOR_SET", + QueryPipelineStatisticFlags::INPUT_ASSEMBLY_VERTICES.0, + "INPUT_ASSEMBLY_VERTICES", ), ( - DescriptorPoolCreateFlags::UPDATE_AFTER_BIND_EXT.0, - "UPDATE_AFTER_BIND_EXT", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for SamplerYcbcrModelConversion { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::RGB_IDENTITY => Some("RGB_IDENTITY"), - Self::YCBCR_IDENTITY => Some("YCBCR_IDENTITY"), - Self::YCBCR_709 => Some("YCBCR_709"), - Self::YCBCR_601 => Some("YCBCR_601"), - Self::YCBCR_2020 => Some("YCBCR_2020"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DiscardRectangleModeEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::INCLUSIVE => Some("INCLUSIVE"), - Self::EXCLUSIVE => Some("EXCLUSIVE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ExternalMemoryFeatureFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - ExternalMemoryFeatureFlags::EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY.0, - "EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY", + QueryPipelineStatisticFlags::INPUT_ASSEMBLY_PRIMITIVES.0, + "INPUT_ASSEMBLY_PRIMITIVES", ), ( - ExternalMemoryFeatureFlags::EXTERNAL_MEMORY_FEATURE_EXPORTABLE.0, - "EXTERNAL_MEMORY_FEATURE_EXPORTABLE", + QueryPipelineStatisticFlags::VERTEX_SHADER_INVOCATIONS.0, + "VERTEX_SHADER_INVOCATIONS", ), ( - ExternalMemoryFeatureFlags::EXTERNAL_MEMORY_FEATURE_IMPORTABLE.0, - "EXTERNAL_MEMORY_FEATURE_IMPORTABLE", + QueryPipelineStatisticFlags::GEOMETRY_SHADER_INVOCATIONS.0, + "GEOMETRY_SHADER_INVOCATIONS", ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for CoverageModulationModeNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::NONE => Some("NONE"), - Self::RGB => Some("RGB"), - Self::ALPHA => Some("ALPHA"), - Self::RGBA => Some("RGBA"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for CommandPoolResetFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[( - CommandPoolResetFlags::RELEASE_RESOURCES.0, - "RELEASE_RESOURCES", - )]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for IndexType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::UINT16 => Some("UINT16"), - Self::UINT32 => Some("UINT32"), - Self::NONE_NV => Some("NONE_NV"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for MemoryHeapFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (MemoryHeapFlags::DEVICE_LOCAL.0, "DEVICE_LOCAL"), - (MemoryHeapFlags::MULTI_INSTANCE.0, "MULTI_INSTANCE"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ImageAspectFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (ImageAspectFlags::COLOR.0, "COLOR"), - (ImageAspectFlags::DEPTH.0, "DEPTH"), - (ImageAspectFlags::STENCIL.0, "STENCIL"), - (ImageAspectFlags::METADATA.0, "METADATA"), - (ImageAspectFlags::MEMORY_PLANE_0_EXT.0, "MEMORY_PLANE_0_EXT"), - (ImageAspectFlags::MEMORY_PLANE_1_EXT.0, "MEMORY_PLANE_1_EXT"), - (ImageAspectFlags::MEMORY_PLANE_2_EXT.0, "MEMORY_PLANE_2_EXT"), - (ImageAspectFlags::MEMORY_PLANE_3_EXT.0, "MEMORY_PLANE_3_EXT"), - (ImageAspectFlags::PLANE_0.0, "PLANE_0"), - (ImageAspectFlags::PLANE_1.0, "PLANE_1"), - (ImageAspectFlags::PLANE_2.0, "PLANE_2"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ColorSpaceKHR { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::SRGB_NONLINEAR => Some("SRGB_NONLINEAR"), - Self::DISPLAY_P3_NONLINEAR_EXT => Some("DISPLAY_P3_NONLINEAR_EXT"), - Self::EXTENDED_SRGB_LINEAR_EXT => Some("EXTENDED_SRGB_LINEAR_EXT"), - Self::DCI_P3_LINEAR_EXT => Some("DCI_P3_LINEAR_EXT"), - Self::DCI_P3_NONLINEAR_EXT => Some("DCI_P3_NONLINEAR_EXT"), - Self::BT709_LINEAR_EXT => Some("BT709_LINEAR_EXT"), - Self::BT709_NONLINEAR_EXT => Some("BT709_NONLINEAR_EXT"), - Self::BT2020_LINEAR_EXT => Some("BT2020_LINEAR_EXT"), - Self::HDR10_ST2084_EXT => Some("HDR10_ST2084_EXT"), - Self::DOLBYVISION_EXT => Some("DOLBYVISION_EXT"), - Self::HDR10_HLG_EXT => Some("HDR10_HLG_EXT"), - Self::ADOBERGB_LINEAR_EXT => Some("ADOBERGB_LINEAR_EXT"), - Self::ADOBERGB_NONLINEAR_EXT => Some("ADOBERGB_NONLINEAR_EXT"), - Self::PASS_THROUGH_EXT => Some("PASS_THROUGH_EXT"), - Self::EXTENDED_SRGB_NONLINEAR_EXT => Some("EXTENDED_SRGB_NONLINEAR_EXT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for CommandBufferResetFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[( - CommandBufferResetFlags::RELEASE_RESOURCES.0, - "RELEASE_RESOURCES", - )]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for QueueGlobalPriorityEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::LOW => Some("LOW"), - Self::MEDIUM => Some("MEDIUM"), - Self::HIGH => Some("HIGH"), - Self::REALTIME => Some("REALTIME"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for MemoryOverallocationBehaviorAMD { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::DEFAULT => Some("DEFAULT"), - Self::ALLOWED => Some("ALLOWED"), - Self::DISALLOWED => Some("DISALLOWED"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DisplayPowerStateEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::OFF => Some("OFF"), - Self::SUSPEND => Some("SUSPEND"), - Self::ON => Some("ON"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for CommandBufferLevel { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::PRIMARY => Some("PRIMARY"), - Self::SECONDARY => Some("SECONDARY"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DriverIdKHR { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::AMD_PROPRIETARY => Some("AMD_PROPRIETARY"), - Self::AMD_OPEN_SOURCE => Some("AMD_OPEN_SOURCE"), - Self::MESA_RADV => Some("MESA_RADV"), - Self::NVIDIA_PROPRIETARY => Some("NVIDIA_PROPRIETARY"), - Self::INTEL_PROPRIETARY_WINDOWS => Some("INTEL_PROPRIETARY_WINDOWS"), - Self::INTEL_OPEN_SOURCE_MESA => Some("INTEL_OPEN_SOURCE_MESA"), - Self::IMAGINATION_PROPRIETARY => Some("IMAGINATION_PROPRIETARY"), - Self::QUALCOMM_PROPRIETARY => Some("QUALCOMM_PROPRIETARY"), - Self::ARM_PROPRIETARY => Some("ARM_PROPRIETARY"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for SharingMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::EXCLUSIVE => Some("EXCLUSIVE"), - Self::CONCURRENT => Some("CONCURRENT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for TimeDomainEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::DEVICE => Some("DEVICE"), - Self::CLOCK_MONOTONIC => Some("CLOCK_MONOTONIC"), - Self::CLOCK_MONOTONIC_RAW => Some("CLOCK_MONOTONIC_RAW"), - Self::QUERY_PERFORMANCE_COUNTER => Some("QUERY_PERFORMANCE_COUNTER"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for SystemAllocationScope { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::COMMAND => Some("COMMAND"), - Self::OBJECT => Some("OBJECT"), - Self::CACHE => Some("CACHE"), - Self::DEVICE => Some("DEVICE"), - Self::INSTANCE => Some("INSTANCE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for QueueFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (QueueFlags::GRAPHICS.0, "GRAPHICS"), - (QueueFlags::COMPUTE.0, "COMPUTE"), - (QueueFlags::TRANSFER.0, "TRANSFER"), - (QueueFlags::SPARSE_BINDING.0, "SPARSE_BINDING"), - (QueueFlags::PROTECTED.0, "PROTECTED"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DynamicState { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::VIEWPORT => Some("VIEWPORT"), - Self::SCISSOR => Some("SCISSOR"), - Self::LINE_WIDTH => Some("LINE_WIDTH"), - Self::DEPTH_BIAS => Some("DEPTH_BIAS"), - Self::BLEND_CONSTANTS => Some("BLEND_CONSTANTS"), - Self::DEPTH_BOUNDS => Some("DEPTH_BOUNDS"), - Self::STENCIL_COMPARE_MASK => Some("STENCIL_COMPARE_MASK"), - Self::STENCIL_WRITE_MASK => Some("STENCIL_WRITE_MASK"), - Self::STENCIL_REFERENCE => Some("STENCIL_REFERENCE"), - Self::VIEWPORT_W_SCALING_NV => Some("VIEWPORT_W_SCALING_NV"), - Self::DISCARD_RECTANGLE_EXT => Some("DISCARD_RECTANGLE_EXT"), - Self::SAMPLE_LOCATIONS_EXT => Some("SAMPLE_LOCATIONS_EXT"), - Self::VIEWPORT_SHADING_RATE_PALETTE_NV => Some("VIEWPORT_SHADING_RATE_PALETTE_NV"), - Self::VIEWPORT_COARSE_SAMPLE_ORDER_NV => Some("VIEWPORT_COARSE_SAMPLE_ORDER_NV"), - Self::EXCLUSIVE_SCISSOR_NV => Some("EXCLUSIVE_SCISSOR_NV"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ImageTiling { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::OPTIMAL => Some("OPTIMAL"), - Self::LINEAR => Some("LINEAR"), - Self::DRM_FORMAT_MODIFIER_EXT => Some("DRM_FORMAT_MODIFIER_EXT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for PeerMemoryFeatureFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (PeerMemoryFeatureFlags::COPY_SRC.0, "COPY_SRC"), - (PeerMemoryFeatureFlags::COPY_DST.0, "COPY_DST"), - (PeerMemoryFeatureFlags::GENERIC_SRC.0, "GENERIC_SRC"), - (PeerMemoryFeatureFlags::GENERIC_DST.0, "GENERIC_DST"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for MemoryAllocateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(MemoryAllocateFlags::DEVICE_MASK.0, "DEVICE_MASK")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DeviceGroupPresentModeFlagsKHR { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (DeviceGroupPresentModeFlagsKHR::LOCAL.0, "LOCAL"), - (DeviceGroupPresentModeFlagsKHR::REMOTE.0, "REMOTE"), - (DeviceGroupPresentModeFlagsKHR::SUM.0, "SUM"), ( - DeviceGroupPresentModeFlagsKHR::LOCAL_MULTI_DEVICE.0, - "LOCAL_MULTI_DEVICE", + QueryPipelineStatisticFlags::GEOMETRY_SHADER_PRIMITIVES.0, + "GEOMETRY_SHADER_PRIMITIVES", + ), + ( + QueryPipelineStatisticFlags::CLIPPING_INVOCATIONS.0, + "CLIPPING_INVOCATIONS", + ), + ( + QueryPipelineStatisticFlags::CLIPPING_PRIMITIVES.0, + "CLIPPING_PRIMITIVES", + ), + ( + QueryPipelineStatisticFlags::FRAGMENT_SHADER_INVOCATIONS.0, + "FRAGMENT_SHADER_INVOCATIONS", + ), + ( + QueryPipelineStatisticFlags::TESSELLATION_CONTROL_SHADER_PATCHES.0, + "TESSELLATION_CONTROL_SHADER_PATCHES", + ), + ( + QueryPipelineStatisticFlags::TESSELLATION_EVALUATION_SHADER_INVOCATIONS.0, + "TESSELLATION_EVALUATION_SHADER_INVOCATIONS", + ), + ( + QueryPipelineStatisticFlags::COMPUTE_SHADER_INVOCATIONS.0, + "COMPUTE_SHADER_INVOCATIONS", ), ]; display_flags(f, KNOWN, self.0) @@ -51941,6 +51450,1556 @@ impl fmt::Display for SurfaceTransformFlagsKHR { display_flags(f, KNOWN, self.0) } } +impl fmt::Display for RenderPassCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = + &[(RenderPassCreateFlags::RESERVED_0_KHR.0, "RESERVED_0_KHR")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for MemoryPropertyFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (MemoryPropertyFlags::DEVICE_LOCAL.0, "DEVICE_LOCAL"), + (MemoryPropertyFlags::HOST_VISIBLE.0, "HOST_VISIBLE"), + (MemoryPropertyFlags::HOST_COHERENT.0, "HOST_COHERENT"), + (MemoryPropertyFlags::HOST_CACHED.0, "HOST_CACHED"), + (MemoryPropertyFlags::LAZILY_ALLOCATED.0, "LAZILY_ALLOCATED"), + (MemoryPropertyFlags::PROTECTED.0, "PROTECTED"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for CommandPoolCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (CommandPoolCreateFlags::TRANSIENT.0, "TRANSIENT"), + ( + CommandPoolCreateFlags::RESET_COMMAND_BUFFER.0, + "RESET_COMMAND_BUFFER", + ), + (CommandPoolCreateFlags::PROTECTED.0, "PROTECTED"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for AccelerationStructureTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::TOP_LEVEL => Some("TOP_LEVEL"), + Self::BOTTOM_LEVEL => Some("BOTTOM_LEVEL"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ImageType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::TYPE_1D => Some("TYPE_1D"), + Self::TYPE_2D => Some("TYPE_2D"), + Self::TYPE_3D => Some("TYPE_3D"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for QueryControlFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(QueryControlFlags::PRECISE.0, "PRECISE")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ImageCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (ImageCreateFlags::SPARSE_BINDING.0, "SPARSE_BINDING"), + (ImageCreateFlags::SPARSE_RESIDENCY.0, "SPARSE_RESIDENCY"), + (ImageCreateFlags::SPARSE_ALIASED.0, "SPARSE_ALIASED"), + (ImageCreateFlags::MUTABLE_FORMAT.0, "MUTABLE_FORMAT"), + (ImageCreateFlags::CUBE_COMPATIBLE.0, "CUBE_COMPATIBLE"), + (ImageCreateFlags::CORNER_SAMPLED_NV.0, "CORNER_SAMPLED_NV"), + ( + ImageCreateFlags::SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_EXT.0, + "SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_EXT", + ), + (ImageCreateFlags::RESERVED_14_EXT.0, "RESERVED_14_EXT"), + (ImageCreateFlags::ALIAS.0, "ALIAS"), + ( + ImageCreateFlags::SPLIT_INSTANCE_BIND_REGIONS.0, + "SPLIT_INSTANCE_BIND_REGIONS", + ), + ( + ImageCreateFlags::TYPE_2D_ARRAY_COMPATIBLE.0, + "TYPE_2D_ARRAY_COMPATIBLE", + ), + ( + ImageCreateFlags::BLOCK_TEXEL_VIEW_COMPATIBLE.0, + "BLOCK_TEXEL_VIEW_COMPATIBLE", + ), + (ImageCreateFlags::EXTENDED_USAGE.0, "EXTENDED_USAGE"), + (ImageCreateFlags::PROTECTED.0, "PROTECTED"), + (ImageCreateFlags::DISJOINT.0, "DISJOINT"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ObjectType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UNKNOWN => Some("UNKNOWN"), + Self::INSTANCE => Some("INSTANCE"), + Self::PHYSICAL_DEVICE => Some("PHYSICAL_DEVICE"), + Self::DEVICE => Some("DEVICE"), + Self::QUEUE => Some("QUEUE"), + Self::SEMAPHORE => Some("SEMAPHORE"), + Self::COMMAND_BUFFER => Some("COMMAND_BUFFER"), + Self::FENCE => Some("FENCE"), + Self::DEVICE_MEMORY => Some("DEVICE_MEMORY"), + Self::BUFFER => Some("BUFFER"), + Self::IMAGE => Some("IMAGE"), + Self::EVENT => Some("EVENT"), + Self::QUERY_POOL => Some("QUERY_POOL"), + Self::BUFFER_VIEW => Some("BUFFER_VIEW"), + Self::IMAGE_VIEW => Some("IMAGE_VIEW"), + Self::SHADER_MODULE => Some("SHADER_MODULE"), + Self::PIPELINE_CACHE => Some("PIPELINE_CACHE"), + Self::PIPELINE_LAYOUT => Some("PIPELINE_LAYOUT"), + Self::RENDER_PASS => Some("RENDER_PASS"), + Self::PIPELINE => Some("PIPELINE"), + Self::DESCRIPTOR_SET_LAYOUT => Some("DESCRIPTOR_SET_LAYOUT"), + Self::SAMPLER => Some("SAMPLER"), + Self::DESCRIPTOR_POOL => Some("DESCRIPTOR_POOL"), + Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), + Self::FRAMEBUFFER => Some("FRAMEBUFFER"), + Self::COMMAND_POOL => Some("COMMAND_POOL"), + Self::SURFACE_KHR => Some("SURFACE_KHR"), + Self::SWAPCHAIN_KHR => Some("SWAPCHAIN_KHR"), + Self::DISPLAY_KHR => Some("DISPLAY_KHR"), + Self::DISPLAY_MODE_KHR => Some("DISPLAY_MODE_KHR"), + Self::DEBUG_REPORT_CALLBACK_EXT => Some("DEBUG_REPORT_CALLBACK_EXT"), + Self::OBJECT_TABLE_NVX => Some("OBJECT_TABLE_NVX"), + Self::INDIRECT_COMMANDS_LAYOUT_NVX => Some("INDIRECT_COMMANDS_LAYOUT_NVX"), + Self::DEBUG_UTILS_MESSENGER_EXT => Some("DEBUG_UTILS_MESSENGER_EXT"), + Self::VALIDATION_CACHE_EXT => Some("VALIDATION_CACHE_EXT"), + Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"), + Self::SAMPLER_YCBCR_CONVERSION => Some("SAMPLER_YCBCR_CONVERSION"), + Self::DESCRIPTOR_UPDATE_TEMPLATE => Some("DESCRIPTOR_UPDATE_TEMPLATE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for QueryType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::OCCLUSION => Some("OCCLUSION"), + Self::PIPELINE_STATISTICS => Some("PIPELINE_STATISTICS"), + Self::TIMESTAMP => Some("TIMESTAMP"), + Self::TRANSFORM_FEEDBACK_STREAM_EXT => Some("TRANSFORM_FEEDBACK_STREAM_EXT"), + Self::ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV => { + Some("ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV") + } + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for TessellationDomainOrigin { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UPPER_LEFT => Some("UPPER_LEFT"), + Self::LOWER_LEFT => Some("LOWER_LEFT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DescriptorSetLayoutCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + DescriptorSetLayoutCreateFlags::PUSH_DESCRIPTOR_KHR.0, + "PUSH_DESCRIPTOR_KHR", + ), + ( + DescriptorSetLayoutCreateFlags::UPDATE_AFTER_BIND_POOL_EXT.0, + "UPDATE_AFTER_BIND_POOL_EXT", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SamplerReductionModeEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::WEIGHTED_AVERAGE => Some("WEIGHTED_AVERAGE"), + Self::MIN => Some("MIN"), + Self::MAX => Some("MAX"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ValidationCacheHeaderVersionEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::ONE => Some("ONE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ComponentSwizzle { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::IDENTITY => Some("IDENTITY"), + Self::ZERO => Some("ZERO"), + Self::ONE => Some("ONE"), + Self::R => Some("R"), + Self::G => Some("G"), + Self::B => Some("B"), + Self::A => Some("A"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for BlendOverlapEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UNCORRELATED => Some("UNCORRELATED"), + Self::DISJOINT => Some("DISJOINT"), + Self::CONJOINT => Some("CONJOINT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for VendorId { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::VIV => Some("VIV"), + Self::VSI => Some("VSI"), + Self::KAZAN => Some("KAZAN"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for PipelineCacheHeaderVersion { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::ONE => Some("ONE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for MemoryOverallocationBehaviorAMD { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::DEFAULT => Some("DEFAULT"), + Self::ALLOWED => Some("ALLOWED"), + Self::DISALLOWED => Some("DISALLOWED"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for SamplerMipmapMode { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::NEAREST => Some("NEAREST"), + Self::LINEAR => Some("LINEAR"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DisplayPlaneAlphaFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (DisplayPlaneAlphaFlagsKHR::OPAQUE.0, "OPAQUE"), + (DisplayPlaneAlphaFlagsKHR::GLOBAL.0, "GLOBAL"), + (DisplayPlaneAlphaFlagsKHR::PER_PIXEL.0, "PER_PIXEL"), + ( + DisplayPlaneAlphaFlagsKHR::PER_PIXEL_PREMULTIPLIED.0, + "PER_PIXEL_PREMULTIPLIED", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ExternalMemoryHandleTypeFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN : & [ ( Flags , & str ) ] = & [ ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_ANDROID . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_ANDROID" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY" ) ] ; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SubpassContents { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::INLINE => Some("INLINE"), + Self::SECONDARY_COMMAND_BUFFERS => Some("SECONDARY_COMMAND_BUFFERS"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for SamplerYcbcrRange { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::ITU_FULL => Some("ITU_FULL"), + Self::ITU_NARROW => Some("ITU_NARROW"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ViewportCoordinateSwizzleNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::POSITIVE_X => Some("POSITIVE_X"), + Self::NEGATIVE_X => Some("NEGATIVE_X"), + Self::POSITIVE_Y => Some("POSITIVE_Y"), + Self::NEGATIVE_Y => Some("NEGATIVE_Y"), + Self::POSITIVE_Z => Some("POSITIVE_Z"), + Self::NEGATIVE_Z => Some("NEGATIVE_Z"), + Self::POSITIVE_W => Some("POSITIVE_W"), + Self::NEGATIVE_W => Some("NEGATIVE_W"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DependencyFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (DependencyFlags::BY_REGION.0, "BY_REGION"), + (DependencyFlags::DEVICE_GROUP.0, "DEVICE_GROUP"), + (DependencyFlags::VIEW_LOCAL.0, "VIEW_LOCAL"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SparseMemoryBindFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(SparseMemoryBindFlags::METADATA.0, "METADATA")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DeviceQueueCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(DeviceQueueCreateFlags::PROTECTED.0, "PROTECTED")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for PhysicalDeviceType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::OTHER => Some("OTHER"), + Self::INTEGRATED_GPU => Some("INTEGRATED_GPU"), + Self::DISCRETE_GPU => Some("DISCRETE_GPU"), + Self::VIRTUAL_GPU => Some("VIRTUAL_GPU"), + Self::CPU => Some("CPU"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for BufferUsageFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (BufferUsageFlags::TRANSFER_SRC.0, "TRANSFER_SRC"), + (BufferUsageFlags::TRANSFER_DST.0, "TRANSFER_DST"), + ( + BufferUsageFlags::UNIFORM_TEXEL_BUFFER.0, + "UNIFORM_TEXEL_BUFFER", + ), + ( + BufferUsageFlags::STORAGE_TEXEL_BUFFER.0, + "STORAGE_TEXEL_BUFFER", + ), + (BufferUsageFlags::UNIFORM_BUFFER.0, "UNIFORM_BUFFER"), + (BufferUsageFlags::STORAGE_BUFFER.0, "STORAGE_BUFFER"), + (BufferUsageFlags::INDEX_BUFFER.0, "INDEX_BUFFER"), + (BufferUsageFlags::VERTEX_BUFFER.0, "VERTEX_BUFFER"), + (BufferUsageFlags::INDIRECT_BUFFER.0, "INDIRECT_BUFFER"), + ( + BufferUsageFlags::TRANSFORM_FEEDBACK_BUFFER_EXT.0, + "TRANSFORM_FEEDBACK_BUFFER_EXT", + ), + ( + BufferUsageFlags::TRANSFORM_FEEDBACK_COUNTER_BUFFER_EXT.0, + "TRANSFORM_FEEDBACK_COUNTER_BUFFER_EXT", + ), + ( + BufferUsageFlags::CONDITIONAL_RENDERING_EXT.0, + "CONDITIONAL_RENDERING_EXT", + ), + (BufferUsageFlags::RAY_TRACING_NV.0, "RAY_TRACING_NV"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ShaderInfoTypeAMD { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::STATISTICS => Some("STATISTICS"), + Self::BINARY => Some("BINARY"), + Self::DISASSEMBLY => Some("DISASSEMBLY"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DriverIdKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::AMD_PROPRIETARY => Some("AMD_PROPRIETARY"), + Self::AMD_OPEN_SOURCE => Some("AMD_OPEN_SOURCE"), + Self::MESA_RADV => Some("MESA_RADV"), + Self::NVIDIA_PROPRIETARY => Some("NVIDIA_PROPRIETARY"), + Self::INTEL_PROPRIETARY_WINDOWS => Some("INTEL_PROPRIETARY_WINDOWS"), + Self::INTEL_OPEN_SOURCE_MESA => Some("INTEL_OPEN_SOURCE_MESA"), + Self::IMAGINATION_PROPRIETARY => Some("IMAGINATION_PROPRIETARY"), + Self::QUALCOMM_PROPRIETARY => Some("QUALCOMM_PROPRIETARY"), + Self::ARM_PROPRIETARY => Some("ARM_PROPRIETARY"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for PeerMemoryFeatureFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (PeerMemoryFeatureFlags::COPY_SRC.0, "COPY_SRC"), + (PeerMemoryFeatureFlags::COPY_DST.0, "COPY_DST"), + (PeerMemoryFeatureFlags::GENERIC_SRC.0, "GENERIC_SRC"), + (PeerMemoryFeatureFlags::GENERIC_DST.0, "GENERIC_DST"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for CommandBufferResetFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[( + CommandBufferResetFlags::RELEASE_RESOURCES.0, + "RELEASE_RESOURCES", + )]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SurfaceCounterFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(SurfaceCounterFlagsEXT::VBLANK.0, "VBLANK")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DisplayEventTypeEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::FIRST_PIXEL_OUT => Some("FIRST_PIXEL_OUT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DescriptorUpdateTemplateType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for CoarseSampleOrderTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::DEFAULT => Some("DEFAULT"), + Self::CUSTOM => Some("CUSTOM"), + Self::PIXEL_MAJOR => Some("PIXEL_MAJOR"), + Self::SAMPLE_MAJOR => Some("SAMPLE_MAJOR"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for PrimitiveTopology { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::POINT_LIST => Some("POINT_LIST"), + Self::LINE_LIST => Some("LINE_LIST"), + Self::LINE_STRIP => Some("LINE_STRIP"), + Self::TRIANGLE_LIST => Some("TRIANGLE_LIST"), + Self::TRIANGLE_STRIP => Some("TRIANGLE_STRIP"), + Self::TRIANGLE_FAN => Some("TRIANGLE_FAN"), + Self::LINE_LIST_WITH_ADJACENCY => Some("LINE_LIST_WITH_ADJACENCY"), + Self::LINE_STRIP_WITH_ADJACENCY => Some("LINE_STRIP_WITH_ADJACENCY"), + Self::TRIANGLE_LIST_WITH_ADJACENCY => Some("TRIANGLE_LIST_WITH_ADJACENCY"), + Self::TRIANGLE_STRIP_WITH_ADJACENCY => Some("TRIANGLE_STRIP_WITH_ADJACENCY"), + Self::PATCH_LIST => Some("PATCH_LIST"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for RasterizationOrderAMD { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::STRICT => Some("STRICT"), + Self::RELAXED => Some("RELAXED"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for SwapchainCreateFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + SwapchainCreateFlagsKHR::SPLIT_INSTANCE_BIND_REGIONS.0, + "SPLIT_INSTANCE_BIND_REGIONS", + ), + (SwapchainCreateFlagsKHR::PROTECTED.0, "PROTECTED"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SystemAllocationScope { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::COMMAND => Some("COMMAND"), + Self::OBJECT => Some("OBJECT"), + Self::CACHE => Some("CACHE"), + Self::DEVICE => Some("DEVICE"), + Self::INSTANCE => Some("INSTANCE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for IndirectCommandsTokenTypeNVX { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::PIPELINE => Some("PIPELINE"), + Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), + Self::INDEX_BUFFER => Some("INDEX_BUFFER"), + Self::VERTEX_BUFFER => Some("VERTEX_BUFFER"), + Self::PUSH_CONSTANT => Some("PUSH_CONSTANT"), + Self::DRAW_INDEXED => Some("DRAW_INDEXED"), + Self::DRAW => Some("DRAW"), + Self::DISPATCH => Some("DISPATCH"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ObjectEntryTypeNVX { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), + Self::PIPELINE => Some("PIPELINE"), + Self::INDEX_BUFFER => Some("INDEX_BUFFER"), + Self::VERTEX_BUFFER => Some("VERTEX_BUFFER"), + Self::PUSH_CONSTANT => Some("PUSH_CONSTANT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for PipelineBindPoint { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::GRAPHICS => Some("GRAPHICS"), + Self::COMPUTE => Some("COMPUTE"), + Self::RAY_TRACING_NV => Some("RAY_TRACING_NV"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ExternalMemoryFeatureFlagsNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + ExternalMemoryFeatureFlagsNV::EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_NV.0, + "EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_NV", + ), + ( + ExternalMemoryFeatureFlagsNV::EXTERNAL_MEMORY_FEATURE_EXPORTABLE_NV.0, + "EXTERNAL_MEMORY_FEATURE_EXPORTABLE_NV", + ), + ( + ExternalMemoryFeatureFlagsNV::EXTERNAL_MEMORY_FEATURE_IMPORTABLE_NV.0, + "EXTERNAL_MEMORY_FEATURE_IMPORTABLE_NV", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for RayTracingShaderGroupTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::GENERAL => Some("GENERAL"), + Self::TRIANGLES_HIT_GROUP => Some("TRIANGLES_HIT_GROUP"), + Self::PROCEDURAL_HIT_GROUP => Some("PROCEDURAL_HIT_GROUP"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for CommandPoolResetFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[( + CommandPoolResetFlags::RELEASE_RESOURCES.0, + "RELEASE_RESOURCES", + )]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SampleCountFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (SampleCountFlags::TYPE_1.0, "TYPE_1"), + (SampleCountFlags::TYPE_2.0, "TYPE_2"), + (SampleCountFlags::TYPE_4.0, "TYPE_4"), + (SampleCountFlags::TYPE_8.0, "TYPE_8"), + (SampleCountFlags::TYPE_16.0, "TYPE_16"), + (SampleCountFlags::TYPE_32.0, "TYPE_32"), + (SampleCountFlags::TYPE_64.0, "TYPE_64"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for PresentModeKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::IMMEDIATE => Some("IMMEDIATE"), + Self::MAILBOX => Some("MAILBOX"), + Self::FIFO => Some("FIFO"), + Self::FIFO_RELAXED => Some("FIFO_RELAXED"), + Self::SHARED_DEMAND_REFRESH => Some("SHARED_DEMAND_REFRESH"), + Self::SHARED_CONTINUOUS_REFRESH => Some("SHARED_CONTINUOUS_REFRESH"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ExternalSemaphoreFeatureFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + ExternalSemaphoreFeatureFlags::EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE.0, + "EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE", + ), + ( + ExternalSemaphoreFeatureFlags::EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE.0, + "EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for VertexInputRate { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::VERTEX => Some("VERTEX"), + Self::INSTANCE => Some("INSTANCE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for SamplerYcbcrModelConversion { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::RGB_IDENTITY => Some("RGB_IDENTITY"), + Self::YCBCR_IDENTITY => Some("YCBCR_IDENTITY"), + Self::YCBCR_709 => Some("YCBCR_709"), + Self::YCBCR_601 => Some("YCBCR_601"), + Self::YCBCR_2020 => Some("YCBCR_2020"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for PipelineCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + PipelineCreateFlags::DISABLE_OPTIMIZATION.0, + "DISABLE_OPTIMIZATION", + ), + ( + PipelineCreateFlags::ALLOW_DERIVATIVES.0, + "ALLOW_DERIVATIVES", + ), + (PipelineCreateFlags::DERIVATIVE.0, "DERIVATIVE"), + (PipelineCreateFlags::DEFER_COMPILE_NV.0, "DEFER_COMPILE_NV"), + ( + PipelineCreateFlags::VIEW_INDEX_FROM_DEVICE_INDEX.0, + "VIEW_INDEX_FROM_DEVICE_INDEX", + ), + (PipelineCreateFlags::DISPATCH_BASE.0, "DISPATCH_BASE"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for StencilFaceFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (StencilFaceFlags::FRONT.0, "FRONT"), + (StencilFaceFlags::BACK.0, "BACK"), + ( + StencilFaceFlags::STENCIL_FRONT_AND_BACK.0, + "STENCIL_FRONT_AND_BACK", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for IndirectCommandsLayoutUsageFlagsNVX { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + IndirectCommandsLayoutUsageFlagsNVX::UNORDERED_SEQUENCES.0, + "UNORDERED_SEQUENCES", + ), + ( + IndirectCommandsLayoutUsageFlagsNVX::SPARSE_SEQUENCES.0, + "SPARSE_SEQUENCES", + ), + ( + IndirectCommandsLayoutUsageFlagsNVX::EMPTY_EXECUTIONS.0, + "EMPTY_EXECUTIONS", + ), + ( + IndirectCommandsLayoutUsageFlagsNVX::INDEXED_SEQUENCES.0, + "INDEXED_SEQUENCES", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ExternalFenceHandleTypeFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD.0, + "EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD", + ), + ( + ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32.0, + "EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32", + ), + ( + ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT.0, + "EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT", + ), + ( + ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD.0, + "EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SparseImageFormatFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (SparseImageFormatFlags::SINGLE_MIPTAIL.0, "SINGLE_MIPTAIL"), + ( + SparseImageFormatFlags::ALIGNED_MIP_SIZE.0, + "ALIGNED_MIP_SIZE", + ), + ( + SparseImageFormatFlags::NONSTANDARD_BLOCK_SIZE.0, + "NONSTANDARD_BLOCK_SIZE", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DescriptorPoolCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + DescriptorPoolCreateFlags::FREE_DESCRIPTOR_SET.0, + "FREE_DESCRIPTOR_SET", + ), + ( + DescriptorPoolCreateFlags::UPDATE_AFTER_BIND_EXT.0, + "UPDATE_AFTER_BIND_EXT", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DebugUtilsMessageTypeFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (DebugUtilsMessageTypeFlagsEXT::GENERAL.0, "GENERAL"), + (DebugUtilsMessageTypeFlagsEXT::VALIDATION.0, "VALIDATION"), + (DebugUtilsMessageTypeFlagsEXT::PERFORMANCE.0, "PERFORMANCE"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SemaphoreImportFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(SemaphoreImportFlags::TEMPORARY.0, "TEMPORARY")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ColorComponentFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (ColorComponentFlags::R.0, "R"), + (ColorComponentFlags::G.0, "G"), + (ColorComponentFlags::B.0, "B"), + (ColorComponentFlags::A.0, "A"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for Format { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UNDEFINED => Some("UNDEFINED"), + Self::R4G4_UNORM_PACK8 => Some("R4G4_UNORM_PACK8"), + Self::R4G4B4A4_UNORM_PACK16 => Some("R4G4B4A4_UNORM_PACK16"), + Self::B4G4R4A4_UNORM_PACK16 => Some("B4G4R4A4_UNORM_PACK16"), + Self::R5G6B5_UNORM_PACK16 => Some("R5G6B5_UNORM_PACK16"), + Self::B5G6R5_UNORM_PACK16 => Some("B5G6R5_UNORM_PACK16"), + Self::R5G5B5A1_UNORM_PACK16 => Some("R5G5B5A1_UNORM_PACK16"), + Self::B5G5R5A1_UNORM_PACK16 => Some("B5G5R5A1_UNORM_PACK16"), + Self::A1R5G5B5_UNORM_PACK16 => Some("A1R5G5B5_UNORM_PACK16"), + Self::R8_UNORM => Some("R8_UNORM"), + Self::R8_SNORM => Some("R8_SNORM"), + Self::R8_USCALED => Some("R8_USCALED"), + Self::R8_SSCALED => Some("R8_SSCALED"), + Self::R8_UINT => Some("R8_UINT"), + Self::R8_SINT => Some("R8_SINT"), + Self::R8_SRGB => Some("R8_SRGB"), + Self::R8G8_UNORM => Some("R8G8_UNORM"), + Self::R8G8_SNORM => Some("R8G8_SNORM"), + Self::R8G8_USCALED => Some("R8G8_USCALED"), + Self::R8G8_SSCALED => Some("R8G8_SSCALED"), + Self::R8G8_UINT => Some("R8G8_UINT"), + Self::R8G8_SINT => Some("R8G8_SINT"), + Self::R8G8_SRGB => Some("R8G8_SRGB"), + Self::R8G8B8_UNORM => Some("R8G8B8_UNORM"), + Self::R8G8B8_SNORM => Some("R8G8B8_SNORM"), + Self::R8G8B8_USCALED => Some("R8G8B8_USCALED"), + Self::R8G8B8_SSCALED => Some("R8G8B8_SSCALED"), + Self::R8G8B8_UINT => Some("R8G8B8_UINT"), + Self::R8G8B8_SINT => Some("R8G8B8_SINT"), + Self::R8G8B8_SRGB => Some("R8G8B8_SRGB"), + Self::B8G8R8_UNORM => Some("B8G8R8_UNORM"), + Self::B8G8R8_SNORM => Some("B8G8R8_SNORM"), + Self::B8G8R8_USCALED => Some("B8G8R8_USCALED"), + Self::B8G8R8_SSCALED => Some("B8G8R8_SSCALED"), + Self::B8G8R8_UINT => Some("B8G8R8_UINT"), + Self::B8G8R8_SINT => Some("B8G8R8_SINT"), + Self::B8G8R8_SRGB => Some("B8G8R8_SRGB"), + Self::R8G8B8A8_UNORM => Some("R8G8B8A8_UNORM"), + Self::R8G8B8A8_SNORM => Some("R8G8B8A8_SNORM"), + Self::R8G8B8A8_USCALED => Some("R8G8B8A8_USCALED"), + Self::R8G8B8A8_SSCALED => Some("R8G8B8A8_SSCALED"), + Self::R8G8B8A8_UINT => Some("R8G8B8A8_UINT"), + Self::R8G8B8A8_SINT => Some("R8G8B8A8_SINT"), + Self::R8G8B8A8_SRGB => Some("R8G8B8A8_SRGB"), + Self::B8G8R8A8_UNORM => Some("B8G8R8A8_UNORM"), + Self::B8G8R8A8_SNORM => Some("B8G8R8A8_SNORM"), + Self::B8G8R8A8_USCALED => Some("B8G8R8A8_USCALED"), + Self::B8G8R8A8_SSCALED => Some("B8G8R8A8_SSCALED"), + Self::B8G8R8A8_UINT => Some("B8G8R8A8_UINT"), + Self::B8G8R8A8_SINT => Some("B8G8R8A8_SINT"), + Self::B8G8R8A8_SRGB => Some("B8G8R8A8_SRGB"), + Self::A8B8G8R8_UNORM_PACK32 => Some("A8B8G8R8_UNORM_PACK32"), + Self::A8B8G8R8_SNORM_PACK32 => Some("A8B8G8R8_SNORM_PACK32"), + Self::A8B8G8R8_USCALED_PACK32 => Some("A8B8G8R8_USCALED_PACK32"), + Self::A8B8G8R8_SSCALED_PACK32 => Some("A8B8G8R8_SSCALED_PACK32"), + Self::A8B8G8R8_UINT_PACK32 => Some("A8B8G8R8_UINT_PACK32"), + Self::A8B8G8R8_SINT_PACK32 => Some("A8B8G8R8_SINT_PACK32"), + Self::A8B8G8R8_SRGB_PACK32 => Some("A8B8G8R8_SRGB_PACK32"), + Self::A2R10G10B10_UNORM_PACK32 => Some("A2R10G10B10_UNORM_PACK32"), + Self::A2R10G10B10_SNORM_PACK32 => Some("A2R10G10B10_SNORM_PACK32"), + Self::A2R10G10B10_USCALED_PACK32 => Some("A2R10G10B10_USCALED_PACK32"), + Self::A2R10G10B10_SSCALED_PACK32 => Some("A2R10G10B10_SSCALED_PACK32"), + Self::A2R10G10B10_UINT_PACK32 => Some("A2R10G10B10_UINT_PACK32"), + Self::A2R10G10B10_SINT_PACK32 => Some("A2R10G10B10_SINT_PACK32"), + Self::A2B10G10R10_UNORM_PACK32 => Some("A2B10G10R10_UNORM_PACK32"), + Self::A2B10G10R10_SNORM_PACK32 => Some("A2B10G10R10_SNORM_PACK32"), + Self::A2B10G10R10_USCALED_PACK32 => Some("A2B10G10R10_USCALED_PACK32"), + Self::A2B10G10R10_SSCALED_PACK32 => Some("A2B10G10R10_SSCALED_PACK32"), + Self::A2B10G10R10_UINT_PACK32 => Some("A2B10G10R10_UINT_PACK32"), + Self::A2B10G10R10_SINT_PACK32 => Some("A2B10G10R10_SINT_PACK32"), + Self::R16_UNORM => Some("R16_UNORM"), + Self::R16_SNORM => Some("R16_SNORM"), + Self::R16_USCALED => Some("R16_USCALED"), + Self::R16_SSCALED => Some("R16_SSCALED"), + Self::R16_UINT => Some("R16_UINT"), + Self::R16_SINT => Some("R16_SINT"), + Self::R16_SFLOAT => Some("R16_SFLOAT"), + Self::R16G16_UNORM => Some("R16G16_UNORM"), + Self::R16G16_SNORM => Some("R16G16_SNORM"), + Self::R16G16_USCALED => Some("R16G16_USCALED"), + Self::R16G16_SSCALED => Some("R16G16_SSCALED"), + Self::R16G16_UINT => Some("R16G16_UINT"), + Self::R16G16_SINT => Some("R16G16_SINT"), + Self::R16G16_SFLOAT => Some("R16G16_SFLOAT"), + Self::R16G16B16_UNORM => Some("R16G16B16_UNORM"), + Self::R16G16B16_SNORM => Some("R16G16B16_SNORM"), + Self::R16G16B16_USCALED => Some("R16G16B16_USCALED"), + Self::R16G16B16_SSCALED => Some("R16G16B16_SSCALED"), + Self::R16G16B16_UINT => Some("R16G16B16_UINT"), + Self::R16G16B16_SINT => Some("R16G16B16_SINT"), + Self::R16G16B16_SFLOAT => Some("R16G16B16_SFLOAT"), + Self::R16G16B16A16_UNORM => Some("R16G16B16A16_UNORM"), + Self::R16G16B16A16_SNORM => Some("R16G16B16A16_SNORM"), + Self::R16G16B16A16_USCALED => Some("R16G16B16A16_USCALED"), + Self::R16G16B16A16_SSCALED => Some("R16G16B16A16_SSCALED"), + Self::R16G16B16A16_UINT => Some("R16G16B16A16_UINT"), + Self::R16G16B16A16_SINT => Some("R16G16B16A16_SINT"), + Self::R16G16B16A16_SFLOAT => Some("R16G16B16A16_SFLOAT"), + Self::R32_UINT => Some("R32_UINT"), + Self::R32_SINT => Some("R32_SINT"), + Self::R32_SFLOAT => Some("R32_SFLOAT"), + Self::R32G32_UINT => Some("R32G32_UINT"), + Self::R32G32_SINT => Some("R32G32_SINT"), + Self::R32G32_SFLOAT => Some("R32G32_SFLOAT"), + Self::R32G32B32_UINT => Some("R32G32B32_UINT"), + Self::R32G32B32_SINT => Some("R32G32B32_SINT"), + Self::R32G32B32_SFLOAT => Some("R32G32B32_SFLOAT"), + Self::R32G32B32A32_UINT => Some("R32G32B32A32_UINT"), + Self::R32G32B32A32_SINT => Some("R32G32B32A32_SINT"), + Self::R32G32B32A32_SFLOAT => Some("R32G32B32A32_SFLOAT"), + Self::R64_UINT => Some("R64_UINT"), + Self::R64_SINT => Some("R64_SINT"), + Self::R64_SFLOAT => Some("R64_SFLOAT"), + Self::R64G64_UINT => Some("R64G64_UINT"), + Self::R64G64_SINT => Some("R64G64_SINT"), + Self::R64G64_SFLOAT => Some("R64G64_SFLOAT"), + Self::R64G64B64_UINT => Some("R64G64B64_UINT"), + Self::R64G64B64_SINT => Some("R64G64B64_SINT"), + Self::R64G64B64_SFLOAT => Some("R64G64B64_SFLOAT"), + Self::R64G64B64A64_UINT => Some("R64G64B64A64_UINT"), + Self::R64G64B64A64_SINT => Some("R64G64B64A64_SINT"), + Self::R64G64B64A64_SFLOAT => Some("R64G64B64A64_SFLOAT"), + Self::B10G11R11_UFLOAT_PACK32 => Some("B10G11R11_UFLOAT_PACK32"), + Self::E5B9G9R9_UFLOAT_PACK32 => Some("E5B9G9R9_UFLOAT_PACK32"), + Self::D16_UNORM => Some("D16_UNORM"), + Self::X8_D24_UNORM_PACK32 => Some("X8_D24_UNORM_PACK32"), + Self::D32_SFLOAT => Some("D32_SFLOAT"), + Self::S8_UINT => Some("S8_UINT"), + Self::D16_UNORM_S8_UINT => Some("D16_UNORM_S8_UINT"), + Self::D24_UNORM_S8_UINT => Some("D24_UNORM_S8_UINT"), + Self::D32_SFLOAT_S8_UINT => Some("D32_SFLOAT_S8_UINT"), + Self::BC1_RGB_UNORM_BLOCK => Some("BC1_RGB_UNORM_BLOCK"), + Self::BC1_RGB_SRGB_BLOCK => Some("BC1_RGB_SRGB_BLOCK"), + Self::BC1_RGBA_UNORM_BLOCK => Some("BC1_RGBA_UNORM_BLOCK"), + Self::BC1_RGBA_SRGB_BLOCK => Some("BC1_RGBA_SRGB_BLOCK"), + Self::BC2_UNORM_BLOCK => Some("BC2_UNORM_BLOCK"), + Self::BC2_SRGB_BLOCK => Some("BC2_SRGB_BLOCK"), + Self::BC3_UNORM_BLOCK => Some("BC3_UNORM_BLOCK"), + Self::BC3_SRGB_BLOCK => Some("BC3_SRGB_BLOCK"), + Self::BC4_UNORM_BLOCK => Some("BC4_UNORM_BLOCK"), + Self::BC4_SNORM_BLOCK => Some("BC4_SNORM_BLOCK"), + Self::BC5_UNORM_BLOCK => Some("BC5_UNORM_BLOCK"), + Self::BC5_SNORM_BLOCK => Some("BC5_SNORM_BLOCK"), + Self::BC6H_UFLOAT_BLOCK => Some("BC6H_UFLOAT_BLOCK"), + Self::BC6H_SFLOAT_BLOCK => Some("BC6H_SFLOAT_BLOCK"), + Self::BC7_UNORM_BLOCK => Some("BC7_UNORM_BLOCK"), + Self::BC7_SRGB_BLOCK => Some("BC7_SRGB_BLOCK"), + Self::ETC2_R8G8B8_UNORM_BLOCK => Some("ETC2_R8G8B8_UNORM_BLOCK"), + Self::ETC2_R8G8B8_SRGB_BLOCK => Some("ETC2_R8G8B8_SRGB_BLOCK"), + Self::ETC2_R8G8B8A1_UNORM_BLOCK => Some("ETC2_R8G8B8A1_UNORM_BLOCK"), + Self::ETC2_R8G8B8A1_SRGB_BLOCK => Some("ETC2_R8G8B8A1_SRGB_BLOCK"), + Self::ETC2_R8G8B8A8_UNORM_BLOCK => Some("ETC2_R8G8B8A8_UNORM_BLOCK"), + Self::ETC2_R8G8B8A8_SRGB_BLOCK => Some("ETC2_R8G8B8A8_SRGB_BLOCK"), + Self::EAC_R11_UNORM_BLOCK => Some("EAC_R11_UNORM_BLOCK"), + Self::EAC_R11_SNORM_BLOCK => Some("EAC_R11_SNORM_BLOCK"), + Self::EAC_R11G11_UNORM_BLOCK => Some("EAC_R11G11_UNORM_BLOCK"), + Self::EAC_R11G11_SNORM_BLOCK => Some("EAC_R11G11_SNORM_BLOCK"), + Self::ASTC_4X4_UNORM_BLOCK => Some("ASTC_4X4_UNORM_BLOCK"), + Self::ASTC_4X4_SRGB_BLOCK => Some("ASTC_4X4_SRGB_BLOCK"), + Self::ASTC_5X4_UNORM_BLOCK => Some("ASTC_5X4_UNORM_BLOCK"), + Self::ASTC_5X4_SRGB_BLOCK => Some("ASTC_5X4_SRGB_BLOCK"), + Self::ASTC_5X5_UNORM_BLOCK => Some("ASTC_5X5_UNORM_BLOCK"), + Self::ASTC_5X5_SRGB_BLOCK => Some("ASTC_5X5_SRGB_BLOCK"), + Self::ASTC_6X5_UNORM_BLOCK => Some("ASTC_6X5_UNORM_BLOCK"), + Self::ASTC_6X5_SRGB_BLOCK => Some("ASTC_6X5_SRGB_BLOCK"), + Self::ASTC_6X6_UNORM_BLOCK => Some("ASTC_6X6_UNORM_BLOCK"), + Self::ASTC_6X6_SRGB_BLOCK => Some("ASTC_6X6_SRGB_BLOCK"), + Self::ASTC_8X5_UNORM_BLOCK => Some("ASTC_8X5_UNORM_BLOCK"), + Self::ASTC_8X5_SRGB_BLOCK => Some("ASTC_8X5_SRGB_BLOCK"), + Self::ASTC_8X6_UNORM_BLOCK => Some("ASTC_8X6_UNORM_BLOCK"), + Self::ASTC_8X6_SRGB_BLOCK => Some("ASTC_8X6_SRGB_BLOCK"), + Self::ASTC_8X8_UNORM_BLOCK => Some("ASTC_8X8_UNORM_BLOCK"), + Self::ASTC_8X8_SRGB_BLOCK => Some("ASTC_8X8_SRGB_BLOCK"), + Self::ASTC_10X5_UNORM_BLOCK => Some("ASTC_10X5_UNORM_BLOCK"), + Self::ASTC_10X5_SRGB_BLOCK => Some("ASTC_10X5_SRGB_BLOCK"), + Self::ASTC_10X6_UNORM_BLOCK => Some("ASTC_10X6_UNORM_BLOCK"), + Self::ASTC_10X6_SRGB_BLOCK => Some("ASTC_10X6_SRGB_BLOCK"), + Self::ASTC_10X8_UNORM_BLOCK => Some("ASTC_10X8_UNORM_BLOCK"), + Self::ASTC_10X8_SRGB_BLOCK => Some("ASTC_10X8_SRGB_BLOCK"), + Self::ASTC_10X10_UNORM_BLOCK => Some("ASTC_10X10_UNORM_BLOCK"), + Self::ASTC_10X10_SRGB_BLOCK => Some("ASTC_10X10_SRGB_BLOCK"), + Self::ASTC_12X10_UNORM_BLOCK => Some("ASTC_12X10_UNORM_BLOCK"), + Self::ASTC_12X10_SRGB_BLOCK => Some("ASTC_12X10_SRGB_BLOCK"), + Self::ASTC_12X12_UNORM_BLOCK => Some("ASTC_12X12_UNORM_BLOCK"), + Self::ASTC_12X12_SRGB_BLOCK => Some("ASTC_12X12_SRGB_BLOCK"), + Self::PVRTC1_2BPP_UNORM_BLOCK_IMG => Some("PVRTC1_2BPP_UNORM_BLOCK_IMG"), + Self::PVRTC1_4BPP_UNORM_BLOCK_IMG => Some("PVRTC1_4BPP_UNORM_BLOCK_IMG"), + Self::PVRTC2_2BPP_UNORM_BLOCK_IMG => Some("PVRTC2_2BPP_UNORM_BLOCK_IMG"), + Self::PVRTC2_4BPP_UNORM_BLOCK_IMG => Some("PVRTC2_4BPP_UNORM_BLOCK_IMG"), + Self::PVRTC1_2BPP_SRGB_BLOCK_IMG => Some("PVRTC1_2BPP_SRGB_BLOCK_IMG"), + Self::PVRTC1_4BPP_SRGB_BLOCK_IMG => Some("PVRTC1_4BPP_SRGB_BLOCK_IMG"), + Self::PVRTC2_2BPP_SRGB_BLOCK_IMG => Some("PVRTC2_2BPP_SRGB_BLOCK_IMG"), + Self::PVRTC2_4BPP_SRGB_BLOCK_IMG => Some("PVRTC2_4BPP_SRGB_BLOCK_IMG"), + Self::G8B8G8R8_422_UNORM => Some("G8B8G8R8_422_UNORM"), + Self::B8G8R8G8_422_UNORM => Some("B8G8R8G8_422_UNORM"), + Self::G8_B8_R8_3PLANE_420_UNORM => Some("G8_B8_R8_3PLANE_420_UNORM"), + Self::G8_B8R8_2PLANE_420_UNORM => Some("G8_B8R8_2PLANE_420_UNORM"), + Self::G8_B8_R8_3PLANE_422_UNORM => Some("G8_B8_R8_3PLANE_422_UNORM"), + Self::G8_B8R8_2PLANE_422_UNORM => Some("G8_B8R8_2PLANE_422_UNORM"), + Self::G8_B8_R8_3PLANE_444_UNORM => Some("G8_B8_R8_3PLANE_444_UNORM"), + Self::R10X6_UNORM_PACK16 => Some("R10X6_UNORM_PACK16"), + Self::R10X6G10X6_UNORM_2PACK16 => Some("R10X6G10X6_UNORM_2PACK16"), + Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => Some("R10X6G10X6B10X6A10X6_UNORM_4PACK16"), + Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => { + Some("G10X6B10X6G10X6R10X6_422_UNORM_4PACK16") + } + Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => { + Some("B10X6G10X6R10X6G10X6_422_UNORM_4PACK16") + } + Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => { + Some("G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16") + } + Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => { + Some("G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16") + } + Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => { + Some("G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16") + } + Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => { + Some("G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16") + } + Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => { + Some("G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16") + } + Self::R12X4_UNORM_PACK16 => Some("R12X4_UNORM_PACK16"), + Self::R12X4G12X4_UNORM_2PACK16 => Some("R12X4G12X4_UNORM_2PACK16"), + Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => Some("R12X4G12X4B12X4A12X4_UNORM_4PACK16"), + Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => { + Some("G12X4B12X4G12X4R12X4_422_UNORM_4PACK16") + } + Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => { + Some("B12X4G12X4R12X4G12X4_422_UNORM_4PACK16") + } + Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => { + Some("G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16") + } + Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => { + Some("G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16") + } + Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => { + Some("G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16") + } + Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => { + Some("G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16") + } + Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => { + Some("G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16") + } + Self::G16B16G16R16_422_UNORM => Some("G16B16G16R16_422_UNORM"), + Self::B16G16R16G16_422_UNORM => Some("B16G16R16G16_422_UNORM"), + Self::G16_B16_R16_3PLANE_420_UNORM => Some("G16_B16_R16_3PLANE_420_UNORM"), + Self::G16_B16R16_2PLANE_420_UNORM => Some("G16_B16R16_2PLANE_420_UNORM"), + Self::G16_B16_R16_3PLANE_422_UNORM => Some("G16_B16_R16_3PLANE_422_UNORM"), + Self::G16_B16R16_2PLANE_422_UNORM => Some("G16_B16R16_2PLANE_422_UNORM"), + Self::G16_B16_R16_3PLANE_444_UNORM => Some("G16_B16_R16_3PLANE_444_UNORM"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ConditionalRenderingFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(ConditionalRenderingFlagsEXT::INVERTED.0, "INVERTED")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for AccessFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + AccessFlags::INDIRECT_COMMAND_READ.0, + "INDIRECT_COMMAND_READ", + ), + (AccessFlags::INDEX_READ.0, "INDEX_READ"), + ( + AccessFlags::VERTEX_ATTRIBUTE_READ.0, + "VERTEX_ATTRIBUTE_READ", + ), + (AccessFlags::UNIFORM_READ.0, "UNIFORM_READ"), + ( + AccessFlags::INPUT_ATTACHMENT_READ.0, + "INPUT_ATTACHMENT_READ", + ), + (AccessFlags::SHADER_READ.0, "SHADER_READ"), + (AccessFlags::SHADER_WRITE.0, "SHADER_WRITE"), + ( + AccessFlags::COLOR_ATTACHMENT_READ.0, + "COLOR_ATTACHMENT_READ", + ), + ( + AccessFlags::COLOR_ATTACHMENT_WRITE.0, + "COLOR_ATTACHMENT_WRITE", + ), + ( + AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ.0, + "DEPTH_STENCIL_ATTACHMENT_READ", + ), + ( + AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE.0, + "DEPTH_STENCIL_ATTACHMENT_WRITE", + ), + (AccessFlags::TRANSFER_READ.0, "TRANSFER_READ"), + (AccessFlags::TRANSFER_WRITE.0, "TRANSFER_WRITE"), + (AccessFlags::HOST_READ.0, "HOST_READ"), + (AccessFlags::HOST_WRITE.0, "HOST_WRITE"), + (AccessFlags::MEMORY_READ.0, "MEMORY_READ"), + (AccessFlags::MEMORY_WRITE.0, "MEMORY_WRITE"), + ( + AccessFlags::TRANSFORM_FEEDBACK_WRITE_EXT.0, + "TRANSFORM_FEEDBACK_WRITE_EXT", + ), + ( + AccessFlags::TRANSFORM_FEEDBACK_COUNTER_READ_EXT.0, + "TRANSFORM_FEEDBACK_COUNTER_READ_EXT", + ), + ( + AccessFlags::TRANSFORM_FEEDBACK_COUNTER_WRITE_EXT.0, + "TRANSFORM_FEEDBACK_COUNTER_WRITE_EXT", + ), + ( + AccessFlags::CONDITIONAL_RENDERING_READ_EXT.0, + "CONDITIONAL_RENDERING_READ_EXT", + ), + ( + AccessFlags::COMMAND_PROCESS_READ_NVX.0, + "COMMAND_PROCESS_READ_NVX", + ), + ( + AccessFlags::COMMAND_PROCESS_WRITE_NVX.0, + "COMMAND_PROCESS_WRITE_NVX", + ), + ( + AccessFlags::COLOR_ATTACHMENT_READ_NONCOHERENT_EXT.0, + "COLOR_ATTACHMENT_READ_NONCOHERENT_EXT", + ), + ( + AccessFlags::SHADING_RATE_IMAGE_READ_NV.0, + "SHADING_RATE_IMAGE_READ_NV", + ), + ( + AccessFlags::ACCELERATION_STRUCTURE_READ_NV.0, + "ACCELERATION_STRUCTURE_READ_NV", + ), + ( + AccessFlags::ACCELERATION_STRUCTURE_WRITE_NV.0, + "ACCELERATION_STRUCTURE_WRITE_NV", + ), + (AccessFlags::RESERVED_24_EXT.0, "RESERVED_24_EXT"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DiscardRectangleModeEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::INCLUSIVE => Some("INCLUSIVE"), + Self::EXCLUSIVE => Some("EXCLUSIVE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for SubgroupFeatureFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (SubgroupFeatureFlags::BASIC.0, "BASIC"), + (SubgroupFeatureFlags::VOTE.0, "VOTE"), + (SubgroupFeatureFlags::ARITHMETIC.0, "ARITHMETIC"), + (SubgroupFeatureFlags::BALLOT.0, "BALLOT"), + (SubgroupFeatureFlags::SHUFFLE.0, "SHUFFLE"), + (SubgroupFeatureFlags::SHUFFLE_RELATIVE.0, "SHUFFLE_RELATIVE"), + (SubgroupFeatureFlags::CLUSTERED.0, "CLUSTERED"), + (SubgroupFeatureFlags::QUAD.0, "QUAD"), + (SubgroupFeatureFlags::PARTITIONED_NV.0, "PARTITIONED_NV"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for CompositeAlphaFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (CompositeAlphaFlagsKHR::OPAQUE.0, "OPAQUE"), + (CompositeAlphaFlagsKHR::PRE_MULTIPLIED.0, "PRE_MULTIPLIED"), + (CompositeAlphaFlagsKHR::POST_MULTIPLIED.0, "POST_MULTIPLIED"), + (CompositeAlphaFlagsKHR::INHERIT.0, "INHERIT"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for PointClippingBehavior { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::ALL_CLIP_PLANES => Some("ALL_CLIP_PLANES"), + Self::USER_CLIP_PLANES_ONLY => Some("USER_CLIP_PLANES_ONLY"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for CommandBufferUsageFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + CommandBufferUsageFlags::ONE_TIME_SUBMIT.0, + "ONE_TIME_SUBMIT", + ), + ( + CommandBufferUsageFlags::RENDER_PASS_CONTINUE.0, + "RENDER_PASS_CONTINUE", + ), + ( + CommandBufferUsageFlags::SIMULTANEOUS_USE.0, + "SIMULTANEOUS_USE", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ImageUsageFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (ImageUsageFlags::TRANSFER_SRC.0, "TRANSFER_SRC"), + (ImageUsageFlags::TRANSFER_DST.0, "TRANSFER_DST"), + (ImageUsageFlags::SAMPLED.0, "SAMPLED"), + (ImageUsageFlags::STORAGE.0, "STORAGE"), + (ImageUsageFlags::COLOR_ATTACHMENT.0, "COLOR_ATTACHMENT"), + ( + ImageUsageFlags::DEPTH_STENCIL_ATTACHMENT.0, + "DEPTH_STENCIL_ATTACHMENT", + ), + ( + ImageUsageFlags::TRANSIENT_ATTACHMENT.0, + "TRANSIENT_ATTACHMENT", + ), + (ImageUsageFlags::INPUT_ATTACHMENT.0, "INPUT_ATTACHMENT"), + ( + ImageUsageFlags::SHADING_RATE_IMAGE_NV.0, + "SHADING_RATE_IMAGE_NV", + ), + (ImageUsageFlags::RESERVED_9_EXT.0, "RESERVED_9_EXT"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for IndexType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UINT16 => Some("UINT16"), + Self::UINT32 => Some("UINT32"), + Self::NONE_NV => Some("NONE_NV"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DescriptorBindingFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + DescriptorBindingFlagsEXT::UPDATE_AFTER_BIND.0, + "UPDATE_AFTER_BIND", + ), + ( + DescriptorBindingFlagsEXT::UPDATE_UNUSED_WHILE_PENDING.0, + "UPDATE_UNUSED_WHILE_PENDING", + ), + ( + DescriptorBindingFlagsEXT::PARTIALLY_BOUND.0, + "PARTIALLY_BOUND", + ), + ( + DescriptorBindingFlagsEXT::VARIABLE_DESCRIPTOR_COUNT.0, + "VARIABLE_DESCRIPTOR_COUNT", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ExternalMemoryHandleTypeFlagsNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_NV.0, + "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_NV", + ), + ( + ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_NV.0, + "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_NV", + ), + ( + ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_NV.0, + "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_NV", + ), + ( + ExternalMemoryHandleTypeFlagsNV::EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_NV.0, + "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_NV", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ShaderStageFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (ShaderStageFlags::VERTEX.0, "VERTEX"), + ( + ShaderStageFlags::TESSELLATION_CONTROL.0, + "TESSELLATION_CONTROL", + ), + ( + ShaderStageFlags::TESSELLATION_EVALUATION.0, + "TESSELLATION_EVALUATION", + ), + (ShaderStageFlags::GEOMETRY.0, "GEOMETRY"), + (ShaderStageFlags::FRAGMENT.0, "FRAGMENT"), + (ShaderStageFlags::COMPUTE.0, "COMPUTE"), + (ShaderStageFlags::ALL_GRAPHICS.0, "ALL_GRAPHICS"), + (ShaderStageFlags::ALL.0, "ALL"), + (ShaderStageFlags::RAYGEN_NV.0, "RAYGEN_NV"), + (ShaderStageFlags::ANY_HIT_NV.0, "ANY_HIT_NV"), + (ShaderStageFlags::CLOSEST_HIT_NV.0, "CLOSEST_HIT_NV"), + (ShaderStageFlags::MISS_NV.0, "MISS_NV"), + (ShaderStageFlags::INTERSECTION_NV.0, "INTERSECTION_NV"), + (ShaderStageFlags::CALLABLE_NV.0, "CALLABLE_NV"), + (ShaderStageFlags::TASK_NV.0, "TASK_NV"), + (ShaderStageFlags::MESH_NV.0, "MESH_NV"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ExternalFenceFeatureFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_EXPORTABLE.0, + "EXTERNAL_FENCE_FEATURE_EXPORTABLE", + ), + ( + ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_IMPORTABLE.0, + "EXTERNAL_FENCE_FEATURE_IMPORTABLE", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DisplayPowerStateEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::OFF => Some("OFF"), + Self::SUSPEND => Some("SUSPEND"), + Self::ON => Some("ON"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for QueueFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (QueueFlags::GRAPHICS.0, "GRAPHICS"), + (QueueFlags::COMPUTE.0, "COMPUTE"), + (QueueFlags::TRANSFER.0, "TRANSFER"), + (QueueFlags::SPARSE_BINDING.0, "SPARSE_BINDING"), + (QueueFlags::PROTECTED.0, "PROTECTED"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for TimeDomainEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::DEVICE => Some("DEVICE"), + Self::CLOCK_MONOTONIC => Some("CLOCK_MONOTONIC"), + Self::CLOCK_MONOTONIC_RAW => Some("CLOCK_MONOTONIC_RAW"), + Self::QUERY_PERFORMANCE_COUNTER => Some("QUERY_PERFORMANCE_COUNTER"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} impl fmt::Display for StructureType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -52533,58 +53592,45 @@ impl fmt::Display for StructureType { } } } -impl fmt::Display for ConditionalRenderingFlagsEXT { +impl fmt::Display for FenceImportFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(ConditionalRenderingFlagsEXT::INVERTED.0, "INVERTED")]; + const KNOWN: &[(Flags, &str)] = &[(FenceImportFlags::TEMPORARY.0, "TEMPORARY")]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for ExternalMemoryHandleTypeFlags { +impl fmt::Display for AttachmentLoadOp { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN : & [ ( Flags , & str ) ] = & [ ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_ANDROID . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_ANDROID" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION" ) , ( ExternalMemoryHandleTypeFlags :: EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY . 0 , "EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY" ) ] ; - display_flags(f, KNOWN, self.0) + let name = match *self { + Self::LOAD => Some("LOAD"), + Self::CLEAR => Some("CLEAR"), + Self::DONT_CARE => Some("DONT_CARE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } } } -impl fmt::Display for ShaderStageFlags { +impl fmt::Display for BufferCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ - (ShaderStageFlags::VERTEX.0, "VERTEX"), - ( - ShaderStageFlags::TESSELLATION_CONTROL.0, - "TESSELLATION_CONTROL", - ), - ( - ShaderStageFlags::TESSELLATION_EVALUATION.0, - "TESSELLATION_EVALUATION", - ), - (ShaderStageFlags::GEOMETRY.0, "GEOMETRY"), - (ShaderStageFlags::FRAGMENT.0, "FRAGMENT"), - (ShaderStageFlags::COMPUTE.0, "COMPUTE"), - (ShaderStageFlags::ALL_GRAPHICS.0, "ALL_GRAPHICS"), - (ShaderStageFlags::ALL.0, "ALL"), - (ShaderStageFlags::RAYGEN_NV.0, "RAYGEN_NV"), - (ShaderStageFlags::ANY_HIT_NV.0, "ANY_HIT_NV"), - (ShaderStageFlags::CLOSEST_HIT_NV.0, "CLOSEST_HIT_NV"), - (ShaderStageFlags::MISS_NV.0, "MISS_NV"), - (ShaderStageFlags::INTERSECTION_NV.0, "INTERSECTION_NV"), - (ShaderStageFlags::CALLABLE_NV.0, "CALLABLE_NV"), - (ShaderStageFlags::TASK_NV.0, "TASK_NV"), - (ShaderStageFlags::MESH_NV.0, "MESH_NV"), + (BufferCreateFlags::SPARSE_BINDING.0, "SPARSE_BINDING"), + (BufferCreateFlags::SPARSE_RESIDENCY.0, "SPARSE_RESIDENCY"), + (BufferCreateFlags::SPARSE_ALIASED.0, "SPARSE_ALIASED"), + (BufferCreateFlags::PROTECTED.0, "PROTECTED"), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for SemaphoreImportFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(SemaphoreImportFlags::TEMPORARY.0, "TEMPORARY")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for SubpassContents { +impl fmt::Display for PolygonMode { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::INLINE => Some("INLINE"), - Self::SECONDARY_COMMAND_BUFFERS => Some("SECONDARY_COMMAND_BUFFERS"), + Self::FILL => Some("FILL"), + Self::LINE => Some("LINE"), + Self::POINT => Some("POINT"), + Self::FILL_RECTANGLE_NV => Some("FILL_RECTANGLE_NV"), _ => None, }; if let Some(x) = name { @@ -52594,761 +53640,6 @@ impl fmt::Display for SubpassContents { } } } -impl fmt::Display for MemoryPropertyFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (MemoryPropertyFlags::DEVICE_LOCAL.0, "DEVICE_LOCAL"), - (MemoryPropertyFlags::HOST_VISIBLE.0, "HOST_VISIBLE"), - (MemoryPropertyFlags::HOST_COHERENT.0, "HOST_COHERENT"), - (MemoryPropertyFlags::HOST_CACHED.0, "HOST_CACHED"), - (MemoryPropertyFlags::LAZILY_ALLOCATED.0, "LAZILY_ALLOCATED"), - (MemoryPropertyFlags::PROTECTED.0, "PROTECTED"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DeviceEventTypeEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::DISPLAY_HOTPLUG => Some("DISPLAY_HOTPLUG"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for AccessFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - AccessFlags::INDIRECT_COMMAND_READ.0, - "INDIRECT_COMMAND_READ", - ), - (AccessFlags::INDEX_READ.0, "INDEX_READ"), - ( - AccessFlags::VERTEX_ATTRIBUTE_READ.0, - "VERTEX_ATTRIBUTE_READ", - ), - (AccessFlags::UNIFORM_READ.0, "UNIFORM_READ"), - ( - AccessFlags::INPUT_ATTACHMENT_READ.0, - "INPUT_ATTACHMENT_READ", - ), - (AccessFlags::SHADER_READ.0, "SHADER_READ"), - (AccessFlags::SHADER_WRITE.0, "SHADER_WRITE"), - ( - AccessFlags::COLOR_ATTACHMENT_READ.0, - "COLOR_ATTACHMENT_READ", - ), - ( - AccessFlags::COLOR_ATTACHMENT_WRITE.0, - "COLOR_ATTACHMENT_WRITE", - ), - ( - AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ.0, - "DEPTH_STENCIL_ATTACHMENT_READ", - ), - ( - AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE.0, - "DEPTH_STENCIL_ATTACHMENT_WRITE", - ), - (AccessFlags::TRANSFER_READ.0, "TRANSFER_READ"), - (AccessFlags::TRANSFER_WRITE.0, "TRANSFER_WRITE"), - (AccessFlags::HOST_READ.0, "HOST_READ"), - (AccessFlags::HOST_WRITE.0, "HOST_WRITE"), - (AccessFlags::MEMORY_READ.0, "MEMORY_READ"), - (AccessFlags::MEMORY_WRITE.0, "MEMORY_WRITE"), - ( - AccessFlags::TRANSFORM_FEEDBACK_WRITE_EXT.0, - "TRANSFORM_FEEDBACK_WRITE_EXT", - ), - ( - AccessFlags::TRANSFORM_FEEDBACK_COUNTER_READ_EXT.0, - "TRANSFORM_FEEDBACK_COUNTER_READ_EXT", - ), - ( - AccessFlags::TRANSFORM_FEEDBACK_COUNTER_WRITE_EXT.0, - "TRANSFORM_FEEDBACK_COUNTER_WRITE_EXT", - ), - ( - AccessFlags::CONDITIONAL_RENDERING_READ_EXT.0, - "CONDITIONAL_RENDERING_READ_EXT", - ), - ( - AccessFlags::COMMAND_PROCESS_READ_NVX.0, - "COMMAND_PROCESS_READ_NVX", - ), - ( - AccessFlags::COMMAND_PROCESS_WRITE_NVX.0, - "COMMAND_PROCESS_WRITE_NVX", - ), - ( - AccessFlags::COLOR_ATTACHMENT_READ_NONCOHERENT_EXT.0, - "COLOR_ATTACHMENT_READ_NONCOHERENT_EXT", - ), - ( - AccessFlags::SHADING_RATE_IMAGE_READ_NV.0, - "SHADING_RATE_IMAGE_READ_NV", - ), - ( - AccessFlags::ACCELERATION_STRUCTURE_READ_NV.0, - "ACCELERATION_STRUCTURE_READ_NV", - ), - ( - AccessFlags::ACCELERATION_STRUCTURE_WRITE_NV.0, - "ACCELERATION_STRUCTURE_WRITE_NV", - ), - (AccessFlags::RESERVED_24_EXT.0, "RESERVED_24_EXT"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for Filter { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::NEAREST => Some("NEAREST"), - Self::LINEAR => Some("LINEAR"), - Self::CUBIC_IMG => Some("CUBIC_IMG"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ValidationCacheHeaderVersionEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::ONE => Some("ONE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for BlendOp { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::ADD => Some("ADD"), - Self::SUBTRACT => Some("SUBTRACT"), - Self::REVERSE_SUBTRACT => Some("REVERSE_SUBTRACT"), - Self::MIN => Some("MIN"), - Self::MAX => Some("MAX"), - Self::ZERO_EXT => Some("ZERO_EXT"), - Self::SRC_EXT => Some("SRC_EXT"), - Self::DST_EXT => Some("DST_EXT"), - Self::SRC_OVER_EXT => Some("SRC_OVER_EXT"), - Self::DST_OVER_EXT => Some("DST_OVER_EXT"), - Self::SRC_IN_EXT => Some("SRC_IN_EXT"), - Self::DST_IN_EXT => Some("DST_IN_EXT"), - Self::SRC_OUT_EXT => Some("SRC_OUT_EXT"), - Self::DST_OUT_EXT => Some("DST_OUT_EXT"), - Self::SRC_ATOP_EXT => Some("SRC_ATOP_EXT"), - Self::DST_ATOP_EXT => Some("DST_ATOP_EXT"), - Self::XOR_EXT => Some("XOR_EXT"), - Self::MULTIPLY_EXT => Some("MULTIPLY_EXT"), - Self::SCREEN_EXT => Some("SCREEN_EXT"), - Self::OVERLAY_EXT => Some("OVERLAY_EXT"), - Self::DARKEN_EXT => Some("DARKEN_EXT"), - Self::LIGHTEN_EXT => Some("LIGHTEN_EXT"), - Self::COLORDODGE_EXT => Some("COLORDODGE_EXT"), - Self::COLORBURN_EXT => Some("COLORBURN_EXT"), - Self::HARDLIGHT_EXT => Some("HARDLIGHT_EXT"), - Self::SOFTLIGHT_EXT => Some("SOFTLIGHT_EXT"), - Self::DIFFERENCE_EXT => Some("DIFFERENCE_EXT"), - Self::EXCLUSION_EXT => Some("EXCLUSION_EXT"), - Self::INVERT_EXT => Some("INVERT_EXT"), - Self::INVERT_RGB_EXT => Some("INVERT_RGB_EXT"), - Self::LINEARDODGE_EXT => Some("LINEARDODGE_EXT"), - Self::LINEARBURN_EXT => Some("LINEARBURN_EXT"), - Self::VIVIDLIGHT_EXT => Some("VIVIDLIGHT_EXT"), - Self::LINEARLIGHT_EXT => Some("LINEARLIGHT_EXT"), - Self::PINLIGHT_EXT => Some("PINLIGHT_EXT"), - Self::HARDMIX_EXT => Some("HARDMIX_EXT"), - Self::HSL_HUE_EXT => Some("HSL_HUE_EXT"), - Self::HSL_SATURATION_EXT => Some("HSL_SATURATION_EXT"), - Self::HSL_COLOR_EXT => Some("HSL_COLOR_EXT"), - Self::HSL_LUMINOSITY_EXT => Some("HSL_LUMINOSITY_EXT"), - Self::PLUS_EXT => Some("PLUS_EXT"), - Self::PLUS_CLAMPED_EXT => Some("PLUS_CLAMPED_EXT"), - Self::PLUS_CLAMPED_ALPHA_EXT => Some("PLUS_CLAMPED_ALPHA_EXT"), - Self::PLUS_DARKER_EXT => Some("PLUS_DARKER_EXT"), - Self::MINUS_EXT => Some("MINUS_EXT"), - Self::MINUS_CLAMPED_EXT => Some("MINUS_CLAMPED_EXT"), - Self::CONTRAST_EXT => Some("CONTRAST_EXT"), - Self::INVERT_OVG_EXT => Some("INVERT_OVG_EXT"), - Self::RED_EXT => Some("RED_EXT"), - Self::GREEN_EXT => Some("GREEN_EXT"), - Self::BLUE_EXT => Some("BLUE_EXT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for QueryType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::OCCLUSION => Some("OCCLUSION"), - Self::PIPELINE_STATISTICS => Some("PIPELINE_STATISTICS"), - Self::TIMESTAMP => Some("TIMESTAMP"), - Self::TRANSFORM_FEEDBACK_STREAM_EXT => Some("TRANSFORM_FEEDBACK_STREAM_EXT"), - Self::ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV => { - Some("ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV") - } - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for CullModeFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (CullModeFlags::NONE.0, "NONE"), - (CullModeFlags::FRONT.0, "FRONT"), - (CullModeFlags::BACK.0, "BACK"), - (CullModeFlags::FRONT_AND_BACK.0, "FRONT_AND_BACK"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for VendorId { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::VIV => Some("VIV"), - Self::VSI => Some("VSI"), - Self::KAZAN => Some("KAZAN"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for TessellationDomainOrigin { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::UPPER_LEFT => Some("UPPER_LEFT"), - Self::LOWER_LEFT => Some("LOWER_LEFT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ChromaLocation { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::COSITED_EVEN => Some("COSITED_EVEN"), - Self::MIDPOINT => Some("MIDPOINT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ImageType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::TYPE_1D => Some("TYPE_1D"), - Self::TYPE_2D => Some("TYPE_2D"), - Self::TYPE_3D => Some("TYPE_3D"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DescriptorType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::SAMPLER => Some("SAMPLER"), - Self::COMBINED_IMAGE_SAMPLER => Some("COMBINED_IMAGE_SAMPLER"), - Self::SAMPLED_IMAGE => Some("SAMPLED_IMAGE"), - Self::STORAGE_IMAGE => Some("STORAGE_IMAGE"), - Self::UNIFORM_TEXEL_BUFFER => Some("UNIFORM_TEXEL_BUFFER"), - Self::STORAGE_TEXEL_BUFFER => Some("STORAGE_TEXEL_BUFFER"), - Self::UNIFORM_BUFFER => Some("UNIFORM_BUFFER"), - Self::STORAGE_BUFFER => Some("STORAGE_BUFFER"), - Self::UNIFORM_BUFFER_DYNAMIC => Some("UNIFORM_BUFFER_DYNAMIC"), - Self::STORAGE_BUFFER_DYNAMIC => Some("STORAGE_BUFFER_DYNAMIC"), - Self::INPUT_ATTACHMENT => Some("INPUT_ATTACHMENT"), - Self::INLINE_UNIFORM_BLOCK_EXT => Some("INLINE_UNIFORM_BLOCK_EXT"), - Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for PointClippingBehavior { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::ALL_CLIP_PLANES => Some("ALL_CLIP_PLANES"), - Self::USER_CLIP_PLANES_ONLY => Some("USER_CLIP_PLANES_ONLY"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for GeometryTypeNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::TRIANGLES => Some("TRIANGLES"), - Self::AABBS => Some("AABBS"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ExternalFenceFeatureFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_EXPORTABLE.0, - "EXTERNAL_FENCE_FEATURE_EXPORTABLE", - ), - ( - ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_IMPORTABLE.0, - "EXTERNAL_FENCE_FEATURE_IMPORTABLE", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for SwapchainCreateFlagsKHR { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - SwapchainCreateFlagsKHR::SPLIT_INSTANCE_BIND_REGIONS.0, - "SPLIT_INSTANCE_BIND_REGIONS", - ), - (SwapchainCreateFlagsKHR::PROTECTED.0, "PROTECTED"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for QueryPipelineStatisticFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - QueryPipelineStatisticFlags::INPUT_ASSEMBLY_VERTICES.0, - "INPUT_ASSEMBLY_VERTICES", - ), - ( - QueryPipelineStatisticFlags::INPUT_ASSEMBLY_PRIMITIVES.0, - "INPUT_ASSEMBLY_PRIMITIVES", - ), - ( - QueryPipelineStatisticFlags::VERTEX_SHADER_INVOCATIONS.0, - "VERTEX_SHADER_INVOCATIONS", - ), - ( - QueryPipelineStatisticFlags::GEOMETRY_SHADER_INVOCATIONS.0, - "GEOMETRY_SHADER_INVOCATIONS", - ), - ( - QueryPipelineStatisticFlags::GEOMETRY_SHADER_PRIMITIVES.0, - "GEOMETRY_SHADER_PRIMITIVES", - ), - ( - QueryPipelineStatisticFlags::CLIPPING_INVOCATIONS.0, - "CLIPPING_INVOCATIONS", - ), - ( - QueryPipelineStatisticFlags::CLIPPING_PRIMITIVES.0, - "CLIPPING_PRIMITIVES", - ), - ( - QueryPipelineStatisticFlags::FRAGMENT_SHADER_INVOCATIONS.0, - "FRAGMENT_SHADER_INVOCATIONS", - ), - ( - QueryPipelineStatisticFlags::TESSELLATION_CONTROL_SHADER_PATCHES.0, - "TESSELLATION_CONTROL_SHADER_PATCHES", - ), - ( - QueryPipelineStatisticFlags::TESSELLATION_EVALUATION_SHADER_INVOCATIONS.0, - "TESSELLATION_EVALUATION_SHADER_INVOCATIONS", - ), - ( - QueryPipelineStatisticFlags::COMPUTE_SHADER_INVOCATIONS.0, - "COMPUTE_SHADER_INVOCATIONS", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for Format { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::UNDEFINED => Some("UNDEFINED"), - Self::R4G4_UNORM_PACK8 => Some("R4G4_UNORM_PACK8"), - Self::R4G4B4A4_UNORM_PACK16 => Some("R4G4B4A4_UNORM_PACK16"), - Self::B4G4R4A4_UNORM_PACK16 => Some("B4G4R4A4_UNORM_PACK16"), - Self::R5G6B5_UNORM_PACK16 => Some("R5G6B5_UNORM_PACK16"), - Self::B5G6R5_UNORM_PACK16 => Some("B5G6R5_UNORM_PACK16"), - Self::R5G5B5A1_UNORM_PACK16 => Some("R5G5B5A1_UNORM_PACK16"), - Self::B5G5R5A1_UNORM_PACK16 => Some("B5G5R5A1_UNORM_PACK16"), - Self::A1R5G5B5_UNORM_PACK16 => Some("A1R5G5B5_UNORM_PACK16"), - Self::R8_UNORM => Some("R8_UNORM"), - Self::R8_SNORM => Some("R8_SNORM"), - Self::R8_USCALED => Some("R8_USCALED"), - Self::R8_SSCALED => Some("R8_SSCALED"), - Self::R8_UINT => Some("R8_UINT"), - Self::R8_SINT => Some("R8_SINT"), - Self::R8_SRGB => Some("R8_SRGB"), - Self::R8G8_UNORM => Some("R8G8_UNORM"), - Self::R8G8_SNORM => Some("R8G8_SNORM"), - Self::R8G8_USCALED => Some("R8G8_USCALED"), - Self::R8G8_SSCALED => Some("R8G8_SSCALED"), - Self::R8G8_UINT => Some("R8G8_UINT"), - Self::R8G8_SINT => Some("R8G8_SINT"), - Self::R8G8_SRGB => Some("R8G8_SRGB"), - Self::R8G8B8_UNORM => Some("R8G8B8_UNORM"), - Self::R8G8B8_SNORM => Some("R8G8B8_SNORM"), - Self::R8G8B8_USCALED => Some("R8G8B8_USCALED"), - Self::R8G8B8_SSCALED => Some("R8G8B8_SSCALED"), - Self::R8G8B8_UINT => Some("R8G8B8_UINT"), - Self::R8G8B8_SINT => Some("R8G8B8_SINT"), - Self::R8G8B8_SRGB => Some("R8G8B8_SRGB"), - Self::B8G8R8_UNORM => Some("B8G8R8_UNORM"), - Self::B8G8R8_SNORM => Some("B8G8R8_SNORM"), - Self::B8G8R8_USCALED => Some("B8G8R8_USCALED"), - Self::B8G8R8_SSCALED => Some("B8G8R8_SSCALED"), - Self::B8G8R8_UINT => Some("B8G8R8_UINT"), - Self::B8G8R8_SINT => Some("B8G8R8_SINT"), - Self::B8G8R8_SRGB => Some("B8G8R8_SRGB"), - Self::R8G8B8A8_UNORM => Some("R8G8B8A8_UNORM"), - Self::R8G8B8A8_SNORM => Some("R8G8B8A8_SNORM"), - Self::R8G8B8A8_USCALED => Some("R8G8B8A8_USCALED"), - Self::R8G8B8A8_SSCALED => Some("R8G8B8A8_SSCALED"), - Self::R8G8B8A8_UINT => Some("R8G8B8A8_UINT"), - Self::R8G8B8A8_SINT => Some("R8G8B8A8_SINT"), - Self::R8G8B8A8_SRGB => Some("R8G8B8A8_SRGB"), - Self::B8G8R8A8_UNORM => Some("B8G8R8A8_UNORM"), - Self::B8G8R8A8_SNORM => Some("B8G8R8A8_SNORM"), - Self::B8G8R8A8_USCALED => Some("B8G8R8A8_USCALED"), - Self::B8G8R8A8_SSCALED => Some("B8G8R8A8_SSCALED"), - Self::B8G8R8A8_UINT => Some("B8G8R8A8_UINT"), - Self::B8G8R8A8_SINT => Some("B8G8R8A8_SINT"), - Self::B8G8R8A8_SRGB => Some("B8G8R8A8_SRGB"), - Self::A8B8G8R8_UNORM_PACK32 => Some("A8B8G8R8_UNORM_PACK32"), - Self::A8B8G8R8_SNORM_PACK32 => Some("A8B8G8R8_SNORM_PACK32"), - Self::A8B8G8R8_USCALED_PACK32 => Some("A8B8G8R8_USCALED_PACK32"), - Self::A8B8G8R8_SSCALED_PACK32 => Some("A8B8G8R8_SSCALED_PACK32"), - Self::A8B8G8R8_UINT_PACK32 => Some("A8B8G8R8_UINT_PACK32"), - Self::A8B8G8R8_SINT_PACK32 => Some("A8B8G8R8_SINT_PACK32"), - Self::A8B8G8R8_SRGB_PACK32 => Some("A8B8G8R8_SRGB_PACK32"), - Self::A2R10G10B10_UNORM_PACK32 => Some("A2R10G10B10_UNORM_PACK32"), - Self::A2R10G10B10_SNORM_PACK32 => Some("A2R10G10B10_SNORM_PACK32"), - Self::A2R10G10B10_USCALED_PACK32 => Some("A2R10G10B10_USCALED_PACK32"), - Self::A2R10G10B10_SSCALED_PACK32 => Some("A2R10G10B10_SSCALED_PACK32"), - Self::A2R10G10B10_UINT_PACK32 => Some("A2R10G10B10_UINT_PACK32"), - Self::A2R10G10B10_SINT_PACK32 => Some("A2R10G10B10_SINT_PACK32"), - Self::A2B10G10R10_UNORM_PACK32 => Some("A2B10G10R10_UNORM_PACK32"), - Self::A2B10G10R10_SNORM_PACK32 => Some("A2B10G10R10_SNORM_PACK32"), - Self::A2B10G10R10_USCALED_PACK32 => Some("A2B10G10R10_USCALED_PACK32"), - Self::A2B10G10R10_SSCALED_PACK32 => Some("A2B10G10R10_SSCALED_PACK32"), - Self::A2B10G10R10_UINT_PACK32 => Some("A2B10G10R10_UINT_PACK32"), - Self::A2B10G10R10_SINT_PACK32 => Some("A2B10G10R10_SINT_PACK32"), - Self::R16_UNORM => Some("R16_UNORM"), - Self::R16_SNORM => Some("R16_SNORM"), - Self::R16_USCALED => Some("R16_USCALED"), - Self::R16_SSCALED => Some("R16_SSCALED"), - Self::R16_UINT => Some("R16_UINT"), - Self::R16_SINT => Some("R16_SINT"), - Self::R16_SFLOAT => Some("R16_SFLOAT"), - Self::R16G16_UNORM => Some("R16G16_UNORM"), - Self::R16G16_SNORM => Some("R16G16_SNORM"), - Self::R16G16_USCALED => Some("R16G16_USCALED"), - Self::R16G16_SSCALED => Some("R16G16_SSCALED"), - Self::R16G16_UINT => Some("R16G16_UINT"), - Self::R16G16_SINT => Some("R16G16_SINT"), - Self::R16G16_SFLOAT => Some("R16G16_SFLOAT"), - Self::R16G16B16_UNORM => Some("R16G16B16_UNORM"), - Self::R16G16B16_SNORM => Some("R16G16B16_SNORM"), - Self::R16G16B16_USCALED => Some("R16G16B16_USCALED"), - Self::R16G16B16_SSCALED => Some("R16G16B16_SSCALED"), - Self::R16G16B16_UINT => Some("R16G16B16_UINT"), - Self::R16G16B16_SINT => Some("R16G16B16_SINT"), - Self::R16G16B16_SFLOAT => Some("R16G16B16_SFLOAT"), - Self::R16G16B16A16_UNORM => Some("R16G16B16A16_UNORM"), - Self::R16G16B16A16_SNORM => Some("R16G16B16A16_SNORM"), - Self::R16G16B16A16_USCALED => Some("R16G16B16A16_USCALED"), - Self::R16G16B16A16_SSCALED => Some("R16G16B16A16_SSCALED"), - Self::R16G16B16A16_UINT => Some("R16G16B16A16_UINT"), - Self::R16G16B16A16_SINT => Some("R16G16B16A16_SINT"), - Self::R16G16B16A16_SFLOAT => Some("R16G16B16A16_SFLOAT"), - Self::R32_UINT => Some("R32_UINT"), - Self::R32_SINT => Some("R32_SINT"), - Self::R32_SFLOAT => Some("R32_SFLOAT"), - Self::R32G32_UINT => Some("R32G32_UINT"), - Self::R32G32_SINT => Some("R32G32_SINT"), - Self::R32G32_SFLOAT => Some("R32G32_SFLOAT"), - Self::R32G32B32_UINT => Some("R32G32B32_UINT"), - Self::R32G32B32_SINT => Some("R32G32B32_SINT"), - Self::R32G32B32_SFLOAT => Some("R32G32B32_SFLOAT"), - Self::R32G32B32A32_UINT => Some("R32G32B32A32_UINT"), - Self::R32G32B32A32_SINT => Some("R32G32B32A32_SINT"), - Self::R32G32B32A32_SFLOAT => Some("R32G32B32A32_SFLOAT"), - Self::R64_UINT => Some("R64_UINT"), - Self::R64_SINT => Some("R64_SINT"), - Self::R64_SFLOAT => Some("R64_SFLOAT"), - Self::R64G64_UINT => Some("R64G64_UINT"), - Self::R64G64_SINT => Some("R64G64_SINT"), - Self::R64G64_SFLOAT => Some("R64G64_SFLOAT"), - Self::R64G64B64_UINT => Some("R64G64B64_UINT"), - Self::R64G64B64_SINT => Some("R64G64B64_SINT"), - Self::R64G64B64_SFLOAT => Some("R64G64B64_SFLOAT"), - Self::R64G64B64A64_UINT => Some("R64G64B64A64_UINT"), - Self::R64G64B64A64_SINT => Some("R64G64B64A64_SINT"), - Self::R64G64B64A64_SFLOAT => Some("R64G64B64A64_SFLOAT"), - Self::B10G11R11_UFLOAT_PACK32 => Some("B10G11R11_UFLOAT_PACK32"), - Self::E5B9G9R9_UFLOAT_PACK32 => Some("E5B9G9R9_UFLOAT_PACK32"), - Self::D16_UNORM => Some("D16_UNORM"), - Self::X8_D24_UNORM_PACK32 => Some("X8_D24_UNORM_PACK32"), - Self::D32_SFLOAT => Some("D32_SFLOAT"), - Self::S8_UINT => Some("S8_UINT"), - Self::D16_UNORM_S8_UINT => Some("D16_UNORM_S8_UINT"), - Self::D24_UNORM_S8_UINT => Some("D24_UNORM_S8_UINT"), - Self::D32_SFLOAT_S8_UINT => Some("D32_SFLOAT_S8_UINT"), - Self::BC1_RGB_UNORM_BLOCK => Some("BC1_RGB_UNORM_BLOCK"), - Self::BC1_RGB_SRGB_BLOCK => Some("BC1_RGB_SRGB_BLOCK"), - Self::BC1_RGBA_UNORM_BLOCK => Some("BC1_RGBA_UNORM_BLOCK"), - Self::BC1_RGBA_SRGB_BLOCK => Some("BC1_RGBA_SRGB_BLOCK"), - Self::BC2_UNORM_BLOCK => Some("BC2_UNORM_BLOCK"), - Self::BC2_SRGB_BLOCK => Some("BC2_SRGB_BLOCK"), - Self::BC3_UNORM_BLOCK => Some("BC3_UNORM_BLOCK"), - Self::BC3_SRGB_BLOCK => Some("BC3_SRGB_BLOCK"), - Self::BC4_UNORM_BLOCK => Some("BC4_UNORM_BLOCK"), - Self::BC4_SNORM_BLOCK => Some("BC4_SNORM_BLOCK"), - Self::BC5_UNORM_BLOCK => Some("BC5_UNORM_BLOCK"), - Self::BC5_SNORM_BLOCK => Some("BC5_SNORM_BLOCK"), - Self::BC6H_UFLOAT_BLOCK => Some("BC6H_UFLOAT_BLOCK"), - Self::BC6H_SFLOAT_BLOCK => Some("BC6H_SFLOAT_BLOCK"), - Self::BC7_UNORM_BLOCK => Some("BC7_UNORM_BLOCK"), - Self::BC7_SRGB_BLOCK => Some("BC7_SRGB_BLOCK"), - Self::ETC2_R8G8B8_UNORM_BLOCK => Some("ETC2_R8G8B8_UNORM_BLOCK"), - Self::ETC2_R8G8B8_SRGB_BLOCK => Some("ETC2_R8G8B8_SRGB_BLOCK"), - Self::ETC2_R8G8B8A1_UNORM_BLOCK => Some("ETC2_R8G8B8A1_UNORM_BLOCK"), - Self::ETC2_R8G8B8A1_SRGB_BLOCK => Some("ETC2_R8G8B8A1_SRGB_BLOCK"), - Self::ETC2_R8G8B8A8_UNORM_BLOCK => Some("ETC2_R8G8B8A8_UNORM_BLOCK"), - Self::ETC2_R8G8B8A8_SRGB_BLOCK => Some("ETC2_R8G8B8A8_SRGB_BLOCK"), - Self::EAC_R11_UNORM_BLOCK => Some("EAC_R11_UNORM_BLOCK"), - Self::EAC_R11_SNORM_BLOCK => Some("EAC_R11_SNORM_BLOCK"), - Self::EAC_R11G11_UNORM_BLOCK => Some("EAC_R11G11_UNORM_BLOCK"), - Self::EAC_R11G11_SNORM_BLOCK => Some("EAC_R11G11_SNORM_BLOCK"), - Self::ASTC_4X4_UNORM_BLOCK => Some("ASTC_4X4_UNORM_BLOCK"), - Self::ASTC_4X4_SRGB_BLOCK => Some("ASTC_4X4_SRGB_BLOCK"), - Self::ASTC_5X4_UNORM_BLOCK => Some("ASTC_5X4_UNORM_BLOCK"), - Self::ASTC_5X4_SRGB_BLOCK => Some("ASTC_5X4_SRGB_BLOCK"), - Self::ASTC_5X5_UNORM_BLOCK => Some("ASTC_5X5_UNORM_BLOCK"), - Self::ASTC_5X5_SRGB_BLOCK => Some("ASTC_5X5_SRGB_BLOCK"), - Self::ASTC_6X5_UNORM_BLOCK => Some("ASTC_6X5_UNORM_BLOCK"), - Self::ASTC_6X5_SRGB_BLOCK => Some("ASTC_6X5_SRGB_BLOCK"), - Self::ASTC_6X6_UNORM_BLOCK => Some("ASTC_6X6_UNORM_BLOCK"), - Self::ASTC_6X6_SRGB_BLOCK => Some("ASTC_6X6_SRGB_BLOCK"), - Self::ASTC_8X5_UNORM_BLOCK => Some("ASTC_8X5_UNORM_BLOCK"), - Self::ASTC_8X5_SRGB_BLOCK => Some("ASTC_8X5_SRGB_BLOCK"), - Self::ASTC_8X6_UNORM_BLOCK => Some("ASTC_8X6_UNORM_BLOCK"), - Self::ASTC_8X6_SRGB_BLOCK => Some("ASTC_8X6_SRGB_BLOCK"), - Self::ASTC_8X8_UNORM_BLOCK => Some("ASTC_8X8_UNORM_BLOCK"), - Self::ASTC_8X8_SRGB_BLOCK => Some("ASTC_8X8_SRGB_BLOCK"), - Self::ASTC_10X5_UNORM_BLOCK => Some("ASTC_10X5_UNORM_BLOCK"), - Self::ASTC_10X5_SRGB_BLOCK => Some("ASTC_10X5_SRGB_BLOCK"), - Self::ASTC_10X6_UNORM_BLOCK => Some("ASTC_10X6_UNORM_BLOCK"), - Self::ASTC_10X6_SRGB_BLOCK => Some("ASTC_10X6_SRGB_BLOCK"), - Self::ASTC_10X8_UNORM_BLOCK => Some("ASTC_10X8_UNORM_BLOCK"), - Self::ASTC_10X8_SRGB_BLOCK => Some("ASTC_10X8_SRGB_BLOCK"), - Self::ASTC_10X10_UNORM_BLOCK => Some("ASTC_10X10_UNORM_BLOCK"), - Self::ASTC_10X10_SRGB_BLOCK => Some("ASTC_10X10_SRGB_BLOCK"), - Self::ASTC_12X10_UNORM_BLOCK => Some("ASTC_12X10_UNORM_BLOCK"), - Self::ASTC_12X10_SRGB_BLOCK => Some("ASTC_12X10_SRGB_BLOCK"), - Self::ASTC_12X12_UNORM_BLOCK => Some("ASTC_12X12_UNORM_BLOCK"), - Self::ASTC_12X12_SRGB_BLOCK => Some("ASTC_12X12_SRGB_BLOCK"), - Self::PVRTC1_2BPP_UNORM_BLOCK_IMG => Some("PVRTC1_2BPP_UNORM_BLOCK_IMG"), - Self::PVRTC1_4BPP_UNORM_BLOCK_IMG => Some("PVRTC1_4BPP_UNORM_BLOCK_IMG"), - Self::PVRTC2_2BPP_UNORM_BLOCK_IMG => Some("PVRTC2_2BPP_UNORM_BLOCK_IMG"), - Self::PVRTC2_4BPP_UNORM_BLOCK_IMG => Some("PVRTC2_4BPP_UNORM_BLOCK_IMG"), - Self::PVRTC1_2BPP_SRGB_BLOCK_IMG => Some("PVRTC1_2BPP_SRGB_BLOCK_IMG"), - Self::PVRTC1_4BPP_SRGB_BLOCK_IMG => Some("PVRTC1_4BPP_SRGB_BLOCK_IMG"), - Self::PVRTC2_2BPP_SRGB_BLOCK_IMG => Some("PVRTC2_2BPP_SRGB_BLOCK_IMG"), - Self::PVRTC2_4BPP_SRGB_BLOCK_IMG => Some("PVRTC2_4BPP_SRGB_BLOCK_IMG"), - Self::G8B8G8R8_422_UNORM => Some("G8B8G8R8_422_UNORM"), - Self::B8G8R8G8_422_UNORM => Some("B8G8R8G8_422_UNORM"), - Self::G8_B8_R8_3PLANE_420_UNORM => Some("G8_B8_R8_3PLANE_420_UNORM"), - Self::G8_B8R8_2PLANE_420_UNORM => Some("G8_B8R8_2PLANE_420_UNORM"), - Self::G8_B8_R8_3PLANE_422_UNORM => Some("G8_B8_R8_3PLANE_422_UNORM"), - Self::G8_B8R8_2PLANE_422_UNORM => Some("G8_B8R8_2PLANE_422_UNORM"), - Self::G8_B8_R8_3PLANE_444_UNORM => Some("G8_B8_R8_3PLANE_444_UNORM"), - Self::R10X6_UNORM_PACK16 => Some("R10X6_UNORM_PACK16"), - Self::R10X6G10X6_UNORM_2PACK16 => Some("R10X6G10X6_UNORM_2PACK16"), - Self::R10X6G10X6B10X6A10X6_UNORM_4PACK16 => Some("R10X6G10X6B10X6A10X6_UNORM_4PACK16"), - Self::G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 => { - Some("G10X6B10X6G10X6R10X6_422_UNORM_4PACK16") - } - Self::B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 => { - Some("B10X6G10X6R10X6G10X6_422_UNORM_4PACK16") - } - Self::G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 => { - Some("G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16") - } - Self::G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 => { - Some("G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16") - } - Self::G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 => { - Some("G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16") - } - Self::G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 => { - Some("G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16") - } - Self::G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 => { - Some("G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16") - } - Self::R12X4_UNORM_PACK16 => Some("R12X4_UNORM_PACK16"), - Self::R12X4G12X4_UNORM_2PACK16 => Some("R12X4G12X4_UNORM_2PACK16"), - Self::R12X4G12X4B12X4A12X4_UNORM_4PACK16 => Some("R12X4G12X4B12X4A12X4_UNORM_4PACK16"), - Self::G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 => { - Some("G12X4B12X4G12X4R12X4_422_UNORM_4PACK16") - } - Self::B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 => { - Some("B12X4G12X4R12X4G12X4_422_UNORM_4PACK16") - } - Self::G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 => { - Some("G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16") - } - Self::G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 => { - Some("G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16") - } - Self::G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 => { - Some("G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16") - } - Self::G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 => { - Some("G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16") - } - Self::G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 => { - Some("G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16") - } - Self::G16B16G16R16_422_UNORM => Some("G16B16G16R16_422_UNORM"), - Self::B16G16R16G16_422_UNORM => Some("B16G16R16G16_422_UNORM"), - Self::G16_B16_R16_3PLANE_420_UNORM => Some("G16_B16_R16_3PLANE_420_UNORM"), - Self::G16_B16R16_2PLANE_420_UNORM => Some("G16_B16R16_2PLANE_420_UNORM"), - Self::G16_B16_R16_3PLANE_422_UNORM => Some("G16_B16_R16_3PLANE_422_UNORM"), - Self::G16_B16R16_2PLANE_422_UNORM => Some("G16_B16R16_2PLANE_422_UNORM"), - Self::G16_B16_R16_3PLANE_444_UNORM => Some("G16_B16_R16_3PLANE_444_UNORM"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for BufferUsageFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (BufferUsageFlags::TRANSFER_SRC.0, "TRANSFER_SRC"), - (BufferUsageFlags::TRANSFER_DST.0, "TRANSFER_DST"), - ( - BufferUsageFlags::UNIFORM_TEXEL_BUFFER.0, - "UNIFORM_TEXEL_BUFFER", - ), - ( - BufferUsageFlags::STORAGE_TEXEL_BUFFER.0, - "STORAGE_TEXEL_BUFFER", - ), - (BufferUsageFlags::UNIFORM_BUFFER.0, "UNIFORM_BUFFER"), - (BufferUsageFlags::STORAGE_BUFFER.0, "STORAGE_BUFFER"), - (BufferUsageFlags::INDEX_BUFFER.0, "INDEX_BUFFER"), - (BufferUsageFlags::VERTEX_BUFFER.0, "VERTEX_BUFFER"), - (BufferUsageFlags::INDIRECT_BUFFER.0, "INDIRECT_BUFFER"), - ( - BufferUsageFlags::TRANSFORM_FEEDBACK_BUFFER_EXT.0, - "TRANSFORM_FEEDBACK_BUFFER_EXT", - ), - ( - BufferUsageFlags::TRANSFORM_FEEDBACK_COUNTER_BUFFER_EXT.0, - "TRANSFORM_FEEDBACK_COUNTER_BUFFER_EXT", - ), - ( - BufferUsageFlags::CONDITIONAL_RENDERING_EXT.0, - "CONDITIONAL_RENDERING_EXT", - ), - (BufferUsageFlags::RAY_TRACING_NV.0, "RAY_TRACING_NV"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for FenceCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(FenceCreateFlags::SIGNALED.0, "SIGNALED")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DependencyFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (DependencyFlags::BY_REGION.0, "BY_REGION"), - (DependencyFlags::DEVICE_GROUP.0, "DEVICE_GROUP"), - (DependencyFlags::VIEW_LOCAL.0, "VIEW_LOCAL"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ExternalSemaphoreFeatureFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - ExternalSemaphoreFeatureFlags::EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE.0, - "EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE", - ), - ( - ExternalSemaphoreFeatureFlags::EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE.0, - "EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} impl fmt::Display for ConservativeRasterizationModeEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -53364,75 +53655,6 @@ impl fmt::Display for ConservativeRasterizationModeEXT { } } } -impl fmt::Display for ExternalMemoryFeatureFlagsNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - ExternalMemoryFeatureFlagsNV::EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_NV.0, - "EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_NV", - ), - ( - ExternalMemoryFeatureFlagsNV::EXTERNAL_MEMORY_FEATURE_EXPORTABLE_NV.0, - "EXTERNAL_MEMORY_FEATURE_EXPORTABLE_NV", - ), - ( - ExternalMemoryFeatureFlagsNV::EXTERNAL_MEMORY_FEATURE_IMPORTABLE_NV.0, - "EXTERNAL_MEMORY_FEATURE_IMPORTABLE_NV", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ShadingRatePaletteEntryNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::NO_INVOCATIONS => Some("NO_INVOCATIONS"), - Self::TYPE_16_INVOCATIONS_PER_PIXEL => Some("TYPE_16_INVOCATIONS_PER_PIXEL"), - Self::TYPE_8_INVOCATIONS_PER_PIXEL => Some("TYPE_8_INVOCATIONS_PER_PIXEL"), - Self::TYPE_4_INVOCATIONS_PER_PIXEL => Some("TYPE_4_INVOCATIONS_PER_PIXEL"), - Self::TYPE_2_INVOCATIONS_PER_PIXEL => Some("TYPE_2_INVOCATIONS_PER_PIXEL"), - Self::TYPE_1_INVOCATION_PER_PIXEL => Some("TYPE_1_INVOCATION_PER_PIXEL"), - Self::TYPE_1_INVOCATION_PER_2X1_PIXELS => Some("TYPE_1_INVOCATION_PER_2X1_PIXELS"), - Self::TYPE_1_INVOCATION_PER_1X2_PIXELS => Some("TYPE_1_INVOCATION_PER_1X2_PIXELS"), - Self::TYPE_1_INVOCATION_PER_2X2_PIXELS => Some("TYPE_1_INVOCATION_PER_2X2_PIXELS"), - Self::TYPE_1_INVOCATION_PER_4X2_PIXELS => Some("TYPE_1_INVOCATION_PER_4X2_PIXELS"), - Self::TYPE_1_INVOCATION_PER_2X4_PIXELS => Some("TYPE_1_INVOCATION_PER_2X4_PIXELS"), - Self::TYPE_1_INVOCATION_PER_4X4_PIXELS => Some("TYPE_1_INVOCATION_PER_4X4_PIXELS"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ColorComponentFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (ColorComponentFlags::R.0, "R"), - (ColorComponentFlags::G.0, "G"), - (ColorComponentFlags::B.0, "B"), - (ColorComponentFlags::A.0, "A"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for SamplerReductionModeEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::WEIGHTED_AVERAGE => Some("WEIGHTED_AVERAGE"), - Self::MIN => Some("MIN"), - Self::MAX => Some("MAX"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} impl fmt::Display for StencilOp { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { @@ -53453,40 +53675,15 @@ impl fmt::Display for StencilOp { } } } -impl fmt::Display for ExternalFenceHandleTypeFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD.0, - "EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD", - ), - ( - ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32.0, - "EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32", - ), - ( - ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT.0, - "EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT", - ), - ( - ExternalFenceHandleTypeFlags::EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD.0, - "EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ViewportCoordinateSwizzleNV { +impl fmt::Display for BorderColor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::POSITIVE_X => Some("POSITIVE_X"), - Self::NEGATIVE_X => Some("NEGATIVE_X"), - Self::POSITIVE_Y => Some("POSITIVE_Y"), - Self::NEGATIVE_Y => Some("NEGATIVE_Y"), - Self::POSITIVE_Z => Some("POSITIVE_Z"), - Self::NEGATIVE_Z => Some("NEGATIVE_Z"), - Self::POSITIVE_W => Some("POSITIVE_W"), - Self::NEGATIVE_W => Some("NEGATIVE_W"), + Self::FLOAT_TRANSPARENT_BLACK => Some("FLOAT_TRANSPARENT_BLACK"), + Self::INT_TRANSPARENT_BLACK => Some("INT_TRANSPARENT_BLACK"), + Self::FLOAT_OPAQUE_BLACK => Some("FLOAT_OPAQUE_BLACK"), + Self::INT_OPAQUE_BLACK => Some("INT_OPAQUE_BLACK"), + Self::FLOAT_OPAQUE_WHITE => Some("FLOAT_OPAQUE_WHITE"), + Self::INT_OPAQUE_WHITE => Some("INT_OPAQUE_WHITE"), _ => None, }; if let Some(x) = name { @@ -53496,13 +53693,12 @@ impl fmt::Display for ViewportCoordinateSwizzleNV { } } } -impl fmt::Display for SamplerAddressMode { +impl fmt::Display for AccelerationStructureMemoryRequirementsTypeNV { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::REPEAT => Some("REPEAT"), - Self::MIRRORED_REPEAT => Some("MIRRORED_REPEAT"), - Self::CLAMP_TO_EDGE => Some("CLAMP_TO_EDGE"), - Self::CLAMP_TO_BORDER => Some("CLAMP_TO_BORDER"), + Self::OBJECT => Some("OBJECT"), + Self::BUILD_SCRATCH => Some("BUILD_SCRATCH"), + Self::UPDATE_SCRATCH => Some("UPDATE_SCRATCH"), _ => None, }; if let Some(x) = name { @@ -53512,53 +53708,10 @@ impl fmt::Display for SamplerAddressMode { } } } -impl fmt::Display for SparseImageFormatFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (SparseImageFormatFlags::SINGLE_MIPTAIL.0, "SINGLE_MIPTAIL"), - ( - SparseImageFormatFlags::ALIGNED_MIP_SIZE.0, - "ALIGNED_MIP_SIZE", - ), - ( - SparseImageFormatFlags::NONSTANDARD_BLOCK_SIZE.0, - "NONSTANDARD_BLOCK_SIZE", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for GeometryInstanceFlagsNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - GeometryInstanceFlagsNV::TRIANGLE_CULL_DISABLE.0, - "TRIANGLE_CULL_DISABLE", - ), - ( - GeometryInstanceFlagsNV::TRIANGLE_FRONT_COUNTERCLOCKWISE.0, - "TRIANGLE_FRONT_COUNTERCLOCKWISE", - ), - (GeometryInstanceFlagsNV::FORCE_OPAQUE.0, "FORCE_OPAQUE"), - ( - GeometryInstanceFlagsNV::FORCE_NO_OPAQUE.0, - "FORCE_NO_OPAQUE", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DeviceQueueCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(DeviceQueueCreateFlags::PROTECTED.0, "PROTECTED")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for FrontFace { +impl fmt::Display for InternalAllocationType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::COUNTER_CLOCKWISE => Some("COUNTER_CLOCKWISE"), - Self::CLOCKWISE => Some("CLOCKWISE"), + Self::EXECUTABLE => Some("EXECUTABLE"), _ => None, }; if let Some(x) = name { @@ -53568,36 +53721,35 @@ impl fmt::Display for FrontFace { } } } -impl fmt::Display for ImageUsageFlags { +impl fmt::Display for ObjectEntryUsageFlagsNVX { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ - (ImageUsageFlags::TRANSFER_SRC.0, "TRANSFER_SRC"), - (ImageUsageFlags::TRANSFER_DST.0, "TRANSFER_DST"), - (ImageUsageFlags::SAMPLED.0, "SAMPLED"), - (ImageUsageFlags::STORAGE.0, "STORAGE"), - (ImageUsageFlags::COLOR_ATTACHMENT.0, "COLOR_ATTACHMENT"), - ( - ImageUsageFlags::DEPTH_STENCIL_ATTACHMENT.0, - "DEPTH_STENCIL_ATTACHMENT", - ), - ( - ImageUsageFlags::TRANSIENT_ATTACHMENT.0, - "TRANSIENT_ATTACHMENT", - ), - (ImageUsageFlags::INPUT_ATTACHMENT.0, "INPUT_ATTACHMENT"), - ( - ImageUsageFlags::SHADING_RATE_IMAGE_NV.0, - "SHADING_RATE_IMAGE_NV", - ), - (ImageUsageFlags::RESERVED_9_EXT.0, "RESERVED_9_EXT"), + (ObjectEntryUsageFlagsNVX::GRAPHICS.0, "GRAPHICS"), + (ObjectEntryUsageFlagsNVX::COMPUTE.0, "COMPUTE"), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for DescriptorUpdateTemplateType { +impl fmt::Display for DebugReportFlagsEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (DebugReportFlagsEXT::INFORMATION.0, "INFORMATION"), + (DebugReportFlagsEXT::WARNING.0, "WARNING"), + ( + DebugReportFlagsEXT::PERFORMANCE_WARNING.0, + "PERFORMANCE_WARNING", + ), + (DebugReportFlagsEXT::ERROR.0, "ERROR"), + (DebugReportFlagsEXT::DEBUG.0, "DEBUG"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for CopyAccelerationStructureModeNV { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), + Self::CLONE => Some("CLONE"), + Self::COMPACT => Some("COMPACT"), _ => None, }; if let Some(x) = name { @@ -53607,14 +53759,86 @@ impl fmt::Display for DescriptorUpdateTemplateType { } } } -impl fmt::Display for StencilFaceFlags { +impl fmt::Display for ExternalMemoryFeatureFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ - (StencilFaceFlags::FRONT.0, "FRONT"), - (StencilFaceFlags::BACK.0, "BACK"), ( - StencilFaceFlags::STENCIL_FRONT_AND_BACK.0, - "STENCIL_FRONT_AND_BACK", + ExternalMemoryFeatureFlags::EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY.0, + "EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY", + ), + ( + ExternalMemoryFeatureFlags::EXTERNAL_MEMORY_FEATURE_EXPORTABLE.0, + "EXTERNAL_MEMORY_FEATURE_EXPORTABLE", + ), + ( + ExternalMemoryFeatureFlags::EXTERNAL_MEMORY_FEATURE_IMPORTABLE.0, + "EXTERNAL_MEMORY_FEATURE_IMPORTABLE", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for Filter { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::NEAREST => Some("NEAREST"), + Self::LINEAR => Some("LINEAR"), + Self::CUBIC_IMG => Some("CUBIC_IMG"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ShadingRatePaletteEntryNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::NO_INVOCATIONS => Some("NO_INVOCATIONS"), + Self::TYPE_16_INVOCATIONS_PER_PIXEL => Some("TYPE_16_INVOCATIONS_PER_PIXEL"), + Self::TYPE_8_INVOCATIONS_PER_PIXEL => Some("TYPE_8_INVOCATIONS_PER_PIXEL"), + Self::TYPE_4_INVOCATIONS_PER_PIXEL => Some("TYPE_4_INVOCATIONS_PER_PIXEL"), + Self::TYPE_2_INVOCATIONS_PER_PIXEL => Some("TYPE_2_INVOCATIONS_PER_PIXEL"), + Self::TYPE_1_INVOCATION_PER_PIXEL => Some("TYPE_1_INVOCATION_PER_PIXEL"), + Self::TYPE_1_INVOCATION_PER_2X1_PIXELS => Some("TYPE_1_INVOCATION_PER_2X1_PIXELS"), + Self::TYPE_1_INVOCATION_PER_1X2_PIXELS => Some("TYPE_1_INVOCATION_PER_1X2_PIXELS"), + Self::TYPE_1_INVOCATION_PER_2X2_PIXELS => Some("TYPE_1_INVOCATION_PER_2X2_PIXELS"), + Self::TYPE_1_INVOCATION_PER_4X2_PIXELS => Some("TYPE_1_INVOCATION_PER_4X2_PIXELS"), + Self::TYPE_1_INVOCATION_PER_2X4_PIXELS => Some("TYPE_1_INVOCATION_PER_2X4_PIXELS"), + Self::TYPE_1_INVOCATION_PER_4X4_PIXELS => Some("TYPE_1_INVOCATION_PER_4X4_PIXELS"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ExternalSemaphoreHandleTypeFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD.0, + "EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD", + ), + ( + ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32.0, + "EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32", + ), + ( + ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT.0, + "EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT", + ), + ( + ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE.0, + "EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE", + ), + ( + ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD.0, + "EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD", ), ]; display_flags(f, KNOWN, self.0) @@ -53647,55 +53871,24 @@ impl fmt::Display for BuildAccelerationStructureFlagsNV { display_flags(f, KNOWN, self.0) } } -impl fmt::Display for CopyAccelerationStructureModeNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::CLONE => Some("CLONE"), - Self::COMPACT => Some("COMPACT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for SamplerYcbcrRange { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::ITU_FULL => Some("ITU_FULL"), - Self::ITU_NARROW => Some("ITU_NARROW"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for SubpassDescriptionFlags { +impl fmt::Display for DebugUtilsMessageSeverityFlagsEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ - ( - SubpassDescriptionFlags::PER_VIEW_ATTRIBUTES_NVX.0, - "PER_VIEW_ATTRIBUTES_NVX", - ), - ( - SubpassDescriptionFlags::PER_VIEW_POSITION_X_ONLY_NVX.0, - "PER_VIEW_POSITION_X_ONLY_NVX", - ), + (DebugUtilsMessageSeverityFlagsEXT::VERBOSE.0, "VERBOSE"), + (DebugUtilsMessageSeverityFlagsEXT::INFO.0, "INFO"), + (DebugUtilsMessageSeverityFlagsEXT::WARNING.0, "WARNING"), + (DebugUtilsMessageSeverityFlagsEXT::ERROR.0, "ERROR"), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for RayTracingShaderGroupTypeNV { +impl fmt::Display for CoverageModulationModeNV { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::GENERAL => Some("GENERAL"), - Self::TRIANGLES_HIT_GROUP => Some("TRIANGLES_HIT_GROUP"), - Self::PROCEDURAL_HIT_GROUP => Some("PROCEDURAL_HIT_GROUP"), + Self::NONE => Some("NONE"), + Self::RGB => Some("RGB"), + Self::ALPHA => Some("ALPHA"), + Self::RGBA => Some("RGBA"), _ => None, }; if let Some(x) = name { @@ -53705,35 +53898,189 @@ impl fmt::Display for RayTracingShaderGroupTypeNV { } } } -impl fmt::Display for IndirectCommandsLayoutUsageFlagsNVX { +impl fmt::Display for FenceCreateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(FenceCreateFlags::SIGNALED.0, "SIGNALED")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DescriptorType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::SAMPLER => Some("SAMPLER"), + Self::COMBINED_IMAGE_SAMPLER => Some("COMBINED_IMAGE_SAMPLER"), + Self::SAMPLED_IMAGE => Some("SAMPLED_IMAGE"), + Self::STORAGE_IMAGE => Some("STORAGE_IMAGE"), + Self::UNIFORM_TEXEL_BUFFER => Some("UNIFORM_TEXEL_BUFFER"), + Self::STORAGE_TEXEL_BUFFER => Some("STORAGE_TEXEL_BUFFER"), + Self::UNIFORM_BUFFER => Some("UNIFORM_BUFFER"), + Self::STORAGE_BUFFER => Some("STORAGE_BUFFER"), + Self::UNIFORM_BUFFER_DYNAMIC => Some("UNIFORM_BUFFER_DYNAMIC"), + Self::STORAGE_BUFFER_DYNAMIC => Some("STORAGE_BUFFER_DYNAMIC"), + Self::INPUT_ATTACHMENT => Some("INPUT_ATTACHMENT"), + Self::INLINE_UNIFORM_BLOCK_EXT => Some("INLINE_UNIFORM_BLOCK_EXT"), + Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for FrontFace { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::COUNTER_CLOCKWISE => Some("COUNTER_CLOCKWISE"), + Self::CLOCKWISE => Some("CLOCKWISE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for CommandBufferLevel { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::PRIMARY => Some("PRIMARY"), + Self::SECONDARY => Some("SECONDARY"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ImageAspectFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ - ( - IndirectCommandsLayoutUsageFlagsNVX::UNORDERED_SEQUENCES.0, - "UNORDERED_SEQUENCES", - ), - ( - IndirectCommandsLayoutUsageFlagsNVX::SPARSE_SEQUENCES.0, - "SPARSE_SEQUENCES", - ), - ( - IndirectCommandsLayoutUsageFlagsNVX::EMPTY_EXECUTIONS.0, - "EMPTY_EXECUTIONS", - ), - ( - IndirectCommandsLayoutUsageFlagsNVX::INDEXED_SEQUENCES.0, - "INDEXED_SEQUENCES", - ), + (ImageAspectFlags::COLOR.0, "COLOR"), + (ImageAspectFlags::DEPTH.0, "DEPTH"), + (ImageAspectFlags::STENCIL.0, "STENCIL"), + (ImageAspectFlags::METADATA.0, "METADATA"), + (ImageAspectFlags::MEMORY_PLANE_0_EXT.0, "MEMORY_PLANE_0_EXT"), + (ImageAspectFlags::MEMORY_PLANE_1_EXT.0, "MEMORY_PLANE_1_EXT"), + (ImageAspectFlags::MEMORY_PLANE_2_EXT.0, "MEMORY_PLANE_2_EXT"), + (ImageAspectFlags::MEMORY_PLANE_3_EXT.0, "MEMORY_PLANE_3_EXT"), + (ImageAspectFlags::PLANE_0.0, "PLANE_0"), + (ImageAspectFlags::PLANE_1.0, "PLANE_1"), + (ImageAspectFlags::PLANE_2.0, "PLANE_2"), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for PipelineBindPoint { +impl fmt::Display for CullModeFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (CullModeFlags::NONE.0, "NONE"), + (CullModeFlags::FRONT.0, "FRONT"), + (CullModeFlags::BACK.0, "BACK"), + (CullModeFlags::FRONT_AND_BACK.0, "FRONT_AND_BACK"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for AttachmentStoreOp { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::GRAPHICS => Some("GRAPHICS"), - Self::COMPUTE => Some("COMPUTE"), - Self::RAY_TRACING_NV => Some("RAY_TRACING_NV"), + Self::STORE => Some("STORE"), + Self::DONT_CARE => Some("DONT_CARE"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for ImageTiling { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::OPTIMAL => Some("OPTIMAL"), + Self::LINEAR => Some("LINEAR"), + Self::DRM_FORMAT_MODIFIER_EXT => Some("DRM_FORMAT_MODIFIER_EXT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DynamicState { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::VIEWPORT => Some("VIEWPORT"), + Self::SCISSOR => Some("SCISSOR"), + Self::LINE_WIDTH => Some("LINE_WIDTH"), + Self::DEPTH_BIAS => Some("DEPTH_BIAS"), + Self::BLEND_CONSTANTS => Some("BLEND_CONSTANTS"), + Self::DEPTH_BOUNDS => Some("DEPTH_BOUNDS"), + Self::STENCIL_COMPARE_MASK => Some("STENCIL_COMPARE_MASK"), + Self::STENCIL_WRITE_MASK => Some("STENCIL_WRITE_MASK"), + Self::STENCIL_REFERENCE => Some("STENCIL_REFERENCE"), + Self::VIEWPORT_W_SCALING_NV => Some("VIEWPORT_W_SCALING_NV"), + Self::DISCARD_RECTANGLE_EXT => Some("DISCARD_RECTANGLE_EXT"), + Self::SAMPLE_LOCATIONS_EXT => Some("SAMPLE_LOCATIONS_EXT"), + Self::VIEWPORT_SHADING_RATE_PALETTE_NV => Some("VIEWPORT_SHADING_RATE_PALETTE_NV"), + Self::VIEWPORT_COARSE_SAMPLE_ORDER_NV => Some("VIEWPORT_COARSE_SAMPLE_ORDER_NV"), + Self::EXCLUSIVE_SCISSOR_NV => Some("EXCLUSIVE_SCISSOR_NV"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for MemoryAllocateFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(MemoryAllocateFlags::DEVICE_MASK.0, "DEVICE_MASK")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for QueueGlobalPriorityEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::LOW => Some("LOW"), + Self::MEDIUM => Some("MEDIUM"), + Self::HIGH => Some("HIGH"), + Self::REALTIME => Some("REALTIME"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for AttachmentDescriptionFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[(AttachmentDescriptionFlags::MAY_ALIAS.0, "MAY_ALIAS")]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for CompareOp { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::NEVER => Some("NEVER"), + Self::LESS => Some("LESS"), + Self::EQUAL => Some("EQUAL"), + Self::LESS_OR_EQUAL => Some("LESS_OR_EQUAL"), + Self::GREATER => Some("GREATER"), + Self::NOT_EQUAL => Some("NOT_EQUAL"), + Self::GREATER_OR_EQUAL => Some("GREATER_OR_EQUAL"), + Self::ALWAYS => Some("ALWAYS"), _ => None, }; if let Some(x) = name { @@ -53809,83 +54156,43 @@ impl fmt::Display for PipelineStageFlags { display_flags(f, KNOWN, self.0) } } -impl fmt::Display for DebugUtilsMessageSeverityFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (DebugUtilsMessageSeverityFlagsEXT::VERBOSE.0, "VERBOSE"), - (DebugUtilsMessageSeverityFlagsEXT::INFO.0, "INFO"), - (DebugUtilsMessageSeverityFlagsEXT::WARNING.0, "WARNING"), - (DebugUtilsMessageSeverityFlagsEXT::ERROR.0, "ERROR"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ImageCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (ImageCreateFlags::SPARSE_BINDING.0, "SPARSE_BINDING"), - (ImageCreateFlags::SPARSE_RESIDENCY.0, "SPARSE_RESIDENCY"), - (ImageCreateFlags::SPARSE_ALIASED.0, "SPARSE_ALIASED"), - (ImageCreateFlags::MUTABLE_FORMAT.0, "MUTABLE_FORMAT"), - (ImageCreateFlags::CUBE_COMPATIBLE.0, "CUBE_COMPATIBLE"), - (ImageCreateFlags::CORNER_SAMPLED_NV.0, "CORNER_SAMPLED_NV"), - ( - ImageCreateFlags::SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_EXT.0, - "SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_EXT", - ), - (ImageCreateFlags::RESERVED_14_EXT.0, "RESERVED_14_EXT"), - (ImageCreateFlags::ALIAS.0, "ALIAS"), - ( - ImageCreateFlags::SPLIT_INSTANCE_BIND_REGIONS.0, - "SPLIT_INSTANCE_BIND_REGIONS", - ), - ( - ImageCreateFlags::TYPE_2D_ARRAY_COMPATIBLE.0, - "TYPE_2D_ARRAY_COMPATIBLE", - ), - ( - ImageCreateFlags::BLOCK_TEXEL_VIEW_COMPATIBLE.0, - "BLOCK_TEXEL_VIEW_COMPATIBLE", - ), - (ImageCreateFlags::EXTENDED_USAGE.0, "EXTENDED_USAGE"), - (ImageCreateFlags::PROTECTED.0, "PROTECTED"), - (ImageCreateFlags::DISJOINT.0, "DISJOINT"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DescriptorBindingFlagsEXT { +impl fmt::Display for SubpassDescriptionFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ ( - DescriptorBindingFlagsEXT::UPDATE_AFTER_BIND.0, - "UPDATE_AFTER_BIND", + SubpassDescriptionFlags::PER_VIEW_ATTRIBUTES_NVX.0, + "PER_VIEW_ATTRIBUTES_NVX", ), ( - DescriptorBindingFlagsEXT::UPDATE_UNUSED_WHILE_PENDING.0, - "UPDATE_UNUSED_WHILE_PENDING", - ), - ( - DescriptorBindingFlagsEXT::PARTIALLY_BOUND.0, - "PARTIALLY_BOUND", - ), - ( - DescriptorBindingFlagsEXT::VARIABLE_DESCRIPTOR_COUNT.0, - "VARIABLE_DESCRIPTOR_COUNT", + SubpassDescriptionFlags::PER_VIEW_POSITION_X_ONLY_NVX.0, + "PER_VIEW_POSITION_X_ONLY_NVX", ), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for PresentModeKHR { +impl fmt::Display for BlendFactor { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::IMMEDIATE => Some("IMMEDIATE"), - Self::MAILBOX => Some("MAILBOX"), - Self::FIFO => Some("FIFO"), - Self::FIFO_RELAXED => Some("FIFO_RELAXED"), - Self::SHARED_DEMAND_REFRESH => Some("SHARED_DEMAND_REFRESH"), - Self::SHARED_CONTINUOUS_REFRESH => Some("SHARED_CONTINUOUS_REFRESH"), + Self::ZERO => Some("ZERO"), + Self::ONE => Some("ONE"), + Self::SRC_COLOR => Some("SRC_COLOR"), + Self::ONE_MINUS_SRC_COLOR => Some("ONE_MINUS_SRC_COLOR"), + Self::DST_COLOR => Some("DST_COLOR"), + Self::ONE_MINUS_DST_COLOR => Some("ONE_MINUS_DST_COLOR"), + Self::SRC_ALPHA => Some("SRC_ALPHA"), + Self::ONE_MINUS_SRC_ALPHA => Some("ONE_MINUS_SRC_ALPHA"), + Self::DST_ALPHA => Some("DST_ALPHA"), + Self::ONE_MINUS_DST_ALPHA => Some("ONE_MINUS_DST_ALPHA"), + Self::CONSTANT_COLOR => Some("CONSTANT_COLOR"), + Self::ONE_MINUS_CONSTANT_COLOR => Some("ONE_MINUS_CONSTANT_COLOR"), + Self::CONSTANT_ALPHA => Some("CONSTANT_ALPHA"), + Self::ONE_MINUS_CONSTANT_ALPHA => Some("ONE_MINUS_CONSTANT_ALPHA"), + Self::SRC_ALPHA_SATURATE => Some("SRC_ALPHA_SATURATE"), + Self::SRC1_COLOR => Some("SRC1_COLOR"), + Self::ONE_MINUS_SRC1_COLOR => Some("ONE_MINUS_SRC1_COLOR"), + Self::SRC1_ALPHA => Some("SRC1_ALPHA"), + Self::ONE_MINUS_SRC1_ALPHA => Some("ONE_MINUS_SRC1_ALPHA"), _ => None, }; if let Some(x) = name { @@ -53895,14 +54202,122 @@ impl fmt::Display for PresentModeKHR { } } } -impl fmt::Display for ObjectEntryTypeNVX { +impl fmt::Display for ChromaLocation { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), - Self::PIPELINE => Some("PIPELINE"), - Self::INDEX_BUFFER => Some("INDEX_BUFFER"), - Self::VERTEX_BUFFER => Some("VERTEX_BUFFER"), - Self::PUSH_CONSTANT => Some("PUSH_CONSTANT"), + Self::COSITED_EVEN => Some("COSITED_EVEN"), + Self::MIDPOINT => Some("MIDPOINT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for QueryResultFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (QueryResultFlags::TYPE_64.0, "TYPE_64"), + (QueryResultFlags::WAIT.0, "WAIT"), + (QueryResultFlags::WITH_AVAILABILITY.0, "WITH_AVAILABILITY"), + (QueryResultFlags::PARTIAL.0, "PARTIAL"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for GeometryInstanceFlagsNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + GeometryInstanceFlagsNV::TRIANGLE_CULL_DISABLE.0, + "TRIANGLE_CULL_DISABLE", + ), + ( + GeometryInstanceFlagsNV::TRIANGLE_FRONT_COUNTERCLOCKWISE.0, + "TRIANGLE_FRONT_COUNTERCLOCKWISE", + ), + (GeometryInstanceFlagsNV::FORCE_OPAQUE.0, "FORCE_OPAQUE"), + ( + GeometryInstanceFlagsNV::FORCE_NO_OPAQUE.0, + "FORCE_NO_OPAQUE", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SamplerAddressMode { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::REPEAT => Some("REPEAT"), + Self::MIRRORED_REPEAT => Some("MIRRORED_REPEAT"), + Self::CLAMP_TO_EDGE => Some("CLAMP_TO_EDGE"), + Self::CLAMP_TO_BORDER => Some("CLAMP_TO_BORDER"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for MemoryHeapFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (MemoryHeapFlags::DEVICE_LOCAL.0, "DEVICE_LOCAL"), + (MemoryHeapFlags::MULTI_INSTANCE.0, "MULTI_INSTANCE"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for DeviceGroupPresentModeFlagsKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (DeviceGroupPresentModeFlagsKHR::LOCAL.0, "LOCAL"), + (DeviceGroupPresentModeFlagsKHR::REMOTE.0, "REMOTE"), + (DeviceGroupPresentModeFlagsKHR::SUM.0, "SUM"), + ( + DeviceGroupPresentModeFlagsKHR::LOCAL_MULTI_DEVICE.0, + "LOCAL_MULTI_DEVICE", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ColorSpaceKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::SRGB_NONLINEAR => Some("SRGB_NONLINEAR"), + Self::DISPLAY_P3_NONLINEAR_EXT => Some("DISPLAY_P3_NONLINEAR_EXT"), + Self::EXTENDED_SRGB_LINEAR_EXT => Some("EXTENDED_SRGB_LINEAR_EXT"), + Self::DCI_P3_LINEAR_EXT => Some("DCI_P3_LINEAR_EXT"), + Self::DCI_P3_NONLINEAR_EXT => Some("DCI_P3_NONLINEAR_EXT"), + Self::BT709_LINEAR_EXT => Some("BT709_LINEAR_EXT"), + Self::BT709_NONLINEAR_EXT => Some("BT709_NONLINEAR_EXT"), + Self::BT2020_LINEAR_EXT => Some("BT2020_LINEAR_EXT"), + Self::HDR10_ST2084_EXT => Some("HDR10_ST2084_EXT"), + Self::DOLBYVISION_EXT => Some("DOLBYVISION_EXT"), + Self::HDR10_HLG_EXT => Some("HDR10_HLG_EXT"), + Self::ADOBERGB_LINEAR_EXT => Some("ADOBERGB_LINEAR_EXT"), + Self::ADOBERGB_NONLINEAR_EXT => Some("ADOBERGB_NONLINEAR_EXT"), + Self::PASS_THROUGH_EXT => Some("PASS_THROUGH_EXT"), + Self::EXTENDED_SRGB_NONLINEAR_EXT => Some("EXTENDED_SRGB_NONLINEAR_EXT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for GeometryTypeNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::TRIANGLES => Some("TRIANGLES"), + Self::AABBS => Some("AABBS"), _ => None, }; if let Some(x) = name { @@ -53961,13 +54376,28 @@ impl fmt::Display for DebugReportObjectTypeEXT { } } } -impl fmt::Display for CoarseSampleOrderTypeNV { +impl fmt::Display for GeometryFlagsNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (GeometryFlagsNV::OPAQUE.0, "OPAQUE"), + ( + GeometryFlagsNV::NO_DUPLICATE_ANY_HIT_INVOCATION.0, + "NO_DUPLICATE_ANY_HIT_INVOCATION", + ), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for ImageViewType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::DEFAULT => Some("DEFAULT"), - Self::CUSTOM => Some("CUSTOM"), - Self::PIXEL_MAJOR => Some("PIXEL_MAJOR"), - Self::SAMPLE_MAJOR => Some("SAMPLE_MAJOR"), + Self::TYPE_1D => Some("TYPE_1D"), + Self::TYPE_2D => Some("TYPE_2D"), + Self::TYPE_3D => Some("TYPE_3D"), + Self::CUBE => Some("CUBE"), + Self::TYPE_1D_ARRAY => Some("TYPE_1D_ARRAY"), + Self::TYPE_2D_ARRAY => Some("TYPE_2D_ARRAY"), + Self::CUBE_ARRAY => Some("CUBE_ARRAY"), _ => None, }; if let Some(x) = name { @@ -53977,25 +54407,30 @@ impl fmt::Display for CoarseSampleOrderTypeNV { } } } -impl fmt::Display for ObjectEntryUsageFlagsNVX { +impl fmt::Display for FormatFeatureFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (ObjectEntryUsageFlagsNVX::GRAPHICS.0, "GRAPHICS"), - (ObjectEntryUsageFlagsNVX::COMPUTE.0, "COMPUTE"), - ]; + const KNOWN : & [ ( Flags , & str ) ] = & [ ( FormatFeatureFlags :: SAMPLED_IMAGE . 0 , "SAMPLED_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE . 0 , "STORAGE_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE_ATOMIC . 0 , "STORAGE_IMAGE_ATOMIC" ) , ( FormatFeatureFlags :: UNIFORM_TEXEL_BUFFER . 0 , "UNIFORM_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER . 0 , "STORAGE_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER_ATOMIC . 0 , "STORAGE_TEXEL_BUFFER_ATOMIC" ) , ( FormatFeatureFlags :: VERTEX_BUFFER . 0 , "VERTEX_BUFFER" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT . 0 , "COLOR_ATTACHMENT" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT_BLEND . 0 , "COLOR_ATTACHMENT_BLEND" ) , ( FormatFeatureFlags :: DEPTH_STENCIL_ATTACHMENT . 0 , "DEPTH_STENCIL_ATTACHMENT" ) , ( FormatFeatureFlags :: BLIT_SRC . 0 , "BLIT_SRC" ) , ( FormatFeatureFlags :: BLIT_DST . 0 , "BLIT_DST" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_LINEAR . 0 , "SAMPLED_IMAGE_FILTER_LINEAR" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_CUBIC_IMG . 0 , "SAMPLED_IMAGE_FILTER_CUBIC_IMG" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_MINMAX_EXT . 0 , "SAMPLED_IMAGE_FILTER_MINMAX_EXT" ) , ( FormatFeatureFlags :: RESERVED_24_EXT . 0 , "RESERVED_24_EXT" ) , ( FormatFeatureFlags :: TRANSFER_SRC . 0 , "TRANSFER_SRC" ) , ( FormatFeatureFlags :: TRANSFER_DST . 0 , "TRANSFER_DST" ) , ( FormatFeatureFlags :: MIDPOINT_CHROMA_SAMPLES . 0 , "MIDPOINT_CHROMA_SAMPLES" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE" ) , ( FormatFeatureFlags :: DISJOINT . 0 , "DISJOINT" ) , ( FormatFeatureFlags :: COSITED_CHROMA_SAMPLES . 0 , "COSITED_CHROMA_SAMPLES" ) ] ; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for SparseMemoryBindFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(SparseMemoryBindFlags::METADATA.0, "METADATA")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for PipelineCacheHeaderVersion { +impl fmt::Display for SharingMode { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::ONE => Some("ONE"), + Self::EXCLUSIVE => Some("EXCLUSIVE"), + Self::CONCURRENT => Some("CONCURRENT"), + _ => None, + }; + if let Some(x) = name { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for DeviceEventTypeEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::DISPLAY_HOTPLUG => Some("DISPLAY_HOTPLUG"), _ => None, }; if let Some(x) = name { @@ -54033,11 +54468,60 @@ impl fmt::Display for LogicOp { } } } -impl fmt::Display for AttachmentStoreOp { +impl fmt::Display for BlendOp { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::STORE => Some("STORE"), - Self::DONT_CARE => Some("DONT_CARE"), + Self::ADD => Some("ADD"), + Self::SUBTRACT => Some("SUBTRACT"), + Self::REVERSE_SUBTRACT => Some("REVERSE_SUBTRACT"), + Self::MIN => Some("MIN"), + Self::MAX => Some("MAX"), + Self::ZERO_EXT => Some("ZERO_EXT"), + Self::SRC_EXT => Some("SRC_EXT"), + Self::DST_EXT => Some("DST_EXT"), + Self::SRC_OVER_EXT => Some("SRC_OVER_EXT"), + Self::DST_OVER_EXT => Some("DST_OVER_EXT"), + Self::SRC_IN_EXT => Some("SRC_IN_EXT"), + Self::DST_IN_EXT => Some("DST_IN_EXT"), + Self::SRC_OUT_EXT => Some("SRC_OUT_EXT"), + Self::DST_OUT_EXT => Some("DST_OUT_EXT"), + Self::SRC_ATOP_EXT => Some("SRC_ATOP_EXT"), + Self::DST_ATOP_EXT => Some("DST_ATOP_EXT"), + Self::XOR_EXT => Some("XOR_EXT"), + Self::MULTIPLY_EXT => Some("MULTIPLY_EXT"), + Self::SCREEN_EXT => Some("SCREEN_EXT"), + Self::OVERLAY_EXT => Some("OVERLAY_EXT"), + Self::DARKEN_EXT => Some("DARKEN_EXT"), + Self::LIGHTEN_EXT => Some("LIGHTEN_EXT"), + Self::COLORDODGE_EXT => Some("COLORDODGE_EXT"), + Self::COLORBURN_EXT => Some("COLORBURN_EXT"), + Self::HARDLIGHT_EXT => Some("HARDLIGHT_EXT"), + Self::SOFTLIGHT_EXT => Some("SOFTLIGHT_EXT"), + Self::DIFFERENCE_EXT => Some("DIFFERENCE_EXT"), + Self::EXCLUSION_EXT => Some("EXCLUSION_EXT"), + Self::INVERT_EXT => Some("INVERT_EXT"), + Self::INVERT_RGB_EXT => Some("INVERT_RGB_EXT"), + Self::LINEARDODGE_EXT => Some("LINEARDODGE_EXT"), + Self::LINEARBURN_EXT => Some("LINEARBURN_EXT"), + Self::VIVIDLIGHT_EXT => Some("VIVIDLIGHT_EXT"), + Self::LINEARLIGHT_EXT => Some("LINEARLIGHT_EXT"), + Self::PINLIGHT_EXT => Some("PINLIGHT_EXT"), + Self::HARDMIX_EXT => Some("HARDMIX_EXT"), + Self::HSL_HUE_EXT => Some("HSL_HUE_EXT"), + Self::HSL_SATURATION_EXT => Some("HSL_SATURATION_EXT"), + Self::HSL_COLOR_EXT => Some("HSL_COLOR_EXT"), + Self::HSL_LUMINOSITY_EXT => Some("HSL_LUMINOSITY_EXT"), + Self::PLUS_EXT => Some("PLUS_EXT"), + Self::PLUS_CLAMPED_EXT => Some("PLUS_CLAMPED_EXT"), + Self::PLUS_CLAMPED_ALPHA_EXT => Some("PLUS_CLAMPED_ALPHA_EXT"), + Self::PLUS_DARKER_EXT => Some("PLUS_DARKER_EXT"), + Self::MINUS_EXT => Some("MINUS_EXT"), + Self::MINUS_CLAMPED_EXT => Some("MINUS_CLAMPED_EXT"), + Self::CONTRAST_EXT => Some("CONTRAST_EXT"), + Self::INVERT_OVG_EXT => Some("INVERT_OVG_EXT"), + Self::RED_EXT => Some("RED_EXT"), + Self::GREEN_EXT => Some("GREEN_EXT"), + Self::BLUE_EXT => Some("BLUE_EXT"), _ => None, }; if let Some(x) = name { @@ -54047,496 +54531,6 @@ impl fmt::Display for AttachmentStoreOp { } } } -impl fmt::Display for FormatFeatureFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN : & [ ( Flags , & str ) ] = & [ ( FormatFeatureFlags :: SAMPLED_IMAGE . 0 , "SAMPLED_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE . 0 , "STORAGE_IMAGE" ) , ( FormatFeatureFlags :: STORAGE_IMAGE_ATOMIC . 0 , "STORAGE_IMAGE_ATOMIC" ) , ( FormatFeatureFlags :: UNIFORM_TEXEL_BUFFER . 0 , "UNIFORM_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER . 0 , "STORAGE_TEXEL_BUFFER" ) , ( FormatFeatureFlags :: STORAGE_TEXEL_BUFFER_ATOMIC . 0 , "STORAGE_TEXEL_BUFFER_ATOMIC" ) , ( FormatFeatureFlags :: VERTEX_BUFFER . 0 , "VERTEX_BUFFER" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT . 0 , "COLOR_ATTACHMENT" ) , ( FormatFeatureFlags :: COLOR_ATTACHMENT_BLEND . 0 , "COLOR_ATTACHMENT_BLEND" ) , ( FormatFeatureFlags :: DEPTH_STENCIL_ATTACHMENT . 0 , "DEPTH_STENCIL_ATTACHMENT" ) , ( FormatFeatureFlags :: BLIT_SRC . 0 , "BLIT_SRC" ) , ( FormatFeatureFlags :: BLIT_DST . 0 , "BLIT_DST" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_LINEAR . 0 , "SAMPLED_IMAGE_FILTER_LINEAR" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_CUBIC_IMG . 0 , "SAMPLED_IMAGE_FILTER_CUBIC_IMG" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_FILTER_MINMAX_EXT . 0 , "SAMPLED_IMAGE_FILTER_MINMAX_EXT" ) , ( FormatFeatureFlags :: RESERVED_24_EXT . 0 , "RESERVED_24_EXT" ) , ( FormatFeatureFlags :: TRANSFER_SRC . 0 , "TRANSFER_SRC" ) , ( FormatFeatureFlags :: TRANSFER_DST . 0 , "TRANSFER_DST" ) , ( FormatFeatureFlags :: MIDPOINT_CHROMA_SAMPLES . 0 , "MIDPOINT_CHROMA_SAMPLES" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT" ) , ( FormatFeatureFlags :: SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE . 0 , "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE" ) , ( FormatFeatureFlags :: DISJOINT . 0 , "DISJOINT" ) , ( FormatFeatureFlags :: COSITED_CHROMA_SAMPLES . 0 , "COSITED_CHROMA_SAMPLES" ) ] ; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for PipelineCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - PipelineCreateFlags::DISABLE_OPTIMIZATION.0, - "DISABLE_OPTIMIZATION", - ), - ( - PipelineCreateFlags::ALLOW_DERIVATIVES.0, - "ALLOW_DERIVATIVES", - ), - (PipelineCreateFlags::DERIVATIVE.0, "DERIVATIVE"), - (PipelineCreateFlags::DEFER_COMPILE_NV.0, "DEFER_COMPILE_NV"), - ( - PipelineCreateFlags::VIEW_INDEX_FROM_DEVICE_INDEX.0, - "VIEW_INDEX_FROM_DEVICE_INDEX", - ), - (PipelineCreateFlags::DISPATCH_BASE.0, "DISPATCH_BASE"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for CommandPoolCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (CommandPoolCreateFlags::TRANSIENT.0, "TRANSIENT"), - ( - CommandPoolCreateFlags::RESET_COMMAND_BUFFER.0, - "RESET_COMMAND_BUFFER", - ), - (CommandPoolCreateFlags::PROTECTED.0, "PROTECTED"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for DisplayPlaneAlphaFlagsKHR { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (DisplayPlaneAlphaFlagsKHR::OPAQUE.0, "OPAQUE"), - (DisplayPlaneAlphaFlagsKHR::GLOBAL.0, "GLOBAL"), - (DisplayPlaneAlphaFlagsKHR::PER_PIXEL.0, "PER_PIXEL"), - ( - DisplayPlaneAlphaFlagsKHR::PER_PIXEL_PREMULTIPLIED.0, - "PER_PIXEL_PREMULTIPLIED", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for SurfaceCounterFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(SurfaceCounterFlagsEXT::VBLANK.0, "VBLANK")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for RenderPassCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = - &[(RenderPassCreateFlags::RESERVED_0_KHR.0, "RESERVED_0_KHR")]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for PhysicalDeviceType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::OTHER => Some("OTHER"), - Self::INTEGRATED_GPU => Some("INTEGRATED_GPU"), - Self::DISCRETE_GPU => Some("DISCRETE_GPU"), - Self::VIRTUAL_GPU => Some("VIRTUAL_GPU"), - Self::CPU => Some("CPU"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for PolygonMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::FILL => Some("FILL"), - Self::LINE => Some("LINE"), - Self::POINT => Some("POINT"), - Self::FILL_RECTANGLE_NV => Some("FILL_RECTANGLE_NV"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for AccelerationStructureMemoryRequirementsTypeNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::OBJECT => Some("OBJECT"), - Self::BUILD_SCRATCH => Some("BUILD_SCRATCH"), - Self::UPDATE_SCRATCH => Some("UPDATE_SCRATCH"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for CommandBufferUsageFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - CommandBufferUsageFlags::ONE_TIME_SUBMIT.0, - "ONE_TIME_SUBMIT", - ), - ( - CommandBufferUsageFlags::RENDER_PASS_CONTINUE.0, - "RENDER_PASS_CONTINUE", - ), - ( - CommandBufferUsageFlags::SIMULTANEOUS_USE.0, - "SIMULTANEOUS_USE", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ValidationCheckEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::ALL => Some("ALL"), - Self::SHADERS => Some("SHADERS"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for GeometryFlagsNV { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (GeometryFlagsNV::OPAQUE.0, "OPAQUE"), - ( - GeometryFlagsNV::NO_DUPLICATE_ANY_HIT_INVOCATION.0, - "NO_DUPLICATE_ANY_HIT_INVOCATION", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for BufferCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (BufferCreateFlags::SPARSE_BINDING.0, "SPARSE_BINDING"), - (BufferCreateFlags::SPARSE_RESIDENCY.0, "SPARSE_RESIDENCY"), - (BufferCreateFlags::SPARSE_ALIASED.0, "SPARSE_ALIASED"), - (BufferCreateFlags::PROTECTED.0, "PROTECTED"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ExternalSemaphoreHandleTypeFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD.0, - "EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD", - ), - ( - ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32.0, - "EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32", - ), - ( - ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT.0, - "EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT", - ), - ( - ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE.0, - "EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE", - ), - ( - ExternalSemaphoreHandleTypeFlags::EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD.0, - "EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for ObjectType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::UNKNOWN => Some("UNKNOWN"), - Self::INSTANCE => Some("INSTANCE"), - Self::PHYSICAL_DEVICE => Some("PHYSICAL_DEVICE"), - Self::DEVICE => Some("DEVICE"), - Self::QUEUE => Some("QUEUE"), - Self::SEMAPHORE => Some("SEMAPHORE"), - Self::COMMAND_BUFFER => Some("COMMAND_BUFFER"), - Self::FENCE => Some("FENCE"), - Self::DEVICE_MEMORY => Some("DEVICE_MEMORY"), - Self::BUFFER => Some("BUFFER"), - Self::IMAGE => Some("IMAGE"), - Self::EVENT => Some("EVENT"), - Self::QUERY_POOL => Some("QUERY_POOL"), - Self::BUFFER_VIEW => Some("BUFFER_VIEW"), - Self::IMAGE_VIEW => Some("IMAGE_VIEW"), - Self::SHADER_MODULE => Some("SHADER_MODULE"), - Self::PIPELINE_CACHE => Some("PIPELINE_CACHE"), - Self::PIPELINE_LAYOUT => Some("PIPELINE_LAYOUT"), - Self::RENDER_PASS => Some("RENDER_PASS"), - Self::PIPELINE => Some("PIPELINE"), - Self::DESCRIPTOR_SET_LAYOUT => Some("DESCRIPTOR_SET_LAYOUT"), - Self::SAMPLER => Some("SAMPLER"), - Self::DESCRIPTOR_POOL => Some("DESCRIPTOR_POOL"), - Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), - Self::FRAMEBUFFER => Some("FRAMEBUFFER"), - Self::COMMAND_POOL => Some("COMMAND_POOL"), - Self::SURFACE_KHR => Some("SURFACE_KHR"), - Self::SWAPCHAIN_KHR => Some("SWAPCHAIN_KHR"), - Self::DISPLAY_KHR => Some("DISPLAY_KHR"), - Self::DISPLAY_MODE_KHR => Some("DISPLAY_MODE_KHR"), - Self::DEBUG_REPORT_CALLBACK_EXT => Some("DEBUG_REPORT_CALLBACK_EXT"), - Self::OBJECT_TABLE_NVX => Some("OBJECT_TABLE_NVX"), - Self::INDIRECT_COMMANDS_LAYOUT_NVX => Some("INDIRECT_COMMANDS_LAYOUT_NVX"), - Self::DEBUG_UTILS_MESSENGER_EXT => Some("DEBUG_UTILS_MESSENGER_EXT"), - Self::VALIDATION_CACHE_EXT => Some("VALIDATION_CACHE_EXT"), - Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"), - Self::SAMPLER_YCBCR_CONVERSION => Some("SAMPLER_YCBCR_CONVERSION"), - Self::DESCRIPTOR_UPDATE_TEMPLATE => Some("DESCRIPTOR_UPDATE_TEMPLATE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ComponentSwizzle { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::IDENTITY => Some("IDENTITY"), - Self::ZERO => Some("ZERO"), - Self::ONE => Some("ONE"), - Self::R => Some("R"), - Self::G => Some("G"), - Self::B => Some("B"), - Self::A => Some("A"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for CompositeAlphaFlagsKHR { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (CompositeAlphaFlagsKHR::OPAQUE.0, "OPAQUE"), - (CompositeAlphaFlagsKHR::PRE_MULTIPLIED.0, "PRE_MULTIPLIED"), - (CompositeAlphaFlagsKHR::POST_MULTIPLIED.0, "POST_MULTIPLIED"), - (CompositeAlphaFlagsKHR::INHERIT.0, "INHERIT"), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for RasterizationOrderAMD { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::STRICT => Some("STRICT"), - Self::RELAXED => Some("RELAXED"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DisplayEventTypeEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::FIRST_PIXEL_OUT => Some("FIRST_PIXEL_OUT"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for BorderColor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::FLOAT_TRANSPARENT_BLACK => Some("FLOAT_TRANSPARENT_BLACK"), - Self::INT_TRANSPARENT_BLACK => Some("INT_TRANSPARENT_BLACK"), - Self::FLOAT_OPAQUE_BLACK => Some("FLOAT_OPAQUE_BLACK"), - Self::INT_OPAQUE_BLACK => Some("INT_OPAQUE_BLACK"), - Self::FLOAT_OPAQUE_WHITE => Some("FLOAT_OPAQUE_WHITE"), - Self::INT_OPAQUE_WHITE => Some("INT_OPAQUE_WHITE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ShaderInfoTypeAMD { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::STATISTICS => Some("STATISTICS"), - Self::BINARY => Some("BINARY"), - Self::DISASSEMBLY => Some("DISASSEMBLY"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for InternalAllocationType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::EXECUTABLE => Some("EXECUTABLE"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DescriptorSetLayoutCreateFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - ( - DescriptorSetLayoutCreateFlags::PUSH_DESCRIPTOR_KHR.0, - "PUSH_DESCRIPTOR_KHR", - ), - ( - DescriptorSetLayoutCreateFlags::UPDATE_AFTER_BIND_POOL_EXT.0, - "UPDATE_AFTER_BIND_POOL_EXT", - ), - ]; - display_flags(f, KNOWN, self.0) - } -} -impl fmt::Display for IndirectCommandsTokenTypeNVX { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::PIPELINE => Some("PIPELINE"), - Self::DESCRIPTOR_SET => Some("DESCRIPTOR_SET"), - Self::INDEX_BUFFER => Some("INDEX_BUFFER"), - Self::VERTEX_BUFFER => Some("VERTEX_BUFFER"), - Self::PUSH_CONSTANT => Some("PUSH_CONSTANT"), - Self::DRAW_INDEXED => Some("DRAW_INDEXED"), - Self::DRAW => Some("DRAW"), - Self::DISPATCH => Some("DISPATCH"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for BlendFactor { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::ZERO => Some("ZERO"), - Self::ONE => Some("ONE"), - Self::SRC_COLOR => Some("SRC_COLOR"), - Self::ONE_MINUS_SRC_COLOR => Some("ONE_MINUS_SRC_COLOR"), - Self::DST_COLOR => Some("DST_COLOR"), - Self::ONE_MINUS_DST_COLOR => Some("ONE_MINUS_DST_COLOR"), - Self::SRC_ALPHA => Some("SRC_ALPHA"), - Self::ONE_MINUS_SRC_ALPHA => Some("ONE_MINUS_SRC_ALPHA"), - Self::DST_ALPHA => Some("DST_ALPHA"), - Self::ONE_MINUS_DST_ALPHA => Some("ONE_MINUS_DST_ALPHA"), - Self::CONSTANT_COLOR => Some("CONSTANT_COLOR"), - Self::ONE_MINUS_CONSTANT_COLOR => Some("ONE_MINUS_CONSTANT_COLOR"), - Self::CONSTANT_ALPHA => Some("CONSTANT_ALPHA"), - Self::ONE_MINUS_CONSTANT_ALPHA => Some("ONE_MINUS_CONSTANT_ALPHA"), - Self::SRC_ALPHA_SATURATE => Some("SRC_ALPHA_SATURATE"), - Self::SRC1_COLOR => Some("SRC1_COLOR"), - Self::ONE_MINUS_SRC1_COLOR => Some("ONE_MINUS_SRC1_COLOR"), - Self::SRC1_ALPHA => Some("SRC1_ALPHA"), - Self::ONE_MINUS_SRC1_ALPHA => Some("ONE_MINUS_SRC1_ALPHA"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for CompareOp { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::NEVER => Some("NEVER"), - Self::LESS => Some("LESS"), - Self::EQUAL => Some("EQUAL"), - Self::LESS_OR_EQUAL => Some("LESS_OR_EQUAL"), - Self::GREATER => Some("GREATER"), - Self::NOT_EQUAL => Some("NOT_EQUAL"), - Self::GREATER_OR_EQUAL => Some("GREATER_OR_EQUAL"), - Self::ALWAYS => Some("ALWAYS"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for ImageViewType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::TYPE_1D => Some("TYPE_1D"), - Self::TYPE_2D => Some("TYPE_2D"), - Self::TYPE_3D => Some("TYPE_3D"), - Self::CUBE => Some("CUBE"), - Self::TYPE_1D_ARRAY => Some("TYPE_1D_ARRAY"), - Self::TYPE_2D_ARRAY => Some("TYPE_2D_ARRAY"), - Self::CUBE_ARRAY => Some("CUBE_ARRAY"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for PrimitiveTopology { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::POINT_LIST => Some("POINT_LIST"), - Self::LINE_LIST => Some("LINE_LIST"), - Self::LINE_STRIP => Some("LINE_STRIP"), - Self::TRIANGLE_LIST => Some("TRIANGLE_LIST"), - Self::TRIANGLE_STRIP => Some("TRIANGLE_STRIP"), - Self::TRIANGLE_FAN => Some("TRIANGLE_FAN"), - Self::LINE_LIST_WITH_ADJACENCY => Some("LINE_LIST_WITH_ADJACENCY"), - Self::LINE_STRIP_WITH_ADJACENCY => Some("LINE_STRIP_WITH_ADJACENCY"), - Self::TRIANGLE_LIST_WITH_ADJACENCY => Some("TRIANGLE_LIST_WITH_ADJACENCY"), - Self::TRIANGLE_STRIP_WITH_ADJACENCY => Some("TRIANGLE_STRIP_WITH_ADJACENCY"), - Self::PATCH_LIST => Some("PATCH_LIST"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} -impl fmt::Display for DebugUtilsMessageTypeFlagsEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[ - (DebugUtilsMessageTypeFlagsEXT::GENERAL.0, "GENERAL"), - (DebugUtilsMessageTypeFlagsEXT::VALIDATION.0, "VALIDATION"), - (DebugUtilsMessageTypeFlagsEXT::PERFORMANCE.0, "PERFORMANCE"), - ]; - display_flags(f, KNOWN, self.0) - } -} pub type DescriptorUpdateTemplateCreateFlagsKHR = DescriptorUpdateTemplateCreateFlags; pub type PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags; pub type MemoryAllocateFlagsKHR = MemoryAllocateFlags; diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 8ff92aa..e4407eb 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1497,26 +1497,36 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { } let slice_param_ty_tokens; - let ptr_mutability; + let ptr; if param_ty_string.starts_with("*const ") { - slice_param_ty_tokens = - "&'a [".to_string() + ¶m_ty_string[7..] + "]"; - ptr_mutability = ".as_ptr()"; + let slice_type = ¶m_ty_string[7..]; + if slice_type == "c_void" { + slice_param_ty_tokens = "&'a [u8]".to_string(); + ptr = ".as_ptr() as *const c_void"; + } else { + slice_param_ty_tokens = "&'a [".to_string() + slice_type + "]"; + ptr = ".as_ptr()"; + } } else { // *mut - slice_param_ty_tokens = - "&'a mut [".to_string() + ¶m_ty_string[5..] + "]"; - ptr_mutability = ".as_mut_ptr()"; + let slice_type = ¶m_ty_string[5..]; + if slice_type == "c_void" { + slice_param_ty_tokens = "&mut 'a [u8]".to_string(); + ptr = ".as_mut_ptr() as *mut c_void"; + } else { + slice_param_ty_tokens = "&'a mut [".to_string() + slice_type + "]"; + ptr = ".as_mut_ptr()"; + } } let slice_param_ty_tokens = Term::intern(&slice_param_ty_tokens); - let ptr_mutability = Term::intern(ptr_mutability); + let ptr = Term::intern(ptr); match array_type { vkxml::ArrayType::Dynamic => { return Some(quote!{ pub fn #param_ident_short(mut self, #param_ident_short: #slice_param_ty_tokens) -> #name_builder<'a> { self.inner.#array_size_ident = #param_ident_short.len() as _; - self.inner.#param_ident = #param_ident_short#ptr_mutability; + self.inner.#param_ident = #param_ident_short#ptr; self } });