diff --git a/.travis.yml b/.travis.yml index adcbf04..1de3d32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,27 @@ +os: + - linux + - osx + language: rust +before_script: +- rustup component add rustfmt + rust: - stable script: + - cargo fmt --all -- --check - 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/Changelog.md b/Changelog.md index 341f676..c9f000c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,19 @@ +# 0.27.0/1 + +* Extensions are now namespaced. `ash::extensions::khr::Swapchain` +* Removed vendor tags from extension methods +* Added missing functions for VkEvent +* The examples were updated to use the new builder pattern +* A SPIR-V parsing function `ash::util::read_spv` +* Added `get_pipeline_cache_data` + +# 0.26.0 + +* Fix loader on MacOS. + +* Expose function pointers for easier interop with external libraries. + +* Builder now uses bool instead of Bool32. # 0.25.0 * Adds support for Vulkan 1.1 diff --git a/README.md b/README.md index 7f1a4d3..7d282f4 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ let instance = entry.create_instance(&create_info, None) ### `Vec` instead of mutable slices ```Rust -pub fn get_swapchain_images_khr(&self, - swapchain: vk::SwapchainKHR) - -> VkResult>; +pub fn get_swapchain_images(&self, + swapchain: vk::SwapchainKHR) + -> VkResult>; let present_images = swapchain_loader.get_swapchain_images_khr(swapchain).unwrap(); ``` *Note*: Functions don't return `Vec` if this would limit the functionality. See `p_next`. @@ -55,6 +55,12 @@ pub fn cmd_pipeline_barrier(&self, image_memory_barriers: &[vk::ImageMemoryBarrier]); ``` +### Strongly typed handles + +Each Vulkan handle type is exposed as a newtyped struct for improved type safety. Null handles can be constructed with +`T::null()`, and handles may be freely converted to and from `u64` with `Handle::from_raw` and `Handle::as_raw` for +interop with non-Ash Vulkan code. + ### Default implementation for all types ```Rust // No need to manually set the structure type @@ -71,7 +77,11 @@ let pipeline_vertex_input_state_create_info = vk::PipelineVertexInputStateCreate .vertex_binding_descriptions(&Vertex::binding_descriptions()) .vertex_attribute_descriptions(&Vertex::attribute_descriptions()).build(); ``` -*Note*: No validation is done, the lifetimes only have to live as long as the builder object. It is the responsibility of the user to make sure that the pointers are valid. + +Builders implement `Deref` targeting their corresponding Vulkan struct, so references to builders can be passed directly +to Vulkan functions. This is encouraged as doing so allows Rust to check the lifetimes of captured objects are valid, +whereas calling `build` discards lifetime information, making inadvertent use-after-free errors more likely. + ### Flags and constants as associated constants ```Rust @@ -95,12 +105,6 @@ println!("Display: {}", flag); // Display: COLOR_ATTACHMENT_READ | COLOR_ATTACHMENT_WRITE ``` -### Interop -Vulkan objects inside Ash can be constructed from raw values with `Object::from:raw`. Useful if you need to interact with a C library. -```Rust -PipelineBindPoint::from_raw(bindpoint); -``` - ### Function pointer loading Ash also takes care of loading the function pointers. Function pointers are split into 3 categories. @@ -119,9 +123,9 @@ Custom loaders can be implemented. ### Extension loading Additionally, every Vulkan extension has to be loaded explicitly. You can find all extensions under [ash::extensions](https://github.com/MaikKlein/ash/tree/master/ash/src/extensions). ```Rust -use ash::extensions::Swapchain; +use ash::extensions::khr::Swapchain; let swapchain_loader = Swapchain::new(&instance, &device); -let swapchain = swapchain_loader.create_swapchain_khr(&swapchain_create_info).unwrap(); +let swapchain = swapchain_loader.create_swapchain(&swapchain_create_info).unwrap(); ``` ### Raw function pointers diff --git a/appveyor.yml b/appveyor.yml index 5b005a3..574dc1a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,15 +1,21 @@ +os: Visual Studio 2015 + environment: matrix: - - TARGET: 1.28.0-x86_64-pc-windows - COMPILER: msvc + # Stable 64-bit MSVC + - channel: stable + target: x86_64-pc-windows-msvc + install: - - if %COMPILER%==gnu choco install -y mingw - - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:TARGET}-${env:COMPILER}.exe" -FileName "rust-install.exe" - - ps: .\rust-install.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null - - ps: $env:PATH="$env:PATH;C:\rust\bin;C:\tools\mingw64\bin" - - if %COMPILER%==gnu gcc -v + - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe + - rustup-init -yv --default-toolchain %channel% --default-host %target% + - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - rustc -vV - cargo -vV -build_script: - - cargo build --manifest-path ash/Cargo.toml - - cargo build --manifest-path examples/Cargo.toml + +# 'cargo test' takes care of building for us, so disable Appveyor's build stage. This prevents +# the "directory does not contain a project or solution file" error. +build: off + +test_script: +- cargo test --verbose %cargoflags% diff --git a/ash/Cargo.toml b/ash/Cargo.toml index d710d1d..6f86e2a 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.25.0" +version = "0.27.1" authors = ["maik klein "] description = "Vulkan bindings for Rust" license = "MIT" @@ -11,7 +11,7 @@ documentation = "https://docs.rs/ash" [dependencies] shared_library = "0.1.9" -lazy_static = "0.2.1" +lazy_static = "1" [features] default = [] diff --git a/ash/src/device.rs b/ash/src/device.rs index 8623be2..ba6783a 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -51,11 +51,7 @@ pub trait DeviceV1_1: DeviceV1_0 { peer_memory_features } - unsafe fn cmd_set_device_mask( - &self, - command_buffer: vk::CommandBuffer, - device_mask: u32, - ) { + unsafe fn cmd_set_device_mask(&self, command_buffer: vk::CommandBuffer, device_mask: u32) { self.fp_v1_1() .cmd_set_device_mask(command_buffer, device_mask); } @@ -86,11 +82,8 @@ pub trait DeviceV1_1: DeviceV1_0 { info: &vk::ImageMemoryRequirementsInfo2, out: &mut vk::MemoryRequirements2, ) { - self.fp_v1_1().get_image_memory_requirements2( - self.handle(), - info, - out, - ); + self.fp_v1_1() + .get_image_memory_requirements2(self.handle(), info, out); } unsafe fn get_buffer_memory_requirements2( @@ -98,11 +91,8 @@ pub trait DeviceV1_1: DeviceV1_0 { info: &vk::BufferMemoryRequirementsInfo2, out: &mut vk::MemoryRequirements2, ) { - self.fp_v1_1().get_buffer_memory_requirements2( - self.handle(), - info, - out, - ); + self.fp_v1_1() + .get_buffer_memory_requirements2(self.handle(), info, out); } unsafe fn get_image_sparse_memory_requirements2_len( @@ -221,11 +211,8 @@ pub trait DeviceV1_1: DeviceV1_0 { create_info: &vk::DescriptorSetLayoutCreateInfo, out: &mut vk::DescriptorSetLayoutSupport, ) { - self.fp_v1_1().get_descriptor_set_layout_support( - self.handle(), - create_info, - out, - ); + self.fp_v1_1() + .get_descriptor_set_layout_support(self.handle(), create_info, out); } } @@ -269,6 +256,94 @@ pub trait DeviceV1_0 { ); } + unsafe fn create_event( + &self, + create_info: &vk::EventCreateInfo, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut event = mem::uninitialized(); + let err_code = self.fp_v1_0().create_event( + self.handle(), + create_info, + allocation_callbacks.as_raw_ptr(), + &mut event, + ); + match err_code { + vk::Result::SUCCESS => Ok(event), + _ => Err(err_code), + } + } + + /// Returns true if the event was set, and false if the event was reset, otherwise it will + /// return the error code. + unsafe fn get_event_status(&self, event: vk::Event) -> VkResult { + let err_code = self.fp_v1_0().get_event_status(self.handle(), event); + match err_code { + vk::Result::EVENT_SET => Ok(true), + vk::Result::EVENT_RESET => Ok(false), + _ => Err(err_code), + } + } + + unsafe fn set_event(&self, event: vk::Event) -> VkResult<()> { + let err_code = self.fp_v1_0().set_event(self.handle(), event); + match err_code { + vk::Result::SUCCESS => Ok(()), + _ => Err(err_code), + } + } + + unsafe fn reset_event(&self, event: vk::Event) -> VkResult<()> { + let err_code = self.fp_v1_0().reset_event(self.handle(), event); + match err_code { + vk::Result::SUCCESS => Ok(()), + _ => Err(err_code), + } + } + unsafe fn cmd_set_event( + &self, + command_buffer: vk::CommandBuffer, + event: vk::Event, + stage_mask: vk::PipelineStageFlags, + ) { + self.fp_v1_0() + .cmd_set_event(command_buffer, event, stage_mask); + } + unsafe fn cmd_reset_event( + &self, + command_buffer: vk::CommandBuffer, + event: vk::Event, + stage_mask: vk::PipelineStageFlags, + ) { + self.fp_v1_0() + .cmd_reset_event(command_buffer, event, stage_mask); + } + + unsafe fn cmd_wait_events( + &self, + command_buffer: vk::CommandBuffer, + events: &[vk::Event], + src_stage_mask: vk::PipelineStageFlags, + dst_stage_mask: vk::PipelineStageFlags, + memory_barriers: &[vk::MemoryBarrier], + buffer_memory_barriers: &[vk::BufferMemoryBarrier], + image_memory_barriers: &[vk::ImageMemoryBarrier], + ) { + self.fp_v1_0().cmd_wait_events( + command_buffer, + events.len() as _, + events.as_ptr(), + src_stage_mask, + dst_stage_mask, + memory_barriers.len() as _, + memory_barriers.as_ptr(), + buffer_memory_barriers.len() as _, + buffer_memory_barriers.as_ptr(), + image_memory_barriers.len() as _, + image_memory_barriers.as_ptr(), + ); + } + unsafe fn destroy_fence( &self, fence: vk::Fence, @@ -278,6 +353,15 @@ pub trait DeviceV1_0 { .destroy_fence(self.handle(), fence, allocation_callbacks.as_raw_ptr()); } + unsafe fn destroy_event( + &self, + event: vk::Event, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) { + self.fp_v1_0() + .destroy_event(self.handle(), event, allocation_callbacks.as_raw_ptr()); + } + unsafe fn destroy_image( &self, image: vk::Image, @@ -721,11 +805,9 @@ pub trait DeviceV1_0 { } unsafe fn reset_fences(&self, fences: &[vk::Fence]) -> VkResult<()> { - let err_code = self.fp_v1_0().reset_fences( - self.handle(), - fences.len() as u32, - fences.as_ptr(), - ); + let err_code = + self.fp_v1_0() + .reset_fences(self.handle(), fences.len() as u32, fences.as_ptr()); match err_code { vk::Result::SUCCESS => Ok(()), _ => Err(err_code), @@ -1291,6 +1373,34 @@ pub trait DeviceV1_0 { } } + unsafe fn get_pipeline_cache_data( + &self, + pipeline_cache: vk::PipelineCache, + ) -> VkResult> { + let mut data_size: usize = 0; + let err_code = self.fp_v1_0().get_pipeline_cache_data( + self.handle(), + pipeline_cache, + &mut data_size, + ptr::null_mut(), + ); + if err_code != vk::Result::SUCCESS { + return Err(err_code); + }; + let mut data: Vec = Vec::with_capacity(data_size); + let err_code = self.fp_v1_0().get_pipeline_cache_data( + self.handle(), + pipeline_cache, + &mut data_size, + data.as_mut_ptr() as _, + ); + data.set_len(data_size); + match err_code { + vk::Result::SUCCESS => Ok(data), + _ => Err(err_code), + } + } + unsafe fn map_memory( &self, memory: vk::DeviceMemory, @@ -1357,11 +1467,7 @@ pub trait DeviceV1_0 { } } - unsafe fn get_device_queue( - &self, - queue_family_index: u32, - queue_index: u32, - ) -> vk::Queue { + unsafe fn get_device_queue(&self, queue_family_index: u32, queue_index: u32) -> vk::Queue { let mut queue = mem::uninitialized(); self.fp_v1_0() .get_device_queue(self.handle(), queue_family_index, queue_index, &mut queue); @@ -1413,11 +1519,11 @@ pub trait DeviceV1_0 { unsafe fn begin_command_buffer( &self, command_buffer: vk::CommandBuffer, - create_info: &vk::CommandBufferBeginInfo, + begin_info: &vk::CommandBufferBeginInfo, ) -> VkResult<()> { let err_code = self .fp_v1_0() - .begin_command_buffer(command_buffer, create_info); + .begin_command_buffer(command_buffer, begin_info); match err_code { vk::Result::SUCCESS => Ok(()), _ => Err(err_code), @@ -1473,12 +1579,9 @@ pub trait DeviceV1_0 { submits: &[vk::SubmitInfo], fence: vk::Fence, ) -> VkResult<()> { - let err_code = self.fp_v1_0().queue_submit( - queue, - submits.len() as u32, - submits.as_ptr(), - fence, - ); + let err_code = + self.fp_v1_0() + .queue_submit(queue, submits.len() as u32, submits.as_ptr(), fence); match err_code { vk::Result::SUCCESS => Ok(()), _ => Err(err_code), @@ -1725,10 +1828,7 @@ pub struct Device { device_fn_1_1: vk::DeviceFnV1_1, } impl Device { - pub unsafe fn load( - instance_fn: &vk::InstanceFnV1_0, - device: vk::Device, - ) -> Self { + pub unsafe fn load(instance_fn: &vk::InstanceFnV1_0, device: vk::Device) -> Self { let device_fn_1_0 = vk::DeviceFnV1_0::load(|name| { mem::transmute(instance_fn.get_device_proc_addr(device, name.as_ptr())) }); diff --git a/ash/src/entry.rs b/ash/src/entry.rs index 6684152..70b4ba4 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -15,25 +15,17 @@ use RawPtr; #[cfg(windows)] const LIB_PATH: &'static str = "vulkan-1.dll"; -#[cfg( - all( - unix, - not( - any( - target_os = "macos", - target_os = "ios", - target_os = "android" - ) - ) - ) -)] +#[cfg(all( + unix, + not(any(target_os = "macos", target_os = "ios", target_os = "android")) +))] const LIB_PATH: &'static str = "libvulkan.so.1"; #[cfg(target_os = "android")] const LIB_PATH: &'static str = "libvulkan.so"; #[cfg(any(target_os = "macos", target_os = "ios"))] -const LIB_PATH: &'static str = "libMoltenVK.dylib"; +const LIB_PATH: &'static str = "libvulkan.dylib"; lazy_static! { static ref VK_LIB: Result = @@ -73,7 +65,7 @@ impl Error for InstanceError { fn cause(&self) -> Option<&Error> { if let &InstanceError::VkError(ref err) = self { - return err.cause(); + return err.source(); } None } diff --git a/ash/src/extensions/debug_marker.rs b/ash/src/extensions/ext/debug_marker.rs similarity index 81% rename from ash/src/extensions/debug_marker.rs rename to ash/src/extensions/ext/debug_marker.rs index 13ec427..fe954e9 100644 --- a/ash/src/extensions/debug_marker.rs +++ b/ash/src/extensions/ext/debug_marker.rs @@ -11,10 +11,7 @@ pub struct DebugMarker { } impl DebugMarker { - pub fn new( - instance: &I, - device: &D, - ) -> DebugMarker { + pub fn new(instance: &I, device: &D) -> DebugMarker { let debug_marker_fn = vk::ExtDebugMarkerFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) }); @@ -27,7 +24,7 @@ impl DebugMarker { CStr::from_bytes_with_nul(b"VK_EXT_debug_marker\0").expect("Wrong extension string") } - pub unsafe fn debug_marker_set_object_name_ext( + pub unsafe fn debug_marker_set_object_name( &self, device: vk::Device, name_info: &vk::DebugMarkerObjectNameInfoEXT, @@ -41,7 +38,7 @@ impl DebugMarker { } } - pub unsafe fn cmd_debug_marker_begin_ext( + pub unsafe fn cmd_debug_marker_begin( &self, command_buffer: vk::CommandBuffer, marker_info: &vk::DebugMarkerMarkerInfoEXT, @@ -50,12 +47,12 @@ impl DebugMarker { .cmd_debug_marker_begin_ext(command_buffer, marker_info); } - pub unsafe fn cmd_debug_marker_end_ext(&self, command_buffer: vk::CommandBuffer) { + pub unsafe fn cmd_debug_marker_end(&self, command_buffer: vk::CommandBuffer) { self.debug_marker_fn .cmd_debug_marker_end_ext(command_buffer); } - pub unsafe fn cmd_debug_marker_insert_ext( + pub unsafe fn cmd_debug_marker_insert( &self, command_buffer: vk::CommandBuffer, marker_info: &vk::DebugMarkerMarkerInfoEXT, diff --git a/ash/src/extensions/debug_report.rs b/ash/src/extensions/ext/debug_report.rs similarity index 87% rename from ash/src/extensions/debug_report.rs rename to ash/src/extensions/ext/debug_report.rs index b819115..ec8e147 100644 --- a/ash/src/extensions/debug_report.rs +++ b/ash/src/extensions/ext/debug_report.rs @@ -13,10 +13,7 @@ pub struct DebugReport { } impl DebugReport { - pub fn new( - entry: &E, - instance: &I, - ) -> DebugReport { + pub fn new(entry: &E, instance: &I) -> DebugReport { let debug_report_fn = vk::ExtDebugReportFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -30,7 +27,7 @@ impl DebugReport { CStr::from_bytes_with_nul(b"VK_EXT_debug_report\0").expect("Wrong extension string") } - pub unsafe fn destroy_debug_report_callback_ext( + pub unsafe fn destroy_debug_report_callback( &self, debug: vk::DebugReportCallbackEXT, allocation_callbacks: Option<&vk::AllocationCallbacks>, @@ -42,7 +39,7 @@ impl DebugReport { ); } - pub unsafe fn create_debug_report_callback_ext( + pub unsafe fn create_debug_report_callback( &self, create_info: &vk::DebugReportCallbackCreateInfoEXT, allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/debug_utils.rs b/ash/src/extensions/ext/debug_utils.rs similarity index 78% rename from ash/src/extensions/debug_utils.rs rename to ash/src/extensions/ext/debug_utils.rs index bfdc291..443e688 100644 --- a/ash/src/extensions/debug_utils.rs +++ b/ash/src/extensions/ext/debug_utils.rs @@ -12,10 +12,7 @@ pub struct DebugUtils { } impl DebugUtils { - pub fn new( - entry: &E, - instance: &I, - ) -> DebugUtils { + pub fn new(entry: &E, instance: &I) -> DebugUtils { let debug_utils_fn = vk::ExtDebugUtilsFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -29,31 +26,35 @@ impl DebugUtils { CStr::from_bytes_with_nul(b"VK_EXT_debug_utils\0").expect("Wrong extension string") } - pub unsafe fn debug_utils_set_object_name_ext( + pub unsafe fn debug_utils_set_object_name( &self, device: vk::Device, name_info: &vk::DebugUtilsObjectNameInfoEXT, ) -> VkResult<()> { - let err_code = self.debug_utils_fn.set_debug_utils_object_name_ext(device, name_info); + let err_code = self + .debug_utils_fn + .set_debug_utils_object_name_ext(device, name_info); match err_code { vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } - pub unsafe fn debug_utils_set_object_tag_ext( + pub unsafe fn debug_utils_set_object_tag( &self, device: vk::Device, tag_info: &vk::DebugUtilsObjectTagInfoEXT, ) -> VkResult<()> { - let err_code = self.debug_utils_fn.set_debug_utils_object_tag_ext(device, tag_info); + let err_code = self + .debug_utils_fn + .set_debug_utils_object_tag_ext(device, tag_info); match err_code { vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } - pub unsafe fn cmd_begin_debug_utils_label_ext( + pub unsafe fn cmd_begin_debug_utils_label( &self, command_buffer: vk::CommandBuffer, label: &vk::DebugUtilsLabelEXT, @@ -62,12 +63,12 @@ impl DebugUtils { .cmd_begin_debug_utils_label_ext(command_buffer, label); } - pub unsafe fn cmd_end_debug_utils_label_ext(&self, command_buffer: vk::CommandBuffer) { + pub unsafe fn cmd_end_debug_utils_label(&self, command_buffer: vk::CommandBuffer) { self.debug_utils_fn .cmd_end_debug_utils_label_ext(command_buffer); } - pub unsafe fn cmd_insert_debug_utils_label_ext( + pub unsafe fn cmd_insert_debug_utils_label( &self, command_buffer: vk::CommandBuffer, label: &vk::DebugUtilsLabelEXT, @@ -76,7 +77,7 @@ impl DebugUtils { .cmd_insert_debug_utils_label_ext(command_buffer, label); } - pub unsafe fn queue_begin_debug_utils_label_ext( + pub unsafe fn queue_begin_debug_utils_label( &self, queue: vk::Queue, label: &vk::DebugUtilsLabelEXT, @@ -85,11 +86,11 @@ impl DebugUtils { .queue_begin_debug_utils_label_ext(queue, label); } - pub unsafe fn queue_end_debug_utils_label_ext(&self, queue: vk::Queue) { + pub unsafe fn queue_end_debug_utils_label(&self, queue: vk::Queue) { self.debug_utils_fn.queue_end_debug_utils_label_ext(queue); } - pub unsafe fn queue_insert_debug_utils_label_ext( + pub unsafe fn queue_insert_debug_utils_label( &self, queue: vk::Queue, label: &vk::DebugUtilsLabelEXT, @@ -98,7 +99,7 @@ impl DebugUtils { .queue_insert_debug_utils_label_ext(queue, label); } - pub unsafe fn create_debug_utils_messenger_ext( + pub unsafe fn create_debug_utils_messenger( &self, create_info: &vk::DebugUtilsMessengerCreateInfoEXT, allocator: Option<&vk::AllocationCallbacks>, @@ -116,7 +117,7 @@ impl DebugUtils { } } - pub unsafe fn destroy_debug_utils_messenger_ext( + pub unsafe fn destroy_debug_utils_messenger( &self, messenger: vk::DebugUtilsMessengerEXT, allocator: Option<&vk::AllocationCallbacks>, @@ -128,7 +129,7 @@ impl DebugUtils { ); } - pub unsafe fn submit_debug_utils_message_ext( + pub unsafe fn submit_debug_utils_message( &self, instance: vk::Instance, message_severity: vk::DebugUtilsMessageSeverityFlagsEXT, diff --git a/ash/src/extensions/ext/mod.rs b/ash/src/extensions/ext/mod.rs new file mode 100644 index 0000000..eba690f --- /dev/null +++ b/ash/src/extensions/ext/mod.rs @@ -0,0 +1,7 @@ +pub use self::debug_marker::DebugMarker; +pub use self::debug_report::DebugReport; +pub use self::debug_utils::DebugUtils; + +mod debug_marker; +mod debug_report; +mod debug_utils; diff --git a/ash/src/extensions/android_surface.rs b/ash/src/extensions/khr/android_surface.rs similarity index 88% rename from ash/src/extensions/android_surface.rs rename to ash/src/extensions/khr/android_surface.rs index 5a38e59..0ceade6 100644 --- a/ash/src/extensions/android_surface.rs +++ b/ash/src/extensions/khr/android_surface.rs @@ -13,10 +13,7 @@ pub struct AndroidSurface { } impl AndroidSurface { - pub fn new( - entry: &E, - instance: &I, - ) -> AndroidSurface { + pub fn new(entry: &E, instance: &I) -> AndroidSurface { let surface_fn = vk::KhrAndroidSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -30,7 +27,7 @@ impl AndroidSurface { CStr::from_bytes_with_nul(b"VK_KHR_android_surface\0").expect("Wrong extension string") } - pub unsafe fn create_android_surface_khr( + pub unsafe fn create_android_surface( &self, create_info: &vk::AndroidSurfaceCreateInfoKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/display_swapchain.rs b/ash/src/extensions/khr/display_swapchain.rs similarity index 89% rename from ash/src/extensions/display_swapchain.rs rename to ash/src/extensions/khr/display_swapchain.rs index ff02aef..dfe1820 100644 --- a/ash/src/extensions/display_swapchain.rs +++ b/ash/src/extensions/khr/display_swapchain.rs @@ -13,10 +13,7 @@ pub struct DisplaySwapchain { } impl DisplaySwapchain { - pub fn new( - instance: &I, - device: &D, - ) -> DisplaySwapchain { + pub fn new(instance: &I, device: &D) -> DisplaySwapchain { let swapchain_fn = vk::KhrDisplaySwapchainFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) }); @@ -30,7 +27,7 @@ impl DisplaySwapchain { CStr::from_bytes_with_nul(b"VK_KHR_display_swapchain\0").expect("Wrong extension string") } - pub unsafe fn create_shared_swapchains_khr( + pub unsafe fn create_shared_swapchains( &self, create_infos: &[vk::SwapchainCreateInfoKHR], allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/khr/mod.rs b/ash/src/extensions/khr/mod.rs new file mode 100644 index 0000000..8812674 --- /dev/null +++ b/ash/src/extensions/khr/mod.rs @@ -0,0 +1,17 @@ +pub use self::android_surface::AndroidSurface; +pub use self::display_swapchain::DisplaySwapchain; +pub use self::surface::Surface; +pub use self::swapchain::Swapchain; +pub use self::wayland_surface::WaylandSurface; +pub use self::win32_surface::Win32Surface; +pub use self::xcb_surface::XcbSurface; +pub use self::xlib_surface::XlibSurface; + +mod android_surface; +mod display_swapchain; +mod surface; +mod swapchain; +mod wayland_surface; +mod win32_surface; +mod xcb_surface; +mod xlib_surface; diff --git a/ash/src/extensions/surface.rs b/ash/src/extensions/khr/surface.rs similarity index 89% rename from ash/src/extensions/surface.rs rename to ash/src/extensions/khr/surface.rs index 16b8da4..bfcaca4 100644 --- a/ash/src/extensions/surface.rs +++ b/ash/src/extensions/khr/surface.rs @@ -14,10 +14,7 @@ pub struct Surface { } impl Surface { - pub fn new( - entry: &E, - instance: &I, - ) -> Surface { + pub fn new(entry: &E, instance: &I) -> Surface { let surface_fn = vk::KhrSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -31,7 +28,7 @@ impl Surface { CStr::from_bytes_with_nul(b"VK_KHR_surface\0").expect("Wrong extension string") } - pub unsafe fn get_physical_device_surface_support_khr( + pub unsafe fn get_physical_device_surface_support( &self, physical_device: vk::PhysicalDevice, queue_index: u32, @@ -47,7 +44,7 @@ impl Surface { b > 0 } - pub unsafe fn get_physical_device_surface_present_modes_khr( + pub unsafe fn get_physical_device_surface_present_modes( &self, physical_device: vk::PhysicalDevice, surface: vk::SurfaceKHR, @@ -76,7 +73,7 @@ impl Surface { } } - pub unsafe fn get_physical_device_surface_capabilities_khr( + pub unsafe fn get_physical_device_surface_capabilities( &self, physical_device: vk::PhysicalDevice, surface: vk::SurfaceKHR, @@ -95,7 +92,7 @@ impl Surface { } } - pub unsafe fn get_physical_device_surface_formats_khr( + pub unsafe fn get_physical_device_surface_formats( &self, physical_device: vk::PhysicalDevice, surface: vk::SurfaceKHR, @@ -121,7 +118,7 @@ impl Surface { } } - pub unsafe fn destroy_surface_khr( + pub unsafe fn destroy_surface( &self, surface: vk::SurfaceKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/swapchain.rs b/ash/src/extensions/khr/swapchain.rs similarity index 91% rename from ash/src/extensions/swapchain.rs rename to ash/src/extensions/khr/swapchain.rs index 956b5bc..fb24d59 100644 --- a/ash/src/extensions/swapchain.rs +++ b/ash/src/extensions/khr/swapchain.rs @@ -14,10 +14,7 @@ pub struct Swapchain { } impl Swapchain { - pub fn new( - instance: &I, - device: &D, - ) -> Swapchain { + pub fn new(instance: &I, device: &D) -> Swapchain { let swapchain_fn = vk::KhrSwapchainFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) }); @@ -31,7 +28,7 @@ impl Swapchain { CStr::from_bytes_with_nul(b"VK_KHR_swapchain\0").expect("Wrong extension string") } - pub unsafe fn destroy_swapchain_khr( + pub unsafe fn destroy_swapchain( &self, swapchain: vk::SwapchainKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, @@ -44,7 +41,7 @@ impl Swapchain { } /// On success, returns the next image's index and whether the swapchain is suboptimal for the surface. - pub unsafe fn acquire_next_image_khr( + pub unsafe fn acquire_next_image( &self, swapchain: vk::SwapchainKHR, timeout: u64, @@ -67,7 +64,7 @@ impl Swapchain { } } - pub unsafe fn create_swapchain_khr( + pub unsafe fn create_swapchain( &self, create_info: &vk::SwapchainCreateInfoKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, @@ -86,7 +83,7 @@ impl Swapchain { } /// On success, returns whether the swapchain is suboptimal for the surface. - pub unsafe fn queue_present_khr( + pub unsafe fn queue_present( &self, queue: vk::Queue, create_info: &vk::PresentInfoKHR, @@ -99,7 +96,7 @@ impl Swapchain { } } - pub unsafe fn get_swapchain_images_khr( + pub unsafe fn get_swapchain_images( &self, swapchain: vk::SwapchainKHR, ) -> VkResult> { diff --git a/ash/src/extensions/wayland_surface.rs b/ash/src/extensions/khr/wayland_surface.rs similarity index 88% rename from ash/src/extensions/wayland_surface.rs rename to ash/src/extensions/khr/wayland_surface.rs index 482f27d..7a1608c 100644 --- a/ash/src/extensions/wayland_surface.rs +++ b/ash/src/extensions/khr/wayland_surface.rs @@ -13,10 +13,7 @@ pub struct WaylandSurface { } impl WaylandSurface { - pub fn new( - entry: &E, - instance: &I, - ) -> WaylandSurface { + pub fn new(entry: &E, instance: &I) -> WaylandSurface { let surface_fn = vk::KhrWaylandSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -30,7 +27,7 @@ impl WaylandSurface { CStr::from_bytes_with_nul(b"VK_KHR_wayland_surface\0").expect("Wrong extension string") } - pub unsafe fn create_wayland_surface_khr( + pub unsafe fn create_wayland_surface( &self, create_info: &vk::WaylandSurfaceCreateInfoKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/win32_surface.rs b/ash/src/extensions/khr/win32_surface.rs similarity index 88% rename from ash/src/extensions/win32_surface.rs rename to ash/src/extensions/khr/win32_surface.rs index 5576e50..86daec6 100644 --- a/ash/src/extensions/win32_surface.rs +++ b/ash/src/extensions/khr/win32_surface.rs @@ -13,10 +13,7 @@ pub struct Win32Surface { } impl Win32Surface { - pub fn new( - entry: &E, - instance: &I, - ) -> Win32Surface { + pub fn new(entry: &E, instance: &I) -> Win32Surface { let surface_fn = vk::KhrWin32SurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -30,7 +27,7 @@ impl Win32Surface { CStr::from_bytes_with_nul(b"VK_KHR_win32_surface\0").expect("Wrong extension string") } - pub unsafe fn create_win32_surface_khr( + pub unsafe fn create_win32_surface( &self, create_info: &vk::Win32SurfaceCreateInfoKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/xcb_surface.rs b/ash/src/extensions/khr/xcb_surface.rs similarity index 88% rename from ash/src/extensions/xcb_surface.rs rename to ash/src/extensions/khr/xcb_surface.rs index 2c45c36..e3a662d 100644 --- a/ash/src/extensions/xcb_surface.rs +++ b/ash/src/extensions/khr/xcb_surface.rs @@ -13,10 +13,7 @@ pub struct XcbSurface { } impl XcbSurface { - pub fn new( - entry: &E, - instance: &I, - ) -> XcbSurface { + pub fn new(entry: &E, instance: &I) -> XcbSurface { let surface_fn = vk::KhrXcbSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -30,7 +27,7 @@ impl XcbSurface { CStr::from_bytes_with_nul(b"VK_KHR_xcb_surface\0").expect("Wrong extension string") } - pub unsafe fn create_xcb_surface_khr( + pub unsafe fn create_xcb_surface( &self, create_info: &vk::XcbSurfaceCreateInfoKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/xlib_surface.rs b/ash/src/extensions/khr/xlib_surface.rs similarity index 88% rename from ash/src/extensions/xlib_surface.rs rename to ash/src/extensions/khr/xlib_surface.rs index 34293d2..ffd9ab1 100644 --- a/ash/src/extensions/xlib_surface.rs +++ b/ash/src/extensions/khr/xlib_surface.rs @@ -13,10 +13,7 @@ pub struct XlibSurface { } impl XlibSurface { - pub fn new( - entry: &E, - instance: &I, - ) -> XlibSurface { + pub fn new(entry: &E, instance: &I) -> XlibSurface { let surface_fn = vk::KhrXlibSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); @@ -30,7 +27,7 @@ impl XlibSurface { CStr::from_bytes_with_nul(b"VK_KHR_xlib_surface\0").expect("Wrong extension string") } - pub unsafe fn create_xlib_surface_khr( + pub unsafe fn create_xlib_surface( &self, create_info: &vk::XlibSurfaceCreateInfoKHR, allocation_callbacks: Option<&vk::AllocationCallbacks>, diff --git a/ash/src/extensions/mod.rs b/ash/src/extensions/mod.rs index dc41390..fe7443f 100644 --- a/ash/src/extensions/mod.rs +++ b/ash/src/extensions/mod.rs @@ -1,27 +1,4 @@ -pub use self::android_surface::AndroidSurface; -pub use self::debug_marker::DebugMarker; -pub use self::debug_report::DebugReport; -pub use self::debug_utils::DebugUtils; -pub use self::display_swapchain::DisplaySwapchain; -pub use self::ios_surface::IOSSurface; -pub use self::macos_surface::MacOSSurface; -pub use self::surface::Surface; -pub use self::swapchain::Swapchain; -pub use self::wayland_surface::WaylandSurface; -pub use self::win32_surface::Win32Surface; -pub use self::xcb_surface::XcbSurface; -pub use self::xlib_surface::XlibSurface; - -mod android_surface; -mod debug_marker; -mod debug_report; -mod debug_utils; -mod display_swapchain; -mod ios_surface; -mod macos_surface; -mod surface; -mod swapchain; -mod wayland_surface; -mod win32_surface; -mod xcb_surface; -mod xlib_surface; +pub mod ext; +pub mod khr; +pub mod mvk; +pub mod nv; diff --git a/ash/src/extensions/ios_surface.rs b/ash/src/extensions/mvk/ios_surface.rs similarity index 92% rename from ash/src/extensions/ios_surface.rs rename to ash/src/extensions/mvk/ios_surface.rs index 97eaad6..1d7a234 100644 --- a/ash/src/extensions/ios_surface.rs +++ b/ash/src/extensions/mvk/ios_surface.rs @@ -13,10 +13,7 @@ pub struct IOSSurface { } impl IOSSurface { - pub fn new( - entry: &E, - instance: &I, - ) -> IOSSurface{ + pub fn new(entry: &E, instance: &I) -> IOSSurface { let surface_fn = vk::MvkIosSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); diff --git a/ash/src/extensions/macos_surface.rs b/ash/src/extensions/mvk/macos_surface.rs similarity index 92% rename from ash/src/extensions/macos_surface.rs rename to ash/src/extensions/mvk/macos_surface.rs index a7d26ae..8264c95 100644 --- a/ash/src/extensions/macos_surface.rs +++ b/ash/src/extensions/mvk/macos_surface.rs @@ -13,10 +13,7 @@ pub struct MacOSSurface { } impl MacOSSurface { - pub fn new( - entry: &E, - instance: &I, - ) -> MacOSSurface { + pub fn new(entry: &E, instance: &I) -> MacOSSurface { let surface_fn = vk::MvkMacosSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) }); diff --git a/ash/src/extensions/mvk/mod.rs b/ash/src/extensions/mvk/mod.rs new file mode 100644 index 0000000..e475d53 --- /dev/null +++ b/ash/src/extensions/mvk/mod.rs @@ -0,0 +1,5 @@ +pub use self::ios_surface::IOSSurface; +pub use self::macos_surface::MacOSSurface; + +mod ios_surface; +mod macos_surface; diff --git a/ash/src/extensions/nv/mesh_shader.rs b/ash/src/extensions/nv/mesh_shader.rs new file mode 100644 index 0000000..db08f83 --- /dev/null +++ b/ash/src/extensions/nv/mesh_shader.rs @@ -0,0 +1,67 @@ +#![allow(dead_code)] +use std::ffi::CStr; +use std::mem; +use version::{DeviceV1_0, InstanceV1_0}; +use vk; + +#[derive(Clone)] +pub struct MeshShader { + mesh_shader_fn: vk::NvMeshShaderFn, +} + +impl MeshShader { + pub fn new(instance: &I, device: &D) -> MeshShader { + let mesh_shader_fn = vk::NvMeshShaderFn::load(|name| unsafe { + mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) + }); + MeshShader { mesh_shader_fn } + } + pub unsafe fn cmd_draw_mesh_tasks( + &self, + command_buffer: vk::CommandBuffer, + task_count: u32, + first_task: u32, + ) { + self.mesh_shader_fn + .cmd_draw_mesh_tasks_nv(command_buffer, task_count, first_task); + } + pub unsafe fn cmd_draw_mesh_tasks_indirect( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + draw_count: u32, + stride: u32, + ) { + self.mesh_shader_fn.cmd_draw_mesh_tasks_indirect_nv( + command_buffer, + buffer, + offset, + draw_count, + stride, + ); + } + pub unsafe fn cmd_draw_mesh_tasks_indirect_count( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + count_buffer: vk::Buffer, + count_buffer_offset: vk::DeviceSize, + max_draw_count: u32, + stride: u32, + ) { + self.mesh_shader_fn.cmd_draw_mesh_tasks_indirect_count_nv( + command_buffer, + buffer, + offset, + count_buffer, + count_buffer_offset, + max_draw_count, + stride, + ); + } + pub fn name() -> &'static CStr { + CStr::from_bytes_with_nul(b"VK_NV_mesh_shader\0").expect("Wrong extension string") + } +} diff --git a/ash/src/extensions/nv/mod.rs b/ash/src/extensions/nv/mod.rs new file mode 100644 index 0000000..4a8d1e5 --- /dev/null +++ b/ash/src/extensions/nv/mod.rs @@ -0,0 +1,3 @@ +pub use self::mesh_shader::MeshShader; + +mod mesh_shader; 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 173d2da..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 @@ -46,11 +47,7 @@ fn calc_padding(adr: vk::DeviceSize, align: vk::DeviceSize) -> vk::DeviceSize { } impl Align { - pub unsafe fn new( - ptr: *mut c_void, - alignment: vk::DeviceSize, - size: vk::DeviceSize, - ) -> Self { + pub unsafe fn new(ptr: *mut c_void, alignment: vk::DeviceSize, size: vk::DeviceSize) -> Self { let padding = calc_padding(size_of::() as vk::DeviceSize, alignment); let elem_size = size_of::() as vk::DeviceSize + padding; assert!(calc_padding(size, alignment) == 0, "size must be aligned"); @@ -84,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) +} diff --git a/ash/src/vk.rs b/ash/src/vk.rs index d27fa3c..f867110 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -51,9 +51,12 @@ pub type HANDLE = *mut c_void; pub type DWORD = c_ulong; pub type LPCWSTR = *const u16; #[allow(non_camel_case_types)] +pub type zx_handle_t = u32; +#[allow(non_camel_case_types)] pub type SECURITY_ATTRIBUTES = (); pub type ANativeWindow = c_void; pub type AHardwareBuffer = c_void; +#[macro_export] macro_rules! vk_bitflags_wrapped { ( $ name : ident , $ all : expr , $ flag_type : ty ) => { impl Default for $name { @@ -162,6 +165,7 @@ macro_rules! vk_bitflags_wrapped { } }; } +#[macro_export] macro_rules! handle_nondispatchable { ( $ name : ident , $ ty : ident ) => { #[repr(transparent)] @@ -193,6 +197,7 @@ macro_rules! handle_nondispatchable { } }; } +#[macro_export] macro_rules! define_handle { ( $ name : ident , $ ty : ident ) => { #[repr(transparent)] @@ -231,8 +236,11 @@ macro_rules! define_handle { } }; } +#[allow(non_camel_case_types)] +pub type PFN_vkGetInstanceProcAddr = + extern "system" fn(instance: Instance, p_name: *const c_char) -> PFN_vkVoidFunction; pub struct StaticFn { - get_instance_proc_addr: + pub get_instance_proc_addr: extern "system" fn(instance: Instance, p_name: *const c_char) -> PFN_vkVoidFunction, } unsafe impl Send for StaticFn {} @@ -279,21 +287,36 @@ impl StaticFn { (self.get_instance_proc_addr)(instance, p_name) } } +#[allow(non_camel_case_types)] +pub type PFN_vkCreateInstance = extern "system" fn( + p_create_info: *const InstanceCreateInfo, + p_allocator: *const AllocationCallbacks, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkEnumerateInstanceLayerProperties = + extern "system" fn(p_property_count: *mut u32, p_properties: *mut LayerProperties) -> Result; pub struct EntryFnV1_0 { - create_instance: extern "system" fn( + pub create_instance: extern "system" fn( p_create_info: *const InstanceCreateInfo, p_allocator: *const AllocationCallbacks, p_instance: *mut Instance, ) -> Result, - enumerate_instance_extension_properties: - extern "system" fn( - p_layer_name: *const c_char, - p_property_count: *mut u32, - p_properties: *mut ExtensionProperties, - ) -> Result, - 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 {} @@ -394,80 +417,154 @@ impl EntryFnV1_0 { (self.enumerate_instance_layer_properties)(p_property_count, p_properties) } } +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +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; +#[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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateDevice = extern "system" fn( + physical_device: PhysicalDevice, + p_create_info: *const DeviceCreateInfo, + p_allocator: *const AllocationCallbacks, + 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; +#[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; +#[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 struct InstanceFnV1_0 { - destroy_instance: + pub destroy_instance: extern "system" fn(instance: Instance, p_allocator: *const AllocationCallbacks) -> c_void, - enumerate_physical_devices: extern "system" fn( + pub enumerate_physical_devices: extern "system" fn( instance: Instance, p_physical_device_count: *mut u32, p_physical_devices: *mut PhysicalDevice, ) -> Result, - get_physical_device_features: extern "system" fn( + pub get_physical_device_features: extern "system" fn( physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures, ) -> c_void, - get_physical_device_format_properties: - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - p_format_properties: *mut FormatProperties, - ) -> c_void, - 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, - get_physical_device_properties: extern "system" fn( + 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, - 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, - get_physical_device_memory_properties: - extern "system" fn( - physical_device: PhysicalDevice, - p_memory_properties: *mut PhysicalDeviceMemoryProperties, - ) -> c_void, - get_device_proc_addr: + 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, - create_device: extern "system" fn( + pub create_device: extern "system" fn( physical_device: PhysicalDevice, p_create_info: *const DeviceCreateInfo, p_allocator: *const AllocationCallbacks, p_device: *mut Device, ) -> Result, - 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, - enumerate_device_layer_properties: extern "system" fn( + 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, - 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 {} @@ -478,18 +575,18 @@ impl ::std::clone::Clone for InstanceFnV1_0 { enumerate_physical_devices: self.enumerate_physical_devices, get_physical_device_features: self.get_physical_device_features, get_physical_device_format_properties: self.get_physical_device_format_properties, - get_physical_device_image_format_properties: - self.get_physical_device_image_format_properties, + get_physical_device_image_format_properties: self + .get_physical_device_image_format_properties, get_physical_device_properties: self.get_physical_device_properties, - get_physical_device_queue_family_properties: - self.get_physical_device_queue_family_properties, + get_physical_device_queue_family_properties: self + .get_physical_device_queue_family_properties, get_physical_device_memory_properties: self.get_physical_device_memory_properties, get_device_proc_addr: self.get_device_proc_addr, create_device: self.create_device, enumerate_device_extension_properties: self.enumerate_device_extension_properties, enumerate_device_layer_properties: self.enumerate_device_layer_properties, - get_physical_device_sparse_image_format_properties: - self.get_physical_device_sparse_image_format_properties, + get_physical_device_sparse_image_format_properties: self + .get_physical_device_sparse_image_format_properties, } } } @@ -895,35 +992,821 @@ impl InstanceFnV1_0 { ) } } +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyDevice = + extern "system" fn(device: Device, p_allocator: *const AllocationCallbacks) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetDeviceQueue = extern "system" fn( + device: Device, + queue_family_index: u32, + queue_index: u32, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkQueueWaitIdle = extern "system" fn(queue: Queue) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDeviceWaitIdle = extern "system" fn(device: Device) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkAllocateMemory = extern "system" fn( + device: Device, + p_allocate_info: *const MemoryAllocateInfo, + p_allocator: *const AllocationCallbacks, + p_memory: *mut DeviceMemory, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkFreeMemory = extern "system" fn( + device: Device, + memory: DeviceMemory, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkMapMemory = extern "system" fn( + device: Device, + memory: DeviceMemory, + offset: DeviceSize, + size: DeviceSize, + flags: MemoryMapFlags, + pp_data: *mut *mut c_void, +) -> Result; +#[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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkBindBufferMemory = extern "system" fn( + device: Device, + buffer: Buffer, + memory: DeviceMemory, + memory_offset: DeviceSize, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkBindImageMemory = extern "system" fn( + device: Device, + image: Image, + memory: DeviceMemory, + 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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkQueueBindSparse = extern "system" fn( + queue: Queue, + bind_info_count: u32, + p_bind_info: *const BindSparseInfo, + fence: Fence, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateFence = extern "system" fn( + device: Device, + p_create_info: *const FenceCreateInfo, + p_allocator: *const AllocationCallbacks, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkResetFences = + extern "system" fn(device: Device, fence_count: u32, p_fences: *const Fence) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkGetFenceStatus = extern "system" fn(device: Device, fence: Fence) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkWaitForFences = extern "system" fn( + device: Device, + fence_count: u32, + p_fences: *const Fence, + wait_all: Bool32, + timeout: u64, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateSemaphore = extern "system" fn( + device: Device, + p_create_info: *const SemaphoreCreateInfo, + p_allocator: *const AllocationCallbacks, + p_semaphore: *mut Semaphore, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroySemaphore = extern "system" fn( + device: Device, + semaphore: Semaphore, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateEvent = extern "system" fn( + device: Device, + p_create_info: *const EventCreateInfo, + p_allocator: *const AllocationCallbacks, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkGetEventStatus = extern "system" fn(device: Device, event: Event) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkSetEvent = extern "system" fn(device: Device, event: Event) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkResetEvent = extern "system" fn(device: Device, event: Event) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateQueryPool = extern "system" fn( + device: Device, + p_create_info: *const QueryPoolCreateInfo, + p_allocator: *const AllocationCallbacks, + p_query_pool: *mut QueryPool, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyQueryPool = extern "system" fn( + device: Device, + query_pool: QueryPool, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetQueryPoolResults = extern "system" fn( + device: Device, + query_pool: QueryPool, + first_query: u32, + query_count: u32, + data_size: usize, + p_data: *mut c_void, + stride: DeviceSize, + flags: QueryResultFlags, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateBuffer = extern "system" fn( + device: Device, + p_create_info: *const BufferCreateInfo, + p_allocator: *const AllocationCallbacks, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateBufferView = extern "system" fn( + device: Device, + p_create_info: *const BufferViewCreateInfo, + p_allocator: *const AllocationCallbacks, + p_view: *mut BufferView, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyBufferView = extern "system" fn( + device: Device, + buffer_view: BufferView, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateImage = extern "system" fn( + device: Device, + p_create_info: *const ImageCreateInfo, + p_allocator: *const AllocationCallbacks, + 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; +#[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; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateImageView = extern "system" fn( + device: Device, + p_create_info: *const ImageViewCreateInfo, + p_allocator: *const AllocationCallbacks, + p_view: *mut ImageView, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyImageView = extern "system" fn( + device: Device, + image_view: ImageView, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyShaderModule = extern "system" fn( + device: Device, + shader_module: ShaderModule, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyPipelineCache = extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPipelineCacheData = extern "system" fn( + device: Device, + pipeline_cache: PipelineCache, + p_data_size: *mut usize, + p_data: *mut c_void, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkMergePipelineCaches = extern "system" fn( + device: Device, + dst_cache: PipelineCache, + src_cache_count: u32, + 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; +#[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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyPipelineLayout = extern "system" fn( + device: Device, + pipeline_layout: PipelineLayout, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateSampler = extern "system" fn( + device: Device, + p_create_info: *const SamplerCreateInfo, + p_allocator: *const AllocationCallbacks, + 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; +#[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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyDescriptorPool = extern "system" fn( + device: Device, + descriptor_pool: DescriptorPool, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkResetDescriptorPool = extern "system" fn( + device: Device, + descriptor_pool: DescriptorPool, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkFreeDescriptorSets = extern "system" fn( + device: Device, + descriptor_pool: DescriptorPool, + descriptor_set_count: u32, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateFramebuffer = extern "system" fn( + device: Device, + p_create_info: *const FramebufferCreateInfo, + p_allocator: *const AllocationCallbacks, + p_framebuffer: *mut Framebuffer, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyFramebuffer = extern "system" fn( + device: Device, + framebuffer: Framebuffer, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateRenderPass = extern "system" fn( + device: Device, + p_create_info: *const RenderPassCreateInfo, + p_allocator: *const AllocationCallbacks, + p_render_pass: *mut RenderPass, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyRenderPass = extern "system" fn( + device: Device, + render_pass: RenderPass, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCreateCommandPool = extern "system" fn( + device: Device, + p_create_info: *const CommandPoolCreateInfo, + p_allocator: *const AllocationCallbacks, + p_command_pool: *mut CommandPool, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyCommandPool = extern "system" fn( + device: Device, + command_pool: CommandPool, + 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; +#[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; +#[allow(non_camel_case_types)] +pub type PFN_vkFreeCommandBuffers = extern "system" fn( + device: Device, + command_pool: CommandPool, + command_buffer_count: u32, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkEndCommandBuffer = extern "system" fn(command_buffer: CommandBuffer) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkResetCommandBuffer = + extern "system" fn(command_buffer: CommandBuffer, flags: CommandBufferResetFlags) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBindPipeline = extern "system" fn( + command_buffer: CommandBuffer, + pipeline_bind_point: PipelineBindPoint, + pipeline: Pipeline, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetViewport = extern "system" fn( + command_buffer: CommandBuffer, + first_viewport: u32, + viewport_count: u32, + p_viewports: *const Viewport, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetScissor = extern "system" fn( + command_buffer: CommandBuffer, + first_scissor: u32, + scissor_count: u32, + p_scissors: *const Rect2D, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetLineWidth = + extern "system" fn(command_buffer: CommandBuffer, line_width: f32) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetDepthBias = extern "system" fn( + command_buffer: CommandBuffer, + depth_bias_constant_factor: f32, + depth_bias_clamp: f32, + depth_bias_slope_factor: f32, +) -> c_void; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetStencilCompareMask = extern "system" fn( + command_buffer: CommandBuffer, + face_mask: StencilFaceFlags, + 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; +#[allow(non_camel_case_types)] +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, + pipeline_bind_point: PipelineBindPoint, + layout: PipelineLayout, + first_set: u32, + descriptor_set_count: u32, + p_descriptor_sets: *const DescriptorSet, + dynamic_offset_count: u32, + p_dynamic_offsets: *const u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBindIndexBuffer = extern "system" fn( + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + index_type: IndexType, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBindVertexBuffers = extern "system" fn( + command_buffer: CommandBuffer, + first_binding: u32, + binding_count: u32, + p_buffers: *const Buffer, + p_offsets: *const DeviceSize, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDraw = extern "system" fn( + command_buffer: CommandBuffer, + vertex_count: u32, + instance_count: u32, + first_vertex: u32, + first_instance: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndexed = extern "system" fn( + command_buffer: CommandBuffer, + index_count: u32, + instance_count: u32, + first_index: u32, + vertex_offset: i32, + first_instance: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndirect = extern "system" fn( + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + draw_count: u32, + stride: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndexedIndirect = extern "system" fn( + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + draw_count: u32, + stride: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDispatch = extern "system" fn( + command_buffer: CommandBuffer, + group_count_x: u32, + group_count_y: u32, + group_count_z: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDispatchIndirect = + extern "system" fn(command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdCopyBuffer = extern "system" fn( + command_buffer: CommandBuffer, + src_buffer: Buffer, + dst_buffer: Buffer, + region_count: u32, + p_regions: *const BufferCopy, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdCopyImage = extern "system" fn( + command_buffer: CommandBuffer, + src_image: Image, + src_image_layout: ImageLayout, + dst_image: Image, + dst_image_layout: ImageLayout, + region_count: u32, + p_regions: *const ImageCopy, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBlitImage = extern "system" fn( + command_buffer: CommandBuffer, + src_image: Image, + src_image_layout: ImageLayout, + dst_image: Image, + dst_image_layout: ImageLayout, + region_count: u32, + p_regions: *const ImageBlit, + filter: Filter, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdCopyBufferToImage = extern "system" fn( + command_buffer: CommandBuffer, + src_buffer: Buffer, + dst_image: Image, + dst_image_layout: ImageLayout, + region_count: u32, + p_regions: *const BufferImageCopy, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdCopyImageToBuffer = extern "system" fn( + command_buffer: CommandBuffer, + src_image: Image, + src_image_layout: ImageLayout, + dst_buffer: Buffer, + region_count: u32, + p_regions: *const BufferImageCopy, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdUpdateBuffer = extern "system" fn( + command_buffer: CommandBuffer, + dst_buffer: Buffer, + dst_offset: DeviceSize, + data_size: DeviceSize, + p_data: *const c_void, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdFillBuffer = extern "system" fn( + command_buffer: CommandBuffer, + dst_buffer: Buffer, + dst_offset: DeviceSize, + size: DeviceSize, + data: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdClearColorImage = extern "system" fn( + command_buffer: CommandBuffer, + image: Image, + image_layout: ImageLayout, + p_color: *const ClearColorValue, + range_count: u32, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdClearAttachments = extern "system" fn( + command_buffer: CommandBuffer, + attachment_count: u32, + p_attachments: *const ClearAttachment, + rect_count: u32, + p_rects: *const ClearRect, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdResolveImage = extern "system" fn( + command_buffer: CommandBuffer, + src_image: Image, + src_image_layout: ImageLayout, + dst_image: Image, + dst_image_layout: ImageLayout, + region_count: u32, + 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; +#[allow(non_camel_case_types)] +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; +#[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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBeginQuery = extern "system" fn( + command_buffer: CommandBuffer, + query_pool: QueryPool, + query: u32, + flags: QueryControlFlags, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdEndQuery = + extern "system" fn(command_buffer: CommandBuffer, query_pool: QueryPool, query: u32) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdResetQueryPool = extern "system" fn( + command_buffer: CommandBuffer, + query_pool: QueryPool, + first_query: u32, + query_count: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdWriteTimestamp = extern "system" fn( + command_buffer: CommandBuffer, + pipeline_stage: PipelineStageFlags, + query_pool: QueryPool, + query: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdCopyQueryPoolResults = extern "system" fn( + command_buffer: CommandBuffer, + query_pool: QueryPool, + first_query: u32, + query_count: u32, + dst_buffer: Buffer, + dst_offset: DeviceSize, + stride: DeviceSize, + flags: QueryResultFlags, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdPushConstants = extern "system" fn( + command_buffer: CommandBuffer, + layout: PipelineLayout, + stage_flags: ShaderStageFlags, + offset: u32, + size: u32, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdNextSubpass = + extern "system" fn(command_buffer: CommandBuffer, contents: SubpassContents) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdEndRenderPass = extern "system" fn(command_buffer: CommandBuffer) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdExecuteCommands = extern "system" fn( + command_buffer: CommandBuffer, + command_buffer_count: u32, + p_command_buffers: *const CommandBuffer, +) -> c_void; pub struct DeviceFnV1_0 { - destroy_device: + pub destroy_device: extern "system" fn(device: Device, p_allocator: *const AllocationCallbacks) -> c_void, - get_device_queue: extern "system" fn( + pub get_device_queue: extern "system" fn( device: Device, queue_family_index: u32, queue_index: u32, p_queue: *mut Queue, ) -> c_void, - queue_submit: extern "system" fn( + pub queue_submit: extern "system" fn( queue: Queue, submit_count: u32, p_submits: *const SubmitInfo, fence: Fence, ) -> Result, - queue_wait_idle: extern "system" fn(queue: Queue) -> Result, - device_wait_idle: extern "system" fn(device: Device) -> Result, - allocate_memory: extern "system" fn( + pub queue_wait_idle: extern "system" fn(queue: Queue) -> Result, + pub device_wait_idle: extern "system" fn(device: Device) -> Result, + pub allocate_memory: extern "system" fn( device: Device, p_allocate_info: *const MemoryAllocateInfo, p_allocator: *const AllocationCallbacks, p_memory: *mut DeviceMemory, ) -> Result, - free_memory: extern "system" fn( + pub free_memory: extern "system" fn( device: Device, memory: DeviceMemory, p_allocator: *const AllocationCallbacks, ) -> c_void, - map_memory: extern "system" fn( + pub map_memory: extern "system" fn( device: Device, memory: DeviceMemory, offset: DeviceSize, @@ -931,113 +1814,114 @@ pub struct DeviceFnV1_0 { flags: MemoryMapFlags, pp_data: *mut *mut c_void, ) -> Result, - unmap_memory: extern "system" fn(device: Device, memory: DeviceMemory) -> c_void, - flush_mapped_memory_ranges: extern "system" fn( + pub unmap_memory: extern "system" fn(device: Device, memory: DeviceMemory) -> c_void, + pub flush_mapped_memory_ranges: extern "system" fn( device: Device, memory_range_count: u32, p_memory_ranges: *const MappedMemoryRange, ) -> Result, - invalidate_mapped_memory_ranges: extern "system" fn( + pub invalidate_mapped_memory_ranges: extern "system" fn( device: Device, memory_range_count: u32, p_memory_ranges: *const MappedMemoryRange, ) -> Result, - get_device_memory_commitment: extern "system" fn( + pub get_device_memory_commitment: extern "system" fn( device: Device, memory: DeviceMemory, p_committed_memory_in_bytes: *mut DeviceSize, ) -> c_void, - bind_buffer_memory: extern "system" fn( + pub bind_buffer_memory: extern "system" fn( device: Device, buffer: Buffer, memory: DeviceMemory, memory_offset: DeviceSize, ) -> Result, - bind_image_memory: extern "system" fn( + pub bind_image_memory: extern "system" fn( device: Device, image: Image, memory: DeviceMemory, memory_offset: DeviceSize, ) -> Result, - get_buffer_memory_requirements: - extern "system" fn( - device: Device, - buffer: Buffer, - p_memory_requirements: *mut MemoryRequirements, - ) -> c_void, - get_image_memory_requirements: - extern "system" fn( - device: Device, - image: Image, - p_memory_requirements: *mut MemoryRequirements, - ) -> c_void, - 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, - queue_bind_sparse: extern "system" fn( + 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, p_bind_info: *const BindSparseInfo, fence: Fence, ) -> Result, - create_fence: extern "system" fn( + pub create_fence: extern "system" fn( device: Device, p_create_info: *const FenceCreateInfo, p_allocator: *const AllocationCallbacks, p_fence: *mut Fence, ) -> Result, - destroy_fence: - extern "system" fn(device: Device, fence: Fence, p_allocator: *const AllocationCallbacks) - -> c_void, - reset_fences: + 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, - get_fence_status: extern "system" fn(device: Device, fence: Fence) -> Result, - wait_for_fences: extern "system" fn( + pub get_fence_status: extern "system" fn(device: Device, fence: Fence) -> Result, + pub wait_for_fences: extern "system" fn( device: Device, fence_count: u32, p_fences: *const Fence, wait_all: Bool32, timeout: u64, ) -> Result, - create_semaphore: extern "system" fn( + pub create_semaphore: extern "system" fn( device: Device, p_create_info: *const SemaphoreCreateInfo, p_allocator: *const AllocationCallbacks, p_semaphore: *mut Semaphore, ) -> Result, - destroy_semaphore: extern "system" fn( + pub destroy_semaphore: extern "system" fn( device: Device, semaphore: Semaphore, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_event: extern "system" fn( + pub create_event: extern "system" fn( device: Device, p_create_info: *const EventCreateInfo, p_allocator: *const AllocationCallbacks, p_event: *mut Event, ) -> Result, - destroy_event: - extern "system" fn(device: Device, event: Event, p_allocator: *const AllocationCallbacks) - -> c_void, - get_event_status: extern "system" fn(device: Device, event: Event) -> Result, - set_event: extern "system" fn(device: Device, event: Event) -> Result, - reset_event: extern "system" fn(device: Device, event: Event) -> Result, - create_query_pool: extern "system" fn( + 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, + pub create_query_pool: extern "system" fn( device: Device, p_create_info: *const QueryPoolCreateInfo, p_allocator: *const AllocationCallbacks, p_query_pool: *mut QueryPool, ) -> Result, - destroy_query_pool: extern "system" fn( + pub destroy_query_pool: extern "system" fn( device: Device, query_pool: QueryPool, p_allocator: *const AllocationCallbacks, ) -> c_void, - get_query_pool_results: extern "system" fn( + pub get_query_pool_results: extern "system" fn( device: Device, query_pool: QueryPool, first_query: u32, @@ -1047,96 +1931,99 @@ pub struct DeviceFnV1_0 { stride: DeviceSize, flags: QueryResultFlags, ) -> Result, - create_buffer: extern "system" fn( + pub create_buffer: extern "system" fn( device: Device, p_create_info: *const BufferCreateInfo, p_allocator: *const AllocationCallbacks, p_buffer: *mut Buffer, ) -> Result, - destroy_buffer: - extern "system" fn(device: Device, buffer: Buffer, p_allocator: *const AllocationCallbacks) - -> c_void, - create_buffer_view: extern "system" fn( + 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, p_allocator: *const AllocationCallbacks, p_view: *mut BufferView, ) -> Result, - destroy_buffer_view: extern "system" fn( + pub destroy_buffer_view: extern "system" fn( device: Device, buffer_view: BufferView, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_image: extern "system" fn( + pub create_image: extern "system" fn( device: Device, p_create_info: *const ImageCreateInfo, p_allocator: *const AllocationCallbacks, p_image: *mut Image, ) -> Result, - destroy_image: - extern "system" fn(device: Device, image: Image, p_allocator: *const AllocationCallbacks) - -> c_void, - get_image_subresource_layout: extern "system" fn( + 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, p_subresource: *const ImageSubresource, p_layout: *mut SubresourceLayout, ) -> c_void, - create_image_view: extern "system" fn( + pub create_image_view: extern "system" fn( device: Device, p_create_info: *const ImageViewCreateInfo, p_allocator: *const AllocationCallbacks, p_view: *mut ImageView, ) -> Result, - destroy_image_view: extern "system" fn( + pub destroy_image_view: extern "system" fn( device: Device, image_view: ImageView, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_shader_module: extern "system" fn( + pub create_shader_module: extern "system" fn( device: Device, p_create_info: *const ShaderModuleCreateInfo, p_allocator: *const AllocationCallbacks, p_shader_module: *mut ShaderModule, ) -> Result, - destroy_shader_module: extern "system" fn( + pub destroy_shader_module: extern "system" fn( device: Device, shader_module: ShaderModule, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_pipeline_cache: extern "system" fn( + pub create_pipeline_cache: extern "system" fn( device: Device, p_create_info: *const PipelineCacheCreateInfo, p_allocator: *const AllocationCallbacks, p_pipeline_cache: *mut PipelineCache, ) -> Result, - destroy_pipeline_cache: extern "system" fn( + pub destroy_pipeline_cache: extern "system" fn( device: Device, pipeline_cache: PipelineCache, p_allocator: *const AllocationCallbacks, ) -> c_void, - get_pipeline_cache_data: extern "system" fn( + pub get_pipeline_cache_data: extern "system" fn( device: Device, pipeline_cache: PipelineCache, p_data_size: *mut usize, p_data: *mut c_void, ) -> Result, - merge_pipeline_caches: extern "system" fn( + pub merge_pipeline_caches: extern "system" fn( device: Device, dst_cache: PipelineCache, src_cache_count: u32, p_src_caches: *const PipelineCache, ) -> Result, - 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, - create_compute_pipelines: extern "system" fn( + 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, @@ -1144,184 +2031,187 @@ pub struct DeviceFnV1_0 { p_allocator: *const AllocationCallbacks, p_pipelines: *mut Pipeline, ) -> Result, - destroy_pipeline: extern "system" fn( + pub destroy_pipeline: extern "system" fn( device: Device, pipeline: Pipeline, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_pipeline_layout: extern "system" fn( + pub create_pipeline_layout: extern "system" fn( device: Device, p_create_info: *const PipelineLayoutCreateInfo, p_allocator: *const AllocationCallbacks, p_pipeline_layout: *mut PipelineLayout, ) -> Result, - destroy_pipeline_layout: extern "system" fn( + pub destroy_pipeline_layout: extern "system" fn( device: Device, pipeline_layout: PipelineLayout, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_sampler: extern "system" fn( + pub create_sampler: extern "system" fn( device: Device, p_create_info: *const SamplerCreateInfo, p_allocator: *const AllocationCallbacks, p_sampler: *mut Sampler, ) -> Result, - destroy_sampler: extern "system" fn( + pub destroy_sampler: extern "system" fn( device: Device, sampler: Sampler, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_descriptor_set_layout: - extern "system" fn( - device: Device, - p_create_info: *const DescriptorSetLayoutCreateInfo, - p_allocator: *const AllocationCallbacks, - p_set_layout: *mut DescriptorSetLayout, - ) -> Result, - destroy_descriptor_set_layout: extern "system" fn( + 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, - create_descriptor_pool: extern "system" fn( + pub create_descriptor_pool: extern "system" fn( device: Device, p_create_info: *const DescriptorPoolCreateInfo, p_allocator: *const AllocationCallbacks, p_descriptor_pool: *mut DescriptorPool, ) -> Result, - destroy_descriptor_pool: extern "system" fn( + pub destroy_descriptor_pool: extern "system" fn( device: Device, descriptor_pool: DescriptorPool, p_allocator: *const AllocationCallbacks, ) -> c_void, - reset_descriptor_pool: extern "system" fn( + pub reset_descriptor_pool: extern "system" fn( device: Device, descriptor_pool: DescriptorPool, flags: DescriptorPoolResetFlags, ) -> Result, - allocate_descriptor_sets: extern "system" fn( + pub allocate_descriptor_sets: extern "system" fn( device: Device, p_allocate_info: *const DescriptorSetAllocateInfo, p_descriptor_sets: *mut DescriptorSet, ) -> Result, - free_descriptor_sets: extern "system" fn( + pub free_descriptor_sets: extern "system" fn( device: Device, descriptor_pool: DescriptorPool, descriptor_set_count: u32, p_descriptor_sets: *const DescriptorSet, ) -> Result, - update_descriptor_sets: extern "system" fn( + pub update_descriptor_sets: 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, - create_framebuffer: extern "system" fn( + pub create_framebuffer: extern "system" fn( device: Device, p_create_info: *const FramebufferCreateInfo, p_allocator: *const AllocationCallbacks, p_framebuffer: *mut Framebuffer, ) -> Result, - destroy_framebuffer: extern "system" fn( + pub destroy_framebuffer: extern "system" fn( device: Device, framebuffer: Framebuffer, p_allocator: *const AllocationCallbacks, ) -> c_void, - create_render_pass: extern "system" fn( + pub create_render_pass: extern "system" fn( device: Device, p_create_info: *const RenderPassCreateInfo, p_allocator: *const AllocationCallbacks, p_render_pass: *mut RenderPass, ) -> Result, - destroy_render_pass: extern "system" fn( + pub destroy_render_pass: extern "system" fn( device: Device, render_pass: RenderPass, p_allocator: *const AllocationCallbacks, ) -> c_void, - get_render_area_granularity: - extern "system" fn(device: Device, render_pass: RenderPass, p_granularity: *mut Extent2D) - -> c_void, - create_command_pool: extern "system" fn( + 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, p_allocator: *const AllocationCallbacks, p_command_pool: *mut CommandPool, ) -> Result, - destroy_command_pool: extern "system" fn( + pub destroy_command_pool: extern "system" fn( device: Device, command_pool: CommandPool, p_allocator: *const AllocationCallbacks, ) -> c_void, - reset_command_pool: - extern "system" fn(device: Device, command_pool: CommandPool, flags: CommandPoolResetFlags) - -> Result, - allocate_command_buffers: extern "system" fn( + 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, - free_command_buffers: extern "system" fn( + pub free_command_buffers: extern "system" fn( device: Device, command_pool: CommandPool, command_buffer_count: u32, p_command_buffers: *const CommandBuffer, ) -> c_void, - begin_command_buffer: extern "system" fn( + pub begin_command_buffer: extern "system" fn( command_buffer: CommandBuffer, p_begin_info: *const CommandBufferBeginInfo, ) -> Result, - end_command_buffer: extern "system" fn(command_buffer: CommandBuffer) -> Result, - reset_command_buffer: + pub end_command_buffer: extern "system" fn(command_buffer: CommandBuffer) -> Result, + pub reset_command_buffer: extern "system" fn(command_buffer: CommandBuffer, flags: CommandBufferResetFlags) -> Result, - cmd_bind_pipeline: extern "system" fn( + pub cmd_bind_pipeline: extern "system" fn( command_buffer: CommandBuffer, pipeline_bind_point: PipelineBindPoint, pipeline: Pipeline, ) -> c_void, - cmd_set_viewport: extern "system" fn( + pub cmd_set_viewport: extern "system" fn( command_buffer: CommandBuffer, first_viewport: u32, viewport_count: u32, p_viewports: *const Viewport, ) -> c_void, - cmd_set_scissor: extern "system" fn( + pub cmd_set_scissor: extern "system" fn( command_buffer: CommandBuffer, first_scissor: u32, scissor_count: u32, p_scissors: *const Rect2D, ) -> c_void, - cmd_set_line_width: + pub cmd_set_line_width: extern "system" fn(command_buffer: CommandBuffer, line_width: f32) -> c_void, - cmd_set_depth_bias: extern "system" fn( + pub cmd_set_depth_bias: extern "system" fn( command_buffer: CommandBuffer, depth_bias_constant_factor: f32, depth_bias_clamp: f32, depth_bias_slope_factor: f32, ) -> c_void, - cmd_set_blend_constants: + pub cmd_set_blend_constants: extern "system" fn(command_buffer: CommandBuffer, blend_constants: [f32; 4]) -> c_void, - cmd_set_depth_bounds: extern "system" fn( + pub cmd_set_depth_bounds: extern "system" fn( command_buffer: CommandBuffer, min_depth_bounds: f32, max_depth_bounds: f32, ) -> c_void, - cmd_set_stencil_compare_mask: extern "system" fn( + pub cmd_set_stencil_compare_mask: extern "system" fn( command_buffer: CommandBuffer, face_mask: StencilFaceFlags, compare_mask: u32, ) -> c_void, - cmd_set_stencil_write_mask: extern "system" fn( + pub cmd_set_stencil_write_mask: extern "system" fn( command_buffer: CommandBuffer, face_mask: StencilFaceFlags, write_mask: u32, ) -> c_void, - cmd_set_stencil_reference: extern "system" fn( + pub cmd_set_stencil_reference: extern "system" fn( command_buffer: CommandBuffer, face_mask: StencilFaceFlags, reference: u32, ) -> c_void, - cmd_bind_descriptor_sets: extern "system" fn( + pub cmd_bind_descriptor_sets: extern "system" fn( command_buffer: CommandBuffer, pipeline_bind_point: PipelineBindPoint, layout: PipelineLayout, @@ -1331,27 +2221,27 @@ pub struct DeviceFnV1_0 { dynamic_offset_count: u32, p_dynamic_offsets: *const u32, ) -> c_void, - cmd_bind_index_buffer: extern "system" fn( + pub cmd_bind_index_buffer: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, index_type: IndexType, ) -> c_void, - cmd_bind_vertex_buffers: extern "system" fn( + pub cmd_bind_vertex_buffers: extern "system" fn( command_buffer: CommandBuffer, first_binding: u32, binding_count: u32, p_buffers: *const Buffer, p_offsets: *const DeviceSize, ) -> c_void, - cmd_draw: extern "system" fn( + pub cmd_draw: extern "system" fn( command_buffer: CommandBuffer, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32, ) -> c_void, - cmd_draw_indexed: extern "system" fn( + pub cmd_draw_indexed: extern "system" fn( command_buffer: CommandBuffer, index_count: u32, instance_count: u32, @@ -1359,37 +2249,39 @@ pub struct DeviceFnV1_0 { vertex_offset: i32, first_instance: u32, ) -> c_void, - cmd_draw_indirect: extern "system" fn( + pub cmd_draw_indirect: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, draw_count: u32, stride: u32, ) -> c_void, - cmd_draw_indexed_indirect: extern "system" fn( + pub cmd_draw_indexed_indirect: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, draw_count: u32, stride: u32, ) -> c_void, - cmd_dispatch: extern "system" fn( + pub cmd_dispatch: extern "system" fn( command_buffer: CommandBuffer, group_count_x: u32, group_count_y: u32, group_count_z: u32, ) -> c_void, - cmd_dispatch_indirect: - extern "system" fn(command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize) - -> c_void, - cmd_copy_buffer: extern "system" fn( + 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, dst_buffer: Buffer, region_count: u32, p_regions: *const BufferCopy, ) -> c_void, - cmd_copy_image: extern "system" fn( + pub cmd_copy_image: extern "system" fn( command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, @@ -1398,7 +2290,7 @@ pub struct DeviceFnV1_0 { region_count: u32, p_regions: *const ImageCopy, ) -> c_void, - cmd_blit_image: extern "system" fn( + pub cmd_blit_image: extern "system" fn( command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, @@ -1408,7 +2300,7 @@ pub struct DeviceFnV1_0 { p_regions: *const ImageBlit, filter: Filter, ) -> c_void, - cmd_copy_buffer_to_image: extern "system" fn( + pub cmd_copy_buffer_to_image: extern "system" fn( command_buffer: CommandBuffer, src_buffer: Buffer, dst_image: Image, @@ -1416,7 +2308,7 @@ pub struct DeviceFnV1_0 { region_count: u32, p_regions: *const BufferImageCopy, ) -> c_void, - cmd_copy_image_to_buffer: extern "system" fn( + pub cmd_copy_image_to_buffer: extern "system" fn( command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, @@ -1424,21 +2316,21 @@ pub struct DeviceFnV1_0 { region_count: u32, p_regions: *const BufferImageCopy, ) -> c_void, - cmd_update_buffer: extern "system" fn( + pub cmd_update_buffer: extern "system" fn( command_buffer: CommandBuffer, dst_buffer: Buffer, dst_offset: DeviceSize, data_size: DeviceSize, p_data: *const c_void, ) -> c_void, - cmd_fill_buffer: extern "system" fn( + pub cmd_fill_buffer: extern "system" fn( command_buffer: CommandBuffer, dst_buffer: Buffer, dst_offset: DeviceSize, size: DeviceSize, data: u32, ) -> c_void, - cmd_clear_color_image: extern "system" fn( + pub cmd_clear_color_image: extern "system" fn( command_buffer: CommandBuffer, image: Image, image_layout: ImageLayout, @@ -1446,23 +2338,22 @@ pub struct DeviceFnV1_0 { range_count: u32, p_ranges: *const ImageSubresourceRange, ) -> c_void, - 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, - cmd_clear_attachments: extern "system" fn( + 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, p_attachments: *const ClearAttachment, rect_count: u32, p_rects: *const ClearRect, ) -> c_void, - cmd_resolve_image: extern "system" fn( + pub cmd_resolve_image: extern "system" fn( command_buffer: CommandBuffer, src_image: Image, src_image_layout: ImageLayout, @@ -1471,17 +2362,17 @@ pub struct DeviceFnV1_0 { region_count: u32, p_regions: *const ImageResolve, ) -> c_void, - cmd_set_event: extern "system" fn( + pub cmd_set_event: extern "system" fn( command_buffer: CommandBuffer, event: Event, stage_mask: PipelineStageFlags, ) -> c_void, - cmd_reset_event: extern "system" fn( + pub cmd_reset_event: extern "system" fn( command_buffer: CommandBuffer, event: Event, stage_mask: PipelineStageFlags, ) -> c_void, - cmd_wait_events: extern "system" fn( + pub cmd_wait_events: extern "system" fn( command_buffer: CommandBuffer, event_count: u32, p_events: *const Event, @@ -1494,7 +2385,7 @@ pub struct DeviceFnV1_0 { image_memory_barrier_count: u32, p_image_memory_barriers: *const ImageMemoryBarrier, ) -> c_void, - cmd_pipeline_barrier: extern "system" fn( + pub cmd_pipeline_barrier: extern "system" fn( command_buffer: CommandBuffer, src_stage_mask: PipelineStageFlags, dst_stage_mask: PipelineStageFlags, @@ -1506,28 +2397,30 @@ pub struct DeviceFnV1_0 { image_memory_barrier_count: u32, p_image_memory_barriers: *const ImageMemoryBarrier, ) -> c_void, - cmd_begin_query: extern "system" fn( + pub cmd_begin_query: extern "system" fn( command_buffer: CommandBuffer, query_pool: QueryPool, query: u32, flags: QueryControlFlags, ) -> c_void, - cmd_end_query: - extern "system" fn(command_buffer: CommandBuffer, query_pool: QueryPool, query: u32) - -> c_void, - cmd_reset_query_pool: extern "system" fn( + 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, first_query: u32, query_count: u32, ) -> c_void, - cmd_write_timestamp: extern "system" fn( + pub cmd_write_timestamp: extern "system" fn( command_buffer: CommandBuffer, pipeline_stage: PipelineStageFlags, query_pool: QueryPool, query: u32, ) -> c_void, - cmd_copy_query_pool_results: extern "system" fn( + pub cmd_copy_query_pool_results: extern "system" fn( command_buffer: CommandBuffer, query_pool: QueryPool, first_query: u32, @@ -1537,7 +2430,7 @@ pub struct DeviceFnV1_0 { stride: DeviceSize, flags: QueryResultFlags, ) -> c_void, - cmd_push_constants: extern "system" fn( + pub cmd_push_constants: extern "system" fn( command_buffer: CommandBuffer, layout: PipelineLayout, stage_flags: ShaderStageFlags, @@ -1545,15 +2438,15 @@ pub struct DeviceFnV1_0 { size: u32, p_values: *const c_void, ) -> c_void, - cmd_begin_render_pass: extern "system" fn( + pub cmd_begin_render_pass: extern "system" fn( command_buffer: CommandBuffer, p_render_pass_begin: *const RenderPassBeginInfo, contents: SubpassContents, ) -> c_void, - cmd_next_subpass: + pub cmd_next_subpass: extern "system" fn(command_buffer: CommandBuffer, contents: SubpassContents) -> c_void, - cmd_end_render_pass: extern "system" fn(command_buffer: CommandBuffer) -> c_void, - cmd_execute_commands: extern "system" fn( + pub cmd_end_render_pass: extern "system" fn(command_buffer: CommandBuffer) -> c_void, + pub cmd_execute_commands: extern "system" fn( command_buffer: CommandBuffer, command_buffer_count: u32, p_command_buffers: *const CommandBuffer, @@ -5157,8 +6050,10 @@ impl DeviceFnV1_0 { (self.cmd_execute_commands)(command_buffer, command_buffer_count, p_command_buffers) } } +#[allow(non_camel_case_types)] +pub type PFN_vkEnumerateInstanceVersion = extern "system" fn(p_api_version: *mut u32) -> Result; pub struct EntryFnV1_1 { - enumerate_instance_version: extern "system" fn(p_api_version: *mut u32) -> Result, + pub enumerate_instance_version: extern "system" fn(p_api_version: *mut u32) -> Result, } unsafe impl Send for EntryFnV1_1 {} unsafe impl Sync for EntryFnV1_1 {} @@ -5197,70 +6092,124 @@ impl EntryFnV1_1 { (self.enumerate_instance_version)(p_api_version) } } +#[allow(non_camel_case_types)] +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 { - enumerate_physical_device_groups: - extern "system" fn( - instance: Instance, - p_physical_device_group_count: *mut u32, - p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties, - ) -> Result, - get_physical_device_features2: extern "system" fn( + 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, + pub get_physical_device_features2: extern "system" fn( physical_device: PhysicalDevice, p_features: *mut PhysicalDeviceFeatures2, ) -> c_void, - get_physical_device_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - p_properties: *mut PhysicalDeviceProperties2, - ) -> c_void, - get_physical_device_format_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - format: Format, - p_format_properties: *mut FormatProperties2, - ) -> c_void, - 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, - 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, - get_physical_device_memory_properties2: - extern "system" fn( - physical_device: PhysicalDevice, - p_memory_properties: *mut PhysicalDeviceMemoryProperties2, - ) -> c_void, - 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, - 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, - 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, - 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 {} @@ -5271,19 +6220,19 @@ impl ::std::clone::Clone for InstanceFnV1_1 { get_physical_device_features2: self.get_physical_device_features2, get_physical_device_properties2: self.get_physical_device_properties2, get_physical_device_format_properties2: self.get_physical_device_format_properties2, - get_physical_device_image_format_properties2: - self.get_physical_device_image_format_properties2, - get_physical_device_queue_family_properties2: - self.get_physical_device_queue_family_properties2, + get_physical_device_image_format_properties2: self + .get_physical_device_image_format_properties2, + get_physical_device_queue_family_properties2: self + .get_physical_device_queue_family_properties2, get_physical_device_memory_properties2: self.get_physical_device_memory_properties2, - get_physical_device_sparse_image_format_properties2: - self.get_physical_device_sparse_image_format_properties2, - get_physical_device_external_buffer_properties: - self.get_physical_device_external_buffer_properties, - get_physical_device_external_fence_properties: - self.get_physical_device_external_fence_properties, - get_physical_device_external_semaphore_properties: - self.get_physical_device_external_semaphore_properties, + get_physical_device_sparse_image_format_properties2: self + .get_physical_device_sparse_image_format_properties2, + get_physical_device_external_buffer_properties: self + .get_physical_device_external_buffer_properties, + get_physical_device_external_fence_properties: self + .get_physical_device_external_fence_properties, + get_physical_device_external_semaphore_properties: self + .get_physical_device_external_semaphore_properties, } } } @@ -5629,28 +6578,130 @@ impl InstanceFnV1_1 { ) } } +#[allow(non_camel_case_types)] +pub type PFN_vkBindBufferMemory2 = extern "system" fn( + device: Device, + bind_info_count: u32, + p_bind_infos: *const BindBufferMemoryInfo, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkBindImageMemory2 = extern "system" fn( + device: Device, + bind_info_count: u32, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetDeviceMask = + extern "system" fn(command_buffer: CommandBuffer, device_mask: u32) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDispatchBase = extern "system" fn( + command_buffer: CommandBuffer, + base_group_x: u32, + base_group_y: u32, + base_group_z: u32, + group_count_x: u32, + group_count_y: u32, + 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; +#[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; +#[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; +#[allow(non_camel_case_types)] +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; +#[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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +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; +#[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 struct DeviceFnV1_1 { - bind_buffer_memory2: extern "system" fn( + pub bind_buffer_memory2: extern "system" fn( device: Device, bind_info_count: u32, p_bind_infos: *const BindBufferMemoryInfo, ) -> Result, - bind_image_memory2: extern "system" fn( + pub bind_image_memory2: extern "system" fn( device: Device, bind_info_count: u32, p_bind_infos: *const BindImageMemoryInfo, ) -> Result, - 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, - cmd_set_device_mask: + 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, - cmd_dispatch_base: extern "system" fn( + pub cmd_dispatch_base: extern "system" fn( command_buffer: CommandBuffer, base_group_x: u32, base_group_y: u32, @@ -5659,71 +6710,65 @@ pub struct DeviceFnV1_1 { group_count_y: u32, group_count_z: u32, ) -> c_void, - get_image_memory_requirements2: - extern "system" fn( - device: Device, - p_info: *const ImageMemoryRequirementsInfo2, - p_memory_requirements: *mut MemoryRequirements2, - ) -> c_void, - get_buffer_memory_requirements2: - extern "system" fn( - device: Device, - p_info: *const BufferMemoryRequirementsInfo2, - p_memory_requirements: *mut MemoryRequirements2, - ) -> c_void, - 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, - trim_command_pool: - extern "system" fn(device: Device, command_pool: CommandPool, flags: CommandPoolTrimFlags) - -> c_void, - get_device_queue2: extern "system" fn( + 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, - create_sampler_ycbcr_conversion: - extern "system" fn( - device: Device, - p_create_info: *const SamplerYcbcrConversionCreateInfo, - p_allocator: *const AllocationCallbacks, - p_ycbcr_conversion: *mut SamplerYcbcrConversion, - ) -> Result, - destroy_sampler_ycbcr_conversion: extern "system" fn( + 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, - 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, - destroy_descriptor_update_template: - extern "system" fn( - device: Device, - descriptor_update_template: DescriptorUpdateTemplate, - p_allocator: *const AllocationCallbacks, - ) -> c_void, - update_descriptor_set_with_template: - extern "system" fn( - device: Device, - descriptor_set: DescriptorSet, - descriptor_update_template: DescriptorUpdateTemplate, - p_data: *const c_void, - ) -> c_void, - get_descriptor_set_layout_support: - extern "system" fn( - device: Device, - p_create_info: *const DescriptorSetLayoutCreateInfo, - p_support: *mut DescriptorSetLayoutSupport, - ) -> 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 {} @@ -6254,10 +7299,6 @@ pub struct QueryPoolCreateFlags(Flags); vk_bitflags_wrapped!(QueryPoolCreateFlags, 0b0, Flags); #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct RenderPassCreateFlags(Flags); -vk_bitflags_wrapped!(RenderPassCreateFlags, 0b0, Flags); -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct SamplerCreateFlags(Flags); vk_bitflags_wrapped!(SamplerCreateFlags, 0b0, Flags); #[repr(transparent)] @@ -6362,10 +7403,6 @@ pub struct AndroidSurfaceCreateFlagsKHR(Flags); vk_bitflags_wrapped!(AndroidSurfaceCreateFlagsKHR, 0b0, Flags); #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct MirSurfaceCreateFlagsKHR(Flags); -vk_bitflags_wrapped!(MirSurfaceCreateFlagsKHR, 0b0, Flags); -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct ViSurfaceCreateFlagsNN(Flags); vk_bitflags_wrapped!(ViSurfaceCreateFlagsNN, 0b0, Flags); #[repr(transparent)] @@ -6394,6 +7431,10 @@ pub struct MacOSSurfaceCreateFlagsMVK(Flags); vk_bitflags_wrapped!(MacOSSurfaceCreateFlagsMVK, 0b0, Flags); #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct ImagePipeSurfaceCreateFlagsFUCHSIA(Flags); +vk_bitflags_wrapped!(ImagePipeSurfaceCreateFlagsFUCHSIA, 0b0, Flags); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct CommandPoolTrimFlags(Flags); vk_bitflags_wrapped!(CommandPoolTrimFlags, 0b0, Flags); #[repr(transparent)] @@ -6432,6 +7473,10 @@ vk_bitflags_wrapped!( 0b0, Flags ); +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct PipelineRasterizationStateStreamCreateFlagsEXT(Flags); +vk_bitflags_wrapped!(PipelineRasterizationStateStreamCreateFlagsEXT, 0b0, Flags); define_handle!(Instance, INSTANCE); define_handle!(PhysicalDevice, PHYSICAL_DEVICE); define_handle!(Device, DEVICE); @@ -6462,6 +7507,7 @@ handle_nondispatchable!(IndirectCommandsLayoutNVX, INDIRECT_COMMANDS_LAYOUT_NVX) handle_nondispatchable!(DescriptorUpdateTemplate, DESCRIPTOR_UPDATE_TEMPLATE); handle_nondispatchable!(SamplerYcbcrConversion, SAMPLER_YCBCR_CONVERSION); handle_nondispatchable!(ValidationCacheEXT, VALIDATION_CACHE_EXT); +handle_nondispatchable!(AccelerationStructureNV, ACCELERATION_STRUCTURE_NV); handle_nondispatchable!(DisplayKHR, DISPLAY_KHR); handle_nondispatchable!(DisplayModeKHR, DISPLAY_MODE_KHR); handle_nondispatchable!(SurfaceKHR, SURFACE_KHR); @@ -6527,7 +7573,7 @@ pub type PFN_vkDebugReportCallbackEXT = Option< pub type PFN_vkDebugUtilsMessengerCallbackEXT = Option< unsafe extern "system" fn( message_severity: DebugUtilsMessageSeverityFlagsEXT, - message_type: DebugUtilsMessageTypeFlagsEXT, + message_types: DebugUtilsMessageTypeFlagsEXT, p_callback_data: *const DebugUtilsMessengerCallbackDataEXT, p_user_data: *mut c_void, ) -> Bool32, @@ -6546,29 +7592,6 @@ impl ::std::default::Default for BaseOutStructure { } } } -impl BaseOutStructure { - pub fn builder<'a>() -> BaseOutStructureBuilder<'a> { - BaseOutStructureBuilder { - inner: BaseOutStructure::default(), - marker: ::std::marker::PhantomData, - } - } -} -pub struct BaseOutStructureBuilder<'a> { - inner: BaseOutStructure, - marker: ::std::marker::PhantomData<&'a ()>, -} -impl<'a> ::std::ops::Deref for BaseOutStructureBuilder<'a> { - type Target = BaseOutStructure; - fn deref(&self) -> &Self::Target { - &self.inner - } -} -impl<'a> BaseOutStructureBuilder<'a> { - pub fn build(self) -> BaseOutStructure { - self.inner - } -} #[repr(C)] #[derive(Copy, Clone, Debug)] pub struct BaseInStructure { @@ -6583,29 +7606,6 @@ impl ::std::default::Default for BaseInStructure { } } } -impl BaseInStructure { - pub fn builder<'a>() -> BaseInStructureBuilder<'a> { - BaseInStructureBuilder { - inner: BaseInStructure::default(), - marker: ::std::marker::PhantomData, - } - } -} -pub struct BaseInStructureBuilder<'a> { - inner: BaseInStructure, - marker: ::std::marker::PhantomData<&'a ()>, -} -impl<'a> ::std::ops::Deref for BaseInStructureBuilder<'a> { - type Target = BaseInStructure; - fn deref(&self) -> &Self::Target { - &self.inner - } -} -impl<'a> BaseInStructureBuilder<'a> { - pub fn build(self) -> BaseInStructure { - self.inner - } -} #[repr(C)] #[derive(Copy, Clone, Default, Debug)] pub struct Offset2D { @@ -6970,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() @@ -7073,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() } } @@ -7132,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 { @@ -7233,6 +8237,7 @@ pub struct ApplicationInfoBuilder<'a> { inner: ApplicationInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsApplicationInfo {} impl<'a> ::std::ops::Deref for ApplicationInfoBuilder<'a> { type Target = ApplicationInfo; fn deref(&self) -> &Self::Target { @@ -7263,6 +8268,13 @@ impl<'a> ApplicationInfoBuilder<'a> { self.inner.api_version = api_version; self } + pub fn next(mut self, next: &'a T) -> ApplicationInfoBuilder<'a> + where + T: ExtendsApplicationInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ApplicationInfo { self.inner } @@ -7284,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 { @@ -7402,6 +8418,7 @@ pub struct DeviceQueueCreateInfoBuilder<'a> { inner: DeviceQueueCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceQueueCreateInfo {} impl<'a> ::std::ops::Deref for DeviceQueueCreateInfoBuilder<'a> { type Target = DeviceQueueCreateInfo; fn deref(&self) -> &Self::Target { @@ -7424,10 +8441,17 @@ impl<'a> DeviceQueueCreateInfoBuilder<'a> { mut self, queue_priorities: &'a [f32], ) -> DeviceQueueCreateInfoBuilder<'a> { - self.inner.queue_count = queue_priorities.len() as u32; + self.inner.queue_count = queue_priorities.len() as _; self.inner.p_queue_priorities = queue_priorities.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DeviceQueueCreateInfoBuilder<'a> + where + T: ExtendsDeviceQueueCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceQueueCreateInfo { self.inner } @@ -7474,6 +8498,7 @@ pub struct DeviceCreateInfoBuilder<'a> { inner: DeviceCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceCreateInfo {} impl<'a> ::std::ops::Deref for DeviceCreateInfoBuilder<'a> { type Target = DeviceCreateInfo; fn deref(&self) -> &Self::Target { @@ -7489,7 +8514,7 @@ impl<'a> DeviceCreateInfoBuilder<'a> { mut self, queue_create_infos: &'a [DeviceQueueCreateInfo], ) -> DeviceCreateInfoBuilder<'a> { - self.inner.queue_create_info_count = queue_create_infos.len() as u32; + self.inner.queue_create_info_count = queue_create_infos.len() as _; self.inner.p_queue_create_infos = queue_create_infos.as_ptr(); self } @@ -7498,7 +8523,7 @@ impl<'a> DeviceCreateInfoBuilder<'a> { enabled_layer_names: &'a [*const c_char], ) -> DeviceCreateInfoBuilder<'a> { self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr(); - self.inner.enabled_layer_count = enabled_layer_names.len() as u32; + self.inner.enabled_layer_count = enabled_layer_names.len() as _; self } pub fn enabled_extension_names( @@ -7506,7 +8531,7 @@ impl<'a> DeviceCreateInfoBuilder<'a> { enabled_extension_names: &'a [*const c_char], ) -> DeviceCreateInfoBuilder<'a> { self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr(); - self.inner.enabled_extension_count = enabled_extension_names.len() as u32; + self.inner.enabled_extension_count = enabled_extension_names.len() as _; self } pub fn enabled_features( @@ -7516,6 +8541,13 @@ impl<'a> DeviceCreateInfoBuilder<'a> { self.inner.p_enabled_features = enabled_features; self } + pub fn next(mut self, next: &'a T) -> DeviceCreateInfoBuilder<'a> + where + T: ExtendsDeviceCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceCreateInfo { self.inner } @@ -7558,6 +8590,7 @@ pub struct InstanceCreateInfoBuilder<'a> { inner: InstanceCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsInstanceCreateInfo {} impl<'a> ::std::ops::Deref for InstanceCreateInfoBuilder<'a> { type Target = InstanceCreateInfo; fn deref(&self) -> &Self::Target { @@ -7581,7 +8614,7 @@ impl<'a> InstanceCreateInfoBuilder<'a> { enabled_layer_names: &'a [*const c_char], ) -> InstanceCreateInfoBuilder<'a> { self.inner.pp_enabled_layer_names = enabled_layer_names.as_ptr(); - self.inner.enabled_layer_count = enabled_layer_names.len() as u32; + self.inner.enabled_layer_count = enabled_layer_names.len() as _; self } pub fn enabled_extension_names( @@ -7589,7 +8622,14 @@ impl<'a> InstanceCreateInfoBuilder<'a> { enabled_extension_names: &'a [*const c_char], ) -> InstanceCreateInfoBuilder<'a> { self.inner.pp_enabled_extension_names = enabled_extension_names.as_ptr(); - self.inner.enabled_extension_count = enabled_extension_names.len() as u32; + self.inner.enabled_extension_count = enabled_extension_names.len() as _; + self + } + pub fn next(mut self, next: &'a T) -> InstanceCreateInfoBuilder<'a> + where + T: ExtendsInstanceCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> InstanceCreateInfo { @@ -7748,6 +8788,7 @@ pub struct MemoryAllocateInfoBuilder<'a> { inner: MemoryAllocateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryAllocateInfo {} impl<'a> ::std::ops::Deref for MemoryAllocateInfoBuilder<'a> { type Target = MemoryAllocateInfo; fn deref(&self) -> &Self::Target { @@ -7763,6 +8804,13 @@ impl<'a> MemoryAllocateInfoBuilder<'a> { self.inner.memory_type_index = memory_type_index; self } + pub fn next(mut self, next: &'a T) -> MemoryAllocateInfoBuilder<'a> + where + T: ExtendsMemoryAllocateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MemoryAllocateInfo { self.inner } @@ -8033,6 +9081,7 @@ pub struct MappedMemoryRangeBuilder<'a> { inner: MappedMemoryRange, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMappedMemoryRange {} impl<'a> ::std::ops::Deref for MappedMemoryRangeBuilder<'a> { type Target = MappedMemoryRange; fn deref(&self) -> &Self::Target { @@ -8052,6 +9101,13 @@ impl<'a> MappedMemoryRangeBuilder<'a> { self.inner.size = size; self } + pub fn next(mut self, next: &'a T) -> MappedMemoryRangeBuilder<'a> + where + T: ExtendsMappedMemoryRange, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MappedMemoryRange { self.inner } @@ -8291,6 +9347,7 @@ pub struct WriteDescriptorSetBuilder<'a> { inner: WriteDescriptorSet, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsWriteDescriptorSet {} impl<'a> ::std::ops::Deref for WriteDescriptorSetBuilder<'a> { type Target = WriteDescriptorSet; fn deref(&self) -> &Self::Target { @@ -8321,7 +9378,7 @@ impl<'a> WriteDescriptorSetBuilder<'a> { mut self, image_info: &'a [DescriptorImageInfo], ) -> WriteDescriptorSetBuilder<'a> { - self.inner.descriptor_count = image_info.len() as u32; + self.inner.descriptor_count = image_info.len() as _; self.inner.p_image_info = image_info.as_ptr(); self } @@ -8329,7 +9386,7 @@ impl<'a> WriteDescriptorSetBuilder<'a> { mut self, buffer_info: &'a [DescriptorBufferInfo], ) -> WriteDescriptorSetBuilder<'a> { - self.inner.descriptor_count = buffer_info.len() as u32; + self.inner.descriptor_count = buffer_info.len() as _; self.inner.p_buffer_info = buffer_info.as_ptr(); self } @@ -8337,10 +9394,17 @@ impl<'a> WriteDescriptorSetBuilder<'a> { mut self, texel_buffer_view: &'a [BufferView], ) -> WriteDescriptorSetBuilder<'a> { - self.inner.descriptor_count = texel_buffer_view.len() as u32; + self.inner.descriptor_count = texel_buffer_view.len() as _; self.inner.p_texel_buffer_view = texel_buffer_view.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> WriteDescriptorSetBuilder<'a> + where + T: ExtendsWriteDescriptorSet, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> WriteDescriptorSet { self.inner } @@ -8385,6 +9449,7 @@ pub struct CopyDescriptorSetBuilder<'a> { inner: CopyDescriptorSet, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsCopyDescriptorSet {} impl<'a> ::std::ops::Deref for CopyDescriptorSetBuilder<'a> { type Target = CopyDescriptorSet; fn deref(&self) -> &Self::Target { @@ -8420,6 +9485,13 @@ impl<'a> CopyDescriptorSetBuilder<'a> { self.inner.descriptor_count = descriptor_count; self } + pub fn next(mut self, next: &'a T) -> CopyDescriptorSetBuilder<'a> + where + T: ExtendsCopyDescriptorSet, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> CopyDescriptorSet { self.inner } @@ -8462,6 +9534,7 @@ pub struct BufferCreateInfoBuilder<'a> { inner: BufferCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBufferCreateInfo {} impl<'a> ::std::ops::Deref for BufferCreateInfoBuilder<'a> { type Target = BufferCreateInfo; fn deref(&self) -> &Self::Target { @@ -8489,10 +9562,17 @@ impl<'a> BufferCreateInfoBuilder<'a> { mut self, queue_family_indices: &'a [u32], ) -> BufferCreateInfoBuilder<'a> { - self.inner.queue_family_index_count = queue_family_indices.len() as u32; + self.inner.queue_family_index_count = queue_family_indices.len() as _; self.inner.p_queue_family_indices = queue_family_indices.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> BufferCreateInfoBuilder<'a> + where + T: ExtendsBufferCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BufferCreateInfo { self.inner } @@ -8533,6 +9613,7 @@ pub struct BufferViewCreateInfoBuilder<'a> { inner: BufferViewCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBufferViewCreateInfo {} impl<'a> ::std::ops::Deref for BufferViewCreateInfoBuilder<'a> { type Target = BufferViewCreateInfo; fn deref(&self) -> &Self::Target { @@ -8560,6 +9641,13 @@ impl<'a> BufferViewCreateInfoBuilder<'a> { self.inner.range = range; self } + pub fn next(mut self, next: &'a T) -> BufferViewCreateInfoBuilder<'a> + where + T: ExtendsBufferViewCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BufferViewCreateInfo { self.inner } @@ -8741,6 +9829,7 @@ pub struct MemoryBarrierBuilder<'a> { inner: MemoryBarrier, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryBarrier {} impl<'a> ::std::ops::Deref for MemoryBarrierBuilder<'a> { type Target = MemoryBarrier; fn deref(&self) -> &Self::Target { @@ -8756,6 +9845,13 @@ impl<'a> MemoryBarrierBuilder<'a> { self.inner.dst_access_mask = dst_access_mask; self } + pub fn next(mut self, next: &'a T) -> MemoryBarrierBuilder<'a> + where + T: ExtendsMemoryBarrier, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MemoryBarrier { self.inner } @@ -8800,6 +9896,7 @@ pub struct BufferMemoryBarrierBuilder<'a> { inner: BufferMemoryBarrier, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBufferMemoryBarrier {} impl<'a> ::std::ops::Deref for BufferMemoryBarrierBuilder<'a> { type Target = BufferMemoryBarrier; fn deref(&self) -> &Self::Target { @@ -8847,6 +9944,13 @@ impl<'a> BufferMemoryBarrierBuilder<'a> { self.inner.size = size; self } + pub fn next(mut self, next: &'a T) -> BufferMemoryBarrierBuilder<'a> + where + T: ExtendsBufferMemoryBarrier, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BufferMemoryBarrier { self.inner } @@ -8893,6 +9997,7 @@ pub struct ImageMemoryBarrierBuilder<'a> { inner: ImageMemoryBarrier, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageMemoryBarrier {} impl<'a> ::std::ops::Deref for ImageMemoryBarrierBuilder<'a> { type Target = ImageMemoryBarrier; fn deref(&self) -> &Self::Target { @@ -8947,6 +10052,13 @@ impl<'a> ImageMemoryBarrierBuilder<'a> { self.inner.subresource_range = subresource_range; self } + pub fn next(mut self, next: &'a T) -> ImageMemoryBarrierBuilder<'a> + where + T: ExtendsImageMemoryBarrier, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageMemoryBarrier { self.inner } @@ -9003,6 +10115,7 @@ pub struct ImageCreateInfoBuilder<'a> { inner: ImageCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageCreateInfo {} impl<'a> ::std::ops::Deref for ImageCreateInfoBuilder<'a> { type Target = ImageCreateInfo; fn deref(&self) -> &Self::Target { @@ -9054,7 +10167,7 @@ impl<'a> ImageCreateInfoBuilder<'a> { mut self, queue_family_indices: &'a [u32], ) -> ImageCreateInfoBuilder<'a> { - self.inner.queue_family_index_count = queue_family_indices.len() as u32; + self.inner.queue_family_index_count = queue_family_indices.len() as _; self.inner.p_queue_family_indices = queue_family_indices.as_ptr(); self } @@ -9062,6 +10175,13 @@ impl<'a> ImageCreateInfoBuilder<'a> { self.inner.initial_layout = initial_layout; self } + pub fn next(mut self, next: &'a T) -> ImageCreateInfoBuilder<'a> + where + T: ExtendsImageCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageCreateInfo { self.inner } @@ -9156,6 +10276,7 @@ pub struct ImageViewCreateInfoBuilder<'a> { inner: ImageViewCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageViewCreateInfo {} impl<'a> ::std::ops::Deref for ImageViewCreateInfoBuilder<'a> { type Target = ImageViewCreateInfo; fn deref(&self) -> &Self::Target { @@ -9190,6 +10311,13 @@ impl<'a> ImageViewCreateInfoBuilder<'a> { self.inner.subresource_range = subresource_range; self } + pub fn next(mut self, next: &'a T) -> ImageViewCreateInfoBuilder<'a> + where + T: ExtendsImageViewCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageViewCreateInfo { self.inner } @@ -9388,7 +10516,7 @@ impl<'a> SparseBufferMemoryBindInfoBuilder<'a> { self } pub fn binds(mut self, binds: &'a [SparseMemoryBind]) -> SparseBufferMemoryBindInfoBuilder<'a> { - self.inner.bind_count = binds.len() as u32; + self.inner.bind_count = binds.len() as _; self.inner.p_binds = binds.as_ptr(); self } @@ -9439,7 +10567,7 @@ impl<'a> SparseImageOpaqueMemoryBindInfoBuilder<'a> { mut self, binds: &'a [SparseMemoryBind], ) -> SparseImageOpaqueMemoryBindInfoBuilder<'a> { - self.inner.bind_count = binds.len() as u32; + self.inner.bind_count = binds.len() as _; self.inner.p_binds = binds.as_ptr(); self } @@ -9490,7 +10618,7 @@ impl<'a> SparseImageMemoryBindInfoBuilder<'a> { mut self, binds: &'a [SparseImageMemoryBind], ) -> SparseImageMemoryBindInfoBuilder<'a> { - self.inner.bind_count = binds.len() as u32; + self.inner.bind_count = binds.len() as _; self.inner.p_binds = binds.as_ptr(); self } @@ -9544,6 +10672,7 @@ pub struct BindSparseInfoBuilder<'a> { inner: BindSparseInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBindSparseInfo {} impl<'a> ::std::ops::Deref for BindSparseInfoBuilder<'a> { type Target = BindSparseInfo; fn deref(&self) -> &Self::Target { @@ -9555,7 +10684,7 @@ impl<'a> BindSparseInfoBuilder<'a> { mut self, wait_semaphores: &'a [Semaphore], ) -> BindSparseInfoBuilder<'a> { - self.inner.wait_semaphore_count = wait_semaphores.len() as u32; + self.inner.wait_semaphore_count = wait_semaphores.len() as _; self.inner.p_wait_semaphores = wait_semaphores.as_ptr(); self } @@ -9563,7 +10692,7 @@ impl<'a> BindSparseInfoBuilder<'a> { mut self, buffer_binds: &'a [SparseBufferMemoryBindInfo], ) -> BindSparseInfoBuilder<'a> { - self.inner.buffer_bind_count = buffer_binds.len() as u32; + self.inner.buffer_bind_count = buffer_binds.len() as _; self.inner.p_buffer_binds = buffer_binds.as_ptr(); self } @@ -9571,7 +10700,7 @@ impl<'a> BindSparseInfoBuilder<'a> { mut self, image_opaque_binds: &'a [SparseImageOpaqueMemoryBindInfo], ) -> BindSparseInfoBuilder<'a> { - self.inner.image_opaque_bind_count = image_opaque_binds.len() as u32; + self.inner.image_opaque_bind_count = image_opaque_binds.len() as _; self.inner.p_image_opaque_binds = image_opaque_binds.as_ptr(); self } @@ -9579,7 +10708,7 @@ impl<'a> BindSparseInfoBuilder<'a> { mut self, image_binds: &'a [SparseImageMemoryBindInfo], ) -> BindSparseInfoBuilder<'a> { - self.inner.image_bind_count = image_binds.len() as u32; + self.inner.image_bind_count = image_binds.len() as _; self.inner.p_image_binds = image_binds.as_ptr(); self } @@ -9587,10 +10716,17 @@ impl<'a> BindSparseInfoBuilder<'a> { mut self, signal_semaphores: &'a [Semaphore], ) -> BindSparseInfoBuilder<'a> { - self.inner.signal_semaphore_count = signal_semaphores.len() as u32; + self.inner.signal_semaphore_count = signal_semaphores.len() as _; self.inner.p_signal_semaphores = signal_semaphores.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> BindSparseInfoBuilder<'a> + where + T: ExtendsBindSparseInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BindSparseInfo { self.inner } @@ -9866,6 +11002,7 @@ pub struct ShaderModuleCreateInfoBuilder<'a> { inner: ShaderModuleCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsShaderModuleCreateInfo {} impl<'a> ::std::ops::Deref for ShaderModuleCreateInfoBuilder<'a> { type Target = ShaderModuleCreateInfo; fn deref(&self) -> &Self::Target { @@ -9882,6 +11019,13 @@ impl<'a> ShaderModuleCreateInfoBuilder<'a> { self.inner.p_code = code.as_ptr() as *const u32; self } + pub fn next(mut self, next: &'a T) -> ShaderModuleCreateInfoBuilder<'a> + where + T: ExtendsShaderModuleCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ShaderModuleCreateInfo { self.inner } @@ -9936,6 +11080,13 @@ impl<'a> DescriptorSetLayoutBindingBuilder<'a> { self.inner.descriptor_type = descriptor_type; self } + pub fn descriptor_count( + mut self, + descriptor_count: u32, + ) -> DescriptorSetLayoutBindingBuilder<'a> { + self.inner.descriptor_count = descriptor_count; + self + } pub fn stage_flags( mut self, stage_flags: ShaderStageFlags, @@ -9947,7 +11098,7 @@ impl<'a> DescriptorSetLayoutBindingBuilder<'a> { mut self, immutable_samplers: &'a [Sampler], ) -> DescriptorSetLayoutBindingBuilder<'a> { - self.inner.descriptor_count = immutable_samplers.len() as u32; + self.inner.descriptor_count = immutable_samplers.len() as _; self.inner.p_immutable_samplers = immutable_samplers.as_ptr(); self } @@ -9987,6 +11138,7 @@ pub struct DescriptorSetLayoutCreateInfoBuilder<'a> { inner: DescriptorSetLayoutCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDescriptorSetLayoutCreateInfo {} impl<'a> ::std::ops::Deref for DescriptorSetLayoutCreateInfoBuilder<'a> { type Target = DescriptorSetLayoutCreateInfo; fn deref(&self) -> &Self::Target { @@ -10005,10 +11157,17 @@ impl<'a> DescriptorSetLayoutCreateInfoBuilder<'a> { mut self, bindings: &'a [DescriptorSetLayoutBinding], ) -> DescriptorSetLayoutCreateInfoBuilder<'a> { - self.inner.binding_count = bindings.len() as u32; + self.inner.binding_count = bindings.len() as _; self.inner.p_bindings = bindings.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DescriptorSetLayoutCreateInfoBuilder<'a> + where + T: ExtendsDescriptorSetLayoutCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DescriptorSetLayoutCreateInfo { self.inner } @@ -10084,6 +11243,7 @@ pub struct DescriptorPoolCreateInfoBuilder<'a> { inner: DescriptorPoolCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDescriptorPoolCreateInfo {} impl<'a> ::std::ops::Deref for DescriptorPoolCreateInfoBuilder<'a> { type Target = DescriptorPoolCreateInfo; fn deref(&self) -> &Self::Target { @@ -10106,10 +11266,17 @@ impl<'a> DescriptorPoolCreateInfoBuilder<'a> { mut self, pool_sizes: &'a [DescriptorPoolSize], ) -> DescriptorPoolCreateInfoBuilder<'a> { - self.inner.pool_size_count = pool_sizes.len() as u32; + self.inner.pool_size_count = pool_sizes.len() as _; self.inner.p_pool_sizes = pool_sizes.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DescriptorPoolCreateInfoBuilder<'a> + where + T: ExtendsDescriptorPoolCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DescriptorPoolCreateInfo { self.inner } @@ -10146,6 +11313,7 @@ pub struct DescriptorSetAllocateInfoBuilder<'a> { inner: DescriptorSetAllocateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDescriptorSetAllocateInfo {} impl<'a> ::std::ops::Deref for DescriptorSetAllocateInfoBuilder<'a> { type Target = DescriptorSetAllocateInfo; fn deref(&self) -> &Self::Target { @@ -10164,10 +11332,17 @@ impl<'a> DescriptorSetAllocateInfoBuilder<'a> { mut self, set_layouts: &'a [DescriptorSetLayout], ) -> DescriptorSetAllocateInfoBuilder<'a> { - self.inner.descriptor_set_count = set_layouts.len() as u32; + self.inner.descriptor_set_count = set_layouts.len() as _; self.inner.p_set_layouts = set_layouts.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DescriptorSetAllocateInfoBuilder<'a> + where + T: ExtendsDescriptorSetAllocateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DescriptorSetAllocateInfo { self.inner } @@ -10255,13 +11430,13 @@ impl<'a> SpecializationInfoBuilder<'a> { mut self, map_entries: &'a [SpecializationMapEntry], ) -> SpecializationInfoBuilder<'a> { - self.inner.map_entry_count = map_entries.len() as u32; + self.inner.map_entry_count = map_entries.len() as _; self.inner.p_map_entries = map_entries.as_ptr(); self } - pub fn data(mut self, data: &'a [c_void]) -> SpecializationInfoBuilder<'a> { - self.inner.data_size = data.len() as usize; - self.inner.p_data = data.as_ptr(); + pub fn data(mut self, data: &'a [u8]) -> SpecializationInfoBuilder<'a> { + self.inner.data_size = data.len() as _; + self.inner.p_data = data.as_ptr() as *const c_void; self } pub fn build(self) -> SpecializationInfo { @@ -10304,6 +11479,7 @@ pub struct PipelineShaderStageCreateInfoBuilder<'a> { inner: PipelineShaderStageCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineShaderStageCreateInfo {} impl<'a> ::std::ops::Deref for PipelineShaderStageCreateInfoBuilder<'a> { type Target = PipelineShaderStageCreateInfo; fn deref(&self) -> &Self::Target { @@ -10337,6 +11513,13 @@ impl<'a> PipelineShaderStageCreateInfoBuilder<'a> { self.inner.p_specialization_info = specialization_info; self } + pub fn next(mut self, next: &'a T) -> PipelineShaderStageCreateInfoBuilder<'a> + where + T: ExtendsPipelineShaderStageCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineShaderStageCreateInfo { self.inner } @@ -10377,6 +11560,7 @@ pub struct ComputePipelineCreateInfoBuilder<'a> { inner: ComputePipelineCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsComputePipelineCreateInfo {} impl<'a> ::std::ops::Deref for ComputePipelineCreateInfoBuilder<'a> { type Target = ComputePipelineCreateInfo; fn deref(&self) -> &Self::Target { @@ -10413,6 +11597,13 @@ impl<'a> ComputePipelineCreateInfoBuilder<'a> { self.inner.base_pipeline_index = base_pipeline_index; self } + pub fn next(mut self, next: &'a T) -> ComputePipelineCreateInfoBuilder<'a> + where + T: ExtendsComputePipelineCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ComputePipelineCreateInfo { self.inner } @@ -10545,6 +11736,7 @@ pub struct PipelineVertexInputStateCreateInfoBuilder<'a> { inner: PipelineVertexInputStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineVertexInputStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineVertexInputStateCreateInfoBuilder<'a> { type Target = PipelineVertexInputStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -10563,7 +11755,7 @@ impl<'a> PipelineVertexInputStateCreateInfoBuilder<'a> { mut self, vertex_binding_descriptions: &'a [VertexInputBindingDescription], ) -> PipelineVertexInputStateCreateInfoBuilder<'a> { - self.inner.vertex_binding_description_count = vertex_binding_descriptions.len() as u32; + self.inner.vertex_binding_description_count = vertex_binding_descriptions.len() as _; self.inner.p_vertex_binding_descriptions = vertex_binding_descriptions.as_ptr(); self } @@ -10571,10 +11763,17 @@ impl<'a> PipelineVertexInputStateCreateInfoBuilder<'a> { mut self, vertex_attribute_descriptions: &'a [VertexInputAttributeDescription], ) -> PipelineVertexInputStateCreateInfoBuilder<'a> { - self.inner.vertex_attribute_description_count = vertex_attribute_descriptions.len() as u32; + self.inner.vertex_attribute_description_count = vertex_attribute_descriptions.len() as _; self.inner.p_vertex_attribute_descriptions = vertex_attribute_descriptions.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineVertexInputStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineVertexInputStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineVertexInputStateCreateInfo { self.inner } @@ -10611,6 +11810,7 @@ pub struct PipelineInputAssemblyStateCreateInfoBuilder<'a> { inner: PipelineInputAssemblyStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineInputAssemblyStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineInputAssemblyStateCreateInfoBuilder<'a> { type Target = PipelineInputAssemblyStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -10634,9 +11834,16 @@ impl<'a> PipelineInputAssemblyStateCreateInfoBuilder<'a> { } pub fn primitive_restart_enable( mut self, - primitive_restart_enable: Bool32, + primitive_restart_enable: bool, ) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> { - self.inner.primitive_restart_enable = primitive_restart_enable; + self.inner.primitive_restart_enable = primitive_restart_enable.into(); + self + } + pub fn next(mut self, next: &'a T) -> PipelineInputAssemblyStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineInputAssemblyStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> PipelineInputAssemblyStateCreateInfo { @@ -10673,6 +11880,7 @@ pub struct PipelineTessellationStateCreateInfoBuilder<'a> { inner: PipelineTessellationStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineTessellationStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineTessellationStateCreateInfoBuilder<'a> { type Target = PipelineTessellationStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -10694,6 +11902,13 @@ impl<'a> PipelineTessellationStateCreateInfoBuilder<'a> { self.inner.patch_control_points = patch_control_points; self } + pub fn next(mut self, next: &'a T) -> PipelineTessellationStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineTessellationStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineTessellationStateCreateInfo { self.inner } @@ -10734,6 +11949,7 @@ pub struct PipelineViewportStateCreateInfoBuilder<'a> { inner: PipelineViewportStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineViewportStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineViewportStateCreateInfoBuilder<'a> { type Target = PipelineViewportStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -10748,22 +11964,43 @@ impl<'a> PipelineViewportStateCreateInfoBuilder<'a> { self.inner.flags = flags; self } + pub fn viewport_count( + mut self, + viewport_count: u32, + ) -> PipelineViewportStateCreateInfoBuilder<'a> { + self.inner.viewport_count = viewport_count; + self + } pub fn viewports( mut self, viewports: &'a [Viewport], ) -> PipelineViewportStateCreateInfoBuilder<'a> { - self.inner.viewport_count = viewports.len() as u32; + self.inner.viewport_count = viewports.len() as _; self.inner.p_viewports = viewports.as_ptr(); self } + pub fn scissor_count( + mut self, + scissor_count: u32, + ) -> PipelineViewportStateCreateInfoBuilder<'a> { + self.inner.scissor_count = scissor_count; + self + } pub fn scissors( mut self, scissors: &'a [Rect2D], ) -> PipelineViewportStateCreateInfoBuilder<'a> { - self.inner.scissor_count = scissors.len() as u32; + self.inner.scissor_count = scissors.len() as _; self.inner.p_scissors = scissors.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineViewportStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineViewportStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineViewportStateCreateInfo { self.inner } @@ -10816,6 +12053,7 @@ pub struct PipelineRasterizationStateCreateInfoBuilder<'a> { inner: PipelineRasterizationStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineRasterizationStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineRasterizationStateCreateInfoBuilder<'a> { type Target = PipelineRasterizationStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -10832,16 +12070,16 @@ impl<'a> PipelineRasterizationStateCreateInfoBuilder<'a> { } pub fn depth_clamp_enable( mut self, - depth_clamp_enable: Bool32, + depth_clamp_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { - self.inner.depth_clamp_enable = depth_clamp_enable; + self.inner.depth_clamp_enable = depth_clamp_enable.into(); self } pub fn rasterizer_discard_enable( mut self, - rasterizer_discard_enable: Bool32, + rasterizer_discard_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { - self.inner.rasterizer_discard_enable = rasterizer_discard_enable; + self.inner.rasterizer_discard_enable = rasterizer_discard_enable.into(); self } pub fn polygon_mode( @@ -10867,9 +12105,9 @@ impl<'a> PipelineRasterizationStateCreateInfoBuilder<'a> { } pub fn depth_bias_enable( mut self, - depth_bias_enable: Bool32, + depth_bias_enable: bool, ) -> PipelineRasterizationStateCreateInfoBuilder<'a> { - self.inner.depth_bias_enable = depth_bias_enable; + self.inner.depth_bias_enable = depth_bias_enable.into(); self } pub fn depth_bias_constant_factor( @@ -10900,6 +12138,13 @@ impl<'a> PipelineRasterizationStateCreateInfoBuilder<'a> { self.inner.line_width = line_width; self } + pub fn next(mut self, next: &'a T) -> PipelineRasterizationStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineRasterizationStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineRasterizationStateCreateInfo { self.inner } @@ -10944,6 +12189,7 @@ pub struct PipelineMultisampleStateCreateInfoBuilder<'a> { inner: PipelineMultisampleStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineMultisampleStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineMultisampleStateCreateInfoBuilder<'a> { type Target = PipelineMultisampleStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -10967,9 +12213,9 @@ impl<'a> PipelineMultisampleStateCreateInfoBuilder<'a> { } pub fn sample_shading_enable( mut self, - sample_shading_enable: Bool32, + sample_shading_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { - self.inner.sample_shading_enable = sample_shading_enable; + self.inner.sample_shading_enable = sample_shading_enable.into(); self } pub fn min_sample_shading( @@ -10981,23 +12227,30 @@ impl<'a> PipelineMultisampleStateCreateInfoBuilder<'a> { } pub fn sample_mask( mut self, - sample_mask: &'a SampleMask, + sample_mask: &'a [SampleMask], ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { - self.inner.p_sample_mask = sample_mask; + self.inner.p_sample_mask = sample_mask.as_ptr() as *const SampleMask; self } pub fn alpha_to_coverage_enable( mut self, - alpha_to_coverage_enable: Bool32, + alpha_to_coverage_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { - self.inner.alpha_to_coverage_enable = alpha_to_coverage_enable; + self.inner.alpha_to_coverage_enable = alpha_to_coverage_enable.into(); self } pub fn alpha_to_one_enable( mut self, - alpha_to_one_enable: Bool32, + alpha_to_one_enable: bool, ) -> PipelineMultisampleStateCreateInfoBuilder<'a> { - self.inner.alpha_to_one_enable = alpha_to_one_enable; + self.inner.alpha_to_one_enable = alpha_to_one_enable.into(); + self + } + pub fn next(mut self, next: &'a T) -> PipelineMultisampleStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineMultisampleStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> PipelineMultisampleStateCreateInfo { @@ -11037,9 +12290,9 @@ impl<'a> ::std::ops::Deref for PipelineColorBlendAttachmentStateBuilder<'a> { impl<'a> PipelineColorBlendAttachmentStateBuilder<'a> { pub fn blend_enable( mut self, - blend_enable: Bool32, + blend_enable: bool, ) -> PipelineColorBlendAttachmentStateBuilder<'a> { - self.inner.blend_enable = blend_enable; + self.inner.blend_enable = blend_enable.into(); self } pub fn src_color_blend_factor( @@ -11133,6 +12386,7 @@ pub struct PipelineColorBlendStateCreateInfoBuilder<'a> { inner: PipelineColorBlendStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineColorBlendStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineColorBlendStateCreateInfoBuilder<'a> { type Target = PipelineColorBlendStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -11149,9 +12403,9 @@ impl<'a> PipelineColorBlendStateCreateInfoBuilder<'a> { } pub fn logic_op_enable( mut self, - logic_op_enable: Bool32, + logic_op_enable: bool, ) -> PipelineColorBlendStateCreateInfoBuilder<'a> { - self.inner.logic_op_enable = logic_op_enable; + self.inner.logic_op_enable = logic_op_enable.into(); self } pub fn logic_op(mut self, logic_op: LogicOp) -> PipelineColorBlendStateCreateInfoBuilder<'a> { @@ -11162,7 +12416,7 @@ impl<'a> PipelineColorBlendStateCreateInfoBuilder<'a> { mut self, attachments: &'a [PipelineColorBlendAttachmentState], ) -> PipelineColorBlendStateCreateInfoBuilder<'a> { - self.inner.attachment_count = attachments.len() as u32; + self.inner.attachment_count = attachments.len() as _; self.inner.p_attachments = attachments.as_ptr(); self } @@ -11173,6 +12427,13 @@ impl<'a> PipelineColorBlendStateCreateInfoBuilder<'a> { self.inner.blend_constants = blend_constants; self } + pub fn next(mut self, next: &'a T) -> PipelineColorBlendStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineColorBlendStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineColorBlendStateCreateInfo { self.inner } @@ -11209,6 +12470,7 @@ pub struct PipelineDynamicStateCreateInfoBuilder<'a> { inner: PipelineDynamicStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineDynamicStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineDynamicStateCreateInfoBuilder<'a> { type Target = PipelineDynamicStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -11227,10 +12489,17 @@ impl<'a> PipelineDynamicStateCreateInfoBuilder<'a> { mut self, dynamic_states: &'a [DynamicState], ) -> PipelineDynamicStateCreateInfoBuilder<'a> { - self.inner.dynamic_state_count = dynamic_states.len() as u32; + self.inner.dynamic_state_count = dynamic_states.len() as _; self.inner.p_dynamic_states = dynamic_states.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineDynamicStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineDynamicStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineDynamicStateCreateInfo { self.inner } @@ -11343,6 +12612,7 @@ pub struct PipelineDepthStencilStateCreateInfoBuilder<'a> { inner: PipelineDepthStencilStateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineDepthStencilStateCreateInfo {} impl<'a> ::std::ops::Deref for PipelineDepthStencilStateCreateInfoBuilder<'a> { type Target = PipelineDepthStencilStateCreateInfo; fn deref(&self) -> &Self::Target { @@ -11359,16 +12629,16 @@ impl<'a> PipelineDepthStencilStateCreateInfoBuilder<'a> { } pub fn depth_test_enable( mut self, - depth_test_enable: Bool32, + depth_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { - self.inner.depth_test_enable = depth_test_enable; + self.inner.depth_test_enable = depth_test_enable.into(); self } pub fn depth_write_enable( mut self, - depth_write_enable: Bool32, + depth_write_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { - self.inner.depth_write_enable = depth_write_enable; + self.inner.depth_write_enable = depth_write_enable.into(); self } pub fn depth_compare_op( @@ -11380,16 +12650,16 @@ impl<'a> PipelineDepthStencilStateCreateInfoBuilder<'a> { } pub fn depth_bounds_test_enable( mut self, - depth_bounds_test_enable: Bool32, + depth_bounds_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { - self.inner.depth_bounds_test_enable = depth_bounds_test_enable; + self.inner.depth_bounds_test_enable = depth_bounds_test_enable.into(); self } pub fn stencil_test_enable( mut self, - stencil_test_enable: Bool32, + stencil_test_enable: bool, ) -> PipelineDepthStencilStateCreateInfoBuilder<'a> { - self.inner.stencil_test_enable = stencil_test_enable; + self.inner.stencil_test_enable = stencil_test_enable.into(); self } pub fn front( @@ -11417,6 +12687,13 @@ impl<'a> PipelineDepthStencilStateCreateInfoBuilder<'a> { self.inner.max_depth_bounds = max_depth_bounds; self } + pub fn next(mut self, next: &'a T) -> PipelineDepthStencilStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineDepthStencilStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineDepthStencilStateCreateInfo { self.inner } @@ -11481,6 +12758,7 @@ pub struct GraphicsPipelineCreateInfoBuilder<'a> { inner: GraphicsPipelineCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsGraphicsPipelineCreateInfo {} impl<'a> ::std::ops::Deref for GraphicsPipelineCreateInfoBuilder<'a> { type Target = GraphicsPipelineCreateInfo; fn deref(&self) -> &Self::Target { @@ -11496,7 +12774,7 @@ impl<'a> GraphicsPipelineCreateInfoBuilder<'a> { mut self, stages: &'a [PipelineShaderStageCreateInfo], ) -> GraphicsPipelineCreateInfoBuilder<'a> { - self.inner.stage_count = stages.len() as u32; + self.inner.stage_count = stages.len() as _; self.inner.p_stages = stages.as_ptr(); self } @@ -11589,6 +12867,13 @@ impl<'a> GraphicsPipelineCreateInfoBuilder<'a> { self.inner.base_pipeline_index = base_pipeline_index; self } + pub fn next(mut self, next: &'a T) -> GraphicsPipelineCreateInfoBuilder<'a> + where + T: ExtendsGraphicsPipelineCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> GraphicsPipelineCreateInfo { self.inner } @@ -11625,6 +12910,7 @@ pub struct PipelineCacheCreateInfoBuilder<'a> { inner: PipelineCacheCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineCacheCreateInfo {} impl<'a> ::std::ops::Deref for PipelineCacheCreateInfoBuilder<'a> { type Target = PipelineCacheCreateInfo; fn deref(&self) -> &Self::Target { @@ -11636,12 +12922,16 @@ impl<'a> PipelineCacheCreateInfoBuilder<'a> { self.inner.flags = flags; self } - pub fn initial_data( - mut self, - initial_data: &'a [c_void], - ) -> PipelineCacheCreateInfoBuilder<'a> { - self.inner.initial_data_size = initial_data.len() as usize; - self.inner.p_initial_data = initial_data.as_ptr(); + 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() as *const c_void; + self + } + pub fn next(mut self, next: &'a T) -> PipelineCacheCreateInfoBuilder<'a> + where + T: ExtendsPipelineCacheCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> PipelineCacheCreateInfo { @@ -11726,6 +13016,7 @@ pub struct PipelineLayoutCreateInfoBuilder<'a> { inner: PipelineLayoutCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineLayoutCreateInfo {} impl<'a> ::std::ops::Deref for PipelineLayoutCreateInfoBuilder<'a> { type Target = PipelineLayoutCreateInfo; fn deref(&self) -> &Self::Target { @@ -11744,7 +13035,7 @@ impl<'a> PipelineLayoutCreateInfoBuilder<'a> { mut self, set_layouts: &'a [DescriptorSetLayout], ) -> PipelineLayoutCreateInfoBuilder<'a> { - self.inner.set_layout_count = set_layouts.len() as u32; + self.inner.set_layout_count = set_layouts.len() as _; self.inner.p_set_layouts = set_layouts.as_ptr(); self } @@ -11752,10 +13043,17 @@ impl<'a> PipelineLayoutCreateInfoBuilder<'a> { mut self, push_constant_ranges: &'a [PushConstantRange], ) -> PipelineLayoutCreateInfoBuilder<'a> { - self.inner.push_constant_range_count = push_constant_ranges.len() as u32; + self.inner.push_constant_range_count = push_constant_ranges.len() as _; self.inner.p_push_constant_ranges = push_constant_ranges.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineLayoutCreateInfoBuilder<'a> + where + T: ExtendsPipelineLayoutCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineLayoutCreateInfo { self.inner } @@ -11818,6 +13116,7 @@ pub struct SamplerCreateInfoBuilder<'a> { inner: SamplerCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSamplerCreateInfo {} impl<'a> ::std::ops::Deref for SamplerCreateInfoBuilder<'a> { type Target = SamplerCreateInfo; fn deref(&self) -> &Self::Target { @@ -11866,16 +13165,16 @@ impl<'a> SamplerCreateInfoBuilder<'a> { self.inner.mip_lod_bias = mip_lod_bias; self } - pub fn anisotropy_enable(mut self, anisotropy_enable: Bool32) -> SamplerCreateInfoBuilder<'a> { - self.inner.anisotropy_enable = anisotropy_enable; + pub fn anisotropy_enable(mut self, anisotropy_enable: bool) -> SamplerCreateInfoBuilder<'a> { + self.inner.anisotropy_enable = anisotropy_enable.into(); self } pub fn max_anisotropy(mut self, max_anisotropy: f32) -> SamplerCreateInfoBuilder<'a> { self.inner.max_anisotropy = max_anisotropy; self } - pub fn compare_enable(mut self, compare_enable: Bool32) -> SamplerCreateInfoBuilder<'a> { - self.inner.compare_enable = compare_enable; + pub fn compare_enable(mut self, compare_enable: bool) -> SamplerCreateInfoBuilder<'a> { + self.inner.compare_enable = compare_enable.into(); self } pub fn compare_op(mut self, compare_op: CompareOp) -> SamplerCreateInfoBuilder<'a> { @@ -11896,9 +13195,16 @@ impl<'a> SamplerCreateInfoBuilder<'a> { } pub fn unnormalized_coordinates( mut self, - unnormalized_coordinates: Bool32, + unnormalized_coordinates: bool, ) -> SamplerCreateInfoBuilder<'a> { - self.inner.unnormalized_coordinates = unnormalized_coordinates; + self.inner.unnormalized_coordinates = unnormalized_coordinates.into(); + self + } + pub fn next(mut self, next: &'a T) -> SamplerCreateInfoBuilder<'a> + where + T: ExtendsSamplerCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> SamplerCreateInfo { @@ -11935,6 +13241,7 @@ pub struct CommandPoolCreateInfoBuilder<'a> { inner: CommandPoolCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsCommandPoolCreateInfo {} impl<'a> ::std::ops::Deref for CommandPoolCreateInfoBuilder<'a> { type Target = CommandPoolCreateInfo; fn deref(&self) -> &Self::Target { @@ -11953,6 +13260,13 @@ impl<'a> CommandPoolCreateInfoBuilder<'a> { self.inner.queue_family_index = queue_family_index; self } + pub fn next(mut self, next: &'a T) -> CommandPoolCreateInfoBuilder<'a> + where + T: ExtendsCommandPoolCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> CommandPoolCreateInfo { self.inner } @@ -11989,6 +13303,7 @@ pub struct CommandBufferAllocateInfoBuilder<'a> { inner: CommandBufferAllocateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsCommandBufferAllocateInfo {} impl<'a> ::std::ops::Deref for CommandBufferAllocateInfoBuilder<'a> { type Target = CommandBufferAllocateInfo; fn deref(&self) -> &Self::Target { @@ -12014,6 +13329,13 @@ impl<'a> CommandBufferAllocateInfoBuilder<'a> { self.inner.command_buffer_count = command_buffer_count; self } + pub fn next(mut self, next: &'a T) -> CommandBufferAllocateInfoBuilder<'a> + where + T: ExtendsCommandBufferAllocateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> CommandBufferAllocateInfo { self.inner } @@ -12056,6 +13378,7 @@ pub struct CommandBufferInheritanceInfoBuilder<'a> { inner: CommandBufferInheritanceInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsCommandBufferInheritanceInfo {} impl<'a> ::std::ops::Deref for CommandBufferInheritanceInfoBuilder<'a> { type Target = CommandBufferInheritanceInfo; fn deref(&self) -> &Self::Target { @@ -12083,9 +13406,9 @@ impl<'a> CommandBufferInheritanceInfoBuilder<'a> { } pub fn occlusion_query_enable( mut self, - occlusion_query_enable: Bool32, + occlusion_query_enable: bool, ) -> CommandBufferInheritanceInfoBuilder<'a> { - self.inner.occlusion_query_enable = occlusion_query_enable; + self.inner.occlusion_query_enable = occlusion_query_enable.into(); self } pub fn query_flags( @@ -12102,6 +13425,13 @@ impl<'a> CommandBufferInheritanceInfoBuilder<'a> { self.inner.pipeline_statistics = pipeline_statistics; self } + pub fn next(mut self, next: &'a T) -> CommandBufferInheritanceInfoBuilder<'a> + where + T: ExtendsCommandBufferInheritanceInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> CommandBufferInheritanceInfo { self.inner } @@ -12136,6 +13466,7 @@ pub struct CommandBufferBeginInfoBuilder<'a> { inner: CommandBufferBeginInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsCommandBufferBeginInfo {} impl<'a> ::std::ops::Deref for CommandBufferBeginInfoBuilder<'a> { type Target = CommandBufferBeginInfo; fn deref(&self) -> &Self::Target { @@ -12154,6 +13485,13 @@ impl<'a> CommandBufferBeginInfoBuilder<'a> { self.inner.p_inheritance_info = inheritance_info; self } + pub fn next(mut self, next: &'a T) -> CommandBufferBeginInfoBuilder<'a> + where + T: ExtendsCommandBufferBeginInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> CommandBufferBeginInfo { self.inner } @@ -12207,6 +13545,7 @@ pub struct RenderPassBeginInfoBuilder<'a> { inner: RenderPassBeginInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsRenderPassBeginInfo {} impl<'a> ::std::ops::Deref for RenderPassBeginInfoBuilder<'a> { type Target = RenderPassBeginInfo; fn deref(&self) -> &Self::Target { @@ -12230,10 +13569,17 @@ impl<'a> RenderPassBeginInfoBuilder<'a> { mut self, clear_values: &'a [ClearValue], ) -> RenderPassBeginInfoBuilder<'a> { - self.inner.clear_value_count = clear_values.len() as u32; + self.inner.clear_value_count = clear_values.len() as _; self.inner.p_clear_values = clear_values.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> RenderPassBeginInfoBuilder<'a> + where + T: ExtendsRenderPassBeginInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> RenderPassBeginInfo { self.inner } @@ -12531,7 +13877,7 @@ impl<'a> SubpassDescriptionBuilder<'a> { mut self, input_attachments: &'a [AttachmentReference], ) -> SubpassDescriptionBuilder<'a> { - self.inner.input_attachment_count = input_attachments.len() as u32; + self.inner.input_attachment_count = input_attachments.len() as _; self.inner.p_input_attachments = input_attachments.as_ptr(); self } @@ -12539,7 +13885,7 @@ impl<'a> SubpassDescriptionBuilder<'a> { mut self, color_attachments: &'a [AttachmentReference], ) -> SubpassDescriptionBuilder<'a> { - self.inner.color_attachment_count = color_attachments.len() as u32; + self.inner.color_attachment_count = color_attachments.len() as _; self.inner.p_color_attachments = color_attachments.as_ptr(); self } @@ -12547,7 +13893,7 @@ impl<'a> SubpassDescriptionBuilder<'a> { mut self, resolve_attachments: &'a [AttachmentReference], ) -> SubpassDescriptionBuilder<'a> { - self.inner.color_attachment_count = resolve_attachments.len() as u32; + self.inner.color_attachment_count = resolve_attachments.len() as _; self.inner.p_resolve_attachments = resolve_attachments.as_ptr(); self } @@ -12562,7 +13908,7 @@ impl<'a> SubpassDescriptionBuilder<'a> { mut self, preserve_attachments: &'a [u32], ) -> SubpassDescriptionBuilder<'a> { - self.inner.preserve_attachment_count = preserve_attachments.len() as u32; + self.inner.preserve_attachment_count = preserve_attachments.len() as _; self.inner.p_preserve_attachments = preserve_attachments.as_ptr(); self } @@ -12681,6 +14027,7 @@ pub struct RenderPassCreateInfoBuilder<'a> { inner: RenderPassCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsRenderPassCreateInfo {} impl<'a> ::std::ops::Deref for RenderPassCreateInfoBuilder<'a> { type Target = RenderPassCreateInfo; fn deref(&self) -> &Self::Target { @@ -12696,7 +14043,7 @@ impl<'a> RenderPassCreateInfoBuilder<'a> { mut self, attachments: &'a [AttachmentDescription], ) -> RenderPassCreateInfoBuilder<'a> { - self.inner.attachment_count = attachments.len() as u32; + self.inner.attachment_count = attachments.len() as _; self.inner.p_attachments = attachments.as_ptr(); self } @@ -12704,7 +14051,7 @@ impl<'a> RenderPassCreateInfoBuilder<'a> { mut self, subpasses: &'a [SubpassDescription], ) -> RenderPassCreateInfoBuilder<'a> { - self.inner.subpass_count = subpasses.len() as u32; + self.inner.subpass_count = subpasses.len() as _; self.inner.p_subpasses = subpasses.as_ptr(); self } @@ -12712,10 +14059,17 @@ impl<'a> RenderPassCreateInfoBuilder<'a> { mut self, dependencies: &'a [SubpassDependency], ) -> RenderPassCreateInfoBuilder<'a> { - self.inner.dependency_count = dependencies.len() as u32; + self.inner.dependency_count = dependencies.len() as _; self.inner.p_dependencies = dependencies.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> RenderPassCreateInfoBuilder<'a> + where + T: ExtendsRenderPassCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> RenderPassCreateInfo { self.inner } @@ -12748,6 +14102,7 @@ pub struct EventCreateInfoBuilder<'a> { inner: EventCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsEventCreateInfo {} impl<'a> ::std::ops::Deref for EventCreateInfoBuilder<'a> { type Target = EventCreateInfo; fn deref(&self) -> &Self::Target { @@ -12759,6 +14114,13 @@ impl<'a> EventCreateInfoBuilder<'a> { self.inner.flags = flags; self } + pub fn next(mut self, next: &'a T) -> EventCreateInfoBuilder<'a> + where + T: ExtendsEventCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> EventCreateInfo { self.inner } @@ -12791,6 +14153,7 @@ pub struct FenceCreateInfoBuilder<'a> { inner: FenceCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsFenceCreateInfo {} impl<'a> ::std::ops::Deref for FenceCreateInfoBuilder<'a> { type Target = FenceCreateInfo; fn deref(&self) -> &Self::Target { @@ -12802,6 +14165,13 @@ impl<'a> FenceCreateInfoBuilder<'a> { self.inner.flags = flags; self } + pub fn next(mut self, next: &'a T) -> FenceCreateInfoBuilder<'a> + where + T: ExtendsFenceCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> FenceCreateInfo { self.inner } @@ -12886,355 +14256,350 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceFeaturesBuilder<'a> { impl<'a> PhysicalDeviceFeaturesBuilder<'a> { pub fn robust_buffer_access( mut self, - robust_buffer_access: Bool32, + robust_buffer_access: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.robust_buffer_access = robust_buffer_access; + self.inner.robust_buffer_access = robust_buffer_access.into(); self } pub fn full_draw_index_uint32( mut self, - full_draw_index_uint32: Bool32, + full_draw_index_uint32: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.full_draw_index_uint32 = full_draw_index_uint32; + self.inner.full_draw_index_uint32 = full_draw_index_uint32.into(); self } - pub fn image_cube_array( - mut self, - image_cube_array: Bool32, - ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.image_cube_array = image_cube_array; + pub fn image_cube_array(mut self, image_cube_array: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.image_cube_array = image_cube_array.into(); self } pub fn independent_blend( mut self, - independent_blend: Bool32, + independent_blend: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.independent_blend = independent_blend; + self.inner.independent_blend = independent_blend.into(); self } - pub fn geometry_shader(mut self, geometry_shader: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.geometry_shader = geometry_shader; + pub fn geometry_shader(mut self, geometry_shader: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.geometry_shader = geometry_shader.into(); self } pub fn tessellation_shader( mut self, - tessellation_shader: Bool32, + tessellation_shader: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.tessellation_shader = tessellation_shader; + self.inner.tessellation_shader = tessellation_shader.into(); self } pub fn sample_rate_shading( mut self, - sample_rate_shading: Bool32, + sample_rate_shading: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sample_rate_shading = sample_rate_shading; + self.inner.sample_rate_shading = sample_rate_shading.into(); self } - pub fn dual_src_blend(mut self, dual_src_blend: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.dual_src_blend = dual_src_blend; + pub fn dual_src_blend(mut self, dual_src_blend: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.dual_src_blend = dual_src_blend.into(); self } - pub fn logic_op(mut self, logic_op: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.logic_op = logic_op; + pub fn logic_op(mut self, logic_op: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.logic_op = logic_op.into(); self } pub fn multi_draw_indirect( mut self, - multi_draw_indirect: Bool32, + multi_draw_indirect: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.multi_draw_indirect = multi_draw_indirect; + self.inner.multi_draw_indirect = multi_draw_indirect.into(); self } pub fn draw_indirect_first_instance( mut self, - draw_indirect_first_instance: Bool32, + draw_indirect_first_instance: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.draw_indirect_first_instance = draw_indirect_first_instance; + self.inner.draw_indirect_first_instance = draw_indirect_first_instance.into(); self } - pub fn depth_clamp(mut self, depth_clamp: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.depth_clamp = depth_clamp; + pub fn depth_clamp(mut self, depth_clamp: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.depth_clamp = depth_clamp.into(); self } - pub fn depth_bias_clamp( - mut self, - depth_bias_clamp: Bool32, - ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.depth_bias_clamp = depth_bias_clamp; + pub fn depth_bias_clamp(mut self, depth_bias_clamp: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.depth_bias_clamp = depth_bias_clamp.into(); self } pub fn fill_mode_non_solid( mut self, - fill_mode_non_solid: Bool32, + fill_mode_non_solid: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.fill_mode_non_solid = fill_mode_non_solid; + self.inner.fill_mode_non_solid = fill_mode_non_solid.into(); self } - pub fn depth_bounds(mut self, depth_bounds: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.depth_bounds = depth_bounds; + pub fn depth_bounds(mut self, depth_bounds: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.depth_bounds = depth_bounds.into(); self } - pub fn wide_lines(mut self, wide_lines: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.wide_lines = wide_lines; + pub fn wide_lines(mut self, wide_lines: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.wide_lines = wide_lines.into(); self } - pub fn large_points(mut self, large_points: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.large_points = large_points; + pub fn large_points(mut self, large_points: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.large_points = large_points.into(); self } - pub fn alpha_to_one(mut self, alpha_to_one: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.alpha_to_one = alpha_to_one; + pub fn alpha_to_one(mut self, alpha_to_one: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.alpha_to_one = alpha_to_one.into(); self } - pub fn multi_viewport(mut self, multi_viewport: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.multi_viewport = multi_viewport; + pub fn multi_viewport(mut self, multi_viewport: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.multi_viewport = multi_viewport.into(); self } pub fn sampler_anisotropy( mut self, - sampler_anisotropy: Bool32, + sampler_anisotropy: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sampler_anisotropy = sampler_anisotropy; + self.inner.sampler_anisotropy = sampler_anisotropy.into(); self } pub fn texture_compression_etc2( mut self, - texture_compression_etc2: Bool32, + texture_compression_etc2: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.texture_compression_etc2 = texture_compression_etc2; + self.inner.texture_compression_etc2 = texture_compression_etc2.into(); self } pub fn texture_compression_astc_ldr( mut self, - texture_compression_astc_ldr: Bool32, + texture_compression_astc_ldr: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.texture_compression_astc_ldr = texture_compression_astc_ldr; + self.inner.texture_compression_astc_ldr = texture_compression_astc_ldr.into(); self } pub fn texture_compression_bc( mut self, - texture_compression_bc: Bool32, + texture_compression_bc: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.texture_compression_bc = texture_compression_bc; + self.inner.texture_compression_bc = texture_compression_bc.into(); self } pub fn occlusion_query_precise( mut self, - occlusion_query_precise: Bool32, + occlusion_query_precise: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.occlusion_query_precise = occlusion_query_precise; + self.inner.occlusion_query_precise = occlusion_query_precise.into(); self } pub fn pipeline_statistics_query( mut self, - pipeline_statistics_query: Bool32, + pipeline_statistics_query: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.pipeline_statistics_query = pipeline_statistics_query; + self.inner.pipeline_statistics_query = pipeline_statistics_query.into(); self } pub fn vertex_pipeline_stores_and_atomics( mut self, - vertex_pipeline_stores_and_atomics: Bool32, + vertex_pipeline_stores_and_atomics: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.vertex_pipeline_stores_and_atomics = vertex_pipeline_stores_and_atomics; + self.inner.vertex_pipeline_stores_and_atomics = vertex_pipeline_stores_and_atomics.into(); self } pub fn fragment_stores_and_atomics( mut self, - fragment_stores_and_atomics: Bool32, + fragment_stores_and_atomics: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.fragment_stores_and_atomics = fragment_stores_and_atomics; + self.inner.fragment_stores_and_atomics = fragment_stores_and_atomics.into(); self } pub fn shader_tessellation_and_geometry_point_size( mut self, - shader_tessellation_and_geometry_point_size: Bool32, + shader_tessellation_and_geometry_point_size: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { self.inner.shader_tessellation_and_geometry_point_size = - shader_tessellation_and_geometry_point_size; + shader_tessellation_and_geometry_point_size.into(); self } pub fn shader_image_gather_extended( mut self, - shader_image_gather_extended: Bool32, + shader_image_gather_extended: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_image_gather_extended = shader_image_gather_extended; + self.inner.shader_image_gather_extended = shader_image_gather_extended.into(); self } pub fn shader_storage_image_extended_formats( mut self, - shader_storage_image_extended_formats: Bool32, + shader_storage_image_extended_formats: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_storage_image_extended_formats = shader_storage_image_extended_formats; + self.inner.shader_storage_image_extended_formats = + shader_storage_image_extended_formats.into(); self } pub fn shader_storage_image_multisample( mut self, - shader_storage_image_multisample: Bool32, + shader_storage_image_multisample: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_storage_image_multisample = shader_storage_image_multisample; + self.inner.shader_storage_image_multisample = shader_storage_image_multisample.into(); self } pub fn shader_storage_image_read_without_format( mut self, - shader_storage_image_read_without_format: Bool32, + shader_storage_image_read_without_format: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { self.inner.shader_storage_image_read_without_format = - shader_storage_image_read_without_format; + shader_storage_image_read_without_format.into(); self } pub fn shader_storage_image_write_without_format( mut self, - shader_storage_image_write_without_format: Bool32, + shader_storage_image_write_without_format: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { self.inner.shader_storage_image_write_without_format = - shader_storage_image_write_without_format; + shader_storage_image_write_without_format.into(); self } pub fn shader_uniform_buffer_array_dynamic_indexing( mut self, - shader_uniform_buffer_array_dynamic_indexing: Bool32, + shader_uniform_buffer_array_dynamic_indexing: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { self.inner.shader_uniform_buffer_array_dynamic_indexing = - shader_uniform_buffer_array_dynamic_indexing; + shader_uniform_buffer_array_dynamic_indexing.into(); self } pub fn shader_sampled_image_array_dynamic_indexing( mut self, - shader_sampled_image_array_dynamic_indexing: Bool32, + shader_sampled_image_array_dynamic_indexing: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { self.inner.shader_sampled_image_array_dynamic_indexing = - shader_sampled_image_array_dynamic_indexing; + shader_sampled_image_array_dynamic_indexing.into(); self } pub fn shader_storage_buffer_array_dynamic_indexing( mut self, - shader_storage_buffer_array_dynamic_indexing: Bool32, + shader_storage_buffer_array_dynamic_indexing: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { self.inner.shader_storage_buffer_array_dynamic_indexing = - shader_storage_buffer_array_dynamic_indexing; + shader_storage_buffer_array_dynamic_indexing.into(); self } pub fn shader_storage_image_array_dynamic_indexing( mut self, - shader_storage_image_array_dynamic_indexing: Bool32, + shader_storage_image_array_dynamic_indexing: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { self.inner.shader_storage_image_array_dynamic_indexing = - shader_storage_image_array_dynamic_indexing; + shader_storage_image_array_dynamic_indexing.into(); self } pub fn shader_clip_distance( mut self, - shader_clip_distance: Bool32, + shader_clip_distance: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_clip_distance = shader_clip_distance; + self.inner.shader_clip_distance = shader_clip_distance.into(); self } pub fn shader_cull_distance( mut self, - shader_cull_distance: Bool32, + shader_cull_distance: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_cull_distance = shader_cull_distance; + self.inner.shader_cull_distance = shader_cull_distance.into(); self } - pub fn shader_float64(mut self, shader_float64: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_float64 = shader_float64; + pub fn shader_float64(mut self, shader_float64: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.shader_float64 = shader_float64.into(); self } - pub fn shader_int64(mut self, shader_int64: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_int64 = shader_int64; + pub fn shader_int64(mut self, shader_int64: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.shader_int64 = shader_int64.into(); self } - pub fn shader_int16(mut self, shader_int16: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_int16 = shader_int16; + pub fn shader_int16(mut self, shader_int16: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.shader_int16 = shader_int16.into(); self } pub fn shader_resource_residency( mut self, - shader_resource_residency: Bool32, + shader_resource_residency: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_resource_residency = shader_resource_residency; + self.inner.shader_resource_residency = shader_resource_residency.into(); self } pub fn shader_resource_min_lod( mut self, - shader_resource_min_lod: Bool32, + shader_resource_min_lod: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.shader_resource_min_lod = shader_resource_min_lod; + self.inner.shader_resource_min_lod = shader_resource_min_lod.into(); self } - pub fn sparse_binding(mut self, sparse_binding: Bool32) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_binding = sparse_binding; + pub fn sparse_binding(mut self, sparse_binding: bool) -> PhysicalDeviceFeaturesBuilder<'a> { + self.inner.sparse_binding = sparse_binding.into(); self } pub fn sparse_residency_buffer( mut self, - sparse_residency_buffer: Bool32, + sparse_residency_buffer: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency_buffer = sparse_residency_buffer; + self.inner.sparse_residency_buffer = sparse_residency_buffer.into(); self } pub fn sparse_residency_image2_d( mut self, - sparse_residency_image2_d: Bool32, + sparse_residency_image2_d: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency_image2_d = sparse_residency_image2_d; + self.inner.sparse_residency_image2_d = sparse_residency_image2_d.into(); self } pub fn sparse_residency_image3_d( mut self, - sparse_residency_image3_d: Bool32, + sparse_residency_image3_d: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency_image3_d = sparse_residency_image3_d; + self.inner.sparse_residency_image3_d = sparse_residency_image3_d.into(); self } pub fn sparse_residency2_samples( mut self, - sparse_residency2_samples: Bool32, + sparse_residency2_samples: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency2_samples = sparse_residency2_samples; + self.inner.sparse_residency2_samples = sparse_residency2_samples.into(); self } pub fn sparse_residency4_samples( mut self, - sparse_residency4_samples: Bool32, + sparse_residency4_samples: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency4_samples = sparse_residency4_samples; + self.inner.sparse_residency4_samples = sparse_residency4_samples.into(); self } pub fn sparse_residency8_samples( mut self, - sparse_residency8_samples: Bool32, + sparse_residency8_samples: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency8_samples = sparse_residency8_samples; + self.inner.sparse_residency8_samples = sparse_residency8_samples.into(); self } pub fn sparse_residency16_samples( mut self, - sparse_residency16_samples: Bool32, + sparse_residency16_samples: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency16_samples = sparse_residency16_samples; + self.inner.sparse_residency16_samples = sparse_residency16_samples.into(); self } pub fn sparse_residency_aliased( mut self, - sparse_residency_aliased: Bool32, + sparse_residency_aliased: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.sparse_residency_aliased = sparse_residency_aliased; + self.inner.sparse_residency_aliased = sparse_residency_aliased.into(); self } pub fn variable_multisample_rate( mut self, - variable_multisample_rate: Bool32, + variable_multisample_rate: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.variable_multisample_rate = variable_multisample_rate; + self.inner.variable_multisample_rate = variable_multisample_rate.into(); self } pub fn inherited_queries( mut self, - inherited_queries: Bool32, + inherited_queries: bool, ) -> PhysicalDeviceFeaturesBuilder<'a> { - self.inner.inherited_queries = inherited_queries; + self.inner.inherited_queries = inherited_queries.into(); self } pub fn build(self) -> PhysicalDeviceFeatures { @@ -13271,38 +14636,38 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceSparsePropertiesBuilder<'a> { impl<'a> PhysicalDeviceSparsePropertiesBuilder<'a> { pub fn residency_standard2_d_block_shape( mut self, - residency_standard2_d_block_shape: Bool32, + residency_standard2_d_block_shape: bool, ) -> PhysicalDeviceSparsePropertiesBuilder<'a> { - self.inner.residency_standard2_d_block_shape = residency_standard2_d_block_shape; + self.inner.residency_standard2_d_block_shape = residency_standard2_d_block_shape.into(); self } pub fn residency_standard2_d_multisample_block_shape( mut self, - residency_standard2_d_multisample_block_shape: Bool32, + residency_standard2_d_multisample_block_shape: bool, ) -> PhysicalDeviceSparsePropertiesBuilder<'a> { self.inner.residency_standard2_d_multisample_block_shape = - residency_standard2_d_multisample_block_shape; + residency_standard2_d_multisample_block_shape.into(); self } pub fn residency_standard3_d_block_shape( mut self, - residency_standard3_d_block_shape: Bool32, + residency_standard3_d_block_shape: bool, ) -> PhysicalDeviceSparsePropertiesBuilder<'a> { - self.inner.residency_standard3_d_block_shape = residency_standard3_d_block_shape; + self.inner.residency_standard3_d_block_shape = residency_standard3_d_block_shape.into(); self } pub fn residency_aligned_mip_size( mut self, - residency_aligned_mip_size: Bool32, + residency_aligned_mip_size: bool, ) -> PhysicalDeviceSparsePropertiesBuilder<'a> { - self.inner.residency_aligned_mip_size = residency_aligned_mip_size; + self.inner.residency_aligned_mip_size = residency_aligned_mip_size.into(); self } pub fn residency_non_resident_strict( mut self, - residency_non_resident_strict: Bool32, + residency_non_resident_strict: bool, ) -> PhysicalDeviceSparsePropertiesBuilder<'a> { - self.inner.residency_non_resident_strict = residency_non_resident_strict; + self.inner.residency_non_resident_strict = residency_non_resident_strict.into(); self } pub fn build(self) -> PhysicalDeviceSparseProperties { @@ -14197,9 +15562,9 @@ impl<'a> PhysicalDeviceLimitsBuilder<'a> { } pub fn timestamp_compute_and_graphics( mut self, - timestamp_compute_and_graphics: Bool32, + timestamp_compute_and_graphics: bool, ) -> PhysicalDeviceLimitsBuilder<'a> { - self.inner.timestamp_compute_and_graphics = timestamp_compute_and_graphics; + self.inner.timestamp_compute_and_graphics = timestamp_compute_and_graphics.into(); self } pub fn timestamp_period(mut self, timestamp_period: f32) -> PhysicalDeviceLimitsBuilder<'a> { @@ -14262,15 +15627,15 @@ impl<'a> PhysicalDeviceLimitsBuilder<'a> { self.inner.line_width_granularity = line_width_granularity; self } - pub fn strict_lines(mut self, strict_lines: Bool32) -> PhysicalDeviceLimitsBuilder<'a> { - self.inner.strict_lines = strict_lines; + pub fn strict_lines(mut self, strict_lines: bool) -> PhysicalDeviceLimitsBuilder<'a> { + self.inner.strict_lines = strict_lines.into(); self } pub fn standard_sample_locations( mut self, - standard_sample_locations: Bool32, + standard_sample_locations: bool, ) -> PhysicalDeviceLimitsBuilder<'a> { - self.inner.standard_sample_locations = standard_sample_locations; + self.inner.standard_sample_locations = standard_sample_locations.into(); self } pub fn optimal_buffer_copy_offset_alignment( @@ -14327,6 +15692,7 @@ pub struct SemaphoreCreateInfoBuilder<'a> { inner: SemaphoreCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSemaphoreCreateInfo {} impl<'a> ::std::ops::Deref for SemaphoreCreateInfoBuilder<'a> { type Target = SemaphoreCreateInfo; fn deref(&self) -> &Self::Target { @@ -14338,6 +15704,13 @@ impl<'a> SemaphoreCreateInfoBuilder<'a> { self.inner.flags = flags; self } + pub fn next(mut self, next: &'a T) -> SemaphoreCreateInfoBuilder<'a> + where + T: ExtendsSemaphoreCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SemaphoreCreateInfo { self.inner } @@ -14376,6 +15749,7 @@ pub struct QueryPoolCreateInfoBuilder<'a> { inner: QueryPoolCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsQueryPoolCreateInfo {} impl<'a> ::std::ops::Deref for QueryPoolCreateInfoBuilder<'a> { type Target = QueryPoolCreateInfo; fn deref(&self) -> &Self::Target { @@ -14402,6 +15776,13 @@ impl<'a> QueryPoolCreateInfoBuilder<'a> { self.inner.pipeline_statistics = pipeline_statistics; self } + pub fn next(mut self, next: &'a T) -> QueryPoolCreateInfoBuilder<'a> + where + T: ExtendsQueryPoolCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> QueryPoolCreateInfo { self.inner } @@ -14446,6 +15827,7 @@ pub struct FramebufferCreateInfoBuilder<'a> { inner: FramebufferCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsFramebufferCreateInfo {} impl<'a> ::std::ops::Deref for FramebufferCreateInfoBuilder<'a> { type Target = FramebufferCreateInfo; fn deref(&self) -> &Self::Target { @@ -14462,7 +15844,7 @@ impl<'a> FramebufferCreateInfoBuilder<'a> { self } pub fn attachments(mut self, attachments: &'a [ImageView]) -> FramebufferCreateInfoBuilder<'a> { - self.inner.attachment_count = attachments.len() as u32; + self.inner.attachment_count = attachments.len() as _; self.inner.p_attachments = attachments.as_ptr(); self } @@ -14478,6 +15860,13 @@ impl<'a> FramebufferCreateInfoBuilder<'a> { self.inner.layers = layers; self } + pub fn next(mut self, next: &'a T) -> FramebufferCreateInfoBuilder<'a> + where + T: ExtendsFramebufferCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> FramebufferCreateInfo { self.inner } @@ -14663,6 +16052,7 @@ pub struct SubmitInfoBuilder<'a> { inner: SubmitInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSubmitInfo {} impl<'a> ::std::ops::Deref for SubmitInfoBuilder<'a> { type Target = SubmitInfo; fn deref(&self) -> &Self::Target { @@ -14671,7 +16061,7 @@ impl<'a> ::std::ops::Deref for SubmitInfoBuilder<'a> { } impl<'a> SubmitInfoBuilder<'a> { pub fn wait_semaphores(mut self, wait_semaphores: &'a [Semaphore]) -> SubmitInfoBuilder<'a> { - self.inner.wait_semaphore_count = wait_semaphores.len() as u32; + self.inner.wait_semaphore_count = wait_semaphores.len() as _; self.inner.p_wait_semaphores = wait_semaphores.as_ptr(); self } @@ -14679,7 +16069,7 @@ impl<'a> SubmitInfoBuilder<'a> { mut self, wait_dst_stage_mask: &'a [PipelineStageFlags], ) -> SubmitInfoBuilder<'a> { - self.inner.wait_semaphore_count = wait_dst_stage_mask.len() as u32; + self.inner.wait_semaphore_count = wait_dst_stage_mask.len() as _; self.inner.p_wait_dst_stage_mask = wait_dst_stage_mask.as_ptr(); self } @@ -14687,7 +16077,7 @@ impl<'a> SubmitInfoBuilder<'a> { mut self, command_buffers: &'a [CommandBuffer], ) -> SubmitInfoBuilder<'a> { - self.inner.command_buffer_count = command_buffers.len() as u32; + self.inner.command_buffer_count = command_buffers.len() as _; self.inner.p_command_buffers = command_buffers.as_ptr(); self } @@ -14695,10 +16085,17 @@ impl<'a> SubmitInfoBuilder<'a> { mut self, signal_semaphores: &'a [Semaphore], ) -> SubmitInfoBuilder<'a> { - self.inner.signal_semaphore_count = signal_semaphores.len() as u32; + self.inner.signal_semaphore_count = signal_semaphores.len() as _; self.inner.p_signal_semaphores = signal_semaphores.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> SubmitInfoBuilder<'a> + where + T: ExtendsSubmitInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SubmitInfo { self.inner } @@ -14777,16 +16174,16 @@ impl<'a> DisplayPropertiesKHRBuilder<'a> { } pub fn plane_reorder_possible( mut self, - plane_reorder_possible: Bool32, + plane_reorder_possible: bool, ) -> DisplayPropertiesKHRBuilder<'a> { - self.inner.plane_reorder_possible = plane_reorder_possible; + self.inner.plane_reorder_possible = plane_reorder_possible.into(); self } pub fn persistent_content( mut self, - persistent_content: Bool32, + persistent_content: bool, ) -> DisplayPropertiesKHRBuilder<'a> { - self.inner.persistent_content = persistent_content; + self.inner.persistent_content = persistent_content.into(); self } pub fn build(self) -> DisplayPropertiesKHR { @@ -14949,6 +16346,7 @@ pub struct DisplayModeCreateInfoKHRBuilder<'a> { inner: DisplayModeCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayModeCreateInfoKHR {} impl<'a> ::std::ops::Deref for DisplayModeCreateInfoKHRBuilder<'a> { type Target = DisplayModeCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -14970,6 +16368,13 @@ impl<'a> DisplayModeCreateInfoKHRBuilder<'a> { self.inner.parameters = parameters; self } + pub fn next(mut self, next: &'a T) -> DisplayModeCreateInfoKHRBuilder<'a> + where + T: ExtendsDisplayModeCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DisplayModeCreateInfoKHR { self.inner } @@ -15115,6 +16520,7 @@ pub struct DisplaySurfaceCreateInfoKHRBuilder<'a> { inner: DisplaySurfaceCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplaySurfaceCreateInfoKHR {} impl<'a> ::std::ops::Deref for DisplaySurfaceCreateInfoKHRBuilder<'a> { type Target = DisplaySurfaceCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -15172,6 +16578,13 @@ impl<'a> DisplaySurfaceCreateInfoKHRBuilder<'a> { self.inner.image_extent = image_extent; self } + pub fn next(mut self, next: &'a T) -> DisplaySurfaceCreateInfoKHRBuilder<'a> + where + T: ExtendsDisplaySurfaceCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DisplaySurfaceCreateInfoKHR { self.inner } @@ -15208,6 +16621,8 @@ pub struct DisplayPresentInfoKHRBuilder<'a> { inner: DisplayPresentInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayPresentInfoKHR {} +unsafe impl ExtendsPresentInfoKHR for DisplayPresentInfoKHR {} impl<'a> ::std::ops::Deref for DisplayPresentInfoKHRBuilder<'a> { type Target = DisplayPresentInfoKHR; fn deref(&self) -> &Self::Target { @@ -15223,8 +16638,15 @@ impl<'a> DisplayPresentInfoKHRBuilder<'a> { self.inner.dst_rect = dst_rect; self } - pub fn persistent(mut self, persistent: Bool32) -> DisplayPresentInfoKHRBuilder<'a> { - self.inner.persistent = persistent; + pub fn persistent(mut self, persistent: bool) -> DisplayPresentInfoKHRBuilder<'a> { + self.inner.persistent = persistent.into(); + self + } + pub fn next(mut self, next: &'a T) -> DisplayPresentInfoKHRBuilder<'a> + where + T: ExtendsDisplayPresentInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> DisplayPresentInfoKHR { @@ -15359,6 +16781,7 @@ pub struct AndroidSurfaceCreateInfoKHRBuilder<'a> { inner: AndroidSurfaceCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsAndroidSurfaceCreateInfoKHR {} impl<'a> ::std::ops::Deref for AndroidSurfaceCreateInfoKHRBuilder<'a> { type Target = AndroidSurfaceCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -15377,73 +16800,19 @@ impl<'a> AndroidSurfaceCreateInfoKHRBuilder<'a> { self.inner.window = window; self } + pub fn next(mut self, next: &'a T) -> AndroidSurfaceCreateInfoKHRBuilder<'a> + where + T: ExtendsAndroidSurfaceCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> AndroidSurfaceCreateInfoKHR { self.inner } } #[repr(C)] #[derive(Copy, Clone, Debug)] -pub struct MirSurfaceCreateInfoKHR { - pub s_type: StructureType, - pub p_next: *const c_void, - pub flags: MirSurfaceCreateFlagsKHR, - pub connection: *mut MirConnection, - pub mir_surface: *mut MirSurface, -} -impl ::std::default::Default for MirSurfaceCreateInfoKHR { - fn default() -> MirSurfaceCreateInfoKHR { - MirSurfaceCreateInfoKHR { - s_type: StructureType::MIR_SURFACE_CREATE_INFO_KHR, - p_next: ::std::ptr::null(), - flags: MirSurfaceCreateFlagsKHR::default(), - connection: ::std::ptr::null_mut(), - mir_surface: ::std::ptr::null_mut(), - } - } -} -impl MirSurfaceCreateInfoKHR { - pub fn builder<'a>() -> MirSurfaceCreateInfoKHRBuilder<'a> { - MirSurfaceCreateInfoKHRBuilder { - inner: MirSurfaceCreateInfoKHR::default(), - marker: ::std::marker::PhantomData, - } - } -} -pub struct MirSurfaceCreateInfoKHRBuilder<'a> { - inner: MirSurfaceCreateInfoKHR, - marker: ::std::marker::PhantomData<&'a ()>, -} -impl<'a> ::std::ops::Deref for MirSurfaceCreateInfoKHRBuilder<'a> { - type Target = MirSurfaceCreateInfoKHR; - fn deref(&self) -> &Self::Target { - &self.inner - } -} -impl<'a> MirSurfaceCreateInfoKHRBuilder<'a> { - pub fn flags(mut self, flags: MirSurfaceCreateFlagsKHR) -> MirSurfaceCreateInfoKHRBuilder<'a> { - self.inner.flags = flags; - self - } - pub fn connection( - mut self, - connection: *mut MirConnection, - ) -> MirSurfaceCreateInfoKHRBuilder<'a> { - self.inner.connection = connection; - self - } - pub fn mir_surface( - mut self, - mir_surface: *mut MirSurface, - ) -> MirSurfaceCreateInfoKHRBuilder<'a> { - self.inner.mir_surface = mir_surface; - self - } - pub fn build(self) -> MirSurfaceCreateInfoKHR { - self.inner - } -} -#[repr(C)] -#[derive(Copy, Clone, Debug)] pub struct ViSurfaceCreateInfoNN { pub s_type: StructureType, pub p_next: *const c_void, @@ -15472,6 +16841,7 @@ pub struct ViSurfaceCreateInfoNNBuilder<'a> { inner: ViSurfaceCreateInfoNN, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsViSurfaceCreateInfoNN {} impl<'a> ::std::ops::Deref for ViSurfaceCreateInfoNNBuilder<'a> { type Target = ViSurfaceCreateInfoNN; fn deref(&self) -> &Self::Target { @@ -15487,6 +16857,13 @@ impl<'a> ViSurfaceCreateInfoNNBuilder<'a> { self.inner.window = window; self } + pub fn next(mut self, next: &'a T) -> ViSurfaceCreateInfoNNBuilder<'a> + where + T: ExtendsViSurfaceCreateInfoNN, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ViSurfaceCreateInfoNN { self.inner } @@ -15523,6 +16900,7 @@ pub struct WaylandSurfaceCreateInfoKHRBuilder<'a> { inner: WaylandSurfaceCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsWaylandSurfaceCreateInfoKHR {} impl<'a> ::std::ops::Deref for WaylandSurfaceCreateInfoKHRBuilder<'a> { type Target = WaylandSurfaceCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -15545,6 +16923,13 @@ impl<'a> WaylandSurfaceCreateInfoKHRBuilder<'a> { self.inner.surface = surface; self } + pub fn next(mut self, next: &'a T) -> WaylandSurfaceCreateInfoKHRBuilder<'a> + where + T: ExtendsWaylandSurfaceCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> WaylandSurfaceCreateInfoKHR { self.inner } @@ -15581,6 +16966,7 @@ pub struct Win32SurfaceCreateInfoKHRBuilder<'a> { inner: Win32SurfaceCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsWin32SurfaceCreateInfoKHR {} impl<'a> ::std::ops::Deref for Win32SurfaceCreateInfoKHRBuilder<'a> { type Target = Win32SurfaceCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -15603,6 +16989,13 @@ impl<'a> Win32SurfaceCreateInfoKHRBuilder<'a> { self.inner.hwnd = hwnd; self } + pub fn next(mut self, next: &'a T) -> Win32SurfaceCreateInfoKHRBuilder<'a> + where + T: ExtendsWin32SurfaceCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> Win32SurfaceCreateInfoKHR { self.inner } @@ -15639,6 +17032,7 @@ pub struct XlibSurfaceCreateInfoKHRBuilder<'a> { inner: XlibSurfaceCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsXlibSurfaceCreateInfoKHR {} impl<'a> ::std::ops::Deref for XlibSurfaceCreateInfoKHRBuilder<'a> { type Target = XlibSurfaceCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -15661,6 +17055,13 @@ impl<'a> XlibSurfaceCreateInfoKHRBuilder<'a> { self.inner.window = window; self } + pub fn next(mut self, next: &'a T) -> XlibSurfaceCreateInfoKHRBuilder<'a> + where + T: ExtendsXlibSurfaceCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> XlibSurfaceCreateInfoKHR { self.inner } @@ -15697,6 +17098,7 @@ pub struct XcbSurfaceCreateInfoKHRBuilder<'a> { inner: XcbSurfaceCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsXcbSurfaceCreateInfoKHR {} impl<'a> ::std::ops::Deref for XcbSurfaceCreateInfoKHRBuilder<'a> { type Target = XcbSurfaceCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -15719,11 +17121,81 @@ impl<'a> XcbSurfaceCreateInfoKHRBuilder<'a> { self.inner.window = window; self } + pub fn next(mut self, next: &'a T) -> XcbSurfaceCreateInfoKHRBuilder<'a> + where + T: ExtendsXcbSurfaceCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> XcbSurfaceCreateInfoKHR { self.inner } } #[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct ImagePipeSurfaceCreateInfoFUCHSIA { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: ImagePipeSurfaceCreateFlagsFUCHSIA, + pub image_pipe_handle: zx_handle_t, +} +impl ::std::default::Default for ImagePipeSurfaceCreateInfoFUCHSIA { + fn default() -> ImagePipeSurfaceCreateInfoFUCHSIA { + ImagePipeSurfaceCreateInfoFUCHSIA { + s_type: StructureType::IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA, + p_next: ::std::ptr::null(), + flags: ImagePipeSurfaceCreateFlagsFUCHSIA::default(), + image_pipe_handle: zx_handle_t::default(), + } + } +} +impl ImagePipeSurfaceCreateInfoFUCHSIA { + pub fn builder<'a>() -> ImagePipeSurfaceCreateInfoFUCHSIABuilder<'a> { + ImagePipeSurfaceCreateInfoFUCHSIABuilder { + inner: ImagePipeSurfaceCreateInfoFUCHSIA::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ImagePipeSurfaceCreateInfoFUCHSIABuilder<'a> { + inner: ImagePipeSurfaceCreateInfoFUCHSIA, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsImagePipeSurfaceCreateInfoFUCHSIA {} +impl<'a> ::std::ops::Deref for ImagePipeSurfaceCreateInfoFUCHSIABuilder<'a> { + type Target = ImagePipeSurfaceCreateInfoFUCHSIA; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ImagePipeSurfaceCreateInfoFUCHSIABuilder<'a> { + pub fn flags( + mut self, + flags: ImagePipeSurfaceCreateFlagsFUCHSIA, + ) -> ImagePipeSurfaceCreateInfoFUCHSIABuilder<'a> { + self.inner.flags = flags; + self + } + pub fn image_pipe_handle( + mut self, + image_pipe_handle: zx_handle_t, + ) -> ImagePipeSurfaceCreateInfoFUCHSIABuilder<'a> { + self.inner.image_pipe_handle = image_pipe_handle; + self + } + pub fn next(mut self, next: &'a T) -> ImagePipeSurfaceCreateInfoFUCHSIABuilder<'a> + where + T: ExtendsImagePipeSurfaceCreateInfoFUCHSIA, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> ImagePipeSurfaceCreateInfoFUCHSIA { + self.inner + } +} +#[repr(C)] #[derive(Copy, Clone, Default, Debug)] pub struct SurfaceFormatKHR { pub format: Format, @@ -15818,6 +17290,7 @@ pub struct SwapchainCreateInfoKHRBuilder<'a> { inner: SwapchainCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSwapchainCreateInfoKHR {} impl<'a> ::std::ops::Deref for SwapchainCreateInfoKHRBuilder<'a> { type Target = SwapchainCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -15877,7 +17350,7 @@ impl<'a> SwapchainCreateInfoKHRBuilder<'a> { mut self, queue_family_indices: &'a [u32], ) -> SwapchainCreateInfoKHRBuilder<'a> { - self.inner.queue_family_index_count = queue_family_indices.len() as u32; + self.inner.queue_family_index_count = queue_family_indices.len() as _; self.inner.p_queue_family_indices = queue_family_indices.as_ptr(); self } @@ -15902,8 +17375,8 @@ impl<'a> SwapchainCreateInfoKHRBuilder<'a> { self.inner.present_mode = present_mode; self } - pub fn clipped(mut self, clipped: Bool32) -> SwapchainCreateInfoKHRBuilder<'a> { - self.inner.clipped = clipped; + pub fn clipped(mut self, clipped: bool) -> SwapchainCreateInfoKHRBuilder<'a> { + self.inner.clipped = clipped.into(); self } pub fn old_swapchain( @@ -15913,6 +17386,13 @@ impl<'a> SwapchainCreateInfoKHRBuilder<'a> { self.inner.old_swapchain = old_swapchain; self } + pub fn next(mut self, next: &'a T) -> SwapchainCreateInfoKHRBuilder<'a> + where + T: ExtendsSwapchainCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SwapchainCreateInfoKHR { self.inner } @@ -15955,6 +17435,7 @@ pub struct PresentInfoKHRBuilder<'a> { inner: PresentInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPresentInfoKHR {} impl<'a> ::std::ops::Deref for PresentInfoKHRBuilder<'a> { type Target = PresentInfoKHR; fn deref(&self) -> &Self::Target { @@ -15966,25 +17447,32 @@ impl<'a> PresentInfoKHRBuilder<'a> { mut self, wait_semaphores: &'a [Semaphore], ) -> PresentInfoKHRBuilder<'a> { - self.inner.wait_semaphore_count = wait_semaphores.len() as u32; + self.inner.wait_semaphore_count = wait_semaphores.len() as _; self.inner.p_wait_semaphores = wait_semaphores.as_ptr(); self } pub fn swapchains(mut self, swapchains: &'a [SwapchainKHR]) -> PresentInfoKHRBuilder<'a> { - self.inner.swapchain_count = swapchains.len() as u32; + self.inner.swapchain_count = swapchains.len() as _; self.inner.p_swapchains = swapchains.as_ptr(); self } pub fn image_indices(mut self, image_indices: &'a [u32]) -> PresentInfoKHRBuilder<'a> { - self.inner.swapchain_count = image_indices.len() as u32; + self.inner.swapchain_count = image_indices.len() as _; self.inner.p_image_indices = image_indices.as_ptr(); self } pub fn results(mut self, results: &'a mut [Result]) -> PresentInfoKHRBuilder<'a> { - self.inner.swapchain_count = results.len() as u32; + self.inner.swapchain_count = results.len() as _; self.inner.p_results = results.as_mut_ptr(); self } + pub fn next(mut self, next: &'a T) -> PresentInfoKHRBuilder<'a> + where + T: ExtendsPresentInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PresentInfoKHR { self.inner } @@ -16032,6 +17520,8 @@ pub struct DebugReportCallbackCreateInfoEXTBuilder<'a> { inner: DebugReportCallbackCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugReportCallbackCreateInfoEXT {} +unsafe impl ExtendsInstanceCreateInfo for DebugReportCallbackCreateInfoEXT {} impl<'a> ::std::ops::Deref for DebugReportCallbackCreateInfoEXTBuilder<'a> { type Target = DebugReportCallbackCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -16060,6 +17550,13 @@ impl<'a> DebugReportCallbackCreateInfoEXTBuilder<'a> { self.inner.p_user_data = user_data; self } + pub fn next(mut self, next: &'a T) -> DebugReportCallbackCreateInfoEXTBuilder<'a> + where + T: ExtendsDebugReportCallbackCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DebugReportCallbackCreateInfoEXT { self.inner } @@ -16070,7 +17567,7 @@ pub struct ValidationFlagsEXT { pub s_type: StructureType, pub p_next: *const c_void, pub disabled_validation_check_count: u32, - pub p_disabled_validation_checks: *mut ValidationCheckEXT, + pub p_disabled_validation_checks: *const ValidationCheckEXT, } impl ::std::default::Default for ValidationFlagsEXT { fn default() -> ValidationFlagsEXT { @@ -16078,7 +17575,7 @@ impl ::std::default::Default for ValidationFlagsEXT { s_type: StructureType::VALIDATION_FLAGS_EXT, p_next: ::std::ptr::null(), disabled_validation_check_count: u32::default(), - p_disabled_validation_checks: ::std::ptr::null_mut(), + p_disabled_validation_checks: ::std::ptr::null(), } } } @@ -16094,6 +17591,8 @@ pub struct ValidationFlagsEXTBuilder<'a> { inner: ValidationFlagsEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsValidationFlagsEXT {} +unsafe impl ExtendsInstanceCreateInfo for ValidationFlagsEXT {} impl<'a> ::std::ops::Deref for ValidationFlagsEXTBuilder<'a> { type Target = ValidationFlagsEXT; fn deref(&self) -> &Self::Target { @@ -16103,10 +17602,17 @@ impl<'a> ::std::ops::Deref for ValidationFlagsEXTBuilder<'a> { impl<'a> ValidationFlagsEXTBuilder<'a> { pub fn disabled_validation_checks( mut self, - disabled_validation_checks: &'a mut [ValidationCheckEXT], + disabled_validation_checks: &'a [ValidationCheckEXT], ) -> ValidationFlagsEXTBuilder<'a> { - self.inner.disabled_validation_check_count = disabled_validation_checks.len() as u32; - self.inner.p_disabled_validation_checks = disabled_validation_checks.as_mut_ptr(); + self.inner.disabled_validation_check_count = disabled_validation_checks.len() as _; + self.inner.p_disabled_validation_checks = disabled_validation_checks.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> ValidationFlagsEXTBuilder<'a> + where + T: ExtendsValidationFlagsEXT, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> ValidationFlagsEXT { @@ -16141,6 +17647,11 @@ pub struct PipelineRasterizationStateRasterizationOrderAMDBuilder<'a> { inner: PipelineRasterizationStateRasterizationOrderAMD, marker: ::std::marker::PhantomData<&'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 { @@ -16155,6 +17666,16 @@ impl<'a> PipelineRasterizationStateRasterizationOrderAMDBuilder<'a> { self.inner.rasterization_order = rasterization_order; self } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineRasterizationStateRasterizationOrderAMDBuilder<'a> + where + T: ExtendsPipelineRasterizationStateRasterizationOrderAMD, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineRasterizationStateRasterizationOrderAMD { self.inner } @@ -16191,6 +17712,7 @@ pub struct DebugMarkerObjectNameInfoEXTBuilder<'a> { inner: DebugMarkerObjectNameInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugMarkerObjectNameInfoEXT {} impl<'a> ::std::ops::Deref for DebugMarkerObjectNameInfoEXTBuilder<'a> { type Target = DebugMarkerObjectNameInfoEXT; fn deref(&self) -> &Self::Target { @@ -16216,6 +17738,13 @@ impl<'a> DebugMarkerObjectNameInfoEXTBuilder<'a> { self.inner.p_object_name = object_name.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DebugMarkerObjectNameInfoEXTBuilder<'a> + where + T: ExtendsDebugMarkerObjectNameInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DebugMarkerObjectNameInfoEXT { self.inner } @@ -16256,6 +17785,7 @@ pub struct DebugMarkerObjectTagInfoEXTBuilder<'a> { inner: DebugMarkerObjectTagInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugMarkerObjectTagInfoEXT {} impl<'a> ::std::ops::Deref for DebugMarkerObjectTagInfoEXTBuilder<'a> { type Target = DebugMarkerObjectTagInfoEXT; fn deref(&self) -> &Self::Target { @@ -16278,9 +17808,16 @@ impl<'a> DebugMarkerObjectTagInfoEXTBuilder<'a> { self.inner.tag_name = tag_name; self } - pub fn tag(mut self, tag: &'a [c_void]) -> DebugMarkerObjectTagInfoEXTBuilder<'a> { - self.inner.tag_size = tag.len() as usize; - self.inner.p_tag = tag.as_ptr(); + pub fn tag(mut self, tag: &'a [u8]) -> DebugMarkerObjectTagInfoEXTBuilder<'a> { + self.inner.tag_size = tag.len() as _; + self.inner.p_tag = tag.as_ptr() as *const c_void; + self + } + pub fn next(mut self, next: &'a T) -> DebugMarkerObjectTagInfoEXTBuilder<'a> + where + T: ExtendsDebugMarkerObjectTagInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> DebugMarkerObjectTagInfoEXT { @@ -16317,6 +17854,7 @@ pub struct DebugMarkerMarkerInfoEXTBuilder<'a> { inner: DebugMarkerMarkerInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugMarkerMarkerInfoEXT {} impl<'a> ::std::ops::Deref for DebugMarkerMarkerInfoEXTBuilder<'a> { type Target = DebugMarkerMarkerInfoEXT; fn deref(&self) -> &Self::Target { @@ -16335,6 +17873,13 @@ impl<'a> DebugMarkerMarkerInfoEXTBuilder<'a> { self.inner.color = color; self } + pub fn next(mut self, next: &'a T) -> DebugMarkerMarkerInfoEXTBuilder<'a> + where + T: ExtendsDebugMarkerMarkerInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DebugMarkerMarkerInfoEXT { self.inner } @@ -16367,6 +17912,8 @@ pub struct DedicatedAllocationImageCreateInfoNVBuilder<'a> { inner: DedicatedAllocationImageCreateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDedicatedAllocationImageCreateInfoNV {} +unsafe impl ExtendsImageCreateInfo for DedicatedAllocationImageCreateInfoNV {} impl<'a> ::std::ops::Deref for DedicatedAllocationImageCreateInfoNVBuilder<'a> { type Target = DedicatedAllocationImageCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -16376,9 +17923,16 @@ impl<'a> ::std::ops::Deref for DedicatedAllocationImageCreateInfoNVBuilder<'a> { impl<'a> DedicatedAllocationImageCreateInfoNVBuilder<'a> { pub fn dedicated_allocation( mut self, - dedicated_allocation: Bool32, + dedicated_allocation: bool, ) -> DedicatedAllocationImageCreateInfoNVBuilder<'a> { - self.inner.dedicated_allocation = dedicated_allocation; + self.inner.dedicated_allocation = dedicated_allocation.into(); + self + } + pub fn next(mut self, next: &'a T) -> DedicatedAllocationImageCreateInfoNVBuilder<'a> + where + T: ExtendsDedicatedAllocationImageCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> DedicatedAllocationImageCreateInfoNV { @@ -16413,6 +17967,8 @@ pub struct DedicatedAllocationBufferCreateInfoNVBuilder<'a> { inner: DedicatedAllocationBufferCreateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDedicatedAllocationBufferCreateInfoNV {} +unsafe impl ExtendsBufferCreateInfo for DedicatedAllocationBufferCreateInfoNV {} impl<'a> ::std::ops::Deref for DedicatedAllocationBufferCreateInfoNVBuilder<'a> { type Target = DedicatedAllocationBufferCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -16422,9 +17978,16 @@ impl<'a> ::std::ops::Deref for DedicatedAllocationBufferCreateInfoNVBuilder<'a> impl<'a> DedicatedAllocationBufferCreateInfoNVBuilder<'a> { pub fn dedicated_allocation( mut self, - dedicated_allocation: Bool32, + dedicated_allocation: bool, ) -> DedicatedAllocationBufferCreateInfoNVBuilder<'a> { - self.inner.dedicated_allocation = dedicated_allocation; + self.inner.dedicated_allocation = dedicated_allocation.into(); + self + } + pub fn next(mut self, next: &'a T) -> DedicatedAllocationBufferCreateInfoNVBuilder<'a> + where + T: ExtendsDedicatedAllocationBufferCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> DedicatedAllocationBufferCreateInfoNV { @@ -16461,6 +18024,8 @@ pub struct DedicatedAllocationMemoryAllocateInfoNVBuilder<'a> { inner: DedicatedAllocationMemoryAllocateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDedicatedAllocationMemoryAllocateInfoNV {} +unsafe impl ExtendsMemoryAllocateInfo for DedicatedAllocationMemoryAllocateInfoNV {} impl<'a> ::std::ops::Deref for DedicatedAllocationMemoryAllocateInfoNVBuilder<'a> { type Target = DedicatedAllocationMemoryAllocateInfoNV; fn deref(&self) -> &Self::Target { @@ -16476,6 +18041,13 @@ impl<'a> DedicatedAllocationMemoryAllocateInfoNVBuilder<'a> { self.inner.buffer = buffer; self } + pub fn next(mut self, next: &'a T) -> DedicatedAllocationMemoryAllocateInfoNVBuilder<'a> + where + T: ExtendsDedicatedAllocationMemoryAllocateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DedicatedAllocationMemoryAllocateInfoNV { self.inner } @@ -16567,6 +18139,8 @@ pub struct ExternalMemoryImageCreateInfoNVBuilder<'a> { inner: ExternalMemoryImageCreateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalMemoryImageCreateInfoNV {} +unsafe impl ExtendsImageCreateInfo for ExternalMemoryImageCreateInfoNV {} impl<'a> ::std::ops::Deref for ExternalMemoryImageCreateInfoNVBuilder<'a> { type Target = ExternalMemoryImageCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -16581,6 +18155,13 @@ impl<'a> ExternalMemoryImageCreateInfoNVBuilder<'a> { self.inner.handle_types = handle_types; self } + pub fn next(mut self, next: &'a T) -> ExternalMemoryImageCreateInfoNVBuilder<'a> + where + T: ExtendsExternalMemoryImageCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExternalMemoryImageCreateInfoNV { self.inner } @@ -16613,6 +18194,8 @@ pub struct ExportMemoryAllocateInfoNVBuilder<'a> { inner: ExportMemoryAllocateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportMemoryAllocateInfoNV {} +unsafe impl ExtendsMemoryAllocateInfo for ExportMemoryAllocateInfoNV {} impl<'a> ::std::ops::Deref for ExportMemoryAllocateInfoNVBuilder<'a> { type Target = ExportMemoryAllocateInfoNV; fn deref(&self) -> &Self::Target { @@ -16627,6 +18210,13 @@ impl<'a> ExportMemoryAllocateInfoNVBuilder<'a> { self.inner.handle_types = handle_types; self } + pub fn next(mut self, next: &'a T) -> ExportMemoryAllocateInfoNVBuilder<'a> + where + T: ExtendsExportMemoryAllocateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportMemoryAllocateInfoNV { self.inner } @@ -16661,6 +18251,8 @@ pub struct ImportMemoryWin32HandleInfoNVBuilder<'a> { inner: ImportMemoryWin32HandleInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportMemoryWin32HandleInfoNV {} +unsafe impl ExtendsMemoryAllocateInfo for ImportMemoryWin32HandleInfoNV {} impl<'a> ::std::ops::Deref for ImportMemoryWin32HandleInfoNVBuilder<'a> { type Target = ImportMemoryWin32HandleInfoNV; fn deref(&self) -> &Self::Target { @@ -16679,6 +18271,13 @@ impl<'a> ImportMemoryWin32HandleInfoNVBuilder<'a> { self.inner.handle = handle; self } + pub fn next(mut self, next: &'a T) -> ImportMemoryWin32HandleInfoNVBuilder<'a> + where + T: ExtendsImportMemoryWin32HandleInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportMemoryWin32HandleInfoNV { self.inner } @@ -16713,6 +18312,8 @@ pub struct ExportMemoryWin32HandleInfoNVBuilder<'a> { inner: ExportMemoryWin32HandleInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportMemoryWin32HandleInfoNV {} +unsafe impl ExtendsMemoryAllocateInfo for ExportMemoryWin32HandleInfoNV {} impl<'a> ::std::ops::Deref for ExportMemoryWin32HandleInfoNVBuilder<'a> { type Target = ExportMemoryWin32HandleInfoNV; fn deref(&self) -> &Self::Target { @@ -16731,6 +18332,13 @@ impl<'a> ExportMemoryWin32HandleInfoNVBuilder<'a> { self.inner.dw_access = dw_access; self } + pub fn next(mut self, next: &'a T) -> ExportMemoryWin32HandleInfoNVBuilder<'a> + where + T: ExtendsExportMemoryWin32HandleInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportMemoryWin32HandleInfoNV { self.inner } @@ -16775,6 +18383,8 @@ pub struct Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { inner: Win32KeyedMutexAcquireReleaseInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsWin32KeyedMutexAcquireReleaseInfoNV {} +unsafe impl ExtendsSubmitInfo for Win32KeyedMutexAcquireReleaseInfoNV {} impl<'a> ::std::ops::Deref for Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { type Target = Win32KeyedMutexAcquireReleaseInfoNV; fn deref(&self) -> &Self::Target { @@ -16786,7 +18396,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { mut self, acquire_syncs: &'a [DeviceMemory], ) -> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { - self.inner.acquire_count = acquire_syncs.len() as u32; + self.inner.acquire_count = acquire_syncs.len() as _; self.inner.p_acquire_syncs = acquire_syncs.as_ptr(); self } @@ -16794,7 +18404,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { mut self, acquire_keys: &'a [u64], ) -> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { - self.inner.acquire_count = acquire_keys.len() as u32; + self.inner.acquire_count = acquire_keys.len() as _; self.inner.p_acquire_keys = acquire_keys.as_ptr(); self } @@ -16802,7 +18412,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { mut self, acquire_timeout_milliseconds: &'a [u32], ) -> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { - self.inner.acquire_count = acquire_timeout_milliseconds.len() as u32; + self.inner.acquire_count = acquire_timeout_milliseconds.len() as _; self.inner.p_acquire_timeout_milliseconds = acquire_timeout_milliseconds.as_ptr(); self } @@ -16810,7 +18420,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { mut self, release_syncs: &'a [DeviceMemory], ) -> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { - self.inner.release_count = release_syncs.len() as u32; + self.inner.release_count = release_syncs.len() as _; self.inner.p_release_syncs = release_syncs.as_ptr(); self } @@ -16818,10 +18428,17 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { mut self, release_keys: &'a [u64], ) -> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> { - self.inner.release_count = release_keys.len() as u32; + self.inner.release_count = release_keys.len() as _; self.inner.p_release_keys = release_keys.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> Win32KeyedMutexAcquireReleaseInfoNVBuilder<'a> + where + T: ExtendsWin32KeyedMutexAcquireReleaseInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> Win32KeyedMutexAcquireReleaseInfoNV { self.inner } @@ -16854,6 +18471,7 @@ pub struct DeviceGeneratedCommandsFeaturesNVXBuilder<'a> { inner: DeviceGeneratedCommandsFeaturesNVX, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGeneratedCommandsFeaturesNVX {} impl<'a> ::std::ops::Deref for DeviceGeneratedCommandsFeaturesNVXBuilder<'a> { type Target = DeviceGeneratedCommandsFeaturesNVX; fn deref(&self) -> &Self::Target { @@ -16863,9 +18481,16 @@ impl<'a> ::std::ops::Deref for DeviceGeneratedCommandsFeaturesNVXBuilder<'a> { impl<'a> DeviceGeneratedCommandsFeaturesNVXBuilder<'a> { pub fn compute_binding_point_support( mut self, - compute_binding_point_support: Bool32, + compute_binding_point_support: bool, ) -> DeviceGeneratedCommandsFeaturesNVXBuilder<'a> { - self.inner.compute_binding_point_support = compute_binding_point_support; + self.inner.compute_binding_point_support = compute_binding_point_support.into(); + self + } + pub fn next(mut self, next: &'a T) -> DeviceGeneratedCommandsFeaturesNVXBuilder<'a> + where + T: ExtendsDeviceGeneratedCommandsFeaturesNVX, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> DeviceGeneratedCommandsFeaturesNVX { @@ -16908,6 +18533,7 @@ pub struct DeviceGeneratedCommandsLimitsNVXBuilder<'a> { inner: DeviceGeneratedCommandsLimitsNVX, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGeneratedCommandsLimitsNVX {} impl<'a> ::std::ops::Deref for DeviceGeneratedCommandsLimitsNVXBuilder<'a> { type Target = DeviceGeneratedCommandsLimitsNVX; fn deref(&self) -> &Self::Target { @@ -16954,6 +18580,13 @@ impl<'a> DeviceGeneratedCommandsLimitsNVXBuilder<'a> { min_commands_token_buffer_offset_alignment; self } + pub fn next(mut self, next: &'a T) -> DeviceGeneratedCommandsLimitsNVXBuilder<'a> + where + T: ExtendsDeviceGeneratedCommandsLimitsNVX, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGeneratedCommandsLimitsNVX { self.inner } @@ -17090,6 +18723,7 @@ pub struct IndirectCommandsLayoutCreateInfoNVXBuilder<'a> { inner: IndirectCommandsLayoutCreateInfoNVX, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsIndirectCommandsLayoutCreateInfoNVX {} impl<'a> ::std::ops::Deref for IndirectCommandsLayoutCreateInfoNVXBuilder<'a> { type Target = IndirectCommandsLayoutCreateInfoNVX; fn deref(&self) -> &Self::Target { @@ -17115,10 +18749,17 @@ impl<'a> IndirectCommandsLayoutCreateInfoNVXBuilder<'a> { mut self, tokens: &'a [IndirectCommandsLayoutTokenNVX], ) -> IndirectCommandsLayoutCreateInfoNVXBuilder<'a> { - self.inner.token_count = tokens.len() as u32; + self.inner.token_count = tokens.len() as _; self.inner.p_tokens = tokens.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> IndirectCommandsLayoutCreateInfoNVXBuilder<'a> + where + T: ExtendsIndirectCommandsLayoutCreateInfoNVX, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> IndirectCommandsLayoutCreateInfoNVX { self.inner } @@ -17169,6 +18810,7 @@ pub struct CmdProcessCommandsInfoNVXBuilder<'a> { inner: CmdProcessCommandsInfoNVX, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsCmdProcessCommandsInfoNVX {} impl<'a> ::std::ops::Deref for CmdProcessCommandsInfoNVXBuilder<'a> { type Target = CmdProcessCommandsInfoNVX; fn deref(&self) -> &Self::Target { @@ -17194,7 +18836,7 @@ impl<'a> CmdProcessCommandsInfoNVXBuilder<'a> { mut self, indirect_commands_tokens: &'a [IndirectCommandsTokenNVX], ) -> CmdProcessCommandsInfoNVXBuilder<'a> { - self.inner.indirect_commands_token_count = indirect_commands_tokens.len() as u32; + self.inner.indirect_commands_token_count = indirect_commands_tokens.len() as _; self.inner.p_indirect_commands_tokens = indirect_commands_tokens.as_ptr(); self } @@ -17240,6 +18882,13 @@ impl<'a> CmdProcessCommandsInfoNVXBuilder<'a> { self.inner.sequences_index_offset = sequences_index_offset; self } + pub fn next(mut self, next: &'a T) -> CmdProcessCommandsInfoNVXBuilder<'a> + where + T: ExtendsCmdProcessCommandsInfoNVX, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> CmdProcessCommandsInfoNVX { self.inner } @@ -17276,6 +18925,7 @@ pub struct CmdReserveSpaceForCommandsInfoNVXBuilder<'a> { inner: CmdReserveSpaceForCommandsInfoNVX, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsCmdReserveSpaceForCommandsInfoNVX {} impl<'a> ::std::ops::Deref for CmdReserveSpaceForCommandsInfoNVXBuilder<'a> { type Target = CmdReserveSpaceForCommandsInfoNVX; fn deref(&self) -> &Self::Target { @@ -17304,6 +18954,13 @@ impl<'a> CmdReserveSpaceForCommandsInfoNVXBuilder<'a> { self.inner.max_sequences_count = max_sequences_count; self } + pub fn next(mut self, next: &'a T) -> CmdReserveSpaceForCommandsInfoNVXBuilder<'a> + where + T: ExtendsCmdReserveSpaceForCommandsInfoNVX, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> CmdReserveSpaceForCommandsInfoNVX { self.inner } @@ -17352,6 +19009,7 @@ pub struct ObjectTableCreateInfoNVXBuilder<'a> { inner: ObjectTableCreateInfoNVX, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsObjectTableCreateInfoNVX {} impl<'a> ::std::ops::Deref for ObjectTableCreateInfoNVXBuilder<'a> { type Target = ObjectTableCreateInfoNVX; fn deref(&self) -> &Self::Target { @@ -17363,7 +19021,7 @@ impl<'a> ObjectTableCreateInfoNVXBuilder<'a> { mut self, object_entry_types: &'a [ObjectEntryTypeNVX], ) -> ObjectTableCreateInfoNVXBuilder<'a> { - self.inner.object_count = object_entry_types.len() as u32; + self.inner.object_count = object_entry_types.len() as _; self.inner.p_object_entry_types = object_entry_types.as_ptr(); self } @@ -17371,7 +19029,7 @@ impl<'a> ObjectTableCreateInfoNVXBuilder<'a> { mut self, object_entry_counts: &'a [u32], ) -> ObjectTableCreateInfoNVXBuilder<'a> { - self.inner.object_count = object_entry_counts.len() as u32; + self.inner.object_count = object_entry_counts.len() as _; self.inner.p_object_entry_counts = object_entry_counts.as_ptr(); self } @@ -17379,7 +19037,7 @@ impl<'a> ObjectTableCreateInfoNVXBuilder<'a> { mut self, object_entry_usage_flags: &'a [ObjectEntryUsageFlagsNVX], ) -> ObjectTableCreateInfoNVXBuilder<'a> { - self.inner.object_count = object_entry_usage_flags.len() as u32; + self.inner.object_count = object_entry_usage_flags.len() as _; self.inner.p_object_entry_usage_flags = object_entry_usage_flags.as_ptr(); self } @@ -17418,6 +19076,13 @@ impl<'a> ObjectTableCreateInfoNVXBuilder<'a> { self.inner.max_pipeline_layouts = max_pipeline_layouts; self } + pub fn next(mut self, next: &'a T) -> ObjectTableCreateInfoNVXBuilder<'a> + where + T: ExtendsObjectTableCreateInfoNVX, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ObjectTableCreateInfoNVX { self.inner } @@ -17742,6 +19407,8 @@ pub struct PhysicalDeviceFeatures2Builder<'a> { inner: PhysicalDeviceFeatures2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceFeatures2 {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceFeatures2 {} impl<'a> ::std::ops::Deref for PhysicalDeviceFeatures2Builder<'a> { type Target = PhysicalDeviceFeatures2; fn deref(&self) -> &Self::Target { @@ -17756,6 +19423,13 @@ impl<'a> PhysicalDeviceFeatures2Builder<'a> { self.inner.features = features; self } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceFeatures2Builder<'a> + where + T: ExtendsPhysicalDeviceFeatures2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceFeatures2 { self.inner } @@ -17788,6 +19462,7 @@ pub struct PhysicalDeviceProperties2Builder<'a> { inner: PhysicalDeviceProperties2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceProperties2 {} impl<'a> ::std::ops::Deref for PhysicalDeviceProperties2Builder<'a> { type Target = PhysicalDeviceProperties2; fn deref(&self) -> &Self::Target { @@ -17802,6 +19477,13 @@ impl<'a> PhysicalDeviceProperties2Builder<'a> { self.inner.properties = properties; self } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceProperties2Builder<'a> + where + T: ExtendsPhysicalDeviceProperties2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceProperties2 { self.inner } @@ -17834,6 +19516,7 @@ pub struct FormatProperties2Builder<'a> { inner: FormatProperties2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsFormatProperties2 {} impl<'a> ::std::ops::Deref for FormatProperties2Builder<'a> { type Target = FormatProperties2; fn deref(&self) -> &Self::Target { @@ -17848,6 +19531,13 @@ impl<'a> FormatProperties2Builder<'a> { self.inner.format_properties = format_properties; self } + pub fn next(mut self, next: &'a mut T) -> FormatProperties2Builder<'a> + where + T: ExtendsFormatProperties2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> FormatProperties2 { self.inner } @@ -17880,6 +19570,7 @@ pub struct ImageFormatProperties2Builder<'a> { inner: ImageFormatProperties2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageFormatProperties2 {} impl<'a> ::std::ops::Deref for ImageFormatProperties2Builder<'a> { type Target = ImageFormatProperties2; fn deref(&self) -> &Self::Target { @@ -17894,6 +19585,13 @@ impl<'a> ImageFormatProperties2Builder<'a> { self.inner.image_format_properties = image_format_properties; self } + pub fn next(mut self, next: &'a mut T) -> ImageFormatProperties2Builder<'a> + where + T: ExtendsImageFormatProperties2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> ImageFormatProperties2 { self.inner } @@ -17934,6 +19632,7 @@ pub struct PhysicalDeviceImageFormatInfo2Builder<'a> { inner: PhysicalDeviceImageFormatInfo2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceImageFormatInfo2 {} impl<'a> ::std::ops::Deref for PhysicalDeviceImageFormatInfo2Builder<'a> { type Target = PhysicalDeviceImageFormatInfo2; fn deref(&self) -> &Self::Target { @@ -17961,6 +19660,13 @@ impl<'a> PhysicalDeviceImageFormatInfo2Builder<'a> { self.inner.flags = flags; self } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceImageFormatInfo2Builder<'a> + where + T: ExtendsPhysicalDeviceImageFormatInfo2, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PhysicalDeviceImageFormatInfo2 { self.inner } @@ -17993,6 +19699,7 @@ pub struct QueueFamilyProperties2Builder<'a> { inner: QueueFamilyProperties2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsQueueFamilyProperties2 {} impl<'a> ::std::ops::Deref for QueueFamilyProperties2Builder<'a> { type Target = QueueFamilyProperties2; fn deref(&self) -> &Self::Target { @@ -18007,6 +19714,13 @@ impl<'a> QueueFamilyProperties2Builder<'a> { self.inner.queue_family_properties = queue_family_properties; self } + pub fn next(mut self, next: &'a mut T) -> QueueFamilyProperties2Builder<'a> + where + T: ExtendsQueueFamilyProperties2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> QueueFamilyProperties2 { self.inner } @@ -18039,6 +19753,7 @@ pub struct PhysicalDeviceMemoryProperties2Builder<'a> { inner: PhysicalDeviceMemoryProperties2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceMemoryProperties2 {} impl<'a> ::std::ops::Deref for PhysicalDeviceMemoryProperties2Builder<'a> { type Target = PhysicalDeviceMemoryProperties2; fn deref(&self) -> &Self::Target { @@ -18053,6 +19768,13 @@ impl<'a> PhysicalDeviceMemoryProperties2Builder<'a> { self.inner.memory_properties = memory_properties; self } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceMemoryProperties2Builder<'a> + where + T: ExtendsPhysicalDeviceMemoryProperties2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceMemoryProperties2 { self.inner } @@ -18085,6 +19807,7 @@ pub struct SparseImageFormatProperties2Builder<'a> { inner: SparseImageFormatProperties2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSparseImageFormatProperties2 {} impl<'a> ::std::ops::Deref for SparseImageFormatProperties2Builder<'a> { type Target = SparseImageFormatProperties2; fn deref(&self) -> &Self::Target { @@ -18099,6 +19822,13 @@ impl<'a> SparseImageFormatProperties2Builder<'a> { self.inner.properties = properties; self } + pub fn next(mut self, next: &'a mut T) -> SparseImageFormatProperties2Builder<'a> + where + T: ExtendsSparseImageFormatProperties2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> SparseImageFormatProperties2 { self.inner } @@ -18139,6 +19869,7 @@ pub struct PhysicalDeviceSparseImageFormatInfo2Builder<'a> { inner: PhysicalDeviceSparseImageFormatInfo2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceSparseImageFormatInfo2 {} impl<'a> ::std::ops::Deref for PhysicalDeviceSparseImageFormatInfo2Builder<'a> { type Target = PhysicalDeviceSparseImageFormatInfo2; fn deref(&self) -> &Self::Target { @@ -18175,6 +19906,13 @@ impl<'a> PhysicalDeviceSparseImageFormatInfo2Builder<'a> { self.inner.tiling = tiling; self } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceSparseImageFormatInfo2Builder<'a> + where + T: ExtendsPhysicalDeviceSparseImageFormatInfo2, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PhysicalDeviceSparseImageFormatInfo2 { self.inner } @@ -18207,6 +19945,8 @@ pub struct PhysicalDevicePushDescriptorPropertiesKHRBuilder<'a> { inner: PhysicalDevicePushDescriptorPropertiesKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDevicePushDescriptorPropertiesKHR {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePushDescriptorPropertiesKHR {} impl<'a> ::std::ops::Deref for PhysicalDevicePushDescriptorPropertiesKHRBuilder<'a> { type Target = PhysicalDevicePushDescriptorPropertiesKHR; fn deref(&self) -> &Self::Target { @@ -18221,11 +19961,166 @@ impl<'a> PhysicalDevicePushDescriptorPropertiesKHRBuilder<'a> { self.inner.max_push_descriptors = max_push_descriptors; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDevicePushDescriptorPropertiesKHRBuilder<'a> + where + T: ExtendsPhysicalDevicePushDescriptorPropertiesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDevicePushDescriptorPropertiesKHR { self.inner } } #[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +pub struct ConformanceVersionKHR { + pub major: u8, + pub minor: u8, + pub subminor: u8, + pub patch: u8, +} +impl ConformanceVersionKHR { + pub fn builder<'a>() -> ConformanceVersionKHRBuilder<'a> { + ConformanceVersionKHRBuilder { + inner: ConformanceVersionKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ConformanceVersionKHRBuilder<'a> { + inner: ConformanceVersionKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for ConformanceVersionKHRBuilder<'a> { + type Target = ConformanceVersionKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ConformanceVersionKHRBuilder<'a> { + pub fn major(mut self, major: u8) -> ConformanceVersionKHRBuilder<'a> { + self.inner.major = major; + self + } + pub fn minor(mut self, minor: u8) -> ConformanceVersionKHRBuilder<'a> { + self.inner.minor = minor; + self + } + pub fn subminor(mut self, subminor: u8) -> ConformanceVersionKHRBuilder<'a> { + self.inner.subminor = subminor; + self + } + pub fn patch(mut self, patch: u8) -> ConformanceVersionKHRBuilder<'a> { + self.inner.patch = patch; + self + } + pub fn build(self) -> ConformanceVersionKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct PhysicalDeviceDriverPropertiesKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub driver_id: DriverIdKHR, + pub driver_name: [c_char; MAX_DRIVER_NAME_SIZE_KHR], + pub driver_info: [c_char; MAX_DRIVER_INFO_SIZE_KHR], + pub conformance_version: ConformanceVersionKHR, +} +impl fmt::Debug for PhysicalDeviceDriverPropertiesKHR { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fmt.debug_struct("PhysicalDeviceDriverPropertiesKHR") + .field("s_type", &self.s_type) + .field("p_next", &self.p_next) + .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 { + ::std::ffi::CStr::from_ptr(self.driver_info.as_ptr() as *const i8) + }) + .field("conformance_version", &self.conformance_version) + .finish() + } +} +impl ::std::default::Default for PhysicalDeviceDriverPropertiesKHR { + fn default() -> PhysicalDeviceDriverPropertiesKHR { + PhysicalDeviceDriverPropertiesKHR { + s_type: StructureType::PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR, + p_next: ::std::ptr::null_mut(), + driver_id: DriverIdKHR::default(), + driver_name: unsafe { ::std::mem::zeroed() }, + driver_info: unsafe { ::std::mem::zeroed() }, + conformance_version: ConformanceVersionKHR::default(), + } + } +} +impl PhysicalDeviceDriverPropertiesKHR { + pub fn builder<'a>() -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + PhysicalDeviceDriverPropertiesKHRBuilder { + inner: PhysicalDeviceDriverPropertiesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + inner: PhysicalDeviceDriverPropertiesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceDriverPropertiesKHR {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceDriverPropertiesKHR {} +impl<'a> ::std::ops::Deref for PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + type Target = PhysicalDeviceDriverPropertiesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + pub fn driver_id( + mut self, + driver_id: DriverIdKHR, + ) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + self.inner.driver_id = driver_id; + self + } + pub fn driver_name( + mut self, + driver_name: [c_char; MAX_DRIVER_NAME_SIZE_KHR], + ) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + self.inner.driver_name = driver_name; + self + } + pub fn driver_info( + mut self, + driver_info: [c_char; MAX_DRIVER_INFO_SIZE_KHR], + ) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + self.inner.driver_info = driver_info; + self + } + pub fn conformance_version( + mut self, + conformance_version: ConformanceVersionKHR, + ) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> { + self.inner.conformance_version = conformance_version; + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceDriverPropertiesKHRBuilder<'a> + where + T: ExtendsPhysicalDeviceDriverPropertiesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceDriverPropertiesKHR { + self.inner + } +} +#[repr(C)] #[derive(Copy, Clone, Debug)] pub struct PresentRegionsKHR { pub s_type: StructureType, @@ -18255,6 +20150,8 @@ pub struct PresentRegionsKHRBuilder<'a> { inner: PresentRegionsKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPresentRegionsKHR {} +unsafe impl ExtendsPresentInfoKHR for PresentRegionsKHR {} impl<'a> ::std::ops::Deref for PresentRegionsKHRBuilder<'a> { type Target = PresentRegionsKHR; fn deref(&self) -> &Self::Target { @@ -18263,10 +20160,17 @@ impl<'a> ::std::ops::Deref for PresentRegionsKHRBuilder<'a> { } impl<'a> PresentRegionsKHRBuilder<'a> { pub fn regions(mut self, regions: &'a [PresentRegionKHR]) -> PresentRegionsKHRBuilder<'a> { - self.inner.swapchain_count = regions.len() as u32; + self.inner.swapchain_count = regions.len() as _; self.inner.p_regions = regions.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PresentRegionsKHRBuilder<'a> + where + T: ExtendsPresentRegionsKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PresentRegionsKHR { self.inner } @@ -18305,7 +20209,7 @@ impl<'a> ::std::ops::Deref for PresentRegionKHRBuilder<'a> { } impl<'a> PresentRegionKHRBuilder<'a> { pub fn rectangles(mut self, rectangles: &'a [RectLayerKHR]) -> PresentRegionKHRBuilder<'a> { - self.inner.rectangle_count = rectangles.len() as u32; + self.inner.rectangle_count = rectangles.len() as _; self.inner.p_rectangles = rectangles.as_ptr(); self } @@ -18385,6 +20289,9 @@ pub struct PhysicalDeviceVariablePointerFeaturesBuilder<'a> { inner: PhysicalDeviceVariablePointerFeatures, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceVariablePointerFeatures {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceVariablePointerFeatures {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceVariablePointerFeatures {} impl<'a> ::std::ops::Deref for PhysicalDeviceVariablePointerFeaturesBuilder<'a> { type Target = PhysicalDeviceVariablePointerFeatures; fn deref(&self) -> &Self::Target { @@ -18394,16 +20301,23 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceVariablePointerFeaturesBuilder<'a> impl<'a> PhysicalDeviceVariablePointerFeaturesBuilder<'a> { pub fn variable_pointers_storage_buffer( mut self, - variable_pointers_storage_buffer: Bool32, + variable_pointers_storage_buffer: bool, ) -> PhysicalDeviceVariablePointerFeaturesBuilder<'a> { - self.inner.variable_pointers_storage_buffer = variable_pointers_storage_buffer; + self.inner.variable_pointers_storage_buffer = variable_pointers_storage_buffer.into(); self } pub fn variable_pointers( mut self, - variable_pointers: Bool32, + variable_pointers: bool, ) -> PhysicalDeviceVariablePointerFeaturesBuilder<'a> { - self.inner.variable_pointers = variable_pointers; + self.inner.variable_pointers = variable_pointers.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceVariablePointerFeaturesBuilder<'a> + where + T: ExtendsPhysicalDeviceVariablePointerFeatures, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceVariablePointerFeatures { @@ -18489,6 +20403,8 @@ pub struct PhysicalDeviceExternalImageFormatInfoBuilder<'a> { inner: PhysicalDeviceExternalImageFormatInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceExternalImageFormatInfo {} +unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for PhysicalDeviceExternalImageFormatInfo {} impl<'a> ::std::ops::Deref for PhysicalDeviceExternalImageFormatInfoBuilder<'a> { type Target = PhysicalDeviceExternalImageFormatInfo; fn deref(&self) -> &Self::Target { @@ -18503,6 +20419,13 @@ impl<'a> PhysicalDeviceExternalImageFormatInfoBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceExternalImageFormatInfoBuilder<'a> + where + T: ExtendsPhysicalDeviceExternalImageFormatInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PhysicalDeviceExternalImageFormatInfo { self.inner } @@ -18535,6 +20458,8 @@ pub struct ExternalImageFormatPropertiesBuilder<'a> { inner: ExternalImageFormatProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalImageFormatProperties {} +unsafe impl ExtendsImageFormatProperties2 for ExternalImageFormatProperties {} impl<'a> ::std::ops::Deref for ExternalImageFormatPropertiesBuilder<'a> { type Target = ExternalImageFormatProperties; fn deref(&self) -> &Self::Target { @@ -18549,6 +20474,13 @@ impl<'a> ExternalImageFormatPropertiesBuilder<'a> { self.inner.external_memory_properties = external_memory_properties; self } + pub fn next(mut self, next: &'a mut T) -> ExternalImageFormatPropertiesBuilder<'a> + where + T: ExtendsExternalImageFormatProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> ExternalImageFormatProperties { self.inner } @@ -18585,6 +20517,7 @@ pub struct PhysicalDeviceExternalBufferInfoBuilder<'a> { inner: PhysicalDeviceExternalBufferInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceExternalBufferInfo {} impl<'a> ::std::ops::Deref for PhysicalDeviceExternalBufferInfoBuilder<'a> { type Target = PhysicalDeviceExternalBufferInfo; fn deref(&self) -> &Self::Target { @@ -18610,6 +20543,13 @@ impl<'a> PhysicalDeviceExternalBufferInfoBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceExternalBufferInfoBuilder<'a> + where + T: ExtendsPhysicalDeviceExternalBufferInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PhysicalDeviceExternalBufferInfo { self.inner } @@ -18642,6 +20582,7 @@ pub struct ExternalBufferPropertiesBuilder<'a> { inner: ExternalBufferProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalBufferProperties {} impl<'a> ::std::ops::Deref for ExternalBufferPropertiesBuilder<'a> { type Target = ExternalBufferProperties; fn deref(&self) -> &Self::Target { @@ -18656,6 +20597,13 @@ impl<'a> ExternalBufferPropertiesBuilder<'a> { self.inner.external_memory_properties = external_memory_properties; self } + pub fn next(mut self, next: &'a mut T) -> ExternalBufferPropertiesBuilder<'a> + where + T: ExtendsExternalBufferProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> ExternalBufferProperties { self.inner } @@ -18696,6 +20644,8 @@ pub struct PhysicalDeviceIDPropertiesBuilder<'a> { inner: PhysicalDeviceIDProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceIDProperties {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceIDProperties {} impl<'a> ::std::ops::Deref for PhysicalDeviceIDPropertiesBuilder<'a> { type Target = PhysicalDeviceIDProperties; fn deref(&self) -> &Self::Target { @@ -18733,9 +20683,16 @@ impl<'a> PhysicalDeviceIDPropertiesBuilder<'a> { } pub fn device_luid_valid( mut self, - device_luid_valid: Bool32, + device_luid_valid: bool, ) -> PhysicalDeviceIDPropertiesBuilder<'a> { - self.inner.device_luid_valid = device_luid_valid; + self.inner.device_luid_valid = device_luid_valid.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceIDPropertiesBuilder<'a> + where + T: ExtendsPhysicalDeviceIDProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceIDProperties { @@ -18770,6 +20727,8 @@ pub struct ExternalMemoryImageCreateInfoBuilder<'a> { inner: ExternalMemoryImageCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalMemoryImageCreateInfo {} +unsafe impl ExtendsImageCreateInfo for ExternalMemoryImageCreateInfo {} impl<'a> ::std::ops::Deref for ExternalMemoryImageCreateInfoBuilder<'a> { type Target = ExternalMemoryImageCreateInfo; fn deref(&self) -> &Self::Target { @@ -18784,6 +20743,13 @@ impl<'a> ExternalMemoryImageCreateInfoBuilder<'a> { self.inner.handle_types = handle_types; self } + pub fn next(mut self, next: &'a T) -> ExternalMemoryImageCreateInfoBuilder<'a> + where + T: ExtendsExternalMemoryImageCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExternalMemoryImageCreateInfo { self.inner } @@ -18816,6 +20782,8 @@ pub struct ExternalMemoryBufferCreateInfoBuilder<'a> { inner: ExternalMemoryBufferCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalMemoryBufferCreateInfo {} +unsafe impl ExtendsBufferCreateInfo for ExternalMemoryBufferCreateInfo {} impl<'a> ::std::ops::Deref for ExternalMemoryBufferCreateInfoBuilder<'a> { type Target = ExternalMemoryBufferCreateInfo; fn deref(&self) -> &Self::Target { @@ -18830,6 +20798,13 @@ impl<'a> ExternalMemoryBufferCreateInfoBuilder<'a> { self.inner.handle_types = handle_types; self } + pub fn next(mut self, next: &'a T) -> ExternalMemoryBufferCreateInfoBuilder<'a> + where + T: ExtendsExternalMemoryBufferCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExternalMemoryBufferCreateInfo { self.inner } @@ -18862,6 +20837,8 @@ pub struct ExportMemoryAllocateInfoBuilder<'a> { inner: ExportMemoryAllocateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportMemoryAllocateInfo {} +unsafe impl ExtendsMemoryAllocateInfo for ExportMemoryAllocateInfo {} impl<'a> ::std::ops::Deref for ExportMemoryAllocateInfoBuilder<'a> { type Target = ExportMemoryAllocateInfo; fn deref(&self) -> &Self::Target { @@ -18876,6 +20853,13 @@ impl<'a> ExportMemoryAllocateInfoBuilder<'a> { self.inner.handle_types = handle_types; self } + pub fn next(mut self, next: &'a T) -> ExportMemoryAllocateInfoBuilder<'a> + where + T: ExtendsExportMemoryAllocateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportMemoryAllocateInfo { self.inner } @@ -18912,6 +20896,8 @@ pub struct ImportMemoryWin32HandleInfoKHRBuilder<'a> { inner: ImportMemoryWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportMemoryWin32HandleInfoKHR {} +unsafe impl ExtendsMemoryAllocateInfo for ImportMemoryWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for ImportMemoryWin32HandleInfoKHRBuilder<'a> { type Target = ImportMemoryWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -18934,6 +20920,13 @@ impl<'a> ImportMemoryWin32HandleInfoKHRBuilder<'a> { self.inner.name = name; self } + pub fn next(mut self, next: &'a T) -> ImportMemoryWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsImportMemoryWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportMemoryWin32HandleInfoKHR { self.inner } @@ -18970,6 +20963,8 @@ pub struct ExportMemoryWin32HandleInfoKHRBuilder<'a> { inner: ExportMemoryWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportMemoryWin32HandleInfoKHR {} +unsafe impl ExtendsMemoryAllocateInfo for ExportMemoryWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for ExportMemoryWin32HandleInfoKHRBuilder<'a> { type Target = ExportMemoryWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -18992,6 +20987,13 @@ impl<'a> ExportMemoryWin32HandleInfoKHRBuilder<'a> { self.inner.name = name; self } + pub fn next(mut self, next: &'a T) -> ExportMemoryWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsExportMemoryWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportMemoryWin32HandleInfoKHR { self.inner } @@ -19024,6 +21026,7 @@ pub struct MemoryWin32HandlePropertiesKHRBuilder<'a> { inner: MemoryWin32HandlePropertiesKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryWin32HandlePropertiesKHR {} impl<'a> ::std::ops::Deref for MemoryWin32HandlePropertiesKHRBuilder<'a> { type Target = MemoryWin32HandlePropertiesKHR; fn deref(&self) -> &Self::Target { @@ -19038,6 +21041,13 @@ impl<'a> MemoryWin32HandlePropertiesKHRBuilder<'a> { self.inner.memory_type_bits = memory_type_bits; self } + pub fn next(mut self, next: &'a mut T) -> MemoryWin32HandlePropertiesKHRBuilder<'a> + where + T: ExtendsMemoryWin32HandlePropertiesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> MemoryWin32HandlePropertiesKHR { self.inner } @@ -19072,6 +21082,7 @@ pub struct MemoryGetWin32HandleInfoKHRBuilder<'a> { inner: MemoryGetWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryGetWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for MemoryGetWin32HandleInfoKHRBuilder<'a> { type Target = MemoryGetWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -19090,6 +21101,13 @@ impl<'a> MemoryGetWin32HandleInfoKHRBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> MemoryGetWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsMemoryGetWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MemoryGetWin32HandleInfoKHR { self.inner } @@ -19124,6 +21142,8 @@ pub struct ImportMemoryFdInfoKHRBuilder<'a> { inner: ImportMemoryFdInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportMemoryFdInfoKHR {} +unsafe impl ExtendsMemoryAllocateInfo for ImportMemoryFdInfoKHR {} impl<'a> ::std::ops::Deref for ImportMemoryFdInfoKHRBuilder<'a> { type Target = ImportMemoryFdInfoKHR; fn deref(&self) -> &Self::Target { @@ -19142,6 +21162,13 @@ impl<'a> ImportMemoryFdInfoKHRBuilder<'a> { self.inner.fd = fd; self } + pub fn next(mut self, next: &'a T) -> ImportMemoryFdInfoKHRBuilder<'a> + where + T: ExtendsImportMemoryFdInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportMemoryFdInfoKHR { self.inner } @@ -19174,6 +21201,7 @@ pub struct MemoryFdPropertiesKHRBuilder<'a> { inner: MemoryFdPropertiesKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryFdPropertiesKHR {} impl<'a> ::std::ops::Deref for MemoryFdPropertiesKHRBuilder<'a> { type Target = MemoryFdPropertiesKHR; fn deref(&self) -> &Self::Target { @@ -19185,6 +21213,13 @@ impl<'a> MemoryFdPropertiesKHRBuilder<'a> { self.inner.memory_type_bits = memory_type_bits; self } + pub fn next(mut self, next: &'a mut T) -> MemoryFdPropertiesKHRBuilder<'a> + where + T: ExtendsMemoryFdPropertiesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> MemoryFdPropertiesKHR { self.inner } @@ -19219,6 +21254,7 @@ pub struct MemoryGetFdInfoKHRBuilder<'a> { inner: MemoryGetFdInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryGetFdInfoKHR {} impl<'a> ::std::ops::Deref for MemoryGetFdInfoKHRBuilder<'a> { type Target = MemoryGetFdInfoKHR; fn deref(&self) -> &Self::Target { @@ -19237,6 +21273,13 @@ impl<'a> MemoryGetFdInfoKHRBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> MemoryGetFdInfoKHRBuilder<'a> + where + T: ExtendsMemoryGetFdInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MemoryGetFdInfoKHR { self.inner } @@ -19281,6 +21324,8 @@ pub struct Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { inner: Win32KeyedMutexAcquireReleaseInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsWin32KeyedMutexAcquireReleaseInfoKHR {} +unsafe impl ExtendsSubmitInfo for Win32KeyedMutexAcquireReleaseInfoKHR {} impl<'a> ::std::ops::Deref for Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { type Target = Win32KeyedMutexAcquireReleaseInfoKHR; fn deref(&self) -> &Self::Target { @@ -19292,7 +21337,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { mut self, acquire_syncs: &'a [DeviceMemory], ) -> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { - self.inner.acquire_count = acquire_syncs.len() as u32; + self.inner.acquire_count = acquire_syncs.len() as _; self.inner.p_acquire_syncs = acquire_syncs.as_ptr(); self } @@ -19300,7 +21345,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { mut self, acquire_keys: &'a [u64], ) -> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { - self.inner.acquire_count = acquire_keys.len() as u32; + self.inner.acquire_count = acquire_keys.len() as _; self.inner.p_acquire_keys = acquire_keys.as_ptr(); self } @@ -19308,7 +21353,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { mut self, acquire_timeouts: &'a [u32], ) -> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { - self.inner.acquire_count = acquire_timeouts.len() as u32; + self.inner.acquire_count = acquire_timeouts.len() as _; self.inner.p_acquire_timeouts = acquire_timeouts.as_ptr(); self } @@ -19316,7 +21361,7 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { mut self, release_syncs: &'a [DeviceMemory], ) -> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { - self.inner.release_count = release_syncs.len() as u32; + self.inner.release_count = release_syncs.len() as _; self.inner.p_release_syncs = release_syncs.as_ptr(); self } @@ -19324,10 +21369,17 @@ impl<'a> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { mut self, release_keys: &'a [u64], ) -> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> { - self.inner.release_count = release_keys.len() as u32; + self.inner.release_count = release_keys.len() as _; self.inner.p_release_keys = release_keys.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> Win32KeyedMutexAcquireReleaseInfoKHRBuilder<'a> + where + T: ExtendsWin32KeyedMutexAcquireReleaseInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> Win32KeyedMutexAcquireReleaseInfoKHR { self.inner } @@ -19360,6 +21412,7 @@ pub struct PhysicalDeviceExternalSemaphoreInfoBuilder<'a> { inner: PhysicalDeviceExternalSemaphoreInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceExternalSemaphoreInfo {} impl<'a> ::std::ops::Deref for PhysicalDeviceExternalSemaphoreInfoBuilder<'a> { type Target = PhysicalDeviceExternalSemaphoreInfo; fn deref(&self) -> &Self::Target { @@ -19374,6 +21427,13 @@ impl<'a> PhysicalDeviceExternalSemaphoreInfoBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceExternalSemaphoreInfoBuilder<'a> + where + T: ExtendsPhysicalDeviceExternalSemaphoreInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PhysicalDeviceExternalSemaphoreInfo { self.inner } @@ -19410,6 +21470,7 @@ pub struct ExternalSemaphorePropertiesBuilder<'a> { inner: ExternalSemaphoreProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalSemaphoreProperties {} impl<'a> ::std::ops::Deref for ExternalSemaphorePropertiesBuilder<'a> { type Target = ExternalSemaphoreProperties; fn deref(&self) -> &Self::Target { @@ -19438,6 +21499,13 @@ impl<'a> ExternalSemaphorePropertiesBuilder<'a> { self.inner.external_semaphore_features = external_semaphore_features; self } + pub fn next(mut self, next: &'a mut T) -> ExternalSemaphorePropertiesBuilder<'a> + where + T: ExtendsExternalSemaphoreProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> ExternalSemaphoreProperties { self.inner } @@ -19470,6 +21538,8 @@ pub struct ExportSemaphoreCreateInfoBuilder<'a> { inner: ExportSemaphoreCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportSemaphoreCreateInfo {} +unsafe impl ExtendsSemaphoreCreateInfo for ExportSemaphoreCreateInfo {} impl<'a> ::std::ops::Deref for ExportSemaphoreCreateInfoBuilder<'a> { type Target = ExportSemaphoreCreateInfo; fn deref(&self) -> &Self::Target { @@ -19484,6 +21554,13 @@ impl<'a> ExportSemaphoreCreateInfoBuilder<'a> { self.inner.handle_types = handle_types; self } + pub fn next(mut self, next: &'a T) -> ExportSemaphoreCreateInfoBuilder<'a> + where + T: ExtendsExportSemaphoreCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportSemaphoreCreateInfo { self.inner } @@ -19524,6 +21601,7 @@ pub struct ImportSemaphoreWin32HandleInfoKHRBuilder<'a> { inner: ImportSemaphoreWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportSemaphoreWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for ImportSemaphoreWin32HandleInfoKHRBuilder<'a> { type Target = ImportSemaphoreWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -19560,6 +21638,13 @@ impl<'a> ImportSemaphoreWin32HandleInfoKHRBuilder<'a> { self.inner.name = name; self } + pub fn next(mut self, next: &'a T) -> ImportSemaphoreWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsImportSemaphoreWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportSemaphoreWin32HandleInfoKHR { self.inner } @@ -19596,6 +21681,8 @@ pub struct ExportSemaphoreWin32HandleInfoKHRBuilder<'a> { inner: ExportSemaphoreWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportSemaphoreWin32HandleInfoKHR {} +unsafe impl ExtendsSemaphoreCreateInfo for ExportSemaphoreWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for ExportSemaphoreWin32HandleInfoKHRBuilder<'a> { type Target = ExportSemaphoreWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -19618,6 +21705,13 @@ impl<'a> ExportSemaphoreWin32HandleInfoKHRBuilder<'a> { self.inner.name = name; self } + pub fn next(mut self, next: &'a T) -> ExportSemaphoreWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsExportSemaphoreWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportSemaphoreWin32HandleInfoKHR { self.inner } @@ -19656,6 +21750,8 @@ pub struct D3D12FenceSubmitInfoKHRBuilder<'a> { inner: D3D12FenceSubmitInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsD3D12FenceSubmitInfoKHR {} +unsafe impl ExtendsSubmitInfo for D3D12FenceSubmitInfoKHR {} impl<'a> ::std::ops::Deref for D3D12FenceSubmitInfoKHRBuilder<'a> { type Target = D3D12FenceSubmitInfoKHR; fn deref(&self) -> &Self::Target { @@ -19667,7 +21763,7 @@ impl<'a> D3D12FenceSubmitInfoKHRBuilder<'a> { mut self, wait_semaphore_values: &'a [u64], ) -> D3D12FenceSubmitInfoKHRBuilder<'a> { - self.inner.wait_semaphore_values_count = wait_semaphore_values.len() as u32; + self.inner.wait_semaphore_values_count = wait_semaphore_values.len() as _; self.inner.p_wait_semaphore_values = wait_semaphore_values.as_ptr(); self } @@ -19675,10 +21771,17 @@ impl<'a> D3D12FenceSubmitInfoKHRBuilder<'a> { mut self, signal_semaphore_values: &'a [u64], ) -> D3D12FenceSubmitInfoKHRBuilder<'a> { - self.inner.signal_semaphore_values_count = signal_semaphore_values.len() as u32; + self.inner.signal_semaphore_values_count = signal_semaphore_values.len() as _; self.inner.p_signal_semaphore_values = signal_semaphore_values.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> D3D12FenceSubmitInfoKHRBuilder<'a> + where + T: ExtendsD3D12FenceSubmitInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> D3D12FenceSubmitInfoKHR { self.inner } @@ -19713,6 +21816,7 @@ pub struct SemaphoreGetWin32HandleInfoKHRBuilder<'a> { inner: SemaphoreGetWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSemaphoreGetWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for SemaphoreGetWin32HandleInfoKHRBuilder<'a> { type Target = SemaphoreGetWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -19731,6 +21835,13 @@ impl<'a> SemaphoreGetWin32HandleInfoKHRBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> SemaphoreGetWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsSemaphoreGetWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SemaphoreGetWin32HandleInfoKHR { self.inner } @@ -19769,6 +21880,7 @@ pub struct ImportSemaphoreFdInfoKHRBuilder<'a> { inner: ImportSemaphoreFdInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportSemaphoreFdInfoKHR {} impl<'a> ::std::ops::Deref for ImportSemaphoreFdInfoKHRBuilder<'a> { type Target = ImportSemaphoreFdInfoKHR; fn deref(&self) -> &Self::Target { @@ -19795,6 +21907,13 @@ impl<'a> ImportSemaphoreFdInfoKHRBuilder<'a> { self.inner.fd = fd; self } + pub fn next(mut self, next: &'a T) -> ImportSemaphoreFdInfoKHRBuilder<'a> + where + T: ExtendsImportSemaphoreFdInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportSemaphoreFdInfoKHR { self.inner } @@ -19829,6 +21948,7 @@ pub struct SemaphoreGetFdInfoKHRBuilder<'a> { inner: SemaphoreGetFdInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSemaphoreGetFdInfoKHR {} impl<'a> ::std::ops::Deref for SemaphoreGetFdInfoKHRBuilder<'a> { type Target = SemaphoreGetFdInfoKHR; fn deref(&self) -> &Self::Target { @@ -19847,6 +21967,13 @@ impl<'a> SemaphoreGetFdInfoKHRBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> SemaphoreGetFdInfoKHRBuilder<'a> + where + T: ExtendsSemaphoreGetFdInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SemaphoreGetFdInfoKHR { self.inner } @@ -19879,6 +22006,7 @@ pub struct PhysicalDeviceExternalFenceInfoBuilder<'a> { inner: PhysicalDeviceExternalFenceInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceExternalFenceInfo {} impl<'a> ::std::ops::Deref for PhysicalDeviceExternalFenceInfoBuilder<'a> { type Target = PhysicalDeviceExternalFenceInfo; fn deref(&self) -> &Self::Target { @@ -19893,6 +22021,13 @@ impl<'a> PhysicalDeviceExternalFenceInfoBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceExternalFenceInfoBuilder<'a> + where + T: ExtendsPhysicalDeviceExternalFenceInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PhysicalDeviceExternalFenceInfo { self.inner } @@ -19929,6 +22064,7 @@ pub struct ExternalFencePropertiesBuilder<'a> { inner: ExternalFenceProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalFenceProperties {} impl<'a> ::std::ops::Deref for ExternalFencePropertiesBuilder<'a> { type Target = ExternalFenceProperties; fn deref(&self) -> &Self::Target { @@ -19957,6 +22093,13 @@ impl<'a> ExternalFencePropertiesBuilder<'a> { self.inner.external_fence_features = external_fence_features; self } + pub fn next(mut self, next: &'a mut T) -> ExternalFencePropertiesBuilder<'a> + where + T: ExtendsExternalFenceProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> ExternalFenceProperties { self.inner } @@ -19989,6 +22132,8 @@ pub struct ExportFenceCreateInfoBuilder<'a> { inner: ExportFenceCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportFenceCreateInfo {} +unsafe impl ExtendsFenceCreateInfo for ExportFenceCreateInfo {} impl<'a> ::std::ops::Deref for ExportFenceCreateInfoBuilder<'a> { type Target = ExportFenceCreateInfo; fn deref(&self) -> &Self::Target { @@ -20003,6 +22148,13 @@ impl<'a> ExportFenceCreateInfoBuilder<'a> { self.inner.handle_types = handle_types; self } + pub fn next(mut self, next: &'a T) -> ExportFenceCreateInfoBuilder<'a> + where + T: ExtendsExportFenceCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportFenceCreateInfo { self.inner } @@ -20043,6 +22195,7 @@ pub struct ImportFenceWin32HandleInfoKHRBuilder<'a> { inner: ImportFenceWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportFenceWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for ImportFenceWin32HandleInfoKHRBuilder<'a> { type Target = ImportFenceWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -20073,6 +22226,13 @@ impl<'a> ImportFenceWin32HandleInfoKHRBuilder<'a> { self.inner.name = name; self } + pub fn next(mut self, next: &'a T) -> ImportFenceWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsImportFenceWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportFenceWin32HandleInfoKHR { self.inner } @@ -20109,6 +22269,8 @@ pub struct ExportFenceWin32HandleInfoKHRBuilder<'a> { inner: ExportFenceWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExportFenceWin32HandleInfoKHR {} +unsafe impl ExtendsFenceCreateInfo for ExportFenceWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for ExportFenceWin32HandleInfoKHRBuilder<'a> { type Target = ExportFenceWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -20131,6 +22293,13 @@ impl<'a> ExportFenceWin32HandleInfoKHRBuilder<'a> { self.inner.name = name; self } + pub fn next(mut self, next: &'a T) -> ExportFenceWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsExportFenceWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ExportFenceWin32HandleInfoKHR { self.inner } @@ -20165,6 +22334,7 @@ pub struct FenceGetWin32HandleInfoKHRBuilder<'a> { inner: FenceGetWin32HandleInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsFenceGetWin32HandleInfoKHR {} impl<'a> ::std::ops::Deref for FenceGetWin32HandleInfoKHRBuilder<'a> { type Target = FenceGetWin32HandleInfoKHR; fn deref(&self) -> &Self::Target { @@ -20183,6 +22353,13 @@ impl<'a> FenceGetWin32HandleInfoKHRBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> FenceGetWin32HandleInfoKHRBuilder<'a> + where + T: ExtendsFenceGetWin32HandleInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> FenceGetWin32HandleInfoKHR { self.inner } @@ -20221,6 +22398,7 @@ pub struct ImportFenceFdInfoKHRBuilder<'a> { inner: ImportFenceFdInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportFenceFdInfoKHR {} impl<'a> ::std::ops::Deref for ImportFenceFdInfoKHRBuilder<'a> { type Target = ImportFenceFdInfoKHR; fn deref(&self) -> &Self::Target { @@ -20247,6 +22425,13 @@ impl<'a> ImportFenceFdInfoKHRBuilder<'a> { self.inner.fd = fd; self } + pub fn next(mut self, next: &'a T) -> ImportFenceFdInfoKHRBuilder<'a> + where + T: ExtendsImportFenceFdInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportFenceFdInfoKHR { self.inner } @@ -20281,6 +22466,7 @@ pub struct FenceGetFdInfoKHRBuilder<'a> { inner: FenceGetFdInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsFenceGetFdInfoKHR {} impl<'a> ::std::ops::Deref for FenceGetFdInfoKHRBuilder<'a> { type Target = FenceGetFdInfoKHR; fn deref(&self) -> &Self::Target { @@ -20299,6 +22485,13 @@ impl<'a> FenceGetFdInfoKHRBuilder<'a> { self.inner.handle_type = handle_type; self } + pub fn next(mut self, next: &'a T) -> FenceGetFdInfoKHRBuilder<'a> + where + T: ExtendsFenceGetFdInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> FenceGetFdInfoKHR { self.inner } @@ -20335,6 +22528,9 @@ pub struct PhysicalDeviceMultiviewFeaturesBuilder<'a> { inner: PhysicalDeviceMultiviewFeatures, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceMultiviewFeatures {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceMultiviewFeatures {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceMultiviewFeatures {} impl<'a> ::std::ops::Deref for PhysicalDeviceMultiviewFeaturesBuilder<'a> { type Target = PhysicalDeviceMultiviewFeatures; fn deref(&self) -> &Self::Target { @@ -20342,22 +22538,29 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceMultiviewFeaturesBuilder<'a> { } } impl<'a> PhysicalDeviceMultiviewFeaturesBuilder<'a> { - pub fn multiview(mut self, multiview: Bool32) -> PhysicalDeviceMultiviewFeaturesBuilder<'a> { - self.inner.multiview = multiview; + pub fn multiview(mut self, multiview: bool) -> PhysicalDeviceMultiviewFeaturesBuilder<'a> { + self.inner.multiview = multiview.into(); self } pub fn multiview_geometry_shader( mut self, - multiview_geometry_shader: Bool32, + multiview_geometry_shader: bool, ) -> PhysicalDeviceMultiviewFeaturesBuilder<'a> { - self.inner.multiview_geometry_shader = multiview_geometry_shader; + self.inner.multiview_geometry_shader = multiview_geometry_shader.into(); self } pub fn multiview_tessellation_shader( mut self, - multiview_tessellation_shader: Bool32, + multiview_tessellation_shader: bool, ) -> PhysicalDeviceMultiviewFeaturesBuilder<'a> { - self.inner.multiview_tessellation_shader = multiview_tessellation_shader; + self.inner.multiview_tessellation_shader = multiview_tessellation_shader.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceMultiviewFeaturesBuilder<'a> + where + T: ExtendsPhysicalDeviceMultiviewFeatures, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceMultiviewFeatures { @@ -20394,6 +22597,8 @@ pub struct PhysicalDeviceMultiviewPropertiesBuilder<'a> { inner: PhysicalDeviceMultiviewProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceMultiviewProperties {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceMultiviewProperties {} impl<'a> ::std::ops::Deref for PhysicalDeviceMultiviewPropertiesBuilder<'a> { type Target = PhysicalDeviceMultiviewProperties; fn deref(&self) -> &Self::Target { @@ -20415,6 +22620,13 @@ impl<'a> PhysicalDeviceMultiviewPropertiesBuilder<'a> { self.inner.max_multiview_instance_index = max_multiview_instance_index; self } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceMultiviewPropertiesBuilder<'a> + where + T: ExtendsPhysicalDeviceMultiviewProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceMultiviewProperties { self.inner } @@ -20457,6 +22669,8 @@ pub struct RenderPassMultiviewCreateInfoBuilder<'a> { inner: RenderPassMultiviewCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsRenderPassMultiviewCreateInfo {} +unsafe impl ExtendsRenderPassCreateInfo for RenderPassMultiviewCreateInfo {} impl<'a> ::std::ops::Deref for RenderPassMultiviewCreateInfoBuilder<'a> { type Target = RenderPassMultiviewCreateInfo; fn deref(&self) -> &Self::Target { @@ -20465,7 +22679,7 @@ impl<'a> ::std::ops::Deref for RenderPassMultiviewCreateInfoBuilder<'a> { } impl<'a> RenderPassMultiviewCreateInfoBuilder<'a> { pub fn view_masks(mut self, view_masks: &'a [u32]) -> RenderPassMultiviewCreateInfoBuilder<'a> { - self.inner.subpass_count = view_masks.len() as u32; + self.inner.subpass_count = view_masks.len() as _; self.inner.p_view_masks = view_masks.as_ptr(); self } @@ -20473,7 +22687,7 @@ impl<'a> RenderPassMultiviewCreateInfoBuilder<'a> { mut self, view_offsets: &'a [i32], ) -> RenderPassMultiviewCreateInfoBuilder<'a> { - self.inner.dependency_count = view_offsets.len() as u32; + self.inner.dependency_count = view_offsets.len() as _; self.inner.p_view_offsets = view_offsets.as_ptr(); self } @@ -20481,10 +22695,17 @@ impl<'a> RenderPassMultiviewCreateInfoBuilder<'a> { mut self, correlation_masks: &'a [u32], ) -> RenderPassMultiviewCreateInfoBuilder<'a> { - self.inner.correlation_mask_count = correlation_masks.len() as u32; + self.inner.correlation_mask_count = correlation_masks.len() as _; self.inner.p_correlation_masks = correlation_masks.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> RenderPassMultiviewCreateInfoBuilder<'a> + where + T: ExtendsRenderPassMultiviewCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> RenderPassMultiviewCreateInfo { self.inner } @@ -20537,6 +22758,7 @@ pub struct SurfaceCapabilities2EXTBuilder<'a> { inner: SurfaceCapabilities2EXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSurfaceCapabilities2EXT {} impl<'a> ::std::ops::Deref for SurfaceCapabilities2EXTBuilder<'a> { type Target = SurfaceCapabilities2EXT; fn deref(&self) -> &Self::Target { @@ -20615,6 +22837,13 @@ impl<'a> SurfaceCapabilities2EXTBuilder<'a> { self.inner.supported_surface_counters = supported_surface_counters; self } + pub fn next(mut self, next: &'a mut T) -> SurfaceCapabilities2EXTBuilder<'a> + where + T: ExtendsSurfaceCapabilities2EXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> SurfaceCapabilities2EXT { self.inner } @@ -20647,6 +22876,7 @@ pub struct DisplayPowerInfoEXTBuilder<'a> { inner: DisplayPowerInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayPowerInfoEXT {} impl<'a> ::std::ops::Deref for DisplayPowerInfoEXTBuilder<'a> { type Target = DisplayPowerInfoEXT; fn deref(&self) -> &Self::Target { @@ -20661,6 +22891,13 @@ impl<'a> DisplayPowerInfoEXTBuilder<'a> { self.inner.power_state = power_state; self } + pub fn next(mut self, next: &'a T) -> DisplayPowerInfoEXTBuilder<'a> + where + T: ExtendsDisplayPowerInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DisplayPowerInfoEXT { self.inner } @@ -20693,6 +22930,7 @@ pub struct DeviceEventInfoEXTBuilder<'a> { inner: DeviceEventInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceEventInfoEXT {} impl<'a> ::std::ops::Deref for DeviceEventInfoEXTBuilder<'a> { type Target = DeviceEventInfoEXT; fn deref(&self) -> &Self::Target { @@ -20707,6 +22945,13 @@ impl<'a> DeviceEventInfoEXTBuilder<'a> { self.inner.device_event = device_event; self } + pub fn next(mut self, next: &'a T) -> DeviceEventInfoEXTBuilder<'a> + where + T: ExtendsDeviceEventInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceEventInfoEXT { self.inner } @@ -20739,6 +22984,7 @@ pub struct DisplayEventInfoEXTBuilder<'a> { inner: DisplayEventInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayEventInfoEXT {} impl<'a> ::std::ops::Deref for DisplayEventInfoEXTBuilder<'a> { type Target = DisplayEventInfoEXT; fn deref(&self) -> &Self::Target { @@ -20753,6 +22999,13 @@ impl<'a> DisplayEventInfoEXTBuilder<'a> { self.inner.display_event = display_event; self } + pub fn next(mut self, next: &'a T) -> DisplayEventInfoEXTBuilder<'a> + where + T: ExtendsDisplayEventInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DisplayEventInfoEXT { self.inner } @@ -20785,6 +23038,8 @@ pub struct SwapchainCounterCreateInfoEXTBuilder<'a> { inner: SwapchainCounterCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSwapchainCounterCreateInfoEXT {} +unsafe impl ExtendsSwapchainCreateInfoKHR for SwapchainCounterCreateInfoEXT {} impl<'a> ::std::ops::Deref for SwapchainCounterCreateInfoEXTBuilder<'a> { type Target = SwapchainCounterCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -20799,6 +23054,13 @@ impl<'a> SwapchainCounterCreateInfoEXTBuilder<'a> { self.inner.surface_counters = surface_counters; self } + pub fn next(mut self, next: &'a T) -> SwapchainCounterCreateInfoEXTBuilder<'a> + where + T: ExtendsSwapchainCounterCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SwapchainCounterCreateInfoEXT { self.inner } @@ -20835,6 +23097,7 @@ pub struct PhysicalDeviceGroupPropertiesBuilder<'a> { inner: PhysicalDeviceGroupProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceGroupProperties {} impl<'a> ::std::ops::Deref for PhysicalDeviceGroupPropertiesBuilder<'a> { type Target = PhysicalDeviceGroupProperties; fn deref(&self) -> &Self::Target { @@ -20858,9 +23121,16 @@ impl<'a> PhysicalDeviceGroupPropertiesBuilder<'a> { } pub fn subset_allocation( mut self, - subset_allocation: Bool32, + subset_allocation: bool, ) -> PhysicalDeviceGroupPropertiesBuilder<'a> { - self.inner.subset_allocation = subset_allocation; + self.inner.subset_allocation = subset_allocation.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceGroupPropertiesBuilder<'a> + where + T: ExtendsPhysicalDeviceGroupProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceGroupProperties { @@ -20897,6 +23167,8 @@ pub struct MemoryAllocateFlagsInfoBuilder<'a> { inner: MemoryAllocateFlagsInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryAllocateFlagsInfo {} +unsafe impl ExtendsMemoryAllocateInfo for MemoryAllocateFlagsInfo {} impl<'a> ::std::ops::Deref for MemoryAllocateFlagsInfoBuilder<'a> { type Target = MemoryAllocateFlagsInfo; fn deref(&self) -> &Self::Target { @@ -20912,6 +23184,13 @@ impl<'a> MemoryAllocateFlagsInfoBuilder<'a> { self.inner.device_mask = device_mask; self } + pub fn next(mut self, next: &'a T) -> MemoryAllocateFlagsInfoBuilder<'a> + where + T: ExtendsMemoryAllocateFlagsInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MemoryAllocateFlagsInfo { self.inner } @@ -20948,6 +23227,7 @@ pub struct BindBufferMemoryInfoBuilder<'a> { inner: BindBufferMemoryInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBindBufferMemoryInfo {} impl<'a> ::std::ops::Deref for BindBufferMemoryInfoBuilder<'a> { type Target = BindBufferMemoryInfo; fn deref(&self) -> &Self::Target { @@ -20967,6 +23247,13 @@ impl<'a> BindBufferMemoryInfoBuilder<'a> { self.inner.memory_offset = memory_offset; self } + pub fn next(mut self, next: &'a T) -> BindBufferMemoryInfoBuilder<'a> + where + T: ExtendsBindBufferMemoryInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BindBufferMemoryInfo { self.inner } @@ -21001,6 +23288,8 @@ pub struct BindBufferMemoryDeviceGroupInfoBuilder<'a> { inner: BindBufferMemoryDeviceGroupInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBindBufferMemoryDeviceGroupInfo {} +unsafe impl ExtendsBindBufferMemoryInfo for BindBufferMemoryDeviceGroupInfo {} impl<'a> ::std::ops::Deref for BindBufferMemoryDeviceGroupInfoBuilder<'a> { type Target = BindBufferMemoryDeviceGroupInfo; fn deref(&self) -> &Self::Target { @@ -21012,10 +23301,17 @@ impl<'a> BindBufferMemoryDeviceGroupInfoBuilder<'a> { mut self, device_indices: &'a [u32], ) -> BindBufferMemoryDeviceGroupInfoBuilder<'a> { - self.inner.device_index_count = device_indices.len() as u32; + self.inner.device_index_count = device_indices.len() as _; self.inner.p_device_indices = device_indices.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> BindBufferMemoryDeviceGroupInfoBuilder<'a> + where + T: ExtendsBindBufferMemoryDeviceGroupInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BindBufferMemoryDeviceGroupInfo { self.inner } @@ -21052,6 +23348,7 @@ pub struct BindImageMemoryInfoBuilder<'a> { inner: BindImageMemoryInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBindImageMemoryInfo {} impl<'a> ::std::ops::Deref for BindImageMemoryInfoBuilder<'a> { type Target = BindImageMemoryInfo; fn deref(&self) -> &Self::Target { @@ -21071,6 +23368,13 @@ impl<'a> BindImageMemoryInfoBuilder<'a> { self.inner.memory_offset = memory_offset; self } + pub fn next(mut self, next: &'a T) -> BindImageMemoryInfoBuilder<'a> + where + T: ExtendsBindImageMemoryInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BindImageMemoryInfo { self.inner } @@ -21109,6 +23413,8 @@ pub struct BindImageMemoryDeviceGroupInfoBuilder<'a> { inner: BindImageMemoryDeviceGroupInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBindImageMemoryDeviceGroupInfo {} +unsafe impl ExtendsBindImageMemoryInfo for BindImageMemoryDeviceGroupInfo {} impl<'a> ::std::ops::Deref for BindImageMemoryDeviceGroupInfoBuilder<'a> { type Target = BindImageMemoryDeviceGroupInfo; fn deref(&self) -> &Self::Target { @@ -21120,7 +23426,7 @@ impl<'a> BindImageMemoryDeviceGroupInfoBuilder<'a> { mut self, device_indices: &'a [u32], ) -> BindImageMemoryDeviceGroupInfoBuilder<'a> { - self.inner.device_index_count = device_indices.len() as u32; + self.inner.device_index_count = device_indices.len() as _; self.inner.p_device_indices = device_indices.as_ptr(); self } @@ -21128,10 +23434,17 @@ impl<'a> BindImageMemoryDeviceGroupInfoBuilder<'a> { mut self, split_instance_bind_regions: &'a [Rect2D], ) -> BindImageMemoryDeviceGroupInfoBuilder<'a> { - self.inner.split_instance_bind_region_count = split_instance_bind_regions.len() as u32; + self.inner.split_instance_bind_region_count = split_instance_bind_regions.len() as _; self.inner.p_split_instance_bind_regions = split_instance_bind_regions.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> BindImageMemoryDeviceGroupInfoBuilder<'a> + where + T: ExtendsBindImageMemoryDeviceGroupInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BindImageMemoryDeviceGroupInfo { self.inner } @@ -21168,6 +23481,8 @@ pub struct DeviceGroupRenderPassBeginInfoBuilder<'a> { inner: DeviceGroupRenderPassBeginInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupRenderPassBeginInfo {} +unsafe impl ExtendsRenderPassBeginInfo for DeviceGroupRenderPassBeginInfo {} impl<'a> ::std::ops::Deref for DeviceGroupRenderPassBeginInfoBuilder<'a> { type Target = DeviceGroupRenderPassBeginInfo; fn deref(&self) -> &Self::Target { @@ -21183,10 +23498,17 @@ impl<'a> DeviceGroupRenderPassBeginInfoBuilder<'a> { mut self, device_render_areas: &'a [Rect2D], ) -> DeviceGroupRenderPassBeginInfoBuilder<'a> { - self.inner.device_render_area_count = device_render_areas.len() as u32; + self.inner.device_render_area_count = device_render_areas.len() as _; self.inner.p_device_render_areas = device_render_areas.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DeviceGroupRenderPassBeginInfoBuilder<'a> + where + T: ExtendsDeviceGroupRenderPassBeginInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupRenderPassBeginInfo { self.inner } @@ -21219,6 +23541,8 @@ pub struct DeviceGroupCommandBufferBeginInfoBuilder<'a> { inner: DeviceGroupCommandBufferBeginInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupCommandBufferBeginInfo {} +unsafe impl ExtendsCommandBufferBeginInfo for DeviceGroupCommandBufferBeginInfo {} impl<'a> ::std::ops::Deref for DeviceGroupCommandBufferBeginInfoBuilder<'a> { type Target = DeviceGroupCommandBufferBeginInfo; fn deref(&self) -> &Self::Target { @@ -21230,6 +23554,13 @@ impl<'a> DeviceGroupCommandBufferBeginInfoBuilder<'a> { self.inner.device_mask = device_mask; self } + pub fn next(mut self, next: &'a T) -> DeviceGroupCommandBufferBeginInfoBuilder<'a> + where + T: ExtendsDeviceGroupCommandBufferBeginInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupCommandBufferBeginInfo { self.inner } @@ -21272,6 +23603,8 @@ pub struct DeviceGroupSubmitInfoBuilder<'a> { inner: DeviceGroupSubmitInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupSubmitInfo {} +unsafe impl ExtendsSubmitInfo for DeviceGroupSubmitInfo {} impl<'a> ::std::ops::Deref for DeviceGroupSubmitInfoBuilder<'a> { type Target = DeviceGroupSubmitInfo; fn deref(&self) -> &Self::Target { @@ -21283,7 +23616,7 @@ impl<'a> DeviceGroupSubmitInfoBuilder<'a> { mut self, wait_semaphore_device_indices: &'a [u32], ) -> DeviceGroupSubmitInfoBuilder<'a> { - self.inner.wait_semaphore_count = wait_semaphore_device_indices.len() as u32; + self.inner.wait_semaphore_count = wait_semaphore_device_indices.len() as _; self.inner.p_wait_semaphore_device_indices = wait_semaphore_device_indices.as_ptr(); self } @@ -21291,7 +23624,7 @@ impl<'a> DeviceGroupSubmitInfoBuilder<'a> { mut self, command_buffer_device_masks: &'a [u32], ) -> DeviceGroupSubmitInfoBuilder<'a> { - self.inner.command_buffer_count = command_buffer_device_masks.len() as u32; + self.inner.command_buffer_count = command_buffer_device_masks.len() as _; self.inner.p_command_buffer_device_masks = command_buffer_device_masks.as_ptr(); self } @@ -21299,10 +23632,17 @@ impl<'a> DeviceGroupSubmitInfoBuilder<'a> { mut self, signal_semaphore_device_indices: &'a [u32], ) -> DeviceGroupSubmitInfoBuilder<'a> { - self.inner.signal_semaphore_count = signal_semaphore_device_indices.len() as u32; + self.inner.signal_semaphore_count = signal_semaphore_device_indices.len() as _; self.inner.p_signal_semaphore_device_indices = signal_semaphore_device_indices.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DeviceGroupSubmitInfoBuilder<'a> + where + T: ExtendsDeviceGroupSubmitInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupSubmitInfo { self.inner } @@ -21337,6 +23677,8 @@ pub struct DeviceGroupBindSparseInfoBuilder<'a> { inner: DeviceGroupBindSparseInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupBindSparseInfo {} +unsafe impl ExtendsBindSparseInfo for DeviceGroupBindSparseInfo {} impl<'a> ::std::ops::Deref for DeviceGroupBindSparseInfoBuilder<'a> { type Target = DeviceGroupBindSparseInfo; fn deref(&self) -> &Self::Target { @@ -21358,6 +23700,13 @@ impl<'a> DeviceGroupBindSparseInfoBuilder<'a> { self.inner.memory_device_index = memory_device_index; self } + pub fn next(mut self, next: &'a T) -> DeviceGroupBindSparseInfoBuilder<'a> + where + T: ExtendsDeviceGroupBindSparseInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupBindSparseInfo { self.inner } @@ -21392,6 +23741,7 @@ pub struct DeviceGroupPresentCapabilitiesKHRBuilder<'a> { inner: DeviceGroupPresentCapabilitiesKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupPresentCapabilitiesKHR {} impl<'a> ::std::ops::Deref for DeviceGroupPresentCapabilitiesKHRBuilder<'a> { type Target = DeviceGroupPresentCapabilitiesKHR; fn deref(&self) -> &Self::Target { @@ -21413,6 +23763,13 @@ impl<'a> DeviceGroupPresentCapabilitiesKHRBuilder<'a> { self.inner.modes = modes; self } + pub fn next(mut self, next: &'a T) -> DeviceGroupPresentCapabilitiesKHRBuilder<'a> + where + T: ExtendsDeviceGroupPresentCapabilitiesKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupPresentCapabilitiesKHR { self.inner } @@ -21445,6 +23802,8 @@ pub struct ImageSwapchainCreateInfoKHRBuilder<'a> { inner: ImageSwapchainCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageSwapchainCreateInfoKHR {} +unsafe impl ExtendsImageCreateInfo for ImageSwapchainCreateInfoKHR {} impl<'a> ::std::ops::Deref for ImageSwapchainCreateInfoKHRBuilder<'a> { type Target = ImageSwapchainCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -21456,6 +23815,13 @@ impl<'a> ImageSwapchainCreateInfoKHRBuilder<'a> { self.inner.swapchain = swapchain; self } + pub fn next(mut self, next: &'a T) -> ImageSwapchainCreateInfoKHRBuilder<'a> + where + T: ExtendsImageSwapchainCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageSwapchainCreateInfoKHR { self.inner } @@ -21490,6 +23856,8 @@ pub struct BindImageMemorySwapchainInfoKHRBuilder<'a> { inner: BindImageMemorySwapchainInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBindImageMemorySwapchainInfoKHR {} +unsafe impl ExtendsBindImageMemoryInfo for BindImageMemorySwapchainInfoKHR {} impl<'a> ::std::ops::Deref for BindImageMemorySwapchainInfoKHRBuilder<'a> { type Target = BindImageMemorySwapchainInfoKHR; fn deref(&self) -> &Self::Target { @@ -21508,6 +23876,13 @@ impl<'a> BindImageMemorySwapchainInfoKHRBuilder<'a> { self.inner.image_index = image_index; self } + pub fn next(mut self, next: &'a T) -> BindImageMemorySwapchainInfoKHRBuilder<'a> + where + T: ExtendsBindImageMemorySwapchainInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BindImageMemorySwapchainInfoKHR { self.inner } @@ -21548,6 +23923,7 @@ pub struct AcquireNextImageInfoKHRBuilder<'a> { inner: AcquireNextImageInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsAcquireNextImageInfoKHR {} impl<'a> ::std::ops::Deref for AcquireNextImageInfoKHRBuilder<'a> { type Target = AcquireNextImageInfoKHR; fn deref(&self) -> &Self::Target { @@ -21575,6 +23951,13 @@ impl<'a> AcquireNextImageInfoKHRBuilder<'a> { self.inner.device_mask = device_mask; self } + pub fn next(mut self, next: &'a T) -> AcquireNextImageInfoKHRBuilder<'a> + where + T: ExtendsAcquireNextImageInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> AcquireNextImageInfoKHR { self.inner } @@ -21611,6 +23994,8 @@ pub struct DeviceGroupPresentInfoKHRBuilder<'a> { inner: DeviceGroupPresentInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupPresentInfoKHR {} +unsafe impl ExtendsPresentInfoKHR for DeviceGroupPresentInfoKHR {} impl<'a> ::std::ops::Deref for DeviceGroupPresentInfoKHRBuilder<'a> { type Target = DeviceGroupPresentInfoKHR; fn deref(&self) -> &Self::Target { @@ -21619,7 +24004,7 @@ impl<'a> ::std::ops::Deref for DeviceGroupPresentInfoKHRBuilder<'a> { } impl<'a> DeviceGroupPresentInfoKHRBuilder<'a> { pub fn device_masks(mut self, device_masks: &'a [u32]) -> DeviceGroupPresentInfoKHRBuilder<'a> { - self.inner.swapchain_count = device_masks.len() as u32; + self.inner.swapchain_count = device_masks.len() as _; self.inner.p_device_masks = device_masks.as_ptr(); self } @@ -21630,6 +24015,13 @@ impl<'a> DeviceGroupPresentInfoKHRBuilder<'a> { self.inner.mode = mode; self } + pub fn next(mut self, next: &'a T) -> DeviceGroupPresentInfoKHRBuilder<'a> + where + T: ExtendsDeviceGroupPresentInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupPresentInfoKHR { self.inner } @@ -21664,6 +24056,8 @@ pub struct DeviceGroupDeviceCreateInfoBuilder<'a> { inner: DeviceGroupDeviceCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupDeviceCreateInfo {} +unsafe impl ExtendsDeviceCreateInfo for DeviceGroupDeviceCreateInfo {} impl<'a> ::std::ops::Deref for DeviceGroupDeviceCreateInfoBuilder<'a> { type Target = DeviceGroupDeviceCreateInfo; fn deref(&self) -> &Self::Target { @@ -21675,10 +24069,17 @@ impl<'a> DeviceGroupDeviceCreateInfoBuilder<'a> { mut self, physical_devices: &'a [PhysicalDevice], ) -> DeviceGroupDeviceCreateInfoBuilder<'a> { - self.inner.physical_device_count = physical_devices.len() as u32; + self.inner.physical_device_count = physical_devices.len() as _; self.inner.p_physical_devices = physical_devices.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DeviceGroupDeviceCreateInfoBuilder<'a> + where + T: ExtendsDeviceGroupDeviceCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupDeviceCreateInfo { self.inner } @@ -21711,6 +24112,8 @@ pub struct DeviceGroupSwapchainCreateInfoKHRBuilder<'a> { inner: DeviceGroupSwapchainCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceGroupSwapchainCreateInfoKHR {} +unsafe impl ExtendsSwapchainCreateInfoKHR for DeviceGroupSwapchainCreateInfoKHR {} impl<'a> ::std::ops::Deref for DeviceGroupSwapchainCreateInfoKHRBuilder<'a> { type Target = DeviceGroupSwapchainCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -21725,6 +24128,13 @@ impl<'a> DeviceGroupSwapchainCreateInfoKHRBuilder<'a> { self.inner.modes = modes; self } + pub fn next(mut self, next: &'a T) -> DeviceGroupSwapchainCreateInfoKHRBuilder<'a> + where + T: ExtendsDeviceGroupSwapchainCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceGroupSwapchainCreateInfoKHR { self.inner } @@ -21837,6 +24247,7 @@ pub struct DescriptorUpdateTemplateCreateInfoBuilder<'a> { inner: DescriptorUpdateTemplateCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDescriptorUpdateTemplateCreateInfo {} impl<'a> ::std::ops::Deref for DescriptorUpdateTemplateCreateInfoBuilder<'a> { type Target = DescriptorUpdateTemplateCreateInfo; fn deref(&self) -> &Self::Target { @@ -21855,7 +24266,7 @@ impl<'a> DescriptorUpdateTemplateCreateInfoBuilder<'a> { mut self, descriptor_update_entries: &'a [DescriptorUpdateTemplateEntry], ) -> DescriptorUpdateTemplateCreateInfoBuilder<'a> { - self.inner.descriptor_update_entry_count = descriptor_update_entries.len() as u32; + self.inner.descriptor_update_entry_count = descriptor_update_entries.len() as _; self.inner.p_descriptor_update_entries = descriptor_update_entries.as_ptr(); self } @@ -21891,6 +24302,13 @@ impl<'a> DescriptorUpdateTemplateCreateInfoBuilder<'a> { self.inner.set = set; self } + pub fn next(mut self, next: &'a mut T) -> DescriptorUpdateTemplateCreateInfoBuilder<'a> + where + T: ExtendsDescriptorUpdateTemplateCreateInfo, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> DescriptorUpdateTemplateCreateInfo { self.inner } @@ -21974,6 +24392,7 @@ pub struct HdrMetadataEXTBuilder<'a> { inner: HdrMetadataEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsHdrMetadataEXT {} impl<'a> ::std::ops::Deref for HdrMetadataEXTBuilder<'a> { type Target = HdrMetadataEXT; fn deref(&self) -> &Self::Target { @@ -22028,6 +24447,13 @@ impl<'a> HdrMetadataEXTBuilder<'a> { self.inner.max_frame_average_light_level = max_frame_average_light_level; self } + pub fn next(mut self, next: &'a T) -> HdrMetadataEXTBuilder<'a> + where + T: ExtendsHdrMetadataEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> HdrMetadataEXT { self.inner } @@ -22161,6 +24587,8 @@ pub struct PresentTimesInfoGOOGLEBuilder<'a> { inner: PresentTimesInfoGOOGLE, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPresentTimesInfoGOOGLE {} +unsafe impl ExtendsPresentInfoKHR for PresentTimesInfoGOOGLE {} impl<'a> ::std::ops::Deref for PresentTimesInfoGOOGLEBuilder<'a> { type Target = PresentTimesInfoGOOGLE; fn deref(&self) -> &Self::Target { @@ -22169,10 +24597,17 @@ impl<'a> ::std::ops::Deref for PresentTimesInfoGOOGLEBuilder<'a> { } impl<'a> PresentTimesInfoGOOGLEBuilder<'a> { pub fn times(mut self, times: &'a [PresentTimeGOOGLE]) -> PresentTimesInfoGOOGLEBuilder<'a> { - self.inner.swapchain_count = times.len() as u32; + self.inner.swapchain_count = times.len() as _; self.inner.p_times = times.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PresentTimesInfoGOOGLEBuilder<'a> + where + T: ExtendsPresentTimesInfoGOOGLE, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PresentTimesInfoGOOGLE { self.inner } @@ -22247,6 +24682,7 @@ pub struct IOSSurfaceCreateInfoMVKBuilder<'a> { inner: IOSSurfaceCreateInfoMVK, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsIOSSurfaceCreateInfoMVK {} impl<'a> ::std::ops::Deref for IOSSurfaceCreateInfoMVKBuilder<'a> { type Target = IOSSurfaceCreateInfoMVK; fn deref(&self) -> &Self::Target { @@ -22262,6 +24698,13 @@ impl<'a> IOSSurfaceCreateInfoMVKBuilder<'a> { self.inner.p_view = view; self } + pub fn next(mut self, next: &'a T) -> IOSSurfaceCreateInfoMVKBuilder<'a> + where + T: ExtendsIOSSurfaceCreateInfoMVK, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> IOSSurfaceCreateInfoMVK { self.inner } @@ -22296,6 +24739,7 @@ pub struct MacOSSurfaceCreateInfoMVKBuilder<'a> { inner: MacOSSurfaceCreateInfoMVK, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMacOSSurfaceCreateInfoMVK {} impl<'a> ::std::ops::Deref for MacOSSurfaceCreateInfoMVKBuilder<'a> { type Target = MacOSSurfaceCreateInfoMVK; fn deref(&self) -> &Self::Target { @@ -22314,6 +24758,13 @@ impl<'a> MacOSSurfaceCreateInfoMVKBuilder<'a> { self.inner.p_view = view; self } + pub fn next(mut self, next: &'a T) -> MacOSSurfaceCreateInfoMVKBuilder<'a> + where + T: ExtendsMacOSSurfaceCreateInfoMVK, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MacOSSurfaceCreateInfoMVK { self.inner } @@ -22387,6 +24838,8 @@ pub struct PipelineViewportWScalingStateCreateInfoNVBuilder<'a> { inner: PipelineViewportWScalingStateCreateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineViewportWScalingStateCreateInfoNV {} +unsafe impl ExtendsPipelineViewportStateCreateInfo for PipelineViewportWScalingStateCreateInfoNV {} impl<'a> ::std::ops::Deref for PipelineViewportWScalingStateCreateInfoNVBuilder<'a> { type Target = PipelineViewportWScalingStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -22396,19 +24849,26 @@ impl<'a> ::std::ops::Deref for PipelineViewportWScalingStateCreateInfoNVBuilder< impl<'a> PipelineViewportWScalingStateCreateInfoNVBuilder<'a> { pub fn viewport_w_scaling_enable( mut self, - viewport_w_scaling_enable: Bool32, + viewport_w_scaling_enable: bool, ) -> PipelineViewportWScalingStateCreateInfoNVBuilder<'a> { - self.inner.viewport_w_scaling_enable = viewport_w_scaling_enable; + self.inner.viewport_w_scaling_enable = viewport_w_scaling_enable.into(); self } pub fn viewport_w_scalings( mut self, viewport_w_scalings: &'a [ViewportWScalingNV], ) -> PipelineViewportWScalingStateCreateInfoNVBuilder<'a> { - self.inner.viewport_count = viewport_w_scalings.len() as u32; + self.inner.viewport_count = viewport_w_scalings.len() as _; self.inner.p_viewport_w_scalings = viewport_w_scalings.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineViewportWScalingStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineViewportWScalingStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineViewportWScalingStateCreateInfoNV { self.inner } @@ -22492,6 +24952,8 @@ pub struct PipelineViewportSwizzleStateCreateInfoNVBuilder<'a> { inner: PipelineViewportSwizzleStateCreateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineViewportSwizzleStateCreateInfoNV {} +unsafe impl ExtendsPipelineViewportStateCreateInfo for PipelineViewportSwizzleStateCreateInfoNV {} impl<'a> ::std::ops::Deref for PipelineViewportSwizzleStateCreateInfoNVBuilder<'a> { type Target = PipelineViewportSwizzleStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -22510,10 +24972,17 @@ impl<'a> PipelineViewportSwizzleStateCreateInfoNVBuilder<'a> { mut self, viewport_swizzles: &'a [ViewportSwizzleNV], ) -> PipelineViewportSwizzleStateCreateInfoNVBuilder<'a> { - self.inner.viewport_count = viewport_swizzles.len() as u32; + self.inner.viewport_count = viewport_swizzles.len() as _; self.inner.p_viewport_swizzles = viewport_swizzles.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineViewportSwizzleStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineViewportSwizzleStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineViewportSwizzleStateCreateInfoNV { self.inner } @@ -22546,6 +25015,8 @@ pub struct PhysicalDeviceDiscardRectanglePropertiesEXTBuilder<'a> { inner: PhysicalDeviceDiscardRectanglePropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceDiscardRectanglePropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceDiscardRectanglePropertiesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceDiscardRectanglePropertiesEXTBuilder<'a> { type Target = PhysicalDeviceDiscardRectanglePropertiesEXT; fn deref(&self) -> &Self::Target { @@ -22560,6 +25031,16 @@ impl<'a> PhysicalDeviceDiscardRectanglePropertiesEXTBuilder<'a> { self.inner.max_discard_rectangles = max_discard_rectangles; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceDiscardRectanglePropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceDiscardRectanglePropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceDiscardRectanglePropertiesEXT { self.inner } @@ -22598,6 +25079,8 @@ pub struct PipelineDiscardRectangleStateCreateInfoEXTBuilder<'a> { inner: PipelineDiscardRectangleStateCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineDiscardRectangleStateCreateInfoEXT {} +unsafe impl ExtendsGraphicsPipelineCreateInfo for PipelineDiscardRectangleStateCreateInfoEXT {} impl<'a> ::std::ops::Deref for PipelineDiscardRectangleStateCreateInfoEXTBuilder<'a> { type Target = PipelineDiscardRectangleStateCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -22623,10 +25106,17 @@ impl<'a> PipelineDiscardRectangleStateCreateInfoEXTBuilder<'a> { mut self, discard_rectangles: &'a [Rect2D], ) -> PipelineDiscardRectangleStateCreateInfoEXTBuilder<'a> { - self.inner.discard_rectangle_count = discard_rectangles.len() as u32; + self.inner.discard_rectangle_count = discard_rectangles.len() as _; self.inner.p_discard_rectangles = discard_rectangles.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineDiscardRectangleStateCreateInfoEXTBuilder<'a> + where + T: ExtendsPipelineDiscardRectangleStateCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineDiscardRectangleStateCreateInfoEXT { self.inner } @@ -22659,6 +25149,11 @@ pub struct PhysicalDeviceMultiviewPerViewAttributesPropertiesNVXBuilder<'a> { inner: PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, marker: ::std::marker::PhantomData<&'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 { @@ -22668,9 +25163,19 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceMultiviewPerViewAttributesPropertie impl<'a> PhysicalDeviceMultiviewPerViewAttributesPropertiesNVXBuilder<'a> { pub fn per_view_position_all_components( mut self, - per_view_position_all_components: Bool32, + per_view_position_all_components: bool, ) -> PhysicalDeviceMultiviewPerViewAttributesPropertiesNVXBuilder<'a> { - self.inner.per_view_position_all_components = per_view_position_all_components; + self.inner.per_view_position_all_components = per_view_position_all_components.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceMultiviewPerViewAttributesPropertiesNVXBuilder<'a> + where + T: ExtendsPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { @@ -22755,6 +25260,8 @@ pub struct RenderPassInputAttachmentAspectCreateInfoBuilder<'a> { inner: RenderPassInputAttachmentAspectCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsRenderPassInputAttachmentAspectCreateInfo {} +unsafe impl ExtendsRenderPassCreateInfo for RenderPassInputAttachmentAspectCreateInfo {} impl<'a> ::std::ops::Deref for RenderPassInputAttachmentAspectCreateInfoBuilder<'a> { type Target = RenderPassInputAttachmentAspectCreateInfo; fn deref(&self) -> &Self::Target { @@ -22766,10 +25273,17 @@ impl<'a> RenderPassInputAttachmentAspectCreateInfoBuilder<'a> { mut self, aspect_references: &'a [InputAttachmentAspectReference], ) -> RenderPassInputAttachmentAspectCreateInfoBuilder<'a> { - self.inner.aspect_reference_count = aspect_references.len() as u32; + self.inner.aspect_reference_count = aspect_references.len() as _; self.inner.p_aspect_references = aspect_references.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> RenderPassInputAttachmentAspectCreateInfoBuilder<'a> + where + T: ExtendsRenderPassInputAttachmentAspectCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> RenderPassInputAttachmentAspectCreateInfo { self.inner } @@ -22802,6 +25316,7 @@ pub struct PhysicalDeviceSurfaceInfo2KHRBuilder<'a> { inner: PhysicalDeviceSurfaceInfo2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceSurfaceInfo2KHR {} impl<'a> ::std::ops::Deref for PhysicalDeviceSurfaceInfo2KHRBuilder<'a> { type Target = PhysicalDeviceSurfaceInfo2KHR; fn deref(&self) -> &Self::Target { @@ -22813,6 +25328,13 @@ impl<'a> PhysicalDeviceSurfaceInfo2KHRBuilder<'a> { self.inner.surface = surface; self } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceSurfaceInfo2KHRBuilder<'a> + where + T: ExtendsPhysicalDeviceSurfaceInfo2KHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PhysicalDeviceSurfaceInfo2KHR { self.inner } @@ -22845,6 +25367,7 @@ pub struct SurfaceCapabilities2KHRBuilder<'a> { inner: SurfaceCapabilities2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSurfaceCapabilities2KHR {} impl<'a> ::std::ops::Deref for SurfaceCapabilities2KHRBuilder<'a> { type Target = SurfaceCapabilities2KHR; fn deref(&self) -> &Self::Target { @@ -22859,6 +25382,13 @@ impl<'a> SurfaceCapabilities2KHRBuilder<'a> { self.inner.surface_capabilities = surface_capabilities; self } + pub fn next(mut self, next: &'a mut T) -> SurfaceCapabilities2KHRBuilder<'a> + where + T: ExtendsSurfaceCapabilities2KHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> SurfaceCapabilities2KHR { self.inner } @@ -22891,6 +25421,7 @@ pub struct SurfaceFormat2KHRBuilder<'a> { inner: SurfaceFormat2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSurfaceFormat2KHR {} impl<'a> ::std::ops::Deref for SurfaceFormat2KHRBuilder<'a> { type Target = SurfaceFormat2KHR; fn deref(&self) -> &Self::Target { @@ -22905,6 +25436,13 @@ impl<'a> SurfaceFormat2KHRBuilder<'a> { self.inner.surface_format = surface_format; self } + pub fn next(mut self, next: &'a mut T) -> SurfaceFormat2KHRBuilder<'a> + where + T: ExtendsSurfaceFormat2KHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> SurfaceFormat2KHR { self.inner } @@ -22937,6 +25475,7 @@ pub struct DisplayProperties2KHRBuilder<'a> { inner: DisplayProperties2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayProperties2KHR {} impl<'a> ::std::ops::Deref for DisplayProperties2KHRBuilder<'a> { type Target = DisplayProperties2KHR; fn deref(&self) -> &Self::Target { @@ -22951,6 +25490,13 @@ impl<'a> DisplayProperties2KHRBuilder<'a> { self.inner.display_properties = display_properties; self } + pub fn next(mut self, next: &'a mut T) -> DisplayProperties2KHRBuilder<'a> + where + T: ExtendsDisplayProperties2KHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> DisplayProperties2KHR { self.inner } @@ -22983,6 +25529,7 @@ pub struct DisplayPlaneProperties2KHRBuilder<'a> { inner: DisplayPlaneProperties2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayPlaneProperties2KHR {} impl<'a> ::std::ops::Deref for DisplayPlaneProperties2KHRBuilder<'a> { type Target = DisplayPlaneProperties2KHR; fn deref(&self) -> &Self::Target { @@ -22997,6 +25544,13 @@ impl<'a> DisplayPlaneProperties2KHRBuilder<'a> { self.inner.display_plane_properties = display_plane_properties; self } + pub fn next(mut self, next: &'a mut T) -> DisplayPlaneProperties2KHRBuilder<'a> + where + T: ExtendsDisplayPlaneProperties2KHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> DisplayPlaneProperties2KHR { self.inner } @@ -23029,6 +25583,7 @@ pub struct DisplayModeProperties2KHRBuilder<'a> { inner: DisplayModeProperties2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayModeProperties2KHR {} impl<'a> ::std::ops::Deref for DisplayModeProperties2KHRBuilder<'a> { type Target = DisplayModeProperties2KHR; fn deref(&self) -> &Self::Target { @@ -23043,6 +25598,13 @@ impl<'a> DisplayModeProperties2KHRBuilder<'a> { self.inner.display_mode_properties = display_mode_properties; self } + pub fn next(mut self, next: &'a mut T) -> DisplayModeProperties2KHRBuilder<'a> + where + T: ExtendsDisplayModeProperties2KHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> DisplayModeProperties2KHR { self.inner } @@ -23077,6 +25639,7 @@ pub struct DisplayPlaneInfo2KHRBuilder<'a> { inner: DisplayPlaneInfo2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayPlaneInfo2KHR {} impl<'a> ::std::ops::Deref for DisplayPlaneInfo2KHRBuilder<'a> { type Target = DisplayPlaneInfo2KHR; fn deref(&self) -> &Self::Target { @@ -23092,6 +25655,13 @@ impl<'a> DisplayPlaneInfo2KHRBuilder<'a> { self.inner.plane_index = plane_index; self } + pub fn next(mut self, next: &'a T) -> DisplayPlaneInfo2KHRBuilder<'a> + where + T: ExtendsDisplayPlaneInfo2KHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DisplayPlaneInfo2KHR { self.inner } @@ -23124,6 +25694,7 @@ pub struct DisplayPlaneCapabilities2KHRBuilder<'a> { inner: DisplayPlaneCapabilities2KHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDisplayPlaneCapabilities2KHR {} impl<'a> ::std::ops::Deref for DisplayPlaneCapabilities2KHRBuilder<'a> { type Target = DisplayPlaneCapabilities2KHR; fn deref(&self) -> &Self::Target { @@ -23138,6 +25709,13 @@ impl<'a> DisplayPlaneCapabilities2KHRBuilder<'a> { self.inner.capabilities = capabilities; self } + pub fn next(mut self, next: &'a mut T) -> DisplayPlaneCapabilities2KHRBuilder<'a> + where + T: ExtendsDisplayPlaneCapabilities2KHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> DisplayPlaneCapabilities2KHR { self.inner } @@ -23170,6 +25748,8 @@ pub struct SharedPresentSurfaceCapabilitiesKHRBuilder<'a> { inner: SharedPresentSurfaceCapabilitiesKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSharedPresentSurfaceCapabilitiesKHR {} +unsafe impl ExtendsSurfaceCapabilities2KHR for SharedPresentSurfaceCapabilitiesKHR {} impl<'a> ::std::ops::Deref for SharedPresentSurfaceCapabilitiesKHRBuilder<'a> { type Target = SharedPresentSurfaceCapabilitiesKHR; fn deref(&self) -> &Self::Target { @@ -23184,6 +25764,13 @@ impl<'a> SharedPresentSurfaceCapabilitiesKHRBuilder<'a> { self.inner.shared_present_supported_usage_flags = shared_present_supported_usage_flags; self } + pub fn next(mut self, next: &'a mut T) -> SharedPresentSurfaceCapabilitiesKHRBuilder<'a> + where + T: ExtendsSharedPresentSurfaceCapabilitiesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> SharedPresentSurfaceCapabilitiesKHR { self.inner } @@ -23222,6 +25809,9 @@ pub struct PhysicalDevice16BitStorageFeaturesBuilder<'a> { inner: PhysicalDevice16BitStorageFeatures, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDevice16BitStorageFeatures {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevice16BitStorageFeatures {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDevice16BitStorageFeatures {} impl<'a> ::std::ops::Deref for PhysicalDevice16BitStorageFeaturesBuilder<'a> { type Target = PhysicalDevice16BitStorageFeatures; fn deref(&self) -> &Self::Target { @@ -23231,31 +25821,38 @@ impl<'a> ::std::ops::Deref for PhysicalDevice16BitStorageFeaturesBuilder<'a> { impl<'a> PhysicalDevice16BitStorageFeaturesBuilder<'a> { pub fn storage_buffer16_bit_access( mut self, - storage_buffer16_bit_access: Bool32, + storage_buffer16_bit_access: bool, ) -> PhysicalDevice16BitStorageFeaturesBuilder<'a> { - self.inner.storage_buffer16_bit_access = storage_buffer16_bit_access; + self.inner.storage_buffer16_bit_access = storage_buffer16_bit_access.into(); self } pub fn uniform_and_storage_buffer16_bit_access( mut self, - uniform_and_storage_buffer16_bit_access: Bool32, + uniform_and_storage_buffer16_bit_access: bool, ) -> PhysicalDevice16BitStorageFeaturesBuilder<'a> { self.inner.uniform_and_storage_buffer16_bit_access = - uniform_and_storage_buffer16_bit_access; + uniform_and_storage_buffer16_bit_access.into(); self } pub fn storage_push_constant16( mut self, - storage_push_constant16: Bool32, + storage_push_constant16: bool, ) -> PhysicalDevice16BitStorageFeaturesBuilder<'a> { - self.inner.storage_push_constant16 = storage_push_constant16; + self.inner.storage_push_constant16 = storage_push_constant16.into(); self } pub fn storage_input_output16( mut self, - storage_input_output16: Bool32, + storage_input_output16: bool, ) -> PhysicalDevice16BitStorageFeaturesBuilder<'a> { - self.inner.storage_input_output16 = storage_input_output16; + self.inner.storage_input_output16 = storage_input_output16.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDevice16BitStorageFeaturesBuilder<'a> + where + T: ExtendsPhysicalDevice16BitStorageFeatures, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDevice16BitStorageFeatures { @@ -23296,6 +25893,8 @@ pub struct PhysicalDeviceSubgroupPropertiesBuilder<'a> { inner: PhysicalDeviceSubgroupProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceSubgroupProperties {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceSubgroupProperties {} impl<'a> ::std::ops::Deref for PhysicalDeviceSubgroupPropertiesBuilder<'a> { type Target = PhysicalDeviceSubgroupProperties; fn deref(&self) -> &Self::Target { @@ -23326,9 +25925,16 @@ impl<'a> PhysicalDeviceSubgroupPropertiesBuilder<'a> { } pub fn quad_operations_in_all_stages( mut self, - quad_operations_in_all_stages: Bool32, + quad_operations_in_all_stages: bool, ) -> PhysicalDeviceSubgroupPropertiesBuilder<'a> { - self.inner.quad_operations_in_all_stages = quad_operations_in_all_stages; + self.inner.quad_operations_in_all_stages = quad_operations_in_all_stages.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceSubgroupPropertiesBuilder<'a> + where + T: ExtendsPhysicalDeviceSubgroupProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceSubgroupProperties { @@ -23363,6 +25969,7 @@ pub struct BufferMemoryRequirementsInfo2Builder<'a> { inner: BufferMemoryRequirementsInfo2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBufferMemoryRequirementsInfo2 {} impl<'a> ::std::ops::Deref for BufferMemoryRequirementsInfo2Builder<'a> { type Target = BufferMemoryRequirementsInfo2; fn deref(&self) -> &Self::Target { @@ -23374,6 +25981,13 @@ impl<'a> BufferMemoryRequirementsInfo2Builder<'a> { self.inner.buffer = buffer; self } + pub fn next(mut self, next: &'a T) -> BufferMemoryRequirementsInfo2Builder<'a> + where + T: ExtendsBufferMemoryRequirementsInfo2, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BufferMemoryRequirementsInfo2 { self.inner } @@ -23406,6 +26020,7 @@ pub struct ImageMemoryRequirementsInfo2Builder<'a> { inner: ImageMemoryRequirementsInfo2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageMemoryRequirementsInfo2 {} impl<'a> ::std::ops::Deref for ImageMemoryRequirementsInfo2Builder<'a> { type Target = ImageMemoryRequirementsInfo2; fn deref(&self) -> &Self::Target { @@ -23417,6 +26032,13 @@ impl<'a> ImageMemoryRequirementsInfo2Builder<'a> { self.inner.image = image; self } + pub fn next(mut self, next: &'a T) -> ImageMemoryRequirementsInfo2Builder<'a> + where + T: ExtendsImageMemoryRequirementsInfo2, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageMemoryRequirementsInfo2 { self.inner } @@ -23449,6 +26071,7 @@ pub struct ImageSparseMemoryRequirementsInfo2Builder<'a> { inner: ImageSparseMemoryRequirementsInfo2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageSparseMemoryRequirementsInfo2 {} impl<'a> ::std::ops::Deref for ImageSparseMemoryRequirementsInfo2Builder<'a> { type Target = ImageSparseMemoryRequirementsInfo2; fn deref(&self) -> &Self::Target { @@ -23460,6 +26083,13 @@ impl<'a> ImageSparseMemoryRequirementsInfo2Builder<'a> { self.inner.image = image; self } + pub fn next(mut self, next: &'a T) -> ImageSparseMemoryRequirementsInfo2Builder<'a> + where + T: ExtendsImageSparseMemoryRequirementsInfo2, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageSparseMemoryRequirementsInfo2 { self.inner } @@ -23492,6 +26122,7 @@ pub struct MemoryRequirements2Builder<'a> { inner: MemoryRequirements2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryRequirements2 {} impl<'a> ::std::ops::Deref for MemoryRequirements2Builder<'a> { type Target = MemoryRequirements2; fn deref(&self) -> &Self::Target { @@ -23506,6 +26137,13 @@ impl<'a> MemoryRequirements2Builder<'a> { self.inner.memory_requirements = memory_requirements; self } + pub fn next(mut self, next: &'a mut T) -> MemoryRequirements2Builder<'a> + where + T: ExtendsMemoryRequirements2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> MemoryRequirements2 { self.inner } @@ -23538,6 +26176,7 @@ pub struct SparseImageMemoryRequirements2Builder<'a> { inner: SparseImageMemoryRequirements2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSparseImageMemoryRequirements2 {} impl<'a> ::std::ops::Deref for SparseImageMemoryRequirements2Builder<'a> { type Target = SparseImageMemoryRequirements2; fn deref(&self) -> &Self::Target { @@ -23552,6 +26191,13 @@ impl<'a> SparseImageMemoryRequirements2Builder<'a> { self.inner.memory_requirements = memory_requirements; self } + pub fn next(mut self, next: &'a mut T) -> SparseImageMemoryRequirements2Builder<'a> + where + T: ExtendsSparseImageMemoryRequirements2, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> SparseImageMemoryRequirements2 { self.inner } @@ -23584,6 +26230,8 @@ pub struct PhysicalDevicePointClippingPropertiesBuilder<'a> { inner: PhysicalDevicePointClippingProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDevicePointClippingProperties {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePointClippingProperties {} impl<'a> ::std::ops::Deref for PhysicalDevicePointClippingPropertiesBuilder<'a> { type Target = PhysicalDevicePointClippingProperties; fn deref(&self) -> &Self::Target { @@ -23598,6 +26246,13 @@ impl<'a> PhysicalDevicePointClippingPropertiesBuilder<'a> { self.inner.point_clipping_behavior = point_clipping_behavior; self } + pub fn next(mut self, next: &'a mut T) -> PhysicalDevicePointClippingPropertiesBuilder<'a> + where + T: ExtendsPhysicalDevicePointClippingProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDevicePointClippingProperties { self.inner } @@ -23632,6 +26287,8 @@ pub struct MemoryDedicatedRequirementsBuilder<'a> { inner: MemoryDedicatedRequirements, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryDedicatedRequirements {} +unsafe impl ExtendsMemoryRequirements2 for MemoryDedicatedRequirements {} impl<'a> ::std::ops::Deref for MemoryDedicatedRequirementsBuilder<'a> { type Target = MemoryDedicatedRequirements; fn deref(&self) -> &Self::Target { @@ -23641,16 +26298,23 @@ impl<'a> ::std::ops::Deref for MemoryDedicatedRequirementsBuilder<'a> { impl<'a> MemoryDedicatedRequirementsBuilder<'a> { pub fn prefers_dedicated_allocation( mut self, - prefers_dedicated_allocation: Bool32, + prefers_dedicated_allocation: bool, ) -> MemoryDedicatedRequirementsBuilder<'a> { - self.inner.prefers_dedicated_allocation = prefers_dedicated_allocation; + self.inner.prefers_dedicated_allocation = prefers_dedicated_allocation.into(); self } pub fn requires_dedicated_allocation( mut self, - requires_dedicated_allocation: Bool32, + requires_dedicated_allocation: bool, ) -> MemoryDedicatedRequirementsBuilder<'a> { - self.inner.requires_dedicated_allocation = requires_dedicated_allocation; + self.inner.requires_dedicated_allocation = requires_dedicated_allocation.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> MemoryDedicatedRequirementsBuilder<'a> + where + T: ExtendsMemoryDedicatedRequirements, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> MemoryDedicatedRequirements { @@ -23687,6 +26351,8 @@ pub struct MemoryDedicatedAllocateInfoBuilder<'a> { inner: MemoryDedicatedAllocateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryDedicatedAllocateInfo {} +unsafe impl ExtendsMemoryAllocateInfo for MemoryDedicatedAllocateInfo {} impl<'a> ::std::ops::Deref for MemoryDedicatedAllocateInfoBuilder<'a> { type Target = MemoryDedicatedAllocateInfo; fn deref(&self) -> &Self::Target { @@ -23702,6 +26368,13 @@ impl<'a> MemoryDedicatedAllocateInfoBuilder<'a> { self.inner.buffer = buffer; self } + pub fn next(mut self, next: &'a T) -> MemoryDedicatedAllocateInfoBuilder<'a> + where + T: ExtendsMemoryDedicatedAllocateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MemoryDedicatedAllocateInfo { self.inner } @@ -23734,6 +26407,8 @@ pub struct ImageViewUsageCreateInfoBuilder<'a> { inner: ImageViewUsageCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageViewUsageCreateInfo {} +unsafe impl ExtendsImageViewCreateInfo for ImageViewUsageCreateInfo {} impl<'a> ::std::ops::Deref for ImageViewUsageCreateInfoBuilder<'a> { type Target = ImageViewUsageCreateInfo; fn deref(&self) -> &Self::Target { @@ -23745,6 +26420,13 @@ impl<'a> ImageViewUsageCreateInfoBuilder<'a> { self.inner.usage = usage; self } + pub fn next(mut self, next: &'a T) -> ImageViewUsageCreateInfoBuilder<'a> + where + T: ExtendsImageViewUsageCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageViewUsageCreateInfo { self.inner } @@ -23777,6 +26459,11 @@ pub struct PipelineTessellationDomainOriginStateCreateInfoBuilder<'a> { inner: PipelineTessellationDomainOriginStateCreateInfo, marker: ::std::marker::PhantomData<&'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 { @@ -23791,6 +26478,16 @@ impl<'a> PipelineTessellationDomainOriginStateCreateInfoBuilder<'a> { self.inner.domain_origin = domain_origin; self } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineTessellationDomainOriginStateCreateInfoBuilder<'a> + where + T: ExtendsPipelineTessellationDomainOriginStateCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineTessellationDomainOriginStateCreateInfo { self.inner } @@ -23823,6 +26520,9 @@ pub struct SamplerYcbcrConversionInfoBuilder<'a> { inner: SamplerYcbcrConversionInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSamplerYcbcrConversionInfo {} +unsafe impl ExtendsSamplerCreateInfo for SamplerYcbcrConversionInfo {} +unsafe impl ExtendsImageViewCreateInfo for SamplerYcbcrConversionInfo {} impl<'a> ::std::ops::Deref for SamplerYcbcrConversionInfoBuilder<'a> { type Target = SamplerYcbcrConversionInfo; fn deref(&self) -> &Self::Target { @@ -23837,6 +26537,13 @@ impl<'a> SamplerYcbcrConversionInfoBuilder<'a> { self.inner.conversion = conversion; self } + pub fn next(mut self, next: &'a T) -> SamplerYcbcrConversionInfoBuilder<'a> + where + T: ExtendsSamplerYcbcrConversionInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SamplerYcbcrConversionInfo { self.inner } @@ -23883,6 +26590,7 @@ pub struct SamplerYcbcrConversionCreateInfoBuilder<'a> { inner: SamplerYcbcrConversionCreateInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSamplerYcbcrConversionCreateInfo {} impl<'a> ::std::ops::Deref for SamplerYcbcrConversionCreateInfoBuilder<'a> { type Target = SamplerYcbcrConversionCreateInfo; fn deref(&self) -> &Self::Target { @@ -23938,9 +26646,16 @@ impl<'a> SamplerYcbcrConversionCreateInfoBuilder<'a> { } pub fn force_explicit_reconstruction( mut self, - force_explicit_reconstruction: Bool32, + force_explicit_reconstruction: bool, ) -> SamplerYcbcrConversionCreateInfoBuilder<'a> { - self.inner.force_explicit_reconstruction = force_explicit_reconstruction; + self.inner.force_explicit_reconstruction = force_explicit_reconstruction.into(); + self + } + pub fn next(mut self, next: &'a T) -> SamplerYcbcrConversionCreateInfoBuilder<'a> + where + T: ExtendsSamplerYcbcrConversionCreateInfo, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> SamplerYcbcrConversionCreateInfo { @@ -23975,6 +26690,8 @@ pub struct BindImagePlaneMemoryInfoBuilder<'a> { inner: BindImagePlaneMemoryInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsBindImagePlaneMemoryInfo {} +unsafe impl ExtendsBindImageMemoryInfo for BindImagePlaneMemoryInfo {} impl<'a> ::std::ops::Deref for BindImagePlaneMemoryInfoBuilder<'a> { type Target = BindImagePlaneMemoryInfo; fn deref(&self) -> &Self::Target { @@ -23989,6 +26706,13 @@ impl<'a> BindImagePlaneMemoryInfoBuilder<'a> { self.inner.plane_aspect = plane_aspect; self } + pub fn next(mut self, next: &'a T) -> BindImagePlaneMemoryInfoBuilder<'a> + where + T: ExtendsBindImagePlaneMemoryInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> BindImagePlaneMemoryInfo { self.inner } @@ -24021,6 +26745,8 @@ pub struct ImagePlaneMemoryRequirementsInfoBuilder<'a> { inner: ImagePlaneMemoryRequirementsInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImagePlaneMemoryRequirementsInfo {} +unsafe impl ExtendsImageMemoryRequirementsInfo2 for ImagePlaneMemoryRequirementsInfo {} impl<'a> ::std::ops::Deref for ImagePlaneMemoryRequirementsInfoBuilder<'a> { type Target = ImagePlaneMemoryRequirementsInfo; fn deref(&self) -> &Self::Target { @@ -24035,6 +26761,13 @@ impl<'a> ImagePlaneMemoryRequirementsInfoBuilder<'a> { self.inner.plane_aspect = plane_aspect; self } + pub fn next(mut self, next: &'a T) -> ImagePlaneMemoryRequirementsInfoBuilder<'a> + where + T: ExtendsImagePlaneMemoryRequirementsInfo, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImagePlaneMemoryRequirementsInfo { self.inner } @@ -24067,6 +26800,9 @@ pub struct PhysicalDeviceSamplerYcbcrConversionFeaturesBuilder<'a> { inner: PhysicalDeviceSamplerYcbcrConversionFeatures, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceSamplerYcbcrConversionFeatures {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceSamplerYcbcrConversionFeatures {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceSamplerYcbcrConversionFeatures {} impl<'a> ::std::ops::Deref for PhysicalDeviceSamplerYcbcrConversionFeaturesBuilder<'a> { type Target = PhysicalDeviceSamplerYcbcrConversionFeatures; fn deref(&self) -> &Self::Target { @@ -24076,9 +26812,19 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceSamplerYcbcrConversionFeaturesBuild impl<'a> PhysicalDeviceSamplerYcbcrConversionFeaturesBuilder<'a> { pub fn sampler_ycbcr_conversion( mut self, - sampler_ycbcr_conversion: Bool32, + sampler_ycbcr_conversion: bool, ) -> PhysicalDeviceSamplerYcbcrConversionFeaturesBuilder<'a> { - self.inner.sampler_ycbcr_conversion = sampler_ycbcr_conversion; + self.inner.sampler_ycbcr_conversion = sampler_ycbcr_conversion.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceSamplerYcbcrConversionFeaturesBuilder<'a> + where + T: ExtendsPhysicalDeviceSamplerYcbcrConversionFeatures, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceSamplerYcbcrConversionFeatures { @@ -24113,6 +26859,8 @@ pub struct SamplerYcbcrConversionImageFormatPropertiesBuilder<'a> { inner: SamplerYcbcrConversionImageFormatProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSamplerYcbcrConversionImageFormatProperties {} +unsafe impl ExtendsImageFormatProperties2 for SamplerYcbcrConversionImageFormatProperties {} impl<'a> ::std::ops::Deref for SamplerYcbcrConversionImageFormatPropertiesBuilder<'a> { type Target = SamplerYcbcrConversionImageFormatProperties; fn deref(&self) -> &Self::Target { @@ -24128,6 +26876,16 @@ impl<'a> SamplerYcbcrConversionImageFormatPropertiesBuilder<'a> { combined_image_sampler_descriptor_count; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> SamplerYcbcrConversionImageFormatPropertiesBuilder<'a> + where + T: ExtendsSamplerYcbcrConversionImageFormatProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> SamplerYcbcrConversionImageFormatProperties { self.inner } @@ -24160,6 +26918,8 @@ pub struct TextureLODGatherFormatPropertiesAMDBuilder<'a> { inner: TextureLODGatherFormatPropertiesAMD, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsTextureLODGatherFormatPropertiesAMD {} +unsafe impl ExtendsImageFormatProperties2 for TextureLODGatherFormatPropertiesAMD {} impl<'a> ::std::ops::Deref for TextureLODGatherFormatPropertiesAMDBuilder<'a> { type Target = TextureLODGatherFormatPropertiesAMD; fn deref(&self) -> &Self::Target { @@ -24169,9 +26929,17 @@ impl<'a> ::std::ops::Deref for TextureLODGatherFormatPropertiesAMDBuilder<'a> { impl<'a> TextureLODGatherFormatPropertiesAMDBuilder<'a> { pub fn supports_texture_gather_lod_bias_amd( mut self, - supports_texture_gather_lod_bias_amd: Bool32, + supports_texture_gather_lod_bias_amd: bool, ) -> TextureLODGatherFormatPropertiesAMDBuilder<'a> { - self.inner.supports_texture_gather_lod_bias_amd = supports_texture_gather_lod_bias_amd; + self.inner.supports_texture_gather_lod_bias_amd = + supports_texture_gather_lod_bias_amd.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> TextureLODGatherFormatPropertiesAMDBuilder<'a> + where + T: ExtendsTextureLODGatherFormatPropertiesAMD, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> TextureLODGatherFormatPropertiesAMD { @@ -24180,6 +26948,72 @@ impl<'a> TextureLODGatherFormatPropertiesAMDBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +pub struct ConditionalRenderingBeginInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub buffer: Buffer, + pub offset: DeviceSize, + pub flags: ConditionalRenderingFlagsEXT, +} +impl ::std::default::Default for ConditionalRenderingBeginInfoEXT { + fn default() -> ConditionalRenderingBeginInfoEXT { + ConditionalRenderingBeginInfoEXT { + s_type: StructureType::CONDITIONAL_RENDERING_BEGIN_INFO_EXT, + p_next: ::std::ptr::null(), + buffer: Buffer::default(), + offset: DeviceSize::default(), + flags: ConditionalRenderingFlagsEXT::default(), + } + } +} +impl ConditionalRenderingBeginInfoEXT { + pub fn builder<'a>() -> ConditionalRenderingBeginInfoEXTBuilder<'a> { + ConditionalRenderingBeginInfoEXTBuilder { + inner: ConditionalRenderingBeginInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ConditionalRenderingBeginInfoEXTBuilder<'a> { + inner: ConditionalRenderingBeginInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsConditionalRenderingBeginInfoEXT {} +impl<'a> ::std::ops::Deref for ConditionalRenderingBeginInfoEXTBuilder<'a> { + type Target = ConditionalRenderingBeginInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ConditionalRenderingBeginInfoEXTBuilder<'a> { + pub fn buffer(mut self, buffer: Buffer) -> ConditionalRenderingBeginInfoEXTBuilder<'a> { + self.inner.buffer = buffer; + self + } + pub fn offset(mut self, offset: DeviceSize) -> ConditionalRenderingBeginInfoEXTBuilder<'a> { + self.inner.offset = offset; + self + } + pub fn flags( + mut self, + flags: ConditionalRenderingFlagsEXT, + ) -> ConditionalRenderingBeginInfoEXTBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn next(mut self, next: &'a T) -> ConditionalRenderingBeginInfoEXTBuilder<'a> + where + T: ExtendsConditionalRenderingBeginInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> ConditionalRenderingBeginInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] pub struct ProtectedSubmitInfo { pub s_type: StructureType, pub p_next: *const c_void, @@ -24206,6 +27040,8 @@ pub struct ProtectedSubmitInfoBuilder<'a> { inner: ProtectedSubmitInfo, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsProtectedSubmitInfo {} +unsafe impl ExtendsSubmitInfo for ProtectedSubmitInfo {} impl<'a> ::std::ops::Deref for ProtectedSubmitInfoBuilder<'a> { type Target = ProtectedSubmitInfo; fn deref(&self) -> &Self::Target { @@ -24213,8 +27049,15 @@ impl<'a> ::std::ops::Deref for ProtectedSubmitInfoBuilder<'a> { } } impl<'a> ProtectedSubmitInfoBuilder<'a> { - pub fn protected_submit(mut self, protected_submit: Bool32) -> ProtectedSubmitInfoBuilder<'a> { - self.inner.protected_submit = protected_submit; + pub fn protected_submit(mut self, protected_submit: bool) -> ProtectedSubmitInfoBuilder<'a> { + self.inner.protected_submit = protected_submit.into(); + self + } + pub fn next(mut self, next: &'a T) -> ProtectedSubmitInfoBuilder<'a> + where + T: ExtendsProtectedSubmitInfo, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> ProtectedSubmitInfo { @@ -24249,6 +27092,9 @@ pub struct PhysicalDeviceProtectedMemoryFeaturesBuilder<'a> { inner: PhysicalDeviceProtectedMemoryFeatures, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceProtectedMemoryFeatures {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceProtectedMemoryFeatures {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceProtectedMemoryFeatures {} impl<'a> ::std::ops::Deref for PhysicalDeviceProtectedMemoryFeaturesBuilder<'a> { type Target = PhysicalDeviceProtectedMemoryFeatures; fn deref(&self) -> &Self::Target { @@ -24258,9 +27104,16 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceProtectedMemoryFeaturesBuilder<'a> impl<'a> PhysicalDeviceProtectedMemoryFeaturesBuilder<'a> { pub fn protected_memory( mut self, - protected_memory: Bool32, + protected_memory: bool, ) -> PhysicalDeviceProtectedMemoryFeaturesBuilder<'a> { - self.inner.protected_memory = protected_memory; + self.inner.protected_memory = protected_memory.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceProtectedMemoryFeaturesBuilder<'a> + where + T: ExtendsPhysicalDeviceProtectedMemoryFeatures, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceProtectedMemoryFeatures { @@ -24295,6 +27148,8 @@ pub struct PhysicalDeviceProtectedMemoryPropertiesBuilder<'a> { inner: PhysicalDeviceProtectedMemoryProperties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceProtectedMemoryProperties {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceProtectedMemoryProperties {} impl<'a> ::std::ops::Deref for PhysicalDeviceProtectedMemoryPropertiesBuilder<'a> { type Target = PhysicalDeviceProtectedMemoryProperties; fn deref(&self) -> &Self::Target { @@ -24304,9 +27159,16 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceProtectedMemoryPropertiesBuilder<'a impl<'a> PhysicalDeviceProtectedMemoryPropertiesBuilder<'a> { pub fn protected_no_fault( mut self, - protected_no_fault: Bool32, + protected_no_fault: bool, ) -> PhysicalDeviceProtectedMemoryPropertiesBuilder<'a> { - self.inner.protected_no_fault = protected_no_fault; + self.inner.protected_no_fault = protected_no_fault.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceProtectedMemoryPropertiesBuilder<'a> + where + T: ExtendsPhysicalDeviceProtectedMemoryProperties, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceProtectedMemoryProperties { @@ -24345,6 +27207,7 @@ pub struct DeviceQueueInfo2Builder<'a> { inner: DeviceQueueInfo2, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceQueueInfo2 {} impl<'a> ::std::ops::Deref for DeviceQueueInfo2Builder<'a> { type Target = DeviceQueueInfo2; fn deref(&self) -> &Self::Target { @@ -24364,6 +27227,13 @@ impl<'a> DeviceQueueInfo2Builder<'a> { self.inner.queue_index = queue_index; self } + pub fn next(mut self, next: &'a T) -> DeviceQueueInfo2Builder<'a> + where + T: ExtendsDeviceQueueInfo2, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceQueueInfo2 { self.inner } @@ -24400,6 +27270,8 @@ pub struct PipelineCoverageToColorStateCreateInfoNVBuilder<'a> { inner: PipelineCoverageToColorStateCreateInfoNV, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPipelineCoverageToColorStateCreateInfoNV {} +unsafe impl ExtendsPipelineMultisampleStateCreateInfo for PipelineCoverageToColorStateCreateInfoNV {} impl<'a> ::std::ops::Deref for PipelineCoverageToColorStateCreateInfoNVBuilder<'a> { type Target = PipelineCoverageToColorStateCreateInfoNV; fn deref(&self) -> &Self::Target { @@ -24416,9 +27288,9 @@ impl<'a> PipelineCoverageToColorStateCreateInfoNVBuilder<'a> { } pub fn coverage_to_color_enable( mut self, - coverage_to_color_enable: Bool32, + coverage_to_color_enable: bool, ) -> PipelineCoverageToColorStateCreateInfoNVBuilder<'a> { - self.inner.coverage_to_color_enable = coverage_to_color_enable; + self.inner.coverage_to_color_enable = coverage_to_color_enable.into(); self } pub fn coverage_to_color_location( @@ -24428,6 +27300,13 @@ impl<'a> PipelineCoverageToColorStateCreateInfoNVBuilder<'a> { self.inner.coverage_to_color_location = coverage_to_color_location; self } + pub fn next(mut self, next: &'a T) -> PipelineCoverageToColorStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineCoverageToColorStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineCoverageToColorStateCreateInfoNV { self.inner } @@ -24462,6 +27341,8 @@ pub struct PhysicalDeviceSamplerFilterMinmaxPropertiesEXTBuilder<'a> { inner: PhysicalDeviceSamplerFilterMinmaxPropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceSamplerFilterMinmaxPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceSamplerFilterMinmaxPropertiesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceSamplerFilterMinmaxPropertiesEXTBuilder<'a> { type Target = PhysicalDeviceSamplerFilterMinmaxPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -24471,16 +27352,28 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceSamplerFilterMinmaxPropertiesEXTBui impl<'a> PhysicalDeviceSamplerFilterMinmaxPropertiesEXTBuilder<'a> { pub fn filter_minmax_single_component_formats( mut self, - filter_minmax_single_component_formats: Bool32, + filter_minmax_single_component_formats: bool, ) -> PhysicalDeviceSamplerFilterMinmaxPropertiesEXTBuilder<'a> { - self.inner.filter_minmax_single_component_formats = filter_minmax_single_component_formats; + self.inner.filter_minmax_single_component_formats = + filter_minmax_single_component_formats.into(); self } pub fn filter_minmax_image_component_mapping( mut self, - filter_minmax_image_component_mapping: Bool32, + filter_minmax_image_component_mapping: bool, ) -> PhysicalDeviceSamplerFilterMinmaxPropertiesEXTBuilder<'a> { - self.inner.filter_minmax_image_component_mapping = filter_minmax_image_component_mapping; + self.inner.filter_minmax_image_component_mapping = + filter_minmax_image_component_mapping.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceSamplerFilterMinmaxPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceSamplerFilterMinmaxPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceSamplerFilterMinmaxPropertiesEXT { @@ -24558,6 +27451,8 @@ pub struct SampleLocationsInfoEXTBuilder<'a> { inner: SampleLocationsInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSampleLocationsInfoEXT {} +unsafe impl ExtendsImageMemoryBarrier for SampleLocationsInfoEXT {} impl<'a> ::std::ops::Deref for SampleLocationsInfoEXTBuilder<'a> { type Target = SampleLocationsInfoEXT; fn deref(&self) -> &Self::Target { @@ -24583,10 +27478,17 @@ impl<'a> SampleLocationsInfoEXTBuilder<'a> { mut self, sample_locations: &'a [SampleLocationEXT], ) -> SampleLocationsInfoEXTBuilder<'a> { - self.inner.sample_locations_count = sample_locations.len() as u32; + self.inner.sample_locations_count = sample_locations.len() as _; self.inner.p_sample_locations = sample_locations.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> SampleLocationsInfoEXTBuilder<'a> + where + T: ExtendsSampleLocationsInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SampleLocationsInfoEXT { self.inner } @@ -24708,6 +27610,8 @@ pub struct RenderPassSampleLocationsBeginInfoEXTBuilder<'a> { inner: RenderPassSampleLocationsBeginInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsRenderPassSampleLocationsBeginInfoEXT {} +unsafe impl ExtendsRenderPassBeginInfo for RenderPassSampleLocationsBeginInfoEXT {} impl<'a> ::std::ops::Deref for RenderPassSampleLocationsBeginInfoEXTBuilder<'a> { type Target = RenderPassSampleLocationsBeginInfoEXT; fn deref(&self) -> &Self::Target { @@ -24720,7 +27624,7 @@ impl<'a> RenderPassSampleLocationsBeginInfoEXTBuilder<'a> { attachment_initial_sample_locations: &'a [AttachmentSampleLocationsEXT], ) -> RenderPassSampleLocationsBeginInfoEXTBuilder<'a> { self.inner.attachment_initial_sample_locations_count = - attachment_initial_sample_locations.len() as u32; + attachment_initial_sample_locations.len() as _; self.inner.p_attachment_initial_sample_locations = attachment_initial_sample_locations.as_ptr(); self @@ -24729,10 +27633,17 @@ impl<'a> RenderPassSampleLocationsBeginInfoEXTBuilder<'a> { mut self, post_subpass_sample_locations: &'a [SubpassSampleLocationsEXT], ) -> RenderPassSampleLocationsBeginInfoEXTBuilder<'a> { - self.inner.post_subpass_sample_locations_count = post_subpass_sample_locations.len() as u32; + self.inner.post_subpass_sample_locations_count = post_subpass_sample_locations.len() as _; self.inner.p_post_subpass_sample_locations = post_subpass_sample_locations.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> RenderPassSampleLocationsBeginInfoEXTBuilder<'a> + where + T: ExtendsRenderPassSampleLocationsBeginInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> RenderPassSampleLocationsBeginInfoEXT { self.inner } @@ -24767,6 +27678,11 @@ pub struct PipelineSampleLocationsStateCreateInfoEXTBuilder<'a> { inner: PipelineSampleLocationsStateCreateInfoEXT, marker: ::std::marker::PhantomData<&'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 { @@ -24776,9 +27692,9 @@ impl<'a> ::std::ops::Deref for PipelineSampleLocationsStateCreateInfoEXTBuilder< impl<'a> PipelineSampleLocationsStateCreateInfoEXTBuilder<'a> { pub fn sample_locations_enable( mut self, - sample_locations_enable: Bool32, + sample_locations_enable: bool, ) -> PipelineSampleLocationsStateCreateInfoEXTBuilder<'a> { - self.inner.sample_locations_enable = sample_locations_enable; + self.inner.sample_locations_enable = sample_locations_enable.into(); self } pub fn sample_locations_info( @@ -24788,6 +27704,13 @@ impl<'a> PipelineSampleLocationsStateCreateInfoEXTBuilder<'a> { self.inner.sample_locations_info = sample_locations_info; self } + pub fn next(mut self, next: &'a T) -> PipelineSampleLocationsStateCreateInfoEXTBuilder<'a> + where + T: ExtendsPipelineSampleLocationsStateCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineSampleLocationsStateCreateInfoEXT { self.inner } @@ -24828,6 +27751,8 @@ pub struct PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> { inner: PhysicalDeviceSampleLocationsPropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceSampleLocationsPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceSampleLocationsPropertiesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> { type Target = PhysicalDeviceSampleLocationsPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -24865,9 +27790,19 @@ impl<'a> PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> { } pub fn variable_sample_locations( mut self, - variable_sample_locations: Bool32, + variable_sample_locations: bool, ) -> PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> { - self.inner.variable_sample_locations = variable_sample_locations; + self.inner.variable_sample_locations = variable_sample_locations.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceSampleLocationsPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceSampleLocationsPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceSampleLocationsPropertiesEXT { @@ -24902,6 +27837,7 @@ pub struct MultisamplePropertiesEXTBuilder<'a> { inner: MultisamplePropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMultisamplePropertiesEXT {} impl<'a> ::std::ops::Deref for MultisamplePropertiesEXTBuilder<'a> { type Target = MultisamplePropertiesEXT; fn deref(&self) -> &Self::Target { @@ -24916,6 +27852,13 @@ impl<'a> MultisamplePropertiesEXTBuilder<'a> { self.inner.max_sample_location_grid_size = max_sample_location_grid_size; self } + pub fn next(mut self, next: &'a mut T) -> MultisamplePropertiesEXTBuilder<'a> + where + T: ExtendsMultisamplePropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> MultisamplePropertiesEXT { self.inner } @@ -24948,6 +27891,8 @@ pub struct SamplerReductionModeCreateInfoEXTBuilder<'a> { inner: SamplerReductionModeCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsSamplerReductionModeCreateInfoEXT {} +unsafe impl ExtendsSamplerCreateInfo for SamplerReductionModeCreateInfoEXT {} impl<'a> ::std::ops::Deref for SamplerReductionModeCreateInfoEXTBuilder<'a> { type Target = SamplerReductionModeCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -24962,6 +27907,13 @@ impl<'a> SamplerReductionModeCreateInfoEXTBuilder<'a> { self.inner.reduction_mode = reduction_mode; self } + pub fn next(mut self, next: &'a T) -> SamplerReductionModeCreateInfoEXTBuilder<'a> + where + T: ExtendsSamplerReductionModeCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> SamplerReductionModeCreateInfoEXT { self.inner } @@ -24994,6 +27946,9 @@ pub struct PhysicalDeviceBlendOperationAdvancedFeaturesEXTBuilder<'a> { inner: PhysicalDeviceBlendOperationAdvancedFeaturesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceBlendOperationAdvancedFeaturesEXT {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceBlendOperationAdvancedFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceBlendOperationAdvancedFeaturesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceBlendOperationAdvancedFeaturesEXTBuilder<'a> { type Target = PhysicalDeviceBlendOperationAdvancedFeaturesEXT; fn deref(&self) -> &Self::Target { @@ -25003,9 +27958,19 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceBlendOperationAdvancedFeaturesEXTBu impl<'a> PhysicalDeviceBlendOperationAdvancedFeaturesEXTBuilder<'a> { pub fn advanced_blend_coherent_operations( mut self, - advanced_blend_coherent_operations: Bool32, + advanced_blend_coherent_operations: bool, ) -> PhysicalDeviceBlendOperationAdvancedFeaturesEXTBuilder<'a> { - self.inner.advanced_blend_coherent_operations = advanced_blend_coherent_operations; + self.inner.advanced_blend_coherent_operations = advanced_blend_coherent_operations.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceBlendOperationAdvancedFeaturesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceBlendOperationAdvancedFeaturesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceBlendOperationAdvancedFeaturesEXT { @@ -25050,6 +28015,8 @@ pub struct PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { inner: PhysicalDeviceBlendOperationAdvancedPropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceBlendOperationAdvancedPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceBlendOperationAdvancedPropertiesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { type Target = PhysicalDeviceBlendOperationAdvancedPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -25066,39 +28033,49 @@ impl<'a> PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { } pub fn advanced_blend_independent_blend( mut self, - advanced_blend_independent_blend: Bool32, + advanced_blend_independent_blend: bool, ) -> PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { - self.inner.advanced_blend_independent_blend = advanced_blend_independent_blend; + self.inner.advanced_blend_independent_blend = advanced_blend_independent_blend.into(); self } pub fn advanced_blend_non_premultiplied_src_color( mut self, - advanced_blend_non_premultiplied_src_color: Bool32, + advanced_blend_non_premultiplied_src_color: bool, ) -> PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { self.inner.advanced_blend_non_premultiplied_src_color = - advanced_blend_non_premultiplied_src_color; + advanced_blend_non_premultiplied_src_color.into(); self } pub fn advanced_blend_non_premultiplied_dst_color( mut self, - advanced_blend_non_premultiplied_dst_color: Bool32, + advanced_blend_non_premultiplied_dst_color: bool, ) -> PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { self.inner.advanced_blend_non_premultiplied_dst_color = - advanced_blend_non_premultiplied_dst_color; + advanced_blend_non_premultiplied_dst_color.into(); self } pub fn advanced_blend_correlated_overlap( mut self, - advanced_blend_correlated_overlap: Bool32, + advanced_blend_correlated_overlap: bool, ) -> PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { - self.inner.advanced_blend_correlated_overlap = advanced_blend_correlated_overlap; + self.inner.advanced_blend_correlated_overlap = advanced_blend_correlated_overlap.into(); self } pub fn advanced_blend_all_operations( mut self, - advanced_blend_all_operations: Bool32, + advanced_blend_all_operations: bool, ) -> PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> { - self.inner.advanced_blend_all_operations = advanced_blend_all_operations; + self.inner.advanced_blend_all_operations = advanced_blend_all_operations.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceBlendOperationAdvancedPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceBlendOperationAdvancedPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceBlendOperationAdvancedPropertiesEXT { @@ -25137,6 +28114,11 @@ pub struct PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> { inner: PipelineColorBlendAdvancedStateCreateInfoEXT, marker: ::std::marker::PhantomData<&'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 { @@ -25146,16 +28128,16 @@ impl<'a> ::std::ops::Deref for PipelineColorBlendAdvancedStateCreateInfoEXTBuild impl<'a> PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> { pub fn src_premultiplied( mut self, - src_premultiplied: Bool32, + src_premultiplied: bool, ) -> PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> { - self.inner.src_premultiplied = src_premultiplied; + self.inner.src_premultiplied = src_premultiplied.into(); self } pub fn dst_premultiplied( mut self, - dst_premultiplied: Bool32, + dst_premultiplied: bool, ) -> PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> { - self.inner.dst_premultiplied = dst_premultiplied; + self.inner.dst_premultiplied = dst_premultiplied.into(); self } pub fn blend_overlap( @@ -25165,12 +28147,302 @@ impl<'a> PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> { self.inner.blend_overlap = blend_overlap; self } + pub fn next(mut self, next: &'a T) -> PipelineColorBlendAdvancedStateCreateInfoEXTBuilder<'a> + where + T: ExtendsPipelineColorBlendAdvancedStateCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineColorBlendAdvancedStateCreateInfoEXT { self.inner } } #[repr(C)] #[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceInlineUniformBlockFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub inline_uniform_block: Bool32, + pub descriptor_binding_inline_uniform_block_update_after_bind: Bool32, +} +impl ::std::default::Default for PhysicalDeviceInlineUniformBlockFeaturesEXT { + fn default() -> PhysicalDeviceInlineUniformBlockFeaturesEXT { + PhysicalDeviceInlineUniformBlockFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + inline_uniform_block: Bool32::default(), + descriptor_binding_inline_uniform_block_update_after_bind: Bool32::default(), + } + } +} +impl PhysicalDeviceInlineUniformBlockFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder<'a> { + PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder { + inner: PhysicalDeviceInlineUniformBlockFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceInlineUniformBlockFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceInlineUniformBlockFeaturesEXT {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceInlineUniformBlockFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceInlineUniformBlockFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceInlineUniformBlockFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder<'a> { + pub fn inline_uniform_block( + mut self, + inline_uniform_block: bool, + ) -> PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder<'a> { + self.inner.inline_uniform_block = inline_uniform_block.into(); + self + } + pub fn descriptor_binding_inline_uniform_block_update_after_bind( + mut self, + descriptor_binding_inline_uniform_block_update_after_bind: bool, + ) -> PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder<'a> { + self.inner + .descriptor_binding_inline_uniform_block_update_after_bind = + descriptor_binding_inline_uniform_block_update_after_bind.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceInlineUniformBlockFeaturesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceInlineUniformBlockFeaturesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceInlineUniformBlockFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceInlineUniformBlockPropertiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_inline_uniform_block_size: u32, + pub max_per_stage_descriptor_inline_uniform_blocks: u32, + pub max_per_stage_descriptor_update_after_bind_inline_uniform_blocks: u32, + pub max_descriptor_set_inline_uniform_blocks: u32, + pub max_descriptor_set_update_after_bind_inline_uniform_blocks: u32, +} +impl ::std::default::Default for PhysicalDeviceInlineUniformBlockPropertiesEXT { + fn default() -> PhysicalDeviceInlineUniformBlockPropertiesEXT { + PhysicalDeviceInlineUniformBlockPropertiesEXT { + s_type: StructureType::PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT, + p_next: ::std::ptr::null_mut(), + max_inline_uniform_block_size: u32::default(), + max_per_stage_descriptor_inline_uniform_blocks: u32::default(), + max_per_stage_descriptor_update_after_bind_inline_uniform_blocks: u32::default(), + max_descriptor_set_inline_uniform_blocks: u32::default(), + max_descriptor_set_update_after_bind_inline_uniform_blocks: u32::default(), + } + } +} +impl PhysicalDeviceInlineUniformBlockPropertiesEXT { + pub fn builder<'a>() -> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder { + inner: PhysicalDeviceInlineUniformBlockPropertiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + inner: PhysicalDeviceInlineUniformBlockPropertiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceInlineUniformBlockPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceInlineUniformBlockPropertiesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + type Target = PhysicalDeviceInlineUniformBlockPropertiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + pub fn max_inline_uniform_block_size( + mut self, + max_inline_uniform_block_size: u32, + ) -> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + self.inner.max_inline_uniform_block_size = max_inline_uniform_block_size; + self + } + pub fn max_per_stage_descriptor_inline_uniform_blocks( + mut self, + max_per_stage_descriptor_inline_uniform_blocks: u32, + ) -> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + self.inner.max_per_stage_descriptor_inline_uniform_blocks = + max_per_stage_descriptor_inline_uniform_blocks; + self + } + pub fn max_per_stage_descriptor_update_after_bind_inline_uniform_blocks( + mut self, + max_per_stage_descriptor_update_after_bind_inline_uniform_blocks: u32, + ) -> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + self.inner + .max_per_stage_descriptor_update_after_bind_inline_uniform_blocks = + max_per_stage_descriptor_update_after_bind_inline_uniform_blocks; + self + } + pub fn max_descriptor_set_inline_uniform_blocks( + mut self, + max_descriptor_set_inline_uniform_blocks: u32, + ) -> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + self.inner.max_descriptor_set_inline_uniform_blocks = + max_descriptor_set_inline_uniform_blocks; + self + } + pub fn max_descriptor_set_update_after_bind_inline_uniform_blocks( + mut self, + max_descriptor_set_update_after_bind_inline_uniform_blocks: u32, + ) -> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> { + self.inner + .max_descriptor_set_update_after_bind_inline_uniform_blocks = + max_descriptor_set_update_after_bind_inline_uniform_blocks; + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceInlineUniformBlockPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceInlineUniformBlockPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceInlineUniformBlockPropertiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct WriteDescriptorSetInlineUniformBlockEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub data_size: u32, + pub p_data: *const c_void, +} +impl ::std::default::Default for WriteDescriptorSetInlineUniformBlockEXT { + fn default() -> WriteDescriptorSetInlineUniformBlockEXT { + WriteDescriptorSetInlineUniformBlockEXT { + s_type: StructureType::WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT, + p_next: ::std::ptr::null(), + data_size: u32::default(), + p_data: ::std::ptr::null(), + } + } +} +impl WriteDescriptorSetInlineUniformBlockEXT { + pub fn builder<'a>() -> WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> { + WriteDescriptorSetInlineUniformBlockEXTBuilder { + inner: WriteDescriptorSetInlineUniformBlockEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> { + inner: WriteDescriptorSetInlineUniformBlockEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsWriteDescriptorSetInlineUniformBlockEXT {} +unsafe impl ExtendsWriteDescriptorSet for WriteDescriptorSetInlineUniformBlockEXT {} +impl<'a> ::std::ops::Deref for WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> { + type Target = WriteDescriptorSetInlineUniformBlockEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> 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() as *const c_void; + self + } + pub fn next(mut self, next: &'a T) -> WriteDescriptorSetInlineUniformBlockEXTBuilder<'a> + where + T: ExtendsWriteDescriptorSetInlineUniformBlockEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> WriteDescriptorSetInlineUniformBlockEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct DescriptorPoolInlineUniformBlockCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub max_inline_uniform_block_bindings: u32, +} +impl ::std::default::Default for DescriptorPoolInlineUniformBlockCreateInfoEXT { + fn default() -> DescriptorPoolInlineUniformBlockCreateInfoEXT { + DescriptorPoolInlineUniformBlockCreateInfoEXT { + s_type: StructureType::DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + max_inline_uniform_block_bindings: u32::default(), + } + } +} +impl DescriptorPoolInlineUniformBlockCreateInfoEXT { + pub fn builder<'a>() -> DescriptorPoolInlineUniformBlockCreateInfoEXTBuilder<'a> { + DescriptorPoolInlineUniformBlockCreateInfoEXTBuilder { + inner: DescriptorPoolInlineUniformBlockCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct DescriptorPoolInlineUniformBlockCreateInfoEXTBuilder<'a> { + inner: DescriptorPoolInlineUniformBlockCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsDescriptorPoolInlineUniformBlockCreateInfoEXT {} +unsafe impl ExtendsDescriptorPoolCreateInfo for DescriptorPoolInlineUniformBlockCreateInfoEXT {} +impl<'a> ::std::ops::Deref for DescriptorPoolInlineUniformBlockCreateInfoEXTBuilder<'a> { + type Target = DescriptorPoolInlineUniformBlockCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> DescriptorPoolInlineUniformBlockCreateInfoEXTBuilder<'a> { + pub fn max_inline_uniform_block_bindings( + mut self, + max_inline_uniform_block_bindings: u32, + ) -> DescriptorPoolInlineUniformBlockCreateInfoEXTBuilder<'a> { + self.inner.max_inline_uniform_block_bindings = max_inline_uniform_block_bindings; + self + } + pub fn next( + mut self, + next: &'a T, + ) -> DescriptorPoolInlineUniformBlockCreateInfoEXTBuilder<'a> + where + T: ExtendsDescriptorPoolInlineUniformBlockCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> DescriptorPoolInlineUniformBlockCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] pub struct PipelineCoverageModulationStateCreateInfoNV { pub s_type: StructureType, pub p_next: *const c_void, @@ -25205,6 +28477,11 @@ pub struct PipelineCoverageModulationStateCreateInfoNVBuilder<'a> { inner: PipelineCoverageModulationStateCreateInfoNV, marker: ::std::marker::PhantomData<&'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 { @@ -25228,19 +28505,26 @@ impl<'a> PipelineCoverageModulationStateCreateInfoNVBuilder<'a> { } pub fn coverage_modulation_table_enable( mut self, - coverage_modulation_table_enable: Bool32, + coverage_modulation_table_enable: bool, ) -> PipelineCoverageModulationStateCreateInfoNVBuilder<'a> { - self.inner.coverage_modulation_table_enable = coverage_modulation_table_enable; + self.inner.coverage_modulation_table_enable = coverage_modulation_table_enable.into(); self } pub fn coverage_modulation_table( mut self, coverage_modulation_table: &'a [f32], ) -> PipelineCoverageModulationStateCreateInfoNVBuilder<'a> { - self.inner.coverage_modulation_table_count = coverage_modulation_table.len() as u32; + self.inner.coverage_modulation_table_count = coverage_modulation_table.len() as _; self.inner.p_coverage_modulation_table = coverage_modulation_table.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineCoverageModulationStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineCoverageModulationStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineCoverageModulationStateCreateInfoNV { self.inner } @@ -25275,6 +28559,9 @@ pub struct ImageFormatListCreateInfoKHRBuilder<'a> { inner: ImageFormatListCreateInfoKHR, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImageFormatListCreateInfoKHR {} +unsafe impl ExtendsImageCreateInfo for ImageFormatListCreateInfoKHR {} +unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for ImageFormatListCreateInfoKHR {} impl<'a> ::std::ops::Deref for ImageFormatListCreateInfoKHRBuilder<'a> { type Target = ImageFormatListCreateInfoKHR; fn deref(&self) -> &Self::Target { @@ -25286,10 +28573,17 @@ impl<'a> ImageFormatListCreateInfoKHRBuilder<'a> { mut self, view_formats: &'a [Format], ) -> ImageFormatListCreateInfoKHRBuilder<'a> { - self.inner.view_format_count = view_formats.len() as u32; + self.inner.view_format_count = view_formats.len() as _; self.inner.p_view_formats = view_formats.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> ImageFormatListCreateInfoKHRBuilder<'a> + where + T: ExtendsImageFormatListCreateInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImageFormatListCreateInfoKHR { self.inner } @@ -25326,6 +28620,7 @@ pub struct ValidationCacheCreateInfoEXTBuilder<'a> { inner: ValidationCacheCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsValidationCacheCreateInfoEXT {} impl<'a> ::std::ops::Deref for ValidationCacheCreateInfoEXTBuilder<'a> { type Target = ValidationCacheCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -25342,10 +28637,17 @@ 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 usize; - self.inner.p_initial_data = initial_data.as_ptr(); + self.inner.initial_data_size = initial_data.len() as _; + self.inner.p_initial_data = initial_data.as_ptr() as *const c_void; + self + } + pub fn next(mut self, next: &'a T) -> ValidationCacheCreateInfoEXTBuilder<'a> + where + T: ExtendsValidationCacheCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> ValidationCacheCreateInfoEXT { @@ -25380,6 +28682,8 @@ pub struct ShaderModuleValidationCacheCreateInfoEXTBuilder<'a> { inner: ShaderModuleValidationCacheCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsShaderModuleValidationCacheCreateInfoEXT {} +unsafe impl ExtendsShaderModuleCreateInfo for ShaderModuleValidationCacheCreateInfoEXT {} impl<'a> ::std::ops::Deref for ShaderModuleValidationCacheCreateInfoEXTBuilder<'a> { type Target = ShaderModuleValidationCacheCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -25394,6 +28698,13 @@ impl<'a> ShaderModuleValidationCacheCreateInfoEXTBuilder<'a> { self.inner.validation_cache = validation_cache; self } + pub fn next(mut self, next: &'a T) -> ShaderModuleValidationCacheCreateInfoEXTBuilder<'a> + where + T: ExtendsShaderModuleValidationCacheCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ShaderModuleValidationCacheCreateInfoEXT { self.inner } @@ -25428,6 +28739,8 @@ pub struct PhysicalDeviceMaintenance3PropertiesBuilder<'a> { inner: PhysicalDeviceMaintenance3Properties, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceMaintenance3Properties {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceMaintenance3Properties {} impl<'a> ::std::ops::Deref for PhysicalDeviceMaintenance3PropertiesBuilder<'a> { type Target = PhysicalDeviceMaintenance3Properties; fn deref(&self) -> &Self::Target { @@ -25449,6 +28762,13 @@ impl<'a> PhysicalDeviceMaintenance3PropertiesBuilder<'a> { self.inner.max_memory_allocation_size = max_memory_allocation_size; self } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceMaintenance3PropertiesBuilder<'a> + where + T: ExtendsPhysicalDeviceMaintenance3Properties, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceMaintenance3Properties { self.inner } @@ -25481,6 +28801,7 @@ pub struct DescriptorSetLayoutSupportBuilder<'a> { inner: DescriptorSetLayoutSupport, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDescriptorSetLayoutSupport {} impl<'a> ::std::ops::Deref for DescriptorSetLayoutSupportBuilder<'a> { type Target = DescriptorSetLayoutSupport; fn deref(&self) -> &Self::Target { @@ -25488,8 +28809,15 @@ impl<'a> ::std::ops::Deref for DescriptorSetLayoutSupportBuilder<'a> { } } impl<'a> DescriptorSetLayoutSupportBuilder<'a> { - pub fn supported(mut self, supported: Bool32) -> DescriptorSetLayoutSupportBuilder<'a> { - self.inner.supported = supported; + pub fn supported(mut self, supported: bool) -> DescriptorSetLayoutSupportBuilder<'a> { + self.inner.supported = supported.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> DescriptorSetLayoutSupportBuilder<'a> + where + T: ExtendsDescriptorSetLayoutSupport, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> DescriptorSetLayoutSupport { @@ -25524,6 +28852,9 @@ pub struct PhysicalDeviceShaderDrawParameterFeaturesBuilder<'a> { inner: PhysicalDeviceShaderDrawParameterFeatures, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceShaderDrawParameterFeatures {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceShaderDrawParameterFeatures {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceShaderDrawParameterFeatures {} impl<'a> ::std::ops::Deref for PhysicalDeviceShaderDrawParameterFeaturesBuilder<'a> { type Target = PhysicalDeviceShaderDrawParameterFeatures; fn deref(&self) -> &Self::Target { @@ -25533,9 +28864,19 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceShaderDrawParameterFeaturesBuilder< impl<'a> PhysicalDeviceShaderDrawParameterFeaturesBuilder<'a> { pub fn shader_draw_parameters( mut self, - shader_draw_parameters: Bool32, + shader_draw_parameters: bool, ) -> PhysicalDeviceShaderDrawParameterFeaturesBuilder<'a> { - self.inner.shader_draw_parameters = shader_draw_parameters; + self.inner.shader_draw_parameters = shader_draw_parameters.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceShaderDrawParameterFeaturesBuilder<'a> + where + T: ExtendsPhysicalDeviceShaderDrawParameterFeatures, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceShaderDrawParameterFeatures { @@ -25576,6 +28917,7 @@ pub struct NativeBufferANDROIDBuilder<'a> { inner: NativeBufferANDROID, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsNativeBufferANDROID {} impl<'a> ::std::ops::Deref for NativeBufferANDROIDBuilder<'a> { type Target = NativeBufferANDROID; fn deref(&self) -> &Self::Target { @@ -25599,6 +28941,13 @@ impl<'a> NativeBufferANDROIDBuilder<'a> { self.inner.usage = usage; self } + pub fn next(mut self, next: &'a T) -> NativeBufferANDROIDBuilder<'a> + where + T: ExtendsNativeBufferANDROID, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> NativeBufferANDROID { self.inner } @@ -25788,6 +29137,8 @@ pub struct DeviceQueueGlobalPriorityCreateInfoEXTBuilder<'a> { inner: DeviceQueueGlobalPriorityCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDeviceQueueGlobalPriorityCreateInfoEXT {} +unsafe impl ExtendsDeviceQueueCreateInfo for DeviceQueueGlobalPriorityCreateInfoEXT {} impl<'a> ::std::ops::Deref for DeviceQueueGlobalPriorityCreateInfoEXTBuilder<'a> { type Target = DeviceQueueGlobalPriorityCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -25802,6 +29153,13 @@ impl<'a> DeviceQueueGlobalPriorityCreateInfoEXTBuilder<'a> { self.inner.global_priority = global_priority; self } + pub fn next(mut self, next: &'a T) -> DeviceQueueGlobalPriorityCreateInfoEXTBuilder<'a> + where + T: ExtendsDeviceQueueGlobalPriorityCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DeviceQueueGlobalPriorityCreateInfoEXT { self.inner } @@ -25838,6 +29196,7 @@ pub struct DebugUtilsObjectNameInfoEXTBuilder<'a> { inner: DebugUtilsObjectNameInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugUtilsObjectNameInfoEXT {} impl<'a> ::std::ops::Deref for DebugUtilsObjectNameInfoEXTBuilder<'a> { type Target = DebugUtilsObjectNameInfoEXT; fn deref(&self) -> &Self::Target { @@ -25863,6 +29222,13 @@ impl<'a> DebugUtilsObjectNameInfoEXTBuilder<'a> { self.inner.p_object_name = object_name.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DebugUtilsObjectNameInfoEXTBuilder<'a> + where + T: ExtendsDebugUtilsObjectNameInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DebugUtilsObjectNameInfoEXT { self.inner } @@ -25903,6 +29269,7 @@ pub struct DebugUtilsObjectTagInfoEXTBuilder<'a> { inner: DebugUtilsObjectTagInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugUtilsObjectTagInfoEXT {} impl<'a> ::std::ops::Deref for DebugUtilsObjectTagInfoEXTBuilder<'a> { type Target = DebugUtilsObjectTagInfoEXT; fn deref(&self) -> &Self::Target { @@ -25922,9 +29289,16 @@ impl<'a> DebugUtilsObjectTagInfoEXTBuilder<'a> { self.inner.tag_name = tag_name; self } - pub fn tag(mut self, tag: &'a [c_void]) -> DebugUtilsObjectTagInfoEXTBuilder<'a> { - self.inner.tag_size = tag.len() as usize; - self.inner.p_tag = tag.as_ptr(); + pub fn tag(mut self, tag: &'a [u8]) -> DebugUtilsObjectTagInfoEXTBuilder<'a> { + self.inner.tag_size = tag.len() as _; + self.inner.p_tag = tag.as_ptr() as *const c_void; + self + } + pub fn next(mut self, next: &'a T) -> DebugUtilsObjectTagInfoEXTBuilder<'a> + where + T: ExtendsDebugUtilsObjectTagInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; self } pub fn build(self) -> DebugUtilsObjectTagInfoEXT { @@ -25961,6 +29335,7 @@ pub struct DebugUtilsLabelEXTBuilder<'a> { inner: DebugUtilsLabelEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugUtilsLabelEXT {} impl<'a> ::std::ops::Deref for DebugUtilsLabelEXTBuilder<'a> { type Target = DebugUtilsLabelEXT; fn deref(&self) -> &Self::Target { @@ -25976,6 +29351,13 @@ impl<'a> DebugUtilsLabelEXTBuilder<'a> { self.inner.color = color; self } + pub fn next(mut self, next: &'a T) -> DebugUtilsLabelEXTBuilder<'a> + where + T: ExtendsDebugUtilsLabelEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DebugUtilsLabelEXT { self.inner } @@ -26002,7 +29384,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() } } @@ -26031,6 +29414,8 @@ pub struct DebugUtilsMessengerCreateInfoEXTBuilder<'a> { inner: DebugUtilsMessengerCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugUtilsMessengerCreateInfoEXT {} +unsafe impl ExtendsInstanceCreateInfo for DebugUtilsMessengerCreateInfoEXT {} impl<'a> ::std::ops::Deref for DebugUtilsMessengerCreateInfoEXTBuilder<'a> { type Target = DebugUtilsMessengerCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -26073,6 +29458,13 @@ impl<'a> DebugUtilsMessengerCreateInfoEXTBuilder<'a> { self.inner.p_user_data = user_data; self } + pub fn next(mut self, next: &'a T) -> DebugUtilsMessengerCreateInfoEXTBuilder<'a> + where + T: ExtendsDebugUtilsMessengerCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DebugUtilsMessengerCreateInfoEXT { self.inner } @@ -26123,6 +29515,7 @@ pub struct DebugUtilsMessengerCallbackDataEXTBuilder<'a> { inner: DebugUtilsMessengerCallbackDataEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDebugUtilsMessengerCallbackDataEXT {} impl<'a> ::std::ops::Deref for DebugUtilsMessengerCallbackDataEXTBuilder<'a> { type Target = DebugUtilsMessengerCallbackDataEXT; fn deref(&self) -> &Self::Target { @@ -26162,7 +29555,7 @@ impl<'a> DebugUtilsMessengerCallbackDataEXTBuilder<'a> { mut self, queue_labels: &'a mut [DebugUtilsLabelEXT], ) -> DebugUtilsMessengerCallbackDataEXTBuilder<'a> { - self.inner.queue_label_count = queue_labels.len() as u32; + self.inner.queue_label_count = queue_labels.len() as _; self.inner.p_queue_labels = queue_labels.as_mut_ptr(); self } @@ -26170,7 +29563,7 @@ impl<'a> DebugUtilsMessengerCallbackDataEXTBuilder<'a> { mut self, cmd_buf_labels: &'a mut [DebugUtilsLabelEXT], ) -> DebugUtilsMessengerCallbackDataEXTBuilder<'a> { - self.inner.cmd_buf_label_count = cmd_buf_labels.len() as u32; + self.inner.cmd_buf_label_count = cmd_buf_labels.len() as _; self.inner.p_cmd_buf_labels = cmd_buf_labels.as_mut_ptr(); self } @@ -26178,10 +29571,17 @@ impl<'a> DebugUtilsMessengerCallbackDataEXTBuilder<'a> { mut self, objects: &'a mut [DebugUtilsObjectNameInfoEXT], ) -> DebugUtilsMessengerCallbackDataEXTBuilder<'a> { - self.inner.object_count = objects.len() as u32; + self.inner.object_count = objects.len() as _; self.inner.p_objects = objects.as_mut_ptr(); self } + pub fn next(mut self, next: &'a T) -> DebugUtilsMessengerCallbackDataEXTBuilder<'a> + where + T: ExtendsDebugUtilsMessengerCallbackDataEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DebugUtilsMessengerCallbackDataEXT { self.inner } @@ -26216,6 +29616,8 @@ pub struct ImportMemoryHostPointerInfoEXTBuilder<'a> { inner: ImportMemoryHostPointerInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportMemoryHostPointerInfoEXT {} +unsafe impl ExtendsMemoryAllocateInfo for ImportMemoryHostPointerInfoEXT {} impl<'a> ::std::ops::Deref for ImportMemoryHostPointerInfoEXTBuilder<'a> { type Target = ImportMemoryHostPointerInfoEXT; fn deref(&self) -> &Self::Target { @@ -26237,6 +29639,13 @@ impl<'a> ImportMemoryHostPointerInfoEXTBuilder<'a> { self.inner.p_host_pointer = host_pointer; self } + pub fn next(mut self, next: &'a T) -> ImportMemoryHostPointerInfoEXTBuilder<'a> + where + T: ExtendsImportMemoryHostPointerInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportMemoryHostPointerInfoEXT { self.inner } @@ -26269,6 +29678,7 @@ pub struct MemoryHostPointerPropertiesEXTBuilder<'a> { inner: MemoryHostPointerPropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryHostPointerPropertiesEXT {} impl<'a> ::std::ops::Deref for MemoryHostPointerPropertiesEXTBuilder<'a> { type Target = MemoryHostPointerPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -26283,6 +29693,13 @@ impl<'a> MemoryHostPointerPropertiesEXTBuilder<'a> { self.inner.memory_type_bits = memory_type_bits; self } + pub fn next(mut self, next: &'a mut T) -> MemoryHostPointerPropertiesEXTBuilder<'a> + where + T: ExtendsMemoryHostPointerPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> MemoryHostPointerPropertiesEXT { self.inner } @@ -26315,6 +29732,8 @@ pub struct PhysicalDeviceExternalMemoryHostPropertiesEXTBuilder<'a> { inner: PhysicalDeviceExternalMemoryHostPropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceExternalMemoryHostPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceExternalMemoryHostPropertiesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceExternalMemoryHostPropertiesEXTBuilder<'a> { type Target = PhysicalDeviceExternalMemoryHostPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -26329,6 +29748,16 @@ impl<'a> PhysicalDeviceExternalMemoryHostPropertiesEXTBuilder<'a> { self.inner.min_imported_host_pointer_alignment = min_imported_host_pointer_alignment; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceExternalMemoryHostPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceExternalMemoryHostPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceExternalMemoryHostPropertiesEXT { self.inner } @@ -26377,6 +29806,11 @@ pub struct PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { inner: PhysicalDeviceConservativeRasterizationPropertiesEXT, marker: ::std::marker::PhantomData<&'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 { @@ -26409,47 +29843,57 @@ impl<'a> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { } pub fn primitive_underestimation( mut self, - primitive_underestimation: Bool32, + primitive_underestimation: bool, ) -> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { - self.inner.primitive_underestimation = primitive_underestimation; + self.inner.primitive_underestimation = primitive_underestimation.into(); self } pub fn conservative_point_and_line_rasterization( mut self, - conservative_point_and_line_rasterization: Bool32, + conservative_point_and_line_rasterization: bool, ) -> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { self.inner.conservative_point_and_line_rasterization = - conservative_point_and_line_rasterization; + conservative_point_and_line_rasterization.into(); self } pub fn degenerate_triangles_rasterized( mut self, - degenerate_triangles_rasterized: Bool32, + degenerate_triangles_rasterized: bool, ) -> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { - self.inner.degenerate_triangles_rasterized = degenerate_triangles_rasterized; + self.inner.degenerate_triangles_rasterized = degenerate_triangles_rasterized.into(); self } pub fn degenerate_lines_rasterized( mut self, - degenerate_lines_rasterized: Bool32, + degenerate_lines_rasterized: bool, ) -> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { - self.inner.degenerate_lines_rasterized = degenerate_lines_rasterized; + self.inner.degenerate_lines_rasterized = degenerate_lines_rasterized.into(); self } pub fn fully_covered_fragment_shader_input_variable( mut self, - fully_covered_fragment_shader_input_variable: Bool32, + fully_covered_fragment_shader_input_variable: bool, ) -> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { self.inner.fully_covered_fragment_shader_input_variable = - fully_covered_fragment_shader_input_variable; + fully_covered_fragment_shader_input_variable.into(); self } pub fn conservative_rasterization_post_depth_coverage( mut self, - conservative_rasterization_post_depth_coverage: Bool32, + conservative_rasterization_post_depth_coverage: bool, ) -> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { self.inner.conservative_rasterization_post_depth_coverage = - conservative_rasterization_post_depth_coverage; + conservative_rasterization_post_depth_coverage.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceConservativeRasterizationPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceConservativeRasterizationPropertiesEXT { @@ -26458,6 +29902,60 @@ impl<'a> PhysicalDeviceConservativeRasterizationPropertiesEXTBuilder<'a> { } #[repr(C)] #[derive(Copy, Clone, Debug)] +pub struct CalibratedTimestampInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub time_domain: TimeDomainEXT, +} +impl ::std::default::Default for CalibratedTimestampInfoEXT { + fn default() -> CalibratedTimestampInfoEXT { + CalibratedTimestampInfoEXT { + s_type: StructureType::CALIBRATED_TIMESTAMP_INFO_EXT, + p_next: ::std::ptr::null(), + time_domain: TimeDomainEXT::default(), + } + } +} +impl CalibratedTimestampInfoEXT { + pub fn builder<'a>() -> CalibratedTimestampInfoEXTBuilder<'a> { + CalibratedTimestampInfoEXTBuilder { + inner: CalibratedTimestampInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct CalibratedTimestampInfoEXTBuilder<'a> { + inner: CalibratedTimestampInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsCalibratedTimestampInfoEXT {} +impl<'a> ::std::ops::Deref for CalibratedTimestampInfoEXTBuilder<'a> { + type Target = CalibratedTimestampInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> CalibratedTimestampInfoEXTBuilder<'a> { + pub fn time_domain( + mut self, + time_domain: TimeDomainEXT, + ) -> CalibratedTimestampInfoEXTBuilder<'a> { + self.inner.time_domain = time_domain; + self + } + pub fn next(mut self, next: &'a T) -> CalibratedTimestampInfoEXTBuilder<'a> + where + T: ExtendsCalibratedTimestampInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> CalibratedTimestampInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] pub struct PhysicalDeviceShaderCorePropertiesAMD { pub s_type: StructureType, pub p_next: *mut c_void, @@ -26510,6 +30008,8 @@ pub struct PhysicalDeviceShaderCorePropertiesAMDBuilder<'a> { inner: PhysicalDeviceShaderCorePropertiesAMD, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceShaderCorePropertiesAMD {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceShaderCorePropertiesAMD {} impl<'a> ::std::ops::Deref for PhysicalDeviceShaderCorePropertiesAMDBuilder<'a> { type Target = PhysicalDeviceShaderCorePropertiesAMD; fn deref(&self) -> &Self::Target { @@ -26615,6 +30115,13 @@ impl<'a> PhysicalDeviceShaderCorePropertiesAMDBuilder<'a> { self.inner.vgpr_allocation_granularity = vgpr_allocation_granularity; self } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceShaderCorePropertiesAMDBuilder<'a> + where + T: ExtendsPhysicalDeviceShaderCorePropertiesAMD, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceShaderCorePropertiesAMD { self.inner } @@ -26651,6 +30158,11 @@ pub struct PipelineRasterizationConservativeStateCreateInfoEXTBuilder<'a> { inner: PipelineRasterizationConservativeStateCreateInfoEXT, marker: ::std::marker::PhantomData<&'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 { @@ -26679,6 +30191,16 @@ impl<'a> PipelineRasterizationConservativeStateCreateInfoEXTBuilder<'a> { self.inner.extra_primitive_overestimation_size = extra_primitive_overestimation_size; self } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineRasterizationConservativeStateCreateInfoEXTBuilder<'a> + where + T: ExtendsPipelineRasterizationConservativeStateCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineRasterizationConservativeStateCreateInfoEXT { self.inner } @@ -26749,6 +30271,9 @@ pub struct PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { inner: PhysicalDeviceDescriptorIndexingFeaturesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceDescriptorIndexingFeaturesEXT {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceDescriptorIndexingFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceDescriptorIndexingFeaturesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { type Target = PhysicalDeviceDescriptorIndexingFeaturesEXT; fn deref(&self) -> &Self::Target { @@ -26758,171 +30283,181 @@ impl<'a> ::std::ops::Deref for PhysicalDeviceDescriptorIndexingFeaturesEXTBuilde impl<'a> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { pub fn shader_input_attachment_array_dynamic_indexing( mut self, - shader_input_attachment_array_dynamic_indexing: Bool32, + shader_input_attachment_array_dynamic_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner.shader_input_attachment_array_dynamic_indexing = - shader_input_attachment_array_dynamic_indexing; + shader_input_attachment_array_dynamic_indexing.into(); self } pub fn shader_uniform_texel_buffer_array_dynamic_indexing( mut self, - shader_uniform_texel_buffer_array_dynamic_indexing: Bool32, + shader_uniform_texel_buffer_array_dynamic_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .shader_uniform_texel_buffer_array_dynamic_indexing = - shader_uniform_texel_buffer_array_dynamic_indexing; + shader_uniform_texel_buffer_array_dynamic_indexing.into(); self } pub fn shader_storage_texel_buffer_array_dynamic_indexing( mut self, - shader_storage_texel_buffer_array_dynamic_indexing: Bool32, + shader_storage_texel_buffer_array_dynamic_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .shader_storage_texel_buffer_array_dynamic_indexing = - shader_storage_texel_buffer_array_dynamic_indexing; + shader_storage_texel_buffer_array_dynamic_indexing.into(); self } pub fn shader_uniform_buffer_array_non_uniform_indexing( mut self, - shader_uniform_buffer_array_non_uniform_indexing: Bool32, + shader_uniform_buffer_array_non_uniform_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner.shader_uniform_buffer_array_non_uniform_indexing = - shader_uniform_buffer_array_non_uniform_indexing; + shader_uniform_buffer_array_non_uniform_indexing.into(); self } pub fn shader_sampled_image_array_non_uniform_indexing( mut self, - shader_sampled_image_array_non_uniform_indexing: Bool32, + shader_sampled_image_array_non_uniform_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner.shader_sampled_image_array_non_uniform_indexing = - shader_sampled_image_array_non_uniform_indexing; + shader_sampled_image_array_non_uniform_indexing.into(); self } pub fn shader_storage_buffer_array_non_uniform_indexing( mut self, - shader_storage_buffer_array_non_uniform_indexing: Bool32, + shader_storage_buffer_array_non_uniform_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner.shader_storage_buffer_array_non_uniform_indexing = - shader_storage_buffer_array_non_uniform_indexing; + shader_storage_buffer_array_non_uniform_indexing.into(); self } pub fn shader_storage_image_array_non_uniform_indexing( mut self, - shader_storage_image_array_non_uniform_indexing: Bool32, + shader_storage_image_array_non_uniform_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner.shader_storage_image_array_non_uniform_indexing = - shader_storage_image_array_non_uniform_indexing; + shader_storage_image_array_non_uniform_indexing.into(); self } pub fn shader_input_attachment_array_non_uniform_indexing( mut self, - shader_input_attachment_array_non_uniform_indexing: Bool32, + shader_input_attachment_array_non_uniform_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .shader_input_attachment_array_non_uniform_indexing = - shader_input_attachment_array_non_uniform_indexing; + shader_input_attachment_array_non_uniform_indexing.into(); self } pub fn shader_uniform_texel_buffer_array_non_uniform_indexing( mut self, - shader_uniform_texel_buffer_array_non_uniform_indexing: Bool32, + shader_uniform_texel_buffer_array_non_uniform_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .shader_uniform_texel_buffer_array_non_uniform_indexing = - shader_uniform_texel_buffer_array_non_uniform_indexing; + shader_uniform_texel_buffer_array_non_uniform_indexing.into(); self } pub fn shader_storage_texel_buffer_array_non_uniform_indexing( mut self, - shader_storage_texel_buffer_array_non_uniform_indexing: Bool32, + shader_storage_texel_buffer_array_non_uniform_indexing: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .shader_storage_texel_buffer_array_non_uniform_indexing = - shader_storage_texel_buffer_array_non_uniform_indexing; + shader_storage_texel_buffer_array_non_uniform_indexing.into(); self } pub fn descriptor_binding_uniform_buffer_update_after_bind( mut self, - descriptor_binding_uniform_buffer_update_after_bind: Bool32, + descriptor_binding_uniform_buffer_update_after_bind: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .descriptor_binding_uniform_buffer_update_after_bind = - descriptor_binding_uniform_buffer_update_after_bind; + descriptor_binding_uniform_buffer_update_after_bind.into(); self } pub fn descriptor_binding_sampled_image_update_after_bind( mut self, - descriptor_binding_sampled_image_update_after_bind: Bool32, + descriptor_binding_sampled_image_update_after_bind: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .descriptor_binding_sampled_image_update_after_bind = - descriptor_binding_sampled_image_update_after_bind; + descriptor_binding_sampled_image_update_after_bind.into(); self } pub fn descriptor_binding_storage_image_update_after_bind( mut self, - descriptor_binding_storage_image_update_after_bind: Bool32, + descriptor_binding_storage_image_update_after_bind: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .descriptor_binding_storage_image_update_after_bind = - descriptor_binding_storage_image_update_after_bind; + descriptor_binding_storage_image_update_after_bind.into(); self } pub fn descriptor_binding_storage_buffer_update_after_bind( mut self, - descriptor_binding_storage_buffer_update_after_bind: Bool32, + descriptor_binding_storage_buffer_update_after_bind: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .descriptor_binding_storage_buffer_update_after_bind = - descriptor_binding_storage_buffer_update_after_bind; + descriptor_binding_storage_buffer_update_after_bind.into(); self } pub fn descriptor_binding_uniform_texel_buffer_update_after_bind( mut self, - descriptor_binding_uniform_texel_buffer_update_after_bind: Bool32, + descriptor_binding_uniform_texel_buffer_update_after_bind: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .descriptor_binding_uniform_texel_buffer_update_after_bind = - descriptor_binding_uniform_texel_buffer_update_after_bind; + descriptor_binding_uniform_texel_buffer_update_after_bind.into(); self } pub fn descriptor_binding_storage_texel_buffer_update_after_bind( mut self, - descriptor_binding_storage_texel_buffer_update_after_bind: Bool32, + descriptor_binding_storage_texel_buffer_update_after_bind: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner .descriptor_binding_storage_texel_buffer_update_after_bind = - descriptor_binding_storage_texel_buffer_update_after_bind; + descriptor_binding_storage_texel_buffer_update_after_bind.into(); self } pub fn descriptor_binding_update_unused_while_pending( mut self, - descriptor_binding_update_unused_while_pending: Bool32, + descriptor_binding_update_unused_while_pending: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner.descriptor_binding_update_unused_while_pending = - descriptor_binding_update_unused_while_pending; + descriptor_binding_update_unused_while_pending.into(); self } pub fn descriptor_binding_partially_bound( mut self, - descriptor_binding_partially_bound: Bool32, + descriptor_binding_partially_bound: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { - self.inner.descriptor_binding_partially_bound = descriptor_binding_partially_bound; + self.inner.descriptor_binding_partially_bound = descriptor_binding_partially_bound.into(); self } pub fn descriptor_binding_variable_descriptor_count( mut self, - descriptor_binding_variable_descriptor_count: Bool32, + descriptor_binding_variable_descriptor_count: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { self.inner.descriptor_binding_variable_descriptor_count = - descriptor_binding_variable_descriptor_count; + descriptor_binding_variable_descriptor_count.into(); self } pub fn runtime_descriptor_array( mut self, - runtime_descriptor_array: Bool32, + runtime_descriptor_array: bool, ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> { - self.inner.runtime_descriptor_array = runtime_descriptor_array; + self.inner.runtime_descriptor_array = runtime_descriptor_array.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceDescriptorIndexingFeaturesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceDescriptorIndexingFeaturesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; self } pub fn build(self) -> PhysicalDeviceDescriptorIndexingFeaturesEXT { @@ -27001,6 +30536,8 @@ pub struct PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { inner: PhysicalDeviceDescriptorIndexingPropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceDescriptorIndexingPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceDescriptorIndexingPropertiesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { type Target = PhysicalDeviceDescriptorIndexingPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -27018,61 +30555,62 @@ impl<'a> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { } pub fn shader_uniform_buffer_array_non_uniform_indexing_native( mut self, - shader_uniform_buffer_array_non_uniform_indexing_native: Bool32, + shader_uniform_buffer_array_non_uniform_indexing_native: bool, ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { self.inner .shader_uniform_buffer_array_non_uniform_indexing_native = - shader_uniform_buffer_array_non_uniform_indexing_native; + shader_uniform_buffer_array_non_uniform_indexing_native.into(); self } pub fn shader_sampled_image_array_non_uniform_indexing_native( mut self, - shader_sampled_image_array_non_uniform_indexing_native: Bool32, + shader_sampled_image_array_non_uniform_indexing_native: bool, ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { self.inner .shader_sampled_image_array_non_uniform_indexing_native = - shader_sampled_image_array_non_uniform_indexing_native; + shader_sampled_image_array_non_uniform_indexing_native.into(); self } pub fn shader_storage_buffer_array_non_uniform_indexing_native( mut self, - shader_storage_buffer_array_non_uniform_indexing_native: Bool32, + shader_storage_buffer_array_non_uniform_indexing_native: bool, ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { self.inner .shader_storage_buffer_array_non_uniform_indexing_native = - shader_storage_buffer_array_non_uniform_indexing_native; + shader_storage_buffer_array_non_uniform_indexing_native.into(); self } pub fn shader_storage_image_array_non_uniform_indexing_native( mut self, - shader_storage_image_array_non_uniform_indexing_native: Bool32, + shader_storage_image_array_non_uniform_indexing_native: bool, ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { self.inner .shader_storage_image_array_non_uniform_indexing_native = - shader_storage_image_array_non_uniform_indexing_native; + shader_storage_image_array_non_uniform_indexing_native.into(); self } pub fn shader_input_attachment_array_non_uniform_indexing_native( mut self, - shader_input_attachment_array_non_uniform_indexing_native: Bool32, + shader_input_attachment_array_non_uniform_indexing_native: bool, ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { self.inner .shader_input_attachment_array_non_uniform_indexing_native = - shader_input_attachment_array_non_uniform_indexing_native; + shader_input_attachment_array_non_uniform_indexing_native.into(); self } pub fn robust_buffer_access_update_after_bind( mut self, - robust_buffer_access_update_after_bind: Bool32, + robust_buffer_access_update_after_bind: bool, ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { - self.inner.robust_buffer_access_update_after_bind = robust_buffer_access_update_after_bind; + self.inner.robust_buffer_access_update_after_bind = + robust_buffer_access_update_after_bind.into(); self } pub fn quad_divergent_implicit_lod( mut self, - quad_divergent_implicit_lod: Bool32, + quad_divergent_implicit_lod: bool, ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { - self.inner.quad_divergent_implicit_lod = quad_divergent_implicit_lod; + self.inner.quad_divergent_implicit_lod = quad_divergent_implicit_lod.into(); self } pub fn max_per_stage_descriptor_update_after_bind_samplers( @@ -27208,6 +30746,16 @@ impl<'a> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> { max_descriptor_set_update_after_bind_input_attachments; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceDescriptorIndexingPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceDescriptorIndexingPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceDescriptorIndexingPropertiesEXT { self.inner } @@ -27242,6 +30790,8 @@ pub struct DescriptorSetLayoutBindingFlagsCreateInfoEXTBuilder<'a> { inner: DescriptorSetLayoutBindingFlagsCreateInfoEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsDescriptorSetLayoutBindingFlagsCreateInfoEXT {} +unsafe impl ExtendsDescriptorSetLayoutCreateInfo for DescriptorSetLayoutBindingFlagsCreateInfoEXT {} impl<'a> ::std::ops::Deref for DescriptorSetLayoutBindingFlagsCreateInfoEXTBuilder<'a> { type Target = DescriptorSetLayoutBindingFlagsCreateInfoEXT; fn deref(&self) -> &Self::Target { @@ -27253,10 +30803,17 @@ impl<'a> DescriptorSetLayoutBindingFlagsCreateInfoEXTBuilder<'a> { mut self, binding_flags: &'a [DescriptorBindingFlagsEXT], ) -> DescriptorSetLayoutBindingFlagsCreateInfoEXTBuilder<'a> { - self.inner.binding_count = binding_flags.len() as u32; + self.inner.binding_count = binding_flags.len() as _; self.inner.p_binding_flags = binding_flags.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> DescriptorSetLayoutBindingFlagsCreateInfoEXTBuilder<'a> + where + T: ExtendsDescriptorSetLayoutBindingFlagsCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DescriptorSetLayoutBindingFlagsCreateInfoEXT { self.inner } @@ -27291,6 +30848,11 @@ pub struct DescriptorSetVariableDescriptorCountAllocateInfoEXTBuilder<'a> { inner: DescriptorSetVariableDescriptorCountAllocateInfoEXT, marker: ::std::marker::PhantomData<&'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 { @@ -27302,10 +30864,20 @@ impl<'a> DescriptorSetVariableDescriptorCountAllocateInfoEXTBuilder<'a> { mut self, descriptor_counts: &'a [u32], ) -> DescriptorSetVariableDescriptorCountAllocateInfoEXTBuilder<'a> { - self.inner.descriptor_set_count = descriptor_counts.len() as u32; + self.inner.descriptor_set_count = descriptor_counts.len() as _; self.inner.p_descriptor_counts = descriptor_counts.as_ptr(); self } + pub fn next( + mut self, + next: &'a T, + ) -> DescriptorSetVariableDescriptorCountAllocateInfoEXTBuilder<'a> + where + T: ExtendsDescriptorSetVariableDescriptorCountAllocateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> DescriptorSetVariableDescriptorCountAllocateInfoEXT { self.inner } @@ -27338,6 +30910,11 @@ pub struct DescriptorSetVariableDescriptorCountLayoutSupportEXTBuilder<'a> { inner: DescriptorSetVariableDescriptorCountLayoutSupportEXT, marker: ::std::marker::PhantomData<&'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 { @@ -27352,11 +30929,625 @@ impl<'a> DescriptorSetVariableDescriptorCountLayoutSupportEXTBuilder<'a> { self.inner.max_variable_descriptor_count = max_variable_descriptor_count; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> DescriptorSetVariableDescriptorCountLayoutSupportEXTBuilder<'a> + where + T: ExtendsDescriptorSetVariableDescriptorCountLayoutSupportEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> DescriptorSetVariableDescriptorCountLayoutSupportEXT { self.inner } } #[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct AttachmentDescription2KHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: AttachmentDescriptionFlags, + pub format: Format, + pub samples: SampleCountFlags, + pub load_op: AttachmentLoadOp, + pub store_op: AttachmentStoreOp, + pub stencil_load_op: AttachmentLoadOp, + pub stencil_store_op: AttachmentStoreOp, + pub initial_layout: ImageLayout, + pub final_layout: ImageLayout, +} +impl ::std::default::Default for AttachmentDescription2KHR { + fn default() -> AttachmentDescription2KHR { + AttachmentDescription2KHR { + s_type: StructureType::ATTACHMENT_DESCRIPTION_2_KHR, + p_next: ::std::ptr::null(), + flags: AttachmentDescriptionFlags::default(), + format: Format::default(), + samples: SampleCountFlags::default(), + load_op: AttachmentLoadOp::default(), + store_op: AttachmentStoreOp::default(), + stencil_load_op: AttachmentLoadOp::default(), + stencil_store_op: AttachmentStoreOp::default(), + initial_layout: ImageLayout::default(), + final_layout: ImageLayout::default(), + } + } +} +impl AttachmentDescription2KHR { + pub fn builder<'a>() -> AttachmentDescription2KHRBuilder<'a> { + AttachmentDescription2KHRBuilder { + inner: AttachmentDescription2KHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct AttachmentDescription2KHRBuilder<'a> { + inner: AttachmentDescription2KHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsAttachmentDescription2KHR {} +impl<'a> ::std::ops::Deref for AttachmentDescription2KHRBuilder<'a> { + type Target = AttachmentDescription2KHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> AttachmentDescription2KHRBuilder<'a> { + pub fn flags( + mut self, + flags: AttachmentDescriptionFlags, + ) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn format(mut self, format: Format) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.format = format; + self + } + pub fn samples(mut self, samples: SampleCountFlags) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.samples = samples; + self + } + pub fn load_op(mut self, load_op: AttachmentLoadOp) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.load_op = load_op; + self + } + pub fn store_op(mut self, store_op: AttachmentStoreOp) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.store_op = store_op; + self + } + pub fn stencil_load_op( + mut self, + stencil_load_op: AttachmentLoadOp, + ) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.stencil_load_op = stencil_load_op; + self + } + pub fn stencil_store_op( + mut self, + stencil_store_op: AttachmentStoreOp, + ) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.stencil_store_op = stencil_store_op; + self + } + pub fn initial_layout( + mut self, + initial_layout: ImageLayout, + ) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.initial_layout = initial_layout; + self + } + pub fn final_layout( + mut self, + final_layout: ImageLayout, + ) -> AttachmentDescription2KHRBuilder<'a> { + self.inner.final_layout = final_layout; + self + } + pub fn next(mut self, next: &'a T) -> AttachmentDescription2KHRBuilder<'a> + where + T: ExtendsAttachmentDescription2KHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> AttachmentDescription2KHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct AttachmentReference2KHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub attachment: u32, + pub layout: ImageLayout, + pub aspect_mask: ImageAspectFlags, +} +impl ::std::default::Default for AttachmentReference2KHR { + fn default() -> AttachmentReference2KHR { + AttachmentReference2KHR { + s_type: StructureType::ATTACHMENT_REFERENCE_2_KHR, + p_next: ::std::ptr::null(), + attachment: u32::default(), + layout: ImageLayout::default(), + aspect_mask: ImageAspectFlags::default(), + } + } +} +impl AttachmentReference2KHR { + pub fn builder<'a>() -> AttachmentReference2KHRBuilder<'a> { + AttachmentReference2KHRBuilder { + inner: AttachmentReference2KHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct AttachmentReference2KHRBuilder<'a> { + inner: AttachmentReference2KHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsAttachmentReference2KHR {} +impl<'a> ::std::ops::Deref for AttachmentReference2KHRBuilder<'a> { + type Target = AttachmentReference2KHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> AttachmentReference2KHRBuilder<'a> { + pub fn attachment(mut self, attachment: u32) -> AttachmentReference2KHRBuilder<'a> { + self.inner.attachment = attachment; + self + } + pub fn layout(mut self, layout: ImageLayout) -> AttachmentReference2KHRBuilder<'a> { + self.inner.layout = layout; + self + } + pub fn aspect_mask( + mut self, + aspect_mask: ImageAspectFlags, + ) -> AttachmentReference2KHRBuilder<'a> { + self.inner.aspect_mask = aspect_mask; + self + } + pub fn next(mut self, next: &'a T) -> AttachmentReference2KHRBuilder<'a> + where + T: ExtendsAttachmentReference2KHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> AttachmentReference2KHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct SubpassDescription2KHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: SubpassDescriptionFlags, + pub pipeline_bind_point: PipelineBindPoint, + pub view_mask: u32, + pub input_attachment_count: u32, + pub p_input_attachments: *const AttachmentReference2KHR, + pub color_attachment_count: u32, + pub p_color_attachments: *const AttachmentReference2KHR, + pub p_resolve_attachments: *const AttachmentReference2KHR, + pub p_depth_stencil_attachment: *const AttachmentReference2KHR, + pub preserve_attachment_count: u32, + pub p_preserve_attachments: *const u32, +} +impl ::std::default::Default for SubpassDescription2KHR { + fn default() -> SubpassDescription2KHR { + SubpassDescription2KHR { + s_type: StructureType::SUBPASS_DESCRIPTION_2_KHR, + p_next: ::std::ptr::null(), + flags: SubpassDescriptionFlags::default(), + pipeline_bind_point: PipelineBindPoint::default(), + view_mask: u32::default(), + input_attachment_count: u32::default(), + p_input_attachments: ::std::ptr::null(), + color_attachment_count: u32::default(), + p_color_attachments: ::std::ptr::null(), + p_resolve_attachments: ::std::ptr::null(), + p_depth_stencil_attachment: ::std::ptr::null(), + preserve_attachment_count: u32::default(), + p_preserve_attachments: ::std::ptr::null(), + } + } +} +impl SubpassDescription2KHR { + pub fn builder<'a>() -> SubpassDescription2KHRBuilder<'a> { + SubpassDescription2KHRBuilder { + inner: SubpassDescription2KHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct SubpassDescription2KHRBuilder<'a> { + inner: SubpassDescription2KHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsSubpassDescription2KHR {} +impl<'a> ::std::ops::Deref for SubpassDescription2KHRBuilder<'a> { + type Target = SubpassDescription2KHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> SubpassDescription2KHRBuilder<'a> { + pub fn flags(mut self, flags: SubpassDescriptionFlags) -> SubpassDescription2KHRBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn pipeline_bind_point( + mut self, + pipeline_bind_point: PipelineBindPoint, + ) -> SubpassDescription2KHRBuilder<'a> { + self.inner.pipeline_bind_point = pipeline_bind_point; + self + } + pub fn view_mask(mut self, view_mask: u32) -> SubpassDescription2KHRBuilder<'a> { + self.inner.view_mask = view_mask; + self + } + pub fn input_attachments( + mut self, + input_attachments: &'a [AttachmentReference2KHR], + ) -> SubpassDescription2KHRBuilder<'a> { + self.inner.input_attachment_count = input_attachments.len() as _; + self.inner.p_input_attachments = input_attachments.as_ptr(); + self + } + pub fn color_attachments( + mut self, + color_attachments: &'a [AttachmentReference2KHR], + ) -> SubpassDescription2KHRBuilder<'a> { + self.inner.color_attachment_count = color_attachments.len() as _; + self.inner.p_color_attachments = color_attachments.as_ptr(); + self + } + pub fn resolve_attachments( + mut self, + resolve_attachments: &'a [AttachmentReference2KHR], + ) -> SubpassDescription2KHRBuilder<'a> { + self.inner.color_attachment_count = resolve_attachments.len() as _; + self.inner.p_resolve_attachments = resolve_attachments.as_ptr(); + self + } + pub fn depth_stencil_attachment( + mut self, + depth_stencil_attachment: &'a AttachmentReference2KHR, + ) -> SubpassDescription2KHRBuilder<'a> { + self.inner.p_depth_stencil_attachment = depth_stencil_attachment; + self + } + pub fn preserve_attachments( + mut self, + preserve_attachments: &'a [u32], + ) -> SubpassDescription2KHRBuilder<'a> { + self.inner.preserve_attachment_count = preserve_attachments.len() as _; + self.inner.p_preserve_attachments = preserve_attachments.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> SubpassDescription2KHRBuilder<'a> + where + T: ExtendsSubpassDescription2KHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> SubpassDescription2KHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct SubpassDependency2KHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub src_subpass: u32, + pub dst_subpass: u32, + pub src_stage_mask: PipelineStageFlags, + pub dst_stage_mask: PipelineStageFlags, + pub src_access_mask: AccessFlags, + pub dst_access_mask: AccessFlags, + pub dependency_flags: DependencyFlags, + pub view_offset: i32, +} +impl ::std::default::Default for SubpassDependency2KHR { + fn default() -> SubpassDependency2KHR { + SubpassDependency2KHR { + s_type: StructureType::SUBPASS_DEPENDENCY_2_KHR, + p_next: ::std::ptr::null(), + src_subpass: u32::default(), + dst_subpass: u32::default(), + src_stage_mask: PipelineStageFlags::default(), + dst_stage_mask: PipelineStageFlags::default(), + src_access_mask: AccessFlags::default(), + dst_access_mask: AccessFlags::default(), + dependency_flags: DependencyFlags::default(), + view_offset: i32::default(), + } + } +} +impl SubpassDependency2KHR { + pub fn builder<'a>() -> SubpassDependency2KHRBuilder<'a> { + SubpassDependency2KHRBuilder { + inner: SubpassDependency2KHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct SubpassDependency2KHRBuilder<'a> { + inner: SubpassDependency2KHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsSubpassDependency2KHR {} +impl<'a> ::std::ops::Deref for SubpassDependency2KHRBuilder<'a> { + type Target = SubpassDependency2KHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> SubpassDependency2KHRBuilder<'a> { + pub fn src_subpass(mut self, src_subpass: u32) -> SubpassDependency2KHRBuilder<'a> { + self.inner.src_subpass = src_subpass; + self + } + pub fn dst_subpass(mut self, dst_subpass: u32) -> SubpassDependency2KHRBuilder<'a> { + self.inner.dst_subpass = dst_subpass; + self + } + pub fn src_stage_mask( + mut self, + src_stage_mask: PipelineStageFlags, + ) -> SubpassDependency2KHRBuilder<'a> { + self.inner.src_stage_mask = src_stage_mask; + self + } + pub fn dst_stage_mask( + mut self, + dst_stage_mask: PipelineStageFlags, + ) -> SubpassDependency2KHRBuilder<'a> { + self.inner.dst_stage_mask = dst_stage_mask; + self + } + pub fn src_access_mask( + mut self, + src_access_mask: AccessFlags, + ) -> SubpassDependency2KHRBuilder<'a> { + self.inner.src_access_mask = src_access_mask; + self + } + pub fn dst_access_mask( + mut self, + dst_access_mask: AccessFlags, + ) -> SubpassDependency2KHRBuilder<'a> { + self.inner.dst_access_mask = dst_access_mask; + self + } + pub fn dependency_flags( + mut self, + dependency_flags: DependencyFlags, + ) -> SubpassDependency2KHRBuilder<'a> { + self.inner.dependency_flags = dependency_flags; + self + } + pub fn view_offset(mut self, view_offset: i32) -> SubpassDependency2KHRBuilder<'a> { + self.inner.view_offset = view_offset; + self + } + pub fn next(mut self, next: &'a T) -> SubpassDependency2KHRBuilder<'a> + where + T: ExtendsSubpassDependency2KHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> SubpassDependency2KHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct RenderPassCreateInfo2KHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: RenderPassCreateFlags, + pub attachment_count: u32, + pub p_attachments: *const AttachmentDescription2KHR, + pub subpass_count: u32, + pub p_subpasses: *const SubpassDescription2KHR, + pub dependency_count: u32, + pub p_dependencies: *const SubpassDependency2KHR, + pub correlated_view_mask_count: u32, + pub p_correlated_view_masks: *const u32, +} +impl ::std::default::Default for RenderPassCreateInfo2KHR { + fn default() -> RenderPassCreateInfo2KHR { + RenderPassCreateInfo2KHR { + s_type: StructureType::RENDER_PASS_CREATE_INFO_2_KHR, + p_next: ::std::ptr::null(), + flags: RenderPassCreateFlags::default(), + attachment_count: u32::default(), + p_attachments: ::std::ptr::null(), + subpass_count: u32::default(), + p_subpasses: ::std::ptr::null(), + dependency_count: u32::default(), + p_dependencies: ::std::ptr::null(), + correlated_view_mask_count: u32::default(), + p_correlated_view_masks: ::std::ptr::null(), + } + } +} +impl RenderPassCreateInfo2KHR { + pub fn builder<'a>() -> RenderPassCreateInfo2KHRBuilder<'a> { + RenderPassCreateInfo2KHRBuilder { + inner: RenderPassCreateInfo2KHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct RenderPassCreateInfo2KHRBuilder<'a> { + inner: RenderPassCreateInfo2KHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsRenderPassCreateInfo2KHR {} +impl<'a> ::std::ops::Deref for RenderPassCreateInfo2KHRBuilder<'a> { + type Target = RenderPassCreateInfo2KHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> RenderPassCreateInfo2KHRBuilder<'a> { + pub fn flags(mut self, flags: RenderPassCreateFlags) -> RenderPassCreateInfo2KHRBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn attachments( + mut self, + attachments: &'a [AttachmentDescription2KHR], + ) -> RenderPassCreateInfo2KHRBuilder<'a> { + self.inner.attachment_count = attachments.len() as _; + self.inner.p_attachments = attachments.as_ptr(); + self + } + pub fn subpasses( + mut self, + subpasses: &'a [SubpassDescription2KHR], + ) -> RenderPassCreateInfo2KHRBuilder<'a> { + self.inner.subpass_count = subpasses.len() as _; + self.inner.p_subpasses = subpasses.as_ptr(); + self + } + pub fn dependencies( + mut self, + dependencies: &'a [SubpassDependency2KHR], + ) -> RenderPassCreateInfo2KHRBuilder<'a> { + self.inner.dependency_count = dependencies.len() as _; + self.inner.p_dependencies = dependencies.as_ptr(); + self + } + pub fn correlated_view_masks( + mut self, + correlated_view_masks: &'a [u32], + ) -> RenderPassCreateInfo2KHRBuilder<'a> { + self.inner.correlated_view_mask_count = correlated_view_masks.len() as _; + self.inner.p_correlated_view_masks = correlated_view_masks.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> RenderPassCreateInfo2KHRBuilder<'a> + where + T: ExtendsRenderPassCreateInfo2KHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> RenderPassCreateInfo2KHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct SubpassBeginInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, + pub contents: SubpassContents, +} +impl ::std::default::Default for SubpassBeginInfoKHR { + fn default() -> SubpassBeginInfoKHR { + SubpassBeginInfoKHR { + s_type: StructureType::SUBPASS_BEGIN_INFO_KHR, + p_next: ::std::ptr::null(), + contents: SubpassContents::default(), + } + } +} +impl SubpassBeginInfoKHR { + pub fn builder<'a>() -> SubpassBeginInfoKHRBuilder<'a> { + SubpassBeginInfoKHRBuilder { + inner: SubpassBeginInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct SubpassBeginInfoKHRBuilder<'a> { + inner: SubpassBeginInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsSubpassBeginInfoKHR {} +impl<'a> ::std::ops::Deref for SubpassBeginInfoKHRBuilder<'a> { + type Target = SubpassBeginInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> SubpassBeginInfoKHRBuilder<'a> { + pub fn contents(mut self, contents: SubpassContents) -> SubpassBeginInfoKHRBuilder<'a> { + self.inner.contents = contents; + self + } + pub fn next(mut self, next: &'a T) -> SubpassBeginInfoKHRBuilder<'a> + where + T: ExtendsSubpassBeginInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> SubpassBeginInfoKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct SubpassEndInfoKHR { + pub s_type: StructureType, + pub p_next: *const c_void, +} +impl ::std::default::Default for SubpassEndInfoKHR { + fn default() -> SubpassEndInfoKHR { + SubpassEndInfoKHR { + s_type: StructureType::SUBPASS_END_INFO_KHR, + p_next: ::std::ptr::null(), + } + } +} +impl SubpassEndInfoKHR { + pub fn builder<'a>() -> SubpassEndInfoKHRBuilder<'a> { + SubpassEndInfoKHRBuilder { + inner: SubpassEndInfoKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct SubpassEndInfoKHRBuilder<'a> { + inner: SubpassEndInfoKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsSubpassEndInfoKHR {} +impl<'a> ::std::ops::Deref for SubpassEndInfoKHRBuilder<'a> { + type Target = SubpassEndInfoKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> SubpassEndInfoKHRBuilder<'a> { + pub fn next(mut self, next: &'a T) -> SubpassEndInfoKHRBuilder<'a> + where + T: ExtendsSubpassEndInfoKHR, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> SubpassEndInfoKHR { + self.inner + } +} +#[repr(C)] #[derive(Copy, Clone, Default, Debug)] pub struct VertexInputBindingDivisorDescriptionEXT { pub binding: u32, @@ -27423,6 +31614,11 @@ pub struct PipelineVertexInputDivisorStateCreateInfoEXTBuilder<'a> { inner: PipelineVertexInputDivisorStateCreateInfoEXT, marker: ::std::marker::PhantomData<&'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 { @@ -27434,10 +31630,17 @@ impl<'a> PipelineVertexInputDivisorStateCreateInfoEXTBuilder<'a> { mut self, vertex_binding_divisors: &'a [VertexInputBindingDivisorDescriptionEXT], ) -> PipelineVertexInputDivisorStateCreateInfoEXTBuilder<'a> { - self.inner.vertex_binding_divisor_count = vertex_binding_divisors.len() as u32; + self.inner.vertex_binding_divisor_count = vertex_binding_divisors.len() as _; self.inner.p_vertex_binding_divisors = vertex_binding_divisors.as_ptr(); self } + pub fn next(mut self, next: &'a T) -> PipelineVertexInputDivisorStateCreateInfoEXTBuilder<'a> + where + T: ExtendsPipelineVertexInputDivisorStateCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> PipelineVertexInputDivisorStateCreateInfoEXT { self.inner } @@ -27470,6 +31673,8 @@ pub struct PhysicalDeviceVertexAttributeDivisorPropertiesEXTBuilder<'a> { inner: PhysicalDeviceVertexAttributeDivisorPropertiesEXT, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsPhysicalDeviceVertexAttributeDivisorPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceVertexAttributeDivisorPropertiesEXT {} impl<'a> ::std::ops::Deref for PhysicalDeviceVertexAttributeDivisorPropertiesEXTBuilder<'a> { type Target = PhysicalDeviceVertexAttributeDivisorPropertiesEXT; fn deref(&self) -> &Self::Target { @@ -27484,12 +31689,101 @@ impl<'a> PhysicalDeviceVertexAttributeDivisorPropertiesEXTBuilder<'a> { self.inner.max_vertex_attrib_divisor = max_vertex_attrib_divisor; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceVertexAttributeDivisorPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceVertexAttributeDivisorPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> PhysicalDeviceVertexAttributeDivisorPropertiesEXT { self.inner } } #[repr(C)] #[derive(Copy, Clone, Debug)] +pub struct PhysicalDevicePCIBusInfoPropertiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub pci_domain: u16, + pub pci_bus: u8, + pub pci_device: u8, + pub pci_function: u8, +} +impl ::std::default::Default for PhysicalDevicePCIBusInfoPropertiesEXT { + fn default() -> PhysicalDevicePCIBusInfoPropertiesEXT { + PhysicalDevicePCIBusInfoPropertiesEXT { + s_type: StructureType::PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT, + p_next: ::std::ptr::null_mut(), + pci_domain: u16::default(), + pci_bus: u8::default(), + pci_device: u8::default(), + pci_function: u8::default(), + } + } +} +impl PhysicalDevicePCIBusInfoPropertiesEXT { + pub fn builder<'a>() -> PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + PhysicalDevicePCIBusInfoPropertiesEXTBuilder { + inner: PhysicalDevicePCIBusInfoPropertiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + inner: PhysicalDevicePCIBusInfoPropertiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDevicePCIBusInfoPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDevicePCIBusInfoPropertiesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + type Target = PhysicalDevicePCIBusInfoPropertiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + pub fn pci_domain( + mut self, + pci_domain: u16, + ) -> PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + self.inner.pci_domain = pci_domain; + self + } + pub fn pci_bus(mut self, pci_bus: u8) -> PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + self.inner.pci_bus = pci_bus; + self + } + pub fn pci_device( + mut self, + pci_device: u8, + ) -> PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + self.inner.pci_device = pci_device; + self + } + pub fn pci_function( + mut self, + pci_function: u8, + ) -> PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> { + self.inner.pci_function = pci_function; + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDevicePCIBusInfoPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDevicePCIBusInfoPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDevicePCIBusInfoPropertiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] pub struct ImportAndroidHardwareBufferInfoANDROID { pub s_type: StructureType, pub p_next: *const c_void, @@ -27516,6 +31810,8 @@ pub struct ImportAndroidHardwareBufferInfoANDROIDBuilder<'a> { inner: ImportAndroidHardwareBufferInfoANDROID, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsImportAndroidHardwareBufferInfoANDROID {} +unsafe impl ExtendsMemoryAllocateInfo for ImportAndroidHardwareBufferInfoANDROID {} impl<'a> ::std::ops::Deref for ImportAndroidHardwareBufferInfoANDROIDBuilder<'a> { type Target = ImportAndroidHardwareBufferInfoANDROID; fn deref(&self) -> &Self::Target { @@ -27530,6 +31826,13 @@ impl<'a> ImportAndroidHardwareBufferInfoANDROIDBuilder<'a> { self.inner.buffer = buffer; self } + pub fn next(mut self, next: &'a T) -> ImportAndroidHardwareBufferInfoANDROIDBuilder<'a> + where + T: ExtendsImportAndroidHardwareBufferInfoANDROID, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> ImportAndroidHardwareBufferInfoANDROID { self.inner } @@ -27562,6 +31865,8 @@ pub struct AndroidHardwareBufferUsageANDROIDBuilder<'a> { inner: AndroidHardwareBufferUsageANDROID, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsAndroidHardwareBufferUsageANDROID {} +unsafe impl ExtendsImageFormatProperties2 for AndroidHardwareBufferUsageANDROID {} impl<'a> ::std::ops::Deref for AndroidHardwareBufferUsageANDROIDBuilder<'a> { type Target = AndroidHardwareBufferUsageANDROID; fn deref(&self) -> &Self::Target { @@ -27576,6 +31881,13 @@ impl<'a> AndroidHardwareBufferUsageANDROIDBuilder<'a> { self.inner.android_hardware_buffer_usage = android_hardware_buffer_usage; self } + pub fn next(mut self, next: &'a mut T) -> AndroidHardwareBufferUsageANDROIDBuilder<'a> + where + T: ExtendsAndroidHardwareBufferUsageANDROID, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> AndroidHardwareBufferUsageANDROID { self.inner } @@ -27610,6 +31922,7 @@ pub struct AndroidHardwareBufferPropertiesANDROIDBuilder<'a> { inner: AndroidHardwareBufferPropertiesANDROID, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsAndroidHardwareBufferPropertiesANDROID {} impl<'a> ::std::ops::Deref for AndroidHardwareBufferPropertiesANDROIDBuilder<'a> { type Target = AndroidHardwareBufferPropertiesANDROID; fn deref(&self) -> &Self::Target { @@ -27631,6 +31944,13 @@ impl<'a> AndroidHardwareBufferPropertiesANDROIDBuilder<'a> { self.inner.memory_type_bits = memory_type_bits; self } + pub fn next(mut self, next: &'a mut T) -> AndroidHardwareBufferPropertiesANDROIDBuilder<'a> + where + T: ExtendsAndroidHardwareBufferPropertiesANDROID, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> AndroidHardwareBufferPropertiesANDROID { self.inner } @@ -27663,6 +31983,7 @@ pub struct MemoryGetAndroidHardwareBufferInfoANDROIDBuilder<'a> { inner: MemoryGetAndroidHardwareBufferInfoANDROID, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsMemoryGetAndroidHardwareBufferInfoANDROID {} impl<'a> ::std::ops::Deref for MemoryGetAndroidHardwareBufferInfoANDROIDBuilder<'a> { type Target = MemoryGetAndroidHardwareBufferInfoANDROID; fn deref(&self) -> &Self::Target { @@ -27677,6 +31998,13 @@ impl<'a> MemoryGetAndroidHardwareBufferInfoANDROIDBuilder<'a> { self.inner.memory = memory; self } + pub fn next(mut self, next: &'a T) -> MemoryGetAndroidHardwareBufferInfoANDROIDBuilder<'a> + where + T: ExtendsMemoryGetAndroidHardwareBufferInfoANDROID, + { + self.inner.p_next = next as *const T as *const c_void; + self + } pub fn build(self) -> MemoryGetAndroidHardwareBufferInfoANDROID { self.inner } @@ -27723,6 +32051,11 @@ pub struct AndroidHardwareBufferFormatPropertiesANDROIDBuilder<'a> { inner: AndroidHardwareBufferFormatPropertiesANDROID, marker: ::std::marker::PhantomData<&'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 { @@ -27786,12 +32119,83 @@ impl<'a> AndroidHardwareBufferFormatPropertiesANDROIDBuilder<'a> { self.inner.suggested_y_chroma_offset = suggested_y_chroma_offset; self } + pub fn next( + mut self, + next: &'a mut T, + ) -> AndroidHardwareBufferFormatPropertiesANDROIDBuilder<'a> + where + T: ExtendsAndroidHardwareBufferFormatPropertiesANDROID, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> AndroidHardwareBufferFormatPropertiesANDROID { self.inner } } #[repr(C)] #[derive(Copy, Clone, Debug)] +pub struct CommandBufferInheritanceConditionalRenderingInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub conditional_rendering_enable: Bool32, +} +impl ::std::default::Default for CommandBufferInheritanceConditionalRenderingInfoEXT { + fn default() -> CommandBufferInheritanceConditionalRenderingInfoEXT { + CommandBufferInheritanceConditionalRenderingInfoEXT { + s_type: StructureType::COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT, + p_next: ::std::ptr::null(), + conditional_rendering_enable: Bool32::default(), + } + } +} +impl CommandBufferInheritanceConditionalRenderingInfoEXT { + pub fn builder<'a>() -> CommandBufferInheritanceConditionalRenderingInfoEXTBuilder<'a> { + CommandBufferInheritanceConditionalRenderingInfoEXTBuilder { + inner: CommandBufferInheritanceConditionalRenderingInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct CommandBufferInheritanceConditionalRenderingInfoEXTBuilder<'a> { + inner: CommandBufferInheritanceConditionalRenderingInfoEXT, + marker: ::std::marker::PhantomData<&'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 { + &self.inner + } +} +impl<'a> CommandBufferInheritanceConditionalRenderingInfoEXTBuilder<'a> { + pub fn conditional_rendering_enable( + mut self, + conditional_rendering_enable: bool, + ) -> CommandBufferInheritanceConditionalRenderingInfoEXTBuilder<'a> { + self.inner.conditional_rendering_enable = conditional_rendering_enable.into(); + self + } + pub fn next( + mut self, + next: &'a T, + ) -> CommandBufferInheritanceConditionalRenderingInfoEXTBuilder<'a> + where + T: ExtendsCommandBufferInheritanceConditionalRenderingInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> CommandBufferInheritanceConditionalRenderingInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] pub struct ExternalFormatANDROID { pub s_type: StructureType, pub p_next: *mut c_void, @@ -27818,6 +32222,9 @@ pub struct ExternalFormatANDROIDBuilder<'a> { inner: ExternalFormatANDROID, marker: ::std::marker::PhantomData<&'a ()>, } +pub unsafe trait ExtendsExternalFormatANDROID {} +unsafe impl ExtendsImageCreateInfo for ExternalFormatANDROID {} +unsafe impl ExtendsSamplerYcbcrConversionCreateInfo for ExternalFormatANDROID {} impl<'a> ::std::ops::Deref for ExternalFormatANDROIDBuilder<'a> { type Target = ExternalFormatANDROID; fn deref(&self) -> &Self::Target { @@ -27829,10 +32236,3426 @@ impl<'a> ExternalFormatANDROIDBuilder<'a> { self.inner.external_format = external_format; self } + pub fn next(mut self, next: &'a mut T) -> ExternalFormatANDROIDBuilder<'a> + where + T: ExtendsExternalFormatANDROID, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } pub fn build(self) -> ExternalFormatANDROID { self.inner } } +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDevice8BitStorageFeaturesKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub storage_buffer8_bit_access: Bool32, + pub uniform_and_storage_buffer8_bit_access: Bool32, + pub storage_push_constant8: Bool32, +} +impl ::std::default::Default for PhysicalDevice8BitStorageFeaturesKHR { + fn default() -> PhysicalDevice8BitStorageFeaturesKHR { + PhysicalDevice8BitStorageFeaturesKHR { + s_type: StructureType::PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR, + p_next: ::std::ptr::null_mut(), + storage_buffer8_bit_access: Bool32::default(), + uniform_and_storage_buffer8_bit_access: Bool32::default(), + storage_push_constant8: Bool32::default(), + } + } +} +impl PhysicalDevice8BitStorageFeaturesKHR { + pub fn builder<'a>() -> PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> { + PhysicalDevice8BitStorageFeaturesKHRBuilder { + inner: PhysicalDevice8BitStorageFeaturesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> { + inner: PhysicalDevice8BitStorageFeaturesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDevice8BitStorageFeaturesKHR {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDevice8BitStorageFeaturesKHR {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDevice8BitStorageFeaturesKHR {} +impl<'a> ::std::ops::Deref for PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> { + type Target = PhysicalDevice8BitStorageFeaturesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> { + pub fn storage_buffer8_bit_access( + mut self, + storage_buffer8_bit_access: bool, + ) -> PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> { + self.inner.storage_buffer8_bit_access = storage_buffer8_bit_access.into(); + self + } + pub fn uniform_and_storage_buffer8_bit_access( + mut self, + uniform_and_storage_buffer8_bit_access: bool, + ) -> PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> { + self.inner.uniform_and_storage_buffer8_bit_access = + uniform_and_storage_buffer8_bit_access.into(); + self + } + pub fn storage_push_constant8( + mut self, + storage_push_constant8: bool, + ) -> PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> { + self.inner.storage_push_constant8 = storage_push_constant8.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDevice8BitStorageFeaturesKHRBuilder<'a> + where + T: ExtendsPhysicalDevice8BitStorageFeaturesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDevice8BitStorageFeaturesKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceConditionalRenderingFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub conditional_rendering: Bool32, + pub inherited_conditional_rendering: Bool32, +} +impl ::std::default::Default for PhysicalDeviceConditionalRenderingFeaturesEXT { + fn default() -> PhysicalDeviceConditionalRenderingFeaturesEXT { + PhysicalDeviceConditionalRenderingFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + conditional_rendering: Bool32::default(), + inherited_conditional_rendering: Bool32::default(), + } + } +} +impl PhysicalDeviceConditionalRenderingFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceConditionalRenderingFeaturesEXTBuilder<'a> { + PhysicalDeviceConditionalRenderingFeaturesEXTBuilder { + inner: PhysicalDeviceConditionalRenderingFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceConditionalRenderingFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceConditionalRenderingFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceConditionalRenderingFeaturesEXT {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceConditionalRenderingFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceConditionalRenderingFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceConditionalRenderingFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceConditionalRenderingFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceConditionalRenderingFeaturesEXTBuilder<'a> { + pub fn conditional_rendering( + mut self, + conditional_rendering: bool, + ) -> PhysicalDeviceConditionalRenderingFeaturesEXTBuilder<'a> { + self.inner.conditional_rendering = conditional_rendering.into(); + self + } + pub fn inherited_conditional_rendering( + mut self, + inherited_conditional_rendering: bool, + ) -> PhysicalDeviceConditionalRenderingFeaturesEXTBuilder<'a> { + self.inner.inherited_conditional_rendering = inherited_conditional_rendering.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceConditionalRenderingFeaturesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceConditionalRenderingFeaturesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceConditionalRenderingFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceVulkanMemoryModelFeaturesKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub vulkan_memory_model: Bool32, + pub vulkan_memory_model_device_scope: Bool32, +} +impl ::std::default::Default for PhysicalDeviceVulkanMemoryModelFeaturesKHR { + fn default() -> PhysicalDeviceVulkanMemoryModelFeaturesKHR { + PhysicalDeviceVulkanMemoryModelFeaturesKHR { + s_type: StructureType::PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR, + p_next: ::std::ptr::null_mut(), + vulkan_memory_model: Bool32::default(), + vulkan_memory_model_device_scope: Bool32::default(), + } + } +} +impl PhysicalDeviceVulkanMemoryModelFeaturesKHR { + pub fn builder<'a>() -> PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder<'a> { + PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder { + inner: PhysicalDeviceVulkanMemoryModelFeaturesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder<'a> { + inner: PhysicalDeviceVulkanMemoryModelFeaturesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceVulkanMemoryModelFeaturesKHR {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceVulkanMemoryModelFeaturesKHR {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceVulkanMemoryModelFeaturesKHR {} +impl<'a> ::std::ops::Deref for PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder<'a> { + type Target = PhysicalDeviceVulkanMemoryModelFeaturesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder<'a> { + pub fn vulkan_memory_model( + mut self, + vulkan_memory_model: bool, + ) -> PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder<'a> { + self.inner.vulkan_memory_model = vulkan_memory_model.into(); + self + } + pub fn vulkan_memory_model_device_scope( + mut self, + vulkan_memory_model_device_scope: bool, + ) -> PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder<'a> { + self.inner.vulkan_memory_model_device_scope = vulkan_memory_model_device_scope.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceVulkanMemoryModelFeaturesKHRBuilder<'a> + where + T: ExtendsPhysicalDeviceVulkanMemoryModelFeaturesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceVulkanMemoryModelFeaturesKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceShaderAtomicInt64FeaturesKHR { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub shader_buffer_int64_atomics: Bool32, + pub shader_shared_int64_atomics: Bool32, +} +impl ::std::default::Default for PhysicalDeviceShaderAtomicInt64FeaturesKHR { + fn default() -> PhysicalDeviceShaderAtomicInt64FeaturesKHR { + PhysicalDeviceShaderAtomicInt64FeaturesKHR { + s_type: StructureType::PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR, + p_next: ::std::ptr::null_mut(), + shader_buffer_int64_atomics: Bool32::default(), + shader_shared_int64_atomics: Bool32::default(), + } + } +} +impl PhysicalDeviceShaderAtomicInt64FeaturesKHR { + pub fn builder<'a>() -> PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder<'a> { + PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder { + inner: PhysicalDeviceShaderAtomicInt64FeaturesKHR::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder<'a> { + inner: PhysicalDeviceShaderAtomicInt64FeaturesKHR, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceShaderAtomicInt64FeaturesKHR {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceShaderAtomicInt64FeaturesKHR {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceShaderAtomicInt64FeaturesKHR {} +impl<'a> ::std::ops::Deref for PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder<'a> { + type Target = PhysicalDeviceShaderAtomicInt64FeaturesKHR; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder<'a> { + pub fn shader_buffer_int64_atomics( + mut self, + shader_buffer_int64_atomics: bool, + ) -> PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder<'a> { + self.inner.shader_buffer_int64_atomics = shader_buffer_int64_atomics.into(); + self + } + pub fn shader_shared_int64_atomics( + mut self, + shader_shared_int64_atomics: bool, + ) -> PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder<'a> { + self.inner.shader_shared_int64_atomics = shader_shared_int64_atomics.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceShaderAtomicInt64FeaturesKHRBuilder<'a> + where + T: ExtendsPhysicalDeviceShaderAtomicInt64FeaturesKHR, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceShaderAtomicInt64FeaturesKHR { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceVertexAttributeDivisorFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub vertex_attribute_instance_rate_divisor: Bool32, + pub vertex_attribute_instance_rate_zero_divisor: Bool32, +} +impl ::std::default::Default for PhysicalDeviceVertexAttributeDivisorFeaturesEXT { + fn default() -> PhysicalDeviceVertexAttributeDivisorFeaturesEXT { + PhysicalDeviceVertexAttributeDivisorFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + vertex_attribute_instance_rate_divisor: Bool32::default(), + vertex_attribute_instance_rate_zero_divisor: Bool32::default(), + } + } +} +impl PhysicalDeviceVertexAttributeDivisorFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder<'a> { + PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder { + inner: PhysicalDeviceVertexAttributeDivisorFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceVertexAttributeDivisorFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceVertexAttributeDivisorFeaturesEXT {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceVertexAttributeDivisorFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceVertexAttributeDivisorFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceVertexAttributeDivisorFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder<'a> { + pub fn vertex_attribute_instance_rate_divisor( + mut self, + vertex_attribute_instance_rate_divisor: bool, + ) -> PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder<'a> { + self.inner.vertex_attribute_instance_rate_divisor = + vertex_attribute_instance_rate_divisor.into(); + self + } + pub fn vertex_attribute_instance_rate_zero_divisor( + mut self, + vertex_attribute_instance_rate_zero_divisor: bool, + ) -> PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder<'a> { + self.inner.vertex_attribute_instance_rate_zero_divisor = + vertex_attribute_instance_rate_zero_divisor.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceVertexAttributeDivisorFeaturesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceVertexAttributeDivisorFeaturesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceVertexAttributeDivisorFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct QueueFamilyCheckpointPropertiesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub checkpoint_execution_stage_mask: PipelineStageFlags, +} +impl ::std::default::Default for QueueFamilyCheckpointPropertiesNV { + fn default() -> QueueFamilyCheckpointPropertiesNV { + QueueFamilyCheckpointPropertiesNV { + s_type: StructureType::QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV, + p_next: ::std::ptr::null_mut(), + checkpoint_execution_stage_mask: PipelineStageFlags::default(), + } + } +} +impl QueueFamilyCheckpointPropertiesNV { + pub fn builder<'a>() -> QueueFamilyCheckpointPropertiesNVBuilder<'a> { + QueueFamilyCheckpointPropertiesNVBuilder { + inner: QueueFamilyCheckpointPropertiesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct QueueFamilyCheckpointPropertiesNVBuilder<'a> { + inner: QueueFamilyCheckpointPropertiesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsQueueFamilyCheckpointPropertiesNV {} +unsafe impl ExtendsQueueFamilyProperties2 for QueueFamilyCheckpointPropertiesNV {} +impl<'a> ::std::ops::Deref for QueueFamilyCheckpointPropertiesNVBuilder<'a> { + type Target = QueueFamilyCheckpointPropertiesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> QueueFamilyCheckpointPropertiesNVBuilder<'a> { + pub fn checkpoint_execution_stage_mask( + mut self, + checkpoint_execution_stage_mask: PipelineStageFlags, + ) -> QueueFamilyCheckpointPropertiesNVBuilder<'a> { + self.inner.checkpoint_execution_stage_mask = checkpoint_execution_stage_mask; + self + } + pub fn next(mut self, next: &'a mut T) -> QueueFamilyCheckpointPropertiesNVBuilder<'a> + where + T: ExtendsQueueFamilyCheckpointPropertiesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> QueueFamilyCheckpointPropertiesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct CheckpointDataNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub stage: PipelineStageFlags, + pub p_checkpoint_marker: *mut c_void, +} +impl ::std::default::Default for CheckpointDataNV { + fn default() -> CheckpointDataNV { + CheckpointDataNV { + s_type: StructureType::CHECKPOINT_DATA_NV, + p_next: ::std::ptr::null_mut(), + stage: PipelineStageFlags::default(), + p_checkpoint_marker: ::std::ptr::null_mut(), + } + } +} +impl CheckpointDataNV { + pub fn builder<'a>() -> CheckpointDataNVBuilder<'a> { + CheckpointDataNVBuilder { + inner: CheckpointDataNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct CheckpointDataNVBuilder<'a> { + inner: CheckpointDataNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsCheckpointDataNV {} +impl<'a> ::std::ops::Deref for CheckpointDataNVBuilder<'a> { + type Target = CheckpointDataNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> CheckpointDataNVBuilder<'a> { + pub fn stage(mut self, stage: PipelineStageFlags) -> CheckpointDataNVBuilder<'a> { + self.inner.stage = stage; + self + } + pub fn checkpoint_marker( + mut self, + checkpoint_marker: *mut c_void, + ) -> CheckpointDataNVBuilder<'a> { + self.inner.p_checkpoint_marker = checkpoint_marker; + self + } + pub fn next(mut self, next: &'a mut T) -> CheckpointDataNVBuilder<'a> + where + T: ExtendsCheckpointDataNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> CheckpointDataNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct ImageViewASTCDecodeModeEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub decode_mode: Format, +} +impl ::std::default::Default for ImageViewASTCDecodeModeEXT { + fn default() -> ImageViewASTCDecodeModeEXT { + ImageViewASTCDecodeModeEXT { + s_type: StructureType::IMAGE_VIEW_ASTC_DECODE_MODE_EXT, + p_next: ::std::ptr::null(), + decode_mode: Format::default(), + } + } +} +impl ImageViewASTCDecodeModeEXT { + pub fn builder<'a>() -> ImageViewASTCDecodeModeEXTBuilder<'a> { + ImageViewASTCDecodeModeEXTBuilder { + inner: ImageViewASTCDecodeModeEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ImageViewASTCDecodeModeEXTBuilder<'a> { + inner: ImageViewASTCDecodeModeEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsImageViewASTCDecodeModeEXT {} +unsafe impl ExtendsImageViewCreateInfo for ImageViewASTCDecodeModeEXT {} +impl<'a> ::std::ops::Deref for ImageViewASTCDecodeModeEXTBuilder<'a> { + type Target = ImageViewASTCDecodeModeEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ImageViewASTCDecodeModeEXTBuilder<'a> { + pub fn decode_mode(mut self, decode_mode: Format) -> ImageViewASTCDecodeModeEXTBuilder<'a> { + self.inner.decode_mode = decode_mode; + self + } + pub fn next(mut self, next: &'a T) -> ImageViewASTCDecodeModeEXTBuilder<'a> + where + T: ExtendsImageViewASTCDecodeModeEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> ImageViewASTCDecodeModeEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceASTCDecodeFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub decode_mode_shared_exponent: Bool32, +} +impl ::std::default::Default for PhysicalDeviceASTCDecodeFeaturesEXT { + fn default() -> PhysicalDeviceASTCDecodeFeaturesEXT { + PhysicalDeviceASTCDecodeFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + decode_mode_shared_exponent: Bool32::default(), + } + } +} +impl PhysicalDeviceASTCDecodeFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> { + PhysicalDeviceASTCDecodeFeaturesEXTBuilder { + inner: PhysicalDeviceASTCDecodeFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceASTCDecodeFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceASTCDecodeFeaturesEXT {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceASTCDecodeFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceASTCDecodeFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceASTCDecodeFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> { + pub fn decode_mode_shared_exponent( + mut self, + decode_mode_shared_exponent: bool, + ) -> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> { + self.inner.decode_mode_shared_exponent = decode_mode_shared_exponent.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceASTCDecodeFeaturesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceASTCDecodeFeaturesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceASTCDecodeFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceTransformFeedbackFeaturesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub transform_feedback: Bool32, + pub geometry_streams: Bool32, +} +impl ::std::default::Default for PhysicalDeviceTransformFeedbackFeaturesEXT { + fn default() -> PhysicalDeviceTransformFeedbackFeaturesEXT { + PhysicalDeviceTransformFeedbackFeaturesEXT { + s_type: StructureType::PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT, + p_next: ::std::ptr::null_mut(), + transform_feedback: Bool32::default(), + geometry_streams: Bool32::default(), + } + } +} +impl PhysicalDeviceTransformFeedbackFeaturesEXT { + pub fn builder<'a>() -> PhysicalDeviceTransformFeedbackFeaturesEXTBuilder<'a> { + PhysicalDeviceTransformFeedbackFeaturesEXTBuilder { + inner: PhysicalDeviceTransformFeedbackFeaturesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceTransformFeedbackFeaturesEXTBuilder<'a> { + inner: PhysicalDeviceTransformFeedbackFeaturesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceTransformFeedbackFeaturesEXT {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceTransformFeedbackFeaturesEXT {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceTransformFeedbackFeaturesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceTransformFeedbackFeaturesEXTBuilder<'a> { + type Target = PhysicalDeviceTransformFeedbackFeaturesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceTransformFeedbackFeaturesEXTBuilder<'a> { + pub fn transform_feedback( + mut self, + transform_feedback: bool, + ) -> PhysicalDeviceTransformFeedbackFeaturesEXTBuilder<'a> { + self.inner.transform_feedback = transform_feedback.into(); + self + } + pub fn geometry_streams( + mut self, + geometry_streams: bool, + ) -> PhysicalDeviceTransformFeedbackFeaturesEXTBuilder<'a> { + self.inner.geometry_streams = geometry_streams.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceTransformFeedbackFeaturesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceTransformFeedbackFeaturesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceTransformFeedbackFeaturesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceTransformFeedbackPropertiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_transform_feedback_streams: u32, + pub max_transform_feedback_buffers: u32, + pub max_transform_feedback_buffer_size: DeviceSize, + pub max_transform_feedback_stream_data_size: u32, + pub max_transform_feedback_buffer_data_size: u32, + pub max_transform_feedback_buffer_data_stride: u32, + pub transform_feedback_queries: Bool32, + pub transform_feedback_streams_lines_triangles: Bool32, + pub transform_feedback_rasterization_stream_select: Bool32, + pub transform_feedback_draw: Bool32, +} +impl ::std::default::Default for PhysicalDeviceTransformFeedbackPropertiesEXT { + fn default() -> PhysicalDeviceTransformFeedbackPropertiesEXT { + PhysicalDeviceTransformFeedbackPropertiesEXT { + s_type: StructureType::PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, + p_next: ::std::ptr::null_mut(), + max_transform_feedback_streams: u32::default(), + max_transform_feedback_buffers: u32::default(), + max_transform_feedback_buffer_size: DeviceSize::default(), + max_transform_feedback_stream_data_size: u32::default(), + max_transform_feedback_buffer_data_size: u32::default(), + max_transform_feedback_buffer_data_stride: u32::default(), + transform_feedback_queries: Bool32::default(), + transform_feedback_streams_lines_triangles: Bool32::default(), + transform_feedback_rasterization_stream_select: Bool32::default(), + transform_feedback_draw: Bool32::default(), + } + } +} +impl PhysicalDeviceTransformFeedbackPropertiesEXT { + pub fn builder<'a>() -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + PhysicalDeviceTransformFeedbackPropertiesEXTBuilder { + inner: PhysicalDeviceTransformFeedbackPropertiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + inner: PhysicalDeviceTransformFeedbackPropertiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceTransformFeedbackPropertiesEXT {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceTransformFeedbackPropertiesEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + type Target = PhysicalDeviceTransformFeedbackPropertiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + pub fn max_transform_feedback_streams( + mut self, + max_transform_feedback_streams: u32, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.max_transform_feedback_streams = max_transform_feedback_streams; + self + } + pub fn max_transform_feedback_buffers( + mut self, + max_transform_feedback_buffers: u32, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.max_transform_feedback_buffers = max_transform_feedback_buffers; + self + } + pub fn max_transform_feedback_buffer_size( + mut self, + max_transform_feedback_buffer_size: DeviceSize, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.max_transform_feedback_buffer_size = max_transform_feedback_buffer_size; + self + } + pub fn max_transform_feedback_stream_data_size( + mut self, + max_transform_feedback_stream_data_size: u32, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.max_transform_feedback_stream_data_size = + max_transform_feedback_stream_data_size; + self + } + pub fn max_transform_feedback_buffer_data_size( + mut self, + max_transform_feedback_buffer_data_size: u32, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.max_transform_feedback_buffer_data_size = + max_transform_feedback_buffer_data_size; + self + } + pub fn max_transform_feedback_buffer_data_stride( + mut self, + max_transform_feedback_buffer_data_stride: u32, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.max_transform_feedback_buffer_data_stride = + max_transform_feedback_buffer_data_stride; + self + } + pub fn transform_feedback_queries( + mut self, + transform_feedback_queries: bool, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.transform_feedback_queries = transform_feedback_queries.into(); + self + } + pub fn transform_feedback_streams_lines_triangles( + mut self, + transform_feedback_streams_lines_triangles: bool, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.transform_feedback_streams_lines_triangles = + transform_feedback_streams_lines_triangles.into(); + self + } + pub fn transform_feedback_rasterization_stream_select( + mut self, + transform_feedback_rasterization_stream_select: bool, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.transform_feedback_rasterization_stream_select = + transform_feedback_rasterization_stream_select.into(); + self + } + pub fn transform_feedback_draw( + mut self, + transform_feedback_draw: bool, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> { + self.inner.transform_feedback_draw = transform_feedback_draw.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceTransformFeedbackPropertiesEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceTransformFeedbackPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceTransformFeedbackPropertiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PipelineRasterizationStateStreamCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: PipelineRasterizationStateStreamCreateFlagsEXT, + pub rasterization_stream: u32, +} +impl ::std::default::Default for PipelineRasterizationStateStreamCreateInfoEXT { + fn default() -> PipelineRasterizationStateStreamCreateInfoEXT { + PipelineRasterizationStateStreamCreateInfoEXT { + s_type: StructureType::PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + flags: PipelineRasterizationStateStreamCreateFlagsEXT::default(), + rasterization_stream: u32::default(), + } + } +} +impl PipelineRasterizationStateStreamCreateInfoEXT { + pub fn builder<'a>() -> PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> { + PipelineRasterizationStateStreamCreateInfoEXTBuilder { + inner: PipelineRasterizationStateStreamCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> { + inner: PipelineRasterizationStateStreamCreateInfoEXT, + marker: ::std::marker::PhantomData<&'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 { + &self.inner + } +} +impl<'a> PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> { + pub fn flags( + mut self, + flags: PipelineRasterizationStateStreamCreateFlagsEXT, + ) -> PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn rasterization_stream( + mut self, + rasterization_stream: u32, + ) -> PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> { + self.inner.rasterization_stream = rasterization_stream; + self + } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineRasterizationStateStreamCreateInfoEXTBuilder<'a> + where + T: ExtendsPipelineRasterizationStateStreamCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> PipelineRasterizationStateStreamCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceRepresentativeFragmentTestFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub representative_fragment_test: Bool32, +} +impl ::std::default::Default for PhysicalDeviceRepresentativeFragmentTestFeaturesNV { + fn default() -> PhysicalDeviceRepresentativeFragmentTestFeaturesNV { + PhysicalDeviceRepresentativeFragmentTestFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + representative_fragment_test: Bool32::default(), + } + } +} +impl PhysicalDeviceRepresentativeFragmentTestFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceRepresentativeFragmentTestFeaturesNVBuilder<'a> { + PhysicalDeviceRepresentativeFragmentTestFeaturesNVBuilder { + inner: PhysicalDeviceRepresentativeFragmentTestFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceRepresentativeFragmentTestFeaturesNVBuilder<'a> { + inner: PhysicalDeviceRepresentativeFragmentTestFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceRepresentativeFragmentTestFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceRepresentativeFragmentTestFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceRepresentativeFragmentTestFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceRepresentativeFragmentTestFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceRepresentativeFragmentTestFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceRepresentativeFragmentTestFeaturesNVBuilder<'a> { + pub fn representative_fragment_test( + mut self, + representative_fragment_test: bool, + ) -> PhysicalDeviceRepresentativeFragmentTestFeaturesNVBuilder<'a> { + self.inner.representative_fragment_test = representative_fragment_test.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceRepresentativeFragmentTestFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceRepresentativeFragmentTestFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceRepresentativeFragmentTestFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PipelineRepresentativeFragmentTestStateCreateInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub representative_fragment_test_enable: Bool32, +} +impl ::std::default::Default for PipelineRepresentativeFragmentTestStateCreateInfoNV { + fn default() -> PipelineRepresentativeFragmentTestStateCreateInfoNV { + PipelineRepresentativeFragmentTestStateCreateInfoNV { + s_type: StructureType::PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV, + p_next: ::std::ptr::null(), + representative_fragment_test_enable: Bool32::default(), + } + } +} +impl PipelineRepresentativeFragmentTestStateCreateInfoNV { + pub fn builder<'a>() -> PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder<'a> { + PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder { + inner: PipelineRepresentativeFragmentTestStateCreateInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder<'a> { + inner: PipelineRepresentativeFragmentTestStateCreateInfoNV, + marker: ::std::marker::PhantomData<&'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 { + &self.inner + } +} +impl<'a> PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder<'a> { + pub fn representative_fragment_test_enable( + mut self, + representative_fragment_test_enable: bool, + ) -> PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder<'a> { + self.inner.representative_fragment_test_enable = representative_fragment_test_enable.into(); + self + } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineRepresentativeFragmentTestStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineRepresentativeFragmentTestStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> PipelineRepresentativeFragmentTestStateCreateInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceExclusiveScissorFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub exclusive_scissor: Bool32, +} +impl ::std::default::Default for PhysicalDeviceExclusiveScissorFeaturesNV { + fn default() -> PhysicalDeviceExclusiveScissorFeaturesNV { + PhysicalDeviceExclusiveScissorFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + exclusive_scissor: Bool32::default(), + } + } +} +impl PhysicalDeviceExclusiveScissorFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceExclusiveScissorFeaturesNVBuilder<'a> { + PhysicalDeviceExclusiveScissorFeaturesNVBuilder { + inner: PhysicalDeviceExclusiveScissorFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceExclusiveScissorFeaturesNVBuilder<'a> { + inner: PhysicalDeviceExclusiveScissorFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceExclusiveScissorFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceExclusiveScissorFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceExclusiveScissorFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceExclusiveScissorFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceExclusiveScissorFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceExclusiveScissorFeaturesNVBuilder<'a> { + pub fn exclusive_scissor( + mut self, + exclusive_scissor: bool, + ) -> PhysicalDeviceExclusiveScissorFeaturesNVBuilder<'a> { + self.inner.exclusive_scissor = exclusive_scissor.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceExclusiveScissorFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceExclusiveScissorFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceExclusiveScissorFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PipelineViewportExclusiveScissorStateCreateInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub exclusive_scissor_count: u32, + pub p_exclusive_scissors: *const Rect2D, +} +impl ::std::default::Default for PipelineViewportExclusiveScissorStateCreateInfoNV { + fn default() -> PipelineViewportExclusiveScissorStateCreateInfoNV { + PipelineViewportExclusiveScissorStateCreateInfoNV { + s_type: StructureType::PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV, + p_next: ::std::ptr::null(), + exclusive_scissor_count: u32::default(), + p_exclusive_scissors: ::std::ptr::null(), + } + } +} +impl PipelineViewportExclusiveScissorStateCreateInfoNV { + pub fn builder<'a>() -> PipelineViewportExclusiveScissorStateCreateInfoNVBuilder<'a> { + PipelineViewportExclusiveScissorStateCreateInfoNVBuilder { + inner: PipelineViewportExclusiveScissorStateCreateInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PipelineViewportExclusiveScissorStateCreateInfoNVBuilder<'a> { + inner: PipelineViewportExclusiveScissorStateCreateInfoNV, + marker: ::std::marker::PhantomData<&'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 { + &self.inner + } +} +impl<'a> PipelineViewportExclusiveScissorStateCreateInfoNVBuilder<'a> { + pub fn exclusive_scissors( + mut self, + exclusive_scissors: &'a [Rect2D], + ) -> PipelineViewportExclusiveScissorStateCreateInfoNVBuilder<'a> { + self.inner.exclusive_scissor_count = exclusive_scissors.len() as _; + self.inner.p_exclusive_scissors = exclusive_scissors.as_ptr(); + self + } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineViewportExclusiveScissorStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineViewportExclusiveScissorStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> PipelineViewportExclusiveScissorStateCreateInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceCornerSampledImageFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub corner_sampled_image: Bool32, +} +impl ::std::default::Default for PhysicalDeviceCornerSampledImageFeaturesNV { + fn default() -> PhysicalDeviceCornerSampledImageFeaturesNV { + PhysicalDeviceCornerSampledImageFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + corner_sampled_image: Bool32::default(), + } + } +} +impl PhysicalDeviceCornerSampledImageFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceCornerSampledImageFeaturesNVBuilder<'a> { + PhysicalDeviceCornerSampledImageFeaturesNVBuilder { + inner: PhysicalDeviceCornerSampledImageFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceCornerSampledImageFeaturesNVBuilder<'a> { + inner: PhysicalDeviceCornerSampledImageFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceCornerSampledImageFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceCornerSampledImageFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceCornerSampledImageFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceCornerSampledImageFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceCornerSampledImageFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceCornerSampledImageFeaturesNVBuilder<'a> { + pub fn corner_sampled_image( + mut self, + corner_sampled_image: bool, + ) -> PhysicalDeviceCornerSampledImageFeaturesNVBuilder<'a> { + self.inner.corner_sampled_image = corner_sampled_image.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceCornerSampledImageFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceCornerSampledImageFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceCornerSampledImageFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceComputeShaderDerivativesFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub compute_derivative_group_quads: Bool32, + pub compute_derivative_group_linear: Bool32, +} +impl ::std::default::Default for PhysicalDeviceComputeShaderDerivativesFeaturesNV { + fn default() -> PhysicalDeviceComputeShaderDerivativesFeaturesNV { + PhysicalDeviceComputeShaderDerivativesFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + compute_derivative_group_quads: Bool32::default(), + compute_derivative_group_linear: Bool32::default(), + } + } +} +impl PhysicalDeviceComputeShaderDerivativesFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder<'a> { + PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder { + inner: PhysicalDeviceComputeShaderDerivativesFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder<'a> { + inner: PhysicalDeviceComputeShaderDerivativesFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceComputeShaderDerivativesFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceComputeShaderDerivativesFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceComputeShaderDerivativesFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceComputeShaderDerivativesFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder<'a> { + pub fn compute_derivative_group_quads( + mut self, + compute_derivative_group_quads: bool, + ) -> PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder<'a> { + self.inner.compute_derivative_group_quads = compute_derivative_group_quads.into(); + self + } + pub fn compute_derivative_group_linear( + mut self, + compute_derivative_group_linear: bool, + ) -> PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder<'a> { + self.inner.compute_derivative_group_linear = compute_derivative_group_linear.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceComputeShaderDerivativesFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceComputeShaderDerivativesFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceComputeShaderDerivativesFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceFragmentShaderBarycentricFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub fragment_shader_barycentric: Bool32, +} +impl ::std::default::Default for PhysicalDeviceFragmentShaderBarycentricFeaturesNV { + fn default() -> PhysicalDeviceFragmentShaderBarycentricFeaturesNV { + PhysicalDeviceFragmentShaderBarycentricFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + fragment_shader_barycentric: Bool32::default(), + } + } +} +impl PhysicalDeviceFragmentShaderBarycentricFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceFragmentShaderBarycentricFeaturesNVBuilder<'a> { + PhysicalDeviceFragmentShaderBarycentricFeaturesNVBuilder { + inner: PhysicalDeviceFragmentShaderBarycentricFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceFragmentShaderBarycentricFeaturesNVBuilder<'a> { + inner: PhysicalDeviceFragmentShaderBarycentricFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceFragmentShaderBarycentricFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceFragmentShaderBarycentricFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceFragmentShaderBarycentricFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceFragmentShaderBarycentricFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceFragmentShaderBarycentricFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceFragmentShaderBarycentricFeaturesNVBuilder<'a> { + pub fn fragment_shader_barycentric( + mut self, + fragment_shader_barycentric: bool, + ) -> PhysicalDeviceFragmentShaderBarycentricFeaturesNVBuilder<'a> { + self.inner.fragment_shader_barycentric = fragment_shader_barycentric.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceFragmentShaderBarycentricFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceFragmentShaderBarycentricFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceFragmentShaderBarycentricFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceShaderImageFootprintFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub image_footprint: Bool32, +} +impl ::std::default::Default for PhysicalDeviceShaderImageFootprintFeaturesNV { + fn default() -> PhysicalDeviceShaderImageFootprintFeaturesNV { + PhysicalDeviceShaderImageFootprintFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + image_footprint: Bool32::default(), + } + } +} +impl PhysicalDeviceShaderImageFootprintFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceShaderImageFootprintFeaturesNVBuilder<'a> { + PhysicalDeviceShaderImageFootprintFeaturesNVBuilder { + inner: PhysicalDeviceShaderImageFootprintFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceShaderImageFootprintFeaturesNVBuilder<'a> { + inner: PhysicalDeviceShaderImageFootprintFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceShaderImageFootprintFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceShaderImageFootprintFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceShaderImageFootprintFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceShaderImageFootprintFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceShaderImageFootprintFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceShaderImageFootprintFeaturesNVBuilder<'a> { + pub fn image_footprint( + mut self, + image_footprint: bool, + ) -> PhysicalDeviceShaderImageFootprintFeaturesNVBuilder<'a> { + self.inner.image_footprint = image_footprint.into(); + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceShaderImageFootprintFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceShaderImageFootprintFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceShaderImageFootprintFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct ShadingRatePaletteNV { + pub shading_rate_palette_entry_count: u32, + pub p_shading_rate_palette_entries: *const ShadingRatePaletteEntryNV, +} +impl ::std::default::Default for ShadingRatePaletteNV { + fn default() -> ShadingRatePaletteNV { + ShadingRatePaletteNV { + shading_rate_palette_entry_count: u32::default(), + p_shading_rate_palette_entries: ::std::ptr::null(), + } + } +} +impl ShadingRatePaletteNV { + pub fn builder<'a>() -> ShadingRatePaletteNVBuilder<'a> { + ShadingRatePaletteNVBuilder { + inner: ShadingRatePaletteNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ShadingRatePaletteNVBuilder<'a> { + inner: ShadingRatePaletteNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for ShadingRatePaletteNVBuilder<'a> { + type Target = ShadingRatePaletteNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ShadingRatePaletteNVBuilder<'a> { + pub fn shading_rate_palette_entries( + mut self, + shading_rate_palette_entries: &'a [ShadingRatePaletteEntryNV], + ) -> ShadingRatePaletteNVBuilder<'a> { + self.inner.shading_rate_palette_entry_count = shading_rate_palette_entries.len() as _; + self.inner.p_shading_rate_palette_entries = shading_rate_palette_entries.as_ptr(); + self + } + pub fn build(self) -> ShadingRatePaletteNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PipelineViewportShadingRateImageStateCreateInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub shading_rate_image_enable: Bool32, + pub viewport_count: u32, + pub p_shading_rate_palettes: *const ShadingRatePaletteNV, +} +impl ::std::default::Default for PipelineViewportShadingRateImageStateCreateInfoNV { + fn default() -> PipelineViewportShadingRateImageStateCreateInfoNV { + PipelineViewportShadingRateImageStateCreateInfoNV { + s_type: StructureType::PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV, + p_next: ::std::ptr::null(), + shading_rate_image_enable: Bool32::default(), + viewport_count: u32::default(), + p_shading_rate_palettes: ::std::ptr::null(), + } + } +} +impl PipelineViewportShadingRateImageStateCreateInfoNV { + pub fn builder<'a>() -> PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> { + PipelineViewportShadingRateImageStateCreateInfoNVBuilder { + inner: PipelineViewportShadingRateImageStateCreateInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> { + inner: PipelineViewportShadingRateImageStateCreateInfoNV, + marker: ::std::marker::PhantomData<&'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 { + &self.inner + } +} +impl<'a> PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> { + pub fn shading_rate_image_enable( + mut self, + shading_rate_image_enable: bool, + ) -> PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> { + self.inner.shading_rate_image_enable = shading_rate_image_enable.into(); + self + } + pub fn shading_rate_palettes( + mut self, + shading_rate_palettes: &'a [ShadingRatePaletteNV], + ) -> PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> { + self.inner.viewport_count = shading_rate_palettes.len() as _; + self.inner.p_shading_rate_palettes = shading_rate_palettes.as_ptr(); + self + } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineViewportShadingRateImageStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineViewportShadingRateImageStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> PipelineViewportShadingRateImageStateCreateInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceShadingRateImageFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub shading_rate_image: Bool32, + pub shading_rate_coarse_sample_order: Bool32, +} +impl ::std::default::Default for PhysicalDeviceShadingRateImageFeaturesNV { + fn default() -> PhysicalDeviceShadingRateImageFeaturesNV { + PhysicalDeviceShadingRateImageFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + shading_rate_image: Bool32::default(), + shading_rate_coarse_sample_order: Bool32::default(), + } + } +} +impl PhysicalDeviceShadingRateImageFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceShadingRateImageFeaturesNVBuilder<'a> { + PhysicalDeviceShadingRateImageFeaturesNVBuilder { + inner: PhysicalDeviceShadingRateImageFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceShadingRateImageFeaturesNVBuilder<'a> { + inner: PhysicalDeviceShadingRateImageFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceShadingRateImageFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceShadingRateImageFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceShadingRateImageFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceShadingRateImageFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceShadingRateImageFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceShadingRateImageFeaturesNVBuilder<'a> { + pub fn shading_rate_image( + mut self, + shading_rate_image: bool, + ) -> PhysicalDeviceShadingRateImageFeaturesNVBuilder<'a> { + self.inner.shading_rate_image = shading_rate_image.into(); + self + } + pub fn shading_rate_coarse_sample_order( + mut self, + shading_rate_coarse_sample_order: bool, + ) -> PhysicalDeviceShadingRateImageFeaturesNVBuilder<'a> { + self.inner.shading_rate_coarse_sample_order = shading_rate_coarse_sample_order.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceShadingRateImageFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceShadingRateImageFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceShadingRateImageFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceShadingRateImagePropertiesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub shading_rate_texel_size: Extent2D, + pub shading_rate_palette_size: u32, + pub shading_rate_max_coarse_samples: u32, +} +impl ::std::default::Default for PhysicalDeviceShadingRateImagePropertiesNV { + fn default() -> PhysicalDeviceShadingRateImagePropertiesNV { + PhysicalDeviceShadingRateImagePropertiesNV { + s_type: StructureType::PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV, + p_next: ::std::ptr::null_mut(), + shading_rate_texel_size: Extent2D::default(), + shading_rate_palette_size: u32::default(), + shading_rate_max_coarse_samples: u32::default(), + } + } +} +impl PhysicalDeviceShadingRateImagePropertiesNV { + pub fn builder<'a>() -> PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> { + PhysicalDeviceShadingRateImagePropertiesNVBuilder { + inner: PhysicalDeviceShadingRateImagePropertiesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> { + inner: PhysicalDeviceShadingRateImagePropertiesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceShadingRateImagePropertiesNV {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceShadingRateImagePropertiesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> { + type Target = PhysicalDeviceShadingRateImagePropertiesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> { + pub fn shading_rate_texel_size( + mut self, + shading_rate_texel_size: Extent2D, + ) -> PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> { + self.inner.shading_rate_texel_size = shading_rate_texel_size; + self + } + pub fn shading_rate_palette_size( + mut self, + shading_rate_palette_size: u32, + ) -> PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> { + self.inner.shading_rate_palette_size = shading_rate_palette_size; + self + } + pub fn shading_rate_max_coarse_samples( + mut self, + shading_rate_max_coarse_samples: u32, + ) -> PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> { + self.inner.shading_rate_max_coarse_samples = shading_rate_max_coarse_samples; + self + } + pub fn next( + mut self, + next: &'a mut T, + ) -> PhysicalDeviceShadingRateImagePropertiesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceShadingRateImagePropertiesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceShadingRateImagePropertiesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +pub struct CoarseSampleLocationNV { + pub pixel_x: u32, + pub pixel_y: u32, + pub sample: u32, +} +impl CoarseSampleLocationNV { + pub fn builder<'a>() -> CoarseSampleLocationNVBuilder<'a> { + CoarseSampleLocationNVBuilder { + inner: CoarseSampleLocationNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct CoarseSampleLocationNVBuilder<'a> { + inner: CoarseSampleLocationNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for CoarseSampleLocationNVBuilder<'a> { + type Target = CoarseSampleLocationNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> CoarseSampleLocationNVBuilder<'a> { + pub fn pixel_x(mut self, pixel_x: u32) -> CoarseSampleLocationNVBuilder<'a> { + self.inner.pixel_x = pixel_x; + self + } + pub fn pixel_y(mut self, pixel_y: u32) -> CoarseSampleLocationNVBuilder<'a> { + self.inner.pixel_y = pixel_y; + self + } + pub fn sample(mut self, sample: u32) -> CoarseSampleLocationNVBuilder<'a> { + self.inner.sample = sample; + self + } + pub fn build(self) -> CoarseSampleLocationNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct CoarseSampleOrderCustomNV { + pub shading_rate: ShadingRatePaletteEntryNV, + pub sample_count: u32, + pub sample_location_count: u32, + pub p_sample_locations: *const CoarseSampleLocationNV, +} +impl ::std::default::Default for CoarseSampleOrderCustomNV { + fn default() -> CoarseSampleOrderCustomNV { + CoarseSampleOrderCustomNV { + shading_rate: ShadingRatePaletteEntryNV::default(), + sample_count: u32::default(), + sample_location_count: u32::default(), + p_sample_locations: ::std::ptr::null(), + } + } +} +impl CoarseSampleOrderCustomNV { + pub fn builder<'a>() -> CoarseSampleOrderCustomNVBuilder<'a> { + CoarseSampleOrderCustomNVBuilder { + inner: CoarseSampleOrderCustomNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct CoarseSampleOrderCustomNVBuilder<'a> { + inner: CoarseSampleOrderCustomNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for CoarseSampleOrderCustomNVBuilder<'a> { + type Target = CoarseSampleOrderCustomNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> CoarseSampleOrderCustomNVBuilder<'a> { + pub fn shading_rate( + mut self, + shading_rate: ShadingRatePaletteEntryNV, + ) -> CoarseSampleOrderCustomNVBuilder<'a> { + self.inner.shading_rate = shading_rate; + self + } + pub fn sample_count(mut self, sample_count: u32) -> CoarseSampleOrderCustomNVBuilder<'a> { + self.inner.sample_count = sample_count; + self + } + pub fn sample_locations( + mut self, + sample_locations: &'a [CoarseSampleLocationNV], + ) -> CoarseSampleOrderCustomNVBuilder<'a> { + self.inner.sample_location_count = sample_locations.len() as _; + self.inner.p_sample_locations = sample_locations.as_ptr(); + self + } + pub fn build(self) -> CoarseSampleOrderCustomNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PipelineViewportCoarseSampleOrderStateCreateInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub sample_order_type: CoarseSampleOrderTypeNV, + pub custom_sample_order_count: u32, + pub p_custom_sample_orders: *const CoarseSampleOrderCustomNV, +} +impl ::std::default::Default for PipelineViewportCoarseSampleOrderStateCreateInfoNV { + fn default() -> PipelineViewportCoarseSampleOrderStateCreateInfoNV { + PipelineViewportCoarseSampleOrderStateCreateInfoNV { + s_type: StructureType::PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV, + p_next: ::std::ptr::null(), + sample_order_type: CoarseSampleOrderTypeNV::default(), + custom_sample_order_count: u32::default(), + p_custom_sample_orders: ::std::ptr::null(), + } + } +} +impl PipelineViewportCoarseSampleOrderStateCreateInfoNV { + pub fn builder<'a>() -> PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> { + PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder { + inner: PipelineViewportCoarseSampleOrderStateCreateInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> { + inner: PipelineViewportCoarseSampleOrderStateCreateInfoNV, + marker: ::std::marker::PhantomData<&'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 { + &self.inner + } +} +impl<'a> PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> { + pub fn sample_order_type( + mut self, + sample_order_type: CoarseSampleOrderTypeNV, + ) -> PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> { + self.inner.sample_order_type = sample_order_type; + self + } + pub fn custom_sample_orders( + mut self, + custom_sample_orders: &'a [CoarseSampleOrderCustomNV], + ) -> PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> { + self.inner.custom_sample_order_count = custom_sample_orders.len() as _; + self.inner.p_custom_sample_orders = custom_sample_orders.as_ptr(); + self + } + pub fn next( + mut self, + next: &'a T, + ) -> PipelineViewportCoarseSampleOrderStateCreateInfoNVBuilder<'a> + where + T: ExtendsPipelineViewportCoarseSampleOrderStateCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> PipelineViewportCoarseSampleOrderStateCreateInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceMeshShaderFeaturesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub task_shader: Bool32, + pub mesh_shader: Bool32, +} +impl ::std::default::Default for PhysicalDeviceMeshShaderFeaturesNV { + fn default() -> PhysicalDeviceMeshShaderFeaturesNV { + PhysicalDeviceMeshShaderFeaturesNV { + s_type: StructureType::PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV, + p_next: ::std::ptr::null_mut(), + task_shader: Bool32::default(), + mesh_shader: Bool32::default(), + } + } +} +impl PhysicalDeviceMeshShaderFeaturesNV { + pub fn builder<'a>() -> PhysicalDeviceMeshShaderFeaturesNVBuilder<'a> { + PhysicalDeviceMeshShaderFeaturesNVBuilder { + inner: PhysicalDeviceMeshShaderFeaturesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceMeshShaderFeaturesNVBuilder<'a> { + inner: PhysicalDeviceMeshShaderFeaturesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceMeshShaderFeaturesNV {} +unsafe impl ExtendsPhysicalDeviceFeatures2 for PhysicalDeviceMeshShaderFeaturesNV {} +unsafe impl ExtendsDeviceCreateInfo for PhysicalDeviceMeshShaderFeaturesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceMeshShaderFeaturesNVBuilder<'a> { + type Target = PhysicalDeviceMeshShaderFeaturesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceMeshShaderFeaturesNVBuilder<'a> { + pub fn task_shader( + mut self, + task_shader: bool, + ) -> PhysicalDeviceMeshShaderFeaturesNVBuilder<'a> { + self.inner.task_shader = task_shader.into(); + self + } + pub fn mesh_shader( + mut self, + mesh_shader: bool, + ) -> PhysicalDeviceMeshShaderFeaturesNVBuilder<'a> { + self.inner.mesh_shader = mesh_shader.into(); + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceMeshShaderFeaturesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceMeshShaderFeaturesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceMeshShaderFeaturesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceMeshShaderPropertiesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub max_draw_mesh_tasks_count: u32, + pub max_task_work_group_invocations: u32, + pub max_task_work_group_size: [u32; 3], + pub max_task_total_memory_size: u32, + pub max_task_output_count: u32, + pub max_mesh_work_group_invocations: u32, + pub max_mesh_work_group_size: [u32; 3], + pub max_mesh_total_memory_size: u32, + pub max_mesh_output_vertices: u32, + pub max_mesh_output_primitives: u32, + pub max_mesh_multiview_view_count: u32, + pub mesh_output_per_vertex_granularity: u32, + pub mesh_output_per_primitive_granularity: u32, +} +impl ::std::default::Default for PhysicalDeviceMeshShaderPropertiesNV { + fn default() -> PhysicalDeviceMeshShaderPropertiesNV { + PhysicalDeviceMeshShaderPropertiesNV { + s_type: StructureType::PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV, + p_next: ::std::ptr::null_mut(), + max_draw_mesh_tasks_count: u32::default(), + max_task_work_group_invocations: u32::default(), + max_task_work_group_size: unsafe { ::std::mem::zeroed() }, + max_task_total_memory_size: u32::default(), + max_task_output_count: u32::default(), + max_mesh_work_group_invocations: u32::default(), + max_mesh_work_group_size: unsafe { ::std::mem::zeroed() }, + max_mesh_total_memory_size: u32::default(), + max_mesh_output_vertices: u32::default(), + max_mesh_output_primitives: u32::default(), + max_mesh_multiview_view_count: u32::default(), + mesh_output_per_vertex_granularity: u32::default(), + mesh_output_per_primitive_granularity: u32::default(), + } + } +} +impl PhysicalDeviceMeshShaderPropertiesNV { + pub fn builder<'a>() -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + PhysicalDeviceMeshShaderPropertiesNVBuilder { + inner: PhysicalDeviceMeshShaderPropertiesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + inner: PhysicalDeviceMeshShaderPropertiesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceMeshShaderPropertiesNV {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceMeshShaderPropertiesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + type Target = PhysicalDeviceMeshShaderPropertiesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + pub fn max_draw_mesh_tasks_count( + mut self, + max_draw_mesh_tasks_count: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_draw_mesh_tasks_count = max_draw_mesh_tasks_count; + self + } + pub fn max_task_work_group_invocations( + mut self, + max_task_work_group_invocations: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_task_work_group_invocations = max_task_work_group_invocations; + self + } + pub fn max_task_work_group_size( + mut self, + max_task_work_group_size: [u32; 3], + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_task_work_group_size = max_task_work_group_size; + self + } + pub fn max_task_total_memory_size( + mut self, + max_task_total_memory_size: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_task_total_memory_size = max_task_total_memory_size; + self + } + pub fn max_task_output_count( + mut self, + max_task_output_count: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_task_output_count = max_task_output_count; + self + } + pub fn max_mesh_work_group_invocations( + mut self, + max_mesh_work_group_invocations: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_mesh_work_group_invocations = max_mesh_work_group_invocations; + self + } + pub fn max_mesh_work_group_size( + mut self, + max_mesh_work_group_size: [u32; 3], + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_mesh_work_group_size = max_mesh_work_group_size; + self + } + pub fn max_mesh_total_memory_size( + mut self, + max_mesh_total_memory_size: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_mesh_total_memory_size = max_mesh_total_memory_size; + self + } + pub fn max_mesh_output_vertices( + mut self, + max_mesh_output_vertices: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_mesh_output_vertices = max_mesh_output_vertices; + self + } + pub fn max_mesh_output_primitives( + mut self, + max_mesh_output_primitives: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_mesh_output_primitives = max_mesh_output_primitives; + self + } + pub fn max_mesh_multiview_view_count( + mut self, + max_mesh_multiview_view_count: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.max_mesh_multiview_view_count = max_mesh_multiview_view_count; + self + } + pub fn mesh_output_per_vertex_granularity( + mut self, + mesh_output_per_vertex_granularity: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.mesh_output_per_vertex_granularity = mesh_output_per_vertex_granularity; + self + } + pub fn mesh_output_per_primitive_granularity( + mut self, + mesh_output_per_primitive_granularity: u32, + ) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> { + self.inner.mesh_output_per_primitive_granularity = mesh_output_per_primitive_granularity; + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceMeshShaderPropertiesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceMeshShaderPropertiesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceMeshShaderPropertiesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +pub struct DrawMeshTasksIndirectCommandNV { + pub task_count: u32, + pub first_task: u32, +} +impl DrawMeshTasksIndirectCommandNV { + pub fn builder<'a>() -> DrawMeshTasksIndirectCommandNVBuilder<'a> { + DrawMeshTasksIndirectCommandNVBuilder { + inner: DrawMeshTasksIndirectCommandNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct DrawMeshTasksIndirectCommandNVBuilder<'a> { + inner: DrawMeshTasksIndirectCommandNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for DrawMeshTasksIndirectCommandNVBuilder<'a> { + type Target = DrawMeshTasksIndirectCommandNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> DrawMeshTasksIndirectCommandNVBuilder<'a> { + pub fn task_count(mut self, task_count: u32) -> DrawMeshTasksIndirectCommandNVBuilder<'a> { + self.inner.task_count = task_count; + self + } + pub fn first_task(mut self, first_task: u32) -> DrawMeshTasksIndirectCommandNVBuilder<'a> { + self.inner.first_task = first_task; + self + } + pub fn build(self) -> DrawMeshTasksIndirectCommandNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct RayTracingShaderGroupCreateInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub ty: RayTracingShaderGroupTypeNV, + pub general_shader: u32, + pub closest_hit_shader: u32, + pub any_hit_shader: u32, + pub intersection_shader: u32, +} +impl ::std::default::Default for RayTracingShaderGroupCreateInfoNV { + fn default() -> RayTracingShaderGroupCreateInfoNV { + RayTracingShaderGroupCreateInfoNV { + s_type: StructureType::RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV, + p_next: ::std::ptr::null(), + ty: RayTracingShaderGroupTypeNV::default(), + general_shader: u32::default(), + closest_hit_shader: u32::default(), + any_hit_shader: u32::default(), + intersection_shader: u32::default(), + } + } +} +impl RayTracingShaderGroupCreateInfoNV { + pub fn builder<'a>() -> RayTracingShaderGroupCreateInfoNVBuilder<'a> { + RayTracingShaderGroupCreateInfoNVBuilder { + inner: RayTracingShaderGroupCreateInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct RayTracingShaderGroupCreateInfoNVBuilder<'a> { + inner: RayTracingShaderGroupCreateInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsRayTracingShaderGroupCreateInfoNV {} +impl<'a> ::std::ops::Deref for RayTracingShaderGroupCreateInfoNVBuilder<'a> { + type Target = RayTracingShaderGroupCreateInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> RayTracingShaderGroupCreateInfoNVBuilder<'a> { + pub fn ty( + mut self, + ty: RayTracingShaderGroupTypeNV, + ) -> RayTracingShaderGroupCreateInfoNVBuilder<'a> { + self.inner.ty = ty; + self + } + pub fn general_shader( + mut self, + general_shader: u32, + ) -> RayTracingShaderGroupCreateInfoNVBuilder<'a> { + self.inner.general_shader = general_shader; + self + } + pub fn closest_hit_shader( + mut self, + closest_hit_shader: u32, + ) -> RayTracingShaderGroupCreateInfoNVBuilder<'a> { + self.inner.closest_hit_shader = closest_hit_shader; + self + } + pub fn any_hit_shader( + mut self, + any_hit_shader: u32, + ) -> RayTracingShaderGroupCreateInfoNVBuilder<'a> { + self.inner.any_hit_shader = any_hit_shader; + self + } + pub fn intersection_shader( + mut self, + intersection_shader: u32, + ) -> RayTracingShaderGroupCreateInfoNVBuilder<'a> { + self.inner.intersection_shader = intersection_shader; + self + } + pub fn next(mut self, next: &'a T) -> RayTracingShaderGroupCreateInfoNVBuilder<'a> + where + T: ExtendsRayTracingShaderGroupCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> RayTracingShaderGroupCreateInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct RayTracingPipelineCreateInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub flags: PipelineCreateFlags, + pub stage_count: u32, + pub p_stages: *const PipelineShaderStageCreateInfo, + pub group_count: u32, + pub p_groups: *const RayTracingShaderGroupCreateInfoNV, + pub max_recursion_depth: u32, + pub layout: PipelineLayout, + pub base_pipeline_handle: Pipeline, + pub base_pipeline_index: i32, +} +impl ::std::default::Default for RayTracingPipelineCreateInfoNV { + fn default() -> RayTracingPipelineCreateInfoNV { + RayTracingPipelineCreateInfoNV { + s_type: StructureType::RAY_TRACING_PIPELINE_CREATE_INFO_NV, + p_next: ::std::ptr::null(), + flags: PipelineCreateFlags::default(), + stage_count: u32::default(), + p_stages: ::std::ptr::null(), + group_count: u32::default(), + p_groups: ::std::ptr::null(), + max_recursion_depth: u32::default(), + layout: PipelineLayout::default(), + base_pipeline_handle: Pipeline::default(), + base_pipeline_index: i32::default(), + } + } +} +impl RayTracingPipelineCreateInfoNV { + pub fn builder<'a>() -> RayTracingPipelineCreateInfoNVBuilder<'a> { + RayTracingPipelineCreateInfoNVBuilder { + inner: RayTracingPipelineCreateInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct RayTracingPipelineCreateInfoNVBuilder<'a> { + inner: RayTracingPipelineCreateInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsRayTracingPipelineCreateInfoNV {} +impl<'a> ::std::ops::Deref for RayTracingPipelineCreateInfoNVBuilder<'a> { + type Target = RayTracingPipelineCreateInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> RayTracingPipelineCreateInfoNVBuilder<'a> { + pub fn flags( + mut self, + flags: PipelineCreateFlags, + ) -> RayTracingPipelineCreateInfoNVBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn stages( + mut self, + stages: &'a [PipelineShaderStageCreateInfo], + ) -> RayTracingPipelineCreateInfoNVBuilder<'a> { + self.inner.stage_count = stages.len() as _; + self.inner.p_stages = stages.as_ptr(); + self + } + pub fn groups( + mut self, + groups: &'a [RayTracingShaderGroupCreateInfoNV], + ) -> RayTracingPipelineCreateInfoNVBuilder<'a> { + self.inner.group_count = groups.len() as _; + self.inner.p_groups = groups.as_ptr(); + self + } + pub fn max_recursion_depth( + mut self, + max_recursion_depth: u32, + ) -> RayTracingPipelineCreateInfoNVBuilder<'a> { + self.inner.max_recursion_depth = max_recursion_depth; + self + } + pub fn layout(mut self, layout: PipelineLayout) -> RayTracingPipelineCreateInfoNVBuilder<'a> { + self.inner.layout = layout; + self + } + pub fn base_pipeline_handle( + mut self, + base_pipeline_handle: Pipeline, + ) -> RayTracingPipelineCreateInfoNVBuilder<'a> { + self.inner.base_pipeline_handle = base_pipeline_handle; + self + } + pub fn base_pipeline_index( + mut self, + base_pipeline_index: i32, + ) -> RayTracingPipelineCreateInfoNVBuilder<'a> { + self.inner.base_pipeline_index = base_pipeline_index; + self + } + pub fn next(mut self, next: &'a T) -> RayTracingPipelineCreateInfoNVBuilder<'a> + where + T: ExtendsRayTracingPipelineCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> RayTracingPipelineCreateInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct GeometryTrianglesNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub vertex_data: Buffer, + pub vertex_offset: DeviceSize, + pub vertex_count: u32, + pub vertex_stride: DeviceSize, + pub vertex_format: Format, + pub index_data: Buffer, + pub index_offset: DeviceSize, + pub index_count: u32, + pub index_type: IndexType, + pub transform_data: Buffer, + pub transform_offset: DeviceSize, +} +impl ::std::default::Default for GeometryTrianglesNV { + fn default() -> GeometryTrianglesNV { + GeometryTrianglesNV { + s_type: StructureType::GEOMETRY_TRIANGLES_NV, + p_next: ::std::ptr::null(), + vertex_data: Buffer::default(), + vertex_offset: DeviceSize::default(), + vertex_count: u32::default(), + vertex_stride: DeviceSize::default(), + vertex_format: Format::default(), + index_data: Buffer::default(), + index_offset: DeviceSize::default(), + index_count: u32::default(), + index_type: IndexType::default(), + transform_data: Buffer::default(), + transform_offset: DeviceSize::default(), + } + } +} +impl GeometryTrianglesNV { + pub fn builder<'a>() -> GeometryTrianglesNVBuilder<'a> { + GeometryTrianglesNVBuilder { + inner: GeometryTrianglesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct GeometryTrianglesNVBuilder<'a> { + inner: GeometryTrianglesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsGeometryTrianglesNV {} +impl<'a> ::std::ops::Deref for GeometryTrianglesNVBuilder<'a> { + type Target = GeometryTrianglesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> GeometryTrianglesNVBuilder<'a> { + pub fn vertex_data(mut self, vertex_data: Buffer) -> GeometryTrianglesNVBuilder<'a> { + self.inner.vertex_data = vertex_data; + self + } + pub fn vertex_offset(mut self, vertex_offset: DeviceSize) -> GeometryTrianglesNVBuilder<'a> { + self.inner.vertex_offset = vertex_offset; + self + } + pub fn vertex_count(mut self, vertex_count: u32) -> GeometryTrianglesNVBuilder<'a> { + self.inner.vertex_count = vertex_count; + self + } + pub fn vertex_stride(mut self, vertex_stride: DeviceSize) -> GeometryTrianglesNVBuilder<'a> { + self.inner.vertex_stride = vertex_stride; + self + } + pub fn vertex_format(mut self, vertex_format: Format) -> GeometryTrianglesNVBuilder<'a> { + self.inner.vertex_format = vertex_format; + self + } + pub fn index_data(mut self, index_data: Buffer) -> GeometryTrianglesNVBuilder<'a> { + self.inner.index_data = index_data; + self + } + pub fn index_offset(mut self, index_offset: DeviceSize) -> GeometryTrianglesNVBuilder<'a> { + self.inner.index_offset = index_offset; + self + } + pub fn index_count(mut self, index_count: u32) -> GeometryTrianglesNVBuilder<'a> { + self.inner.index_count = index_count; + self + } + pub fn index_type(mut self, index_type: IndexType) -> GeometryTrianglesNVBuilder<'a> { + self.inner.index_type = index_type; + self + } + pub fn transform_data(mut self, transform_data: Buffer) -> GeometryTrianglesNVBuilder<'a> { + self.inner.transform_data = transform_data; + self + } + pub fn transform_offset( + mut self, + transform_offset: DeviceSize, + ) -> GeometryTrianglesNVBuilder<'a> { + self.inner.transform_offset = transform_offset; + self + } + pub fn next(mut self, next: &'a T) -> GeometryTrianglesNVBuilder<'a> + where + T: ExtendsGeometryTrianglesNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> GeometryTrianglesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct GeometryAABBNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub aabb_data: Buffer, + pub num_aab_bs: u32, + pub stride: u32, + pub offset: DeviceSize, +} +impl ::std::default::Default for GeometryAABBNV { + fn default() -> GeometryAABBNV { + GeometryAABBNV { + s_type: StructureType::GEOMETRY_AABB_NV, + p_next: ::std::ptr::null(), + aabb_data: Buffer::default(), + num_aab_bs: u32::default(), + stride: u32::default(), + offset: DeviceSize::default(), + } + } +} +impl GeometryAABBNV { + pub fn builder<'a>() -> GeometryAABBNVBuilder<'a> { + GeometryAABBNVBuilder { + inner: GeometryAABBNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct GeometryAABBNVBuilder<'a> { + inner: GeometryAABBNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsGeometryAABBNV {} +impl<'a> ::std::ops::Deref for GeometryAABBNVBuilder<'a> { + type Target = GeometryAABBNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> GeometryAABBNVBuilder<'a> { + pub fn aabb_data(mut self, aabb_data: Buffer) -> GeometryAABBNVBuilder<'a> { + self.inner.aabb_data = aabb_data; + self + } + pub fn num_aab_bs(mut self, num_aab_bs: u32) -> GeometryAABBNVBuilder<'a> { + self.inner.num_aab_bs = num_aab_bs; + self + } + pub fn stride(mut self, stride: u32) -> GeometryAABBNVBuilder<'a> { + self.inner.stride = stride; + self + } + pub fn offset(mut self, offset: DeviceSize) -> GeometryAABBNVBuilder<'a> { + self.inner.offset = offset; + self + } + pub fn next(mut self, next: &'a T) -> GeometryAABBNVBuilder<'a> + where + T: ExtendsGeometryAABBNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> GeometryAABBNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +pub struct GeometryDataNV { + pub triangles: GeometryTrianglesNV, + pub aabbs: GeometryAABBNV, +} +impl GeometryDataNV { + pub fn builder<'a>() -> GeometryDataNVBuilder<'a> { + GeometryDataNVBuilder { + inner: GeometryDataNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct GeometryDataNVBuilder<'a> { + inner: GeometryDataNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for GeometryDataNVBuilder<'a> { + type Target = GeometryDataNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> GeometryDataNVBuilder<'a> { + pub fn triangles(mut self, triangles: GeometryTrianglesNV) -> GeometryDataNVBuilder<'a> { + self.inner.triangles = triangles; + self + } + pub fn aabbs(mut self, aabbs: GeometryAABBNV) -> GeometryDataNVBuilder<'a> { + self.inner.aabbs = aabbs; + self + } + pub fn build(self) -> GeometryDataNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct GeometryNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub geometry_type: GeometryTypeNV, + pub geometry: GeometryDataNV, + pub flags: GeometryFlagsNV, +} +impl ::std::default::Default for GeometryNV { + fn default() -> GeometryNV { + GeometryNV { + s_type: StructureType::GEOMETRY_NV, + p_next: ::std::ptr::null(), + geometry_type: GeometryTypeNV::default(), + geometry: GeometryDataNV::default(), + flags: GeometryFlagsNV::default(), + } + } +} +impl GeometryNV { + pub fn builder<'a>() -> GeometryNVBuilder<'a> { + GeometryNVBuilder { + inner: GeometryNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct GeometryNVBuilder<'a> { + inner: GeometryNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsGeometryNV {} +impl<'a> ::std::ops::Deref for GeometryNVBuilder<'a> { + type Target = GeometryNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> GeometryNVBuilder<'a> { + pub fn geometry_type(mut self, geometry_type: GeometryTypeNV) -> GeometryNVBuilder<'a> { + self.inner.geometry_type = geometry_type; + self + } + pub fn geometry(mut self, geometry: GeometryDataNV) -> GeometryNVBuilder<'a> { + self.inner.geometry = geometry; + self + } + pub fn flags(mut self, flags: GeometryFlagsNV) -> GeometryNVBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn next(mut self, next: &'a T) -> GeometryNVBuilder<'a> + where + T: ExtendsGeometryNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> GeometryNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct AccelerationStructureInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub ty: AccelerationStructureTypeNV, + pub flags: BuildAccelerationStructureFlagsNV, + pub instance_count: u32, + pub geometry_count: u32, + pub p_geometries: *const GeometryNV, +} +impl ::std::default::Default for AccelerationStructureInfoNV { + fn default() -> AccelerationStructureInfoNV { + AccelerationStructureInfoNV { + s_type: StructureType::ACCELERATION_STRUCTURE_INFO_NV, + p_next: ::std::ptr::null(), + ty: AccelerationStructureTypeNV::default(), + flags: BuildAccelerationStructureFlagsNV::default(), + instance_count: u32::default(), + geometry_count: u32::default(), + p_geometries: ::std::ptr::null(), + } + } +} +impl AccelerationStructureInfoNV { + pub fn builder<'a>() -> AccelerationStructureInfoNVBuilder<'a> { + AccelerationStructureInfoNVBuilder { + inner: AccelerationStructureInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct AccelerationStructureInfoNVBuilder<'a> { + inner: AccelerationStructureInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsAccelerationStructureInfoNV {} +impl<'a> ::std::ops::Deref for AccelerationStructureInfoNVBuilder<'a> { + type Target = AccelerationStructureInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> AccelerationStructureInfoNVBuilder<'a> { + pub fn ty(mut self, ty: AccelerationStructureTypeNV) -> AccelerationStructureInfoNVBuilder<'a> { + self.inner.ty = ty; + self + } + pub fn flags( + mut self, + flags: BuildAccelerationStructureFlagsNV, + ) -> AccelerationStructureInfoNVBuilder<'a> { + self.inner.flags = flags; + self + } + pub fn instance_count(mut self, instance_count: u32) -> AccelerationStructureInfoNVBuilder<'a> { + self.inner.instance_count = instance_count; + self + } + pub fn geometries( + mut self, + geometries: &'a [GeometryNV], + ) -> AccelerationStructureInfoNVBuilder<'a> { + self.inner.geometry_count = geometries.len() as _; + self.inner.p_geometries = geometries.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> AccelerationStructureInfoNVBuilder<'a> + where + T: ExtendsAccelerationStructureInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> AccelerationStructureInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct AccelerationStructureCreateInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub compacted_size: DeviceSize, + pub info: AccelerationStructureInfoNV, +} +impl ::std::default::Default for AccelerationStructureCreateInfoNV { + fn default() -> AccelerationStructureCreateInfoNV { + AccelerationStructureCreateInfoNV { + s_type: StructureType::ACCELERATION_STRUCTURE_CREATE_INFO_NV, + p_next: ::std::ptr::null(), + compacted_size: DeviceSize::default(), + info: AccelerationStructureInfoNV::default(), + } + } +} +impl AccelerationStructureCreateInfoNV { + pub fn builder<'a>() -> AccelerationStructureCreateInfoNVBuilder<'a> { + AccelerationStructureCreateInfoNVBuilder { + inner: AccelerationStructureCreateInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct AccelerationStructureCreateInfoNVBuilder<'a> { + inner: AccelerationStructureCreateInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsAccelerationStructureCreateInfoNV {} +impl<'a> ::std::ops::Deref for AccelerationStructureCreateInfoNVBuilder<'a> { + type Target = AccelerationStructureCreateInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> AccelerationStructureCreateInfoNVBuilder<'a> { + pub fn compacted_size( + mut self, + compacted_size: DeviceSize, + ) -> AccelerationStructureCreateInfoNVBuilder<'a> { + self.inner.compacted_size = compacted_size; + self + } + pub fn info( + mut self, + info: AccelerationStructureInfoNV, + ) -> AccelerationStructureCreateInfoNVBuilder<'a> { + self.inner.info = info; + self + } + pub fn next(mut self, next: &'a T) -> AccelerationStructureCreateInfoNVBuilder<'a> + where + T: ExtendsAccelerationStructureCreateInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> AccelerationStructureCreateInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct BindAccelerationStructureMemoryInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub acceleration_structure: AccelerationStructureNV, + pub memory: DeviceMemory, + pub memory_offset: DeviceSize, + pub device_index_count: u32, + pub p_device_indices: *const u32, +} +impl ::std::default::Default for BindAccelerationStructureMemoryInfoNV { + fn default() -> BindAccelerationStructureMemoryInfoNV { + BindAccelerationStructureMemoryInfoNV { + s_type: StructureType::BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV, + p_next: ::std::ptr::null(), + acceleration_structure: AccelerationStructureNV::default(), + memory: DeviceMemory::default(), + memory_offset: DeviceSize::default(), + device_index_count: u32::default(), + p_device_indices: ::std::ptr::null(), + } + } +} +impl BindAccelerationStructureMemoryInfoNV { + pub fn builder<'a>() -> BindAccelerationStructureMemoryInfoNVBuilder<'a> { + BindAccelerationStructureMemoryInfoNVBuilder { + inner: BindAccelerationStructureMemoryInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct BindAccelerationStructureMemoryInfoNVBuilder<'a> { + inner: BindAccelerationStructureMemoryInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsBindAccelerationStructureMemoryInfoNV {} +impl<'a> ::std::ops::Deref for BindAccelerationStructureMemoryInfoNVBuilder<'a> { + type Target = BindAccelerationStructureMemoryInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> BindAccelerationStructureMemoryInfoNVBuilder<'a> { + pub fn acceleration_structure( + mut self, + acceleration_structure: AccelerationStructureNV, + ) -> BindAccelerationStructureMemoryInfoNVBuilder<'a> { + self.inner.acceleration_structure = acceleration_structure; + self + } + pub fn memory( + mut self, + memory: DeviceMemory, + ) -> BindAccelerationStructureMemoryInfoNVBuilder<'a> { + self.inner.memory = memory; + self + } + pub fn memory_offset( + mut self, + memory_offset: DeviceSize, + ) -> BindAccelerationStructureMemoryInfoNVBuilder<'a> { + self.inner.memory_offset = memory_offset; + self + } + pub fn device_indices( + mut self, + device_indices: &'a [u32], + ) -> BindAccelerationStructureMemoryInfoNVBuilder<'a> { + self.inner.device_index_count = device_indices.len() as _; + self.inner.p_device_indices = device_indices.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> BindAccelerationStructureMemoryInfoNVBuilder<'a> + where + T: ExtendsBindAccelerationStructureMemoryInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> BindAccelerationStructureMemoryInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct WriteDescriptorSetAccelerationStructureNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub acceleration_structure_count: u32, + pub p_acceleration_structures: *const AccelerationStructureNV, +} +impl ::std::default::Default for WriteDescriptorSetAccelerationStructureNV { + fn default() -> WriteDescriptorSetAccelerationStructureNV { + WriteDescriptorSetAccelerationStructureNV { + s_type: StructureType::WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV, + p_next: ::std::ptr::null(), + acceleration_structure_count: u32::default(), + p_acceleration_structures: ::std::ptr::null(), + } + } +} +impl WriteDescriptorSetAccelerationStructureNV { + pub fn builder<'a>() -> WriteDescriptorSetAccelerationStructureNVBuilder<'a> { + WriteDescriptorSetAccelerationStructureNVBuilder { + inner: WriteDescriptorSetAccelerationStructureNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct WriteDescriptorSetAccelerationStructureNVBuilder<'a> { + inner: WriteDescriptorSetAccelerationStructureNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsWriteDescriptorSetAccelerationStructureNV {} +unsafe impl ExtendsWriteDescriptorSet for WriteDescriptorSetAccelerationStructureNV {} +impl<'a> ::std::ops::Deref for WriteDescriptorSetAccelerationStructureNVBuilder<'a> { + type Target = WriteDescriptorSetAccelerationStructureNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> WriteDescriptorSetAccelerationStructureNVBuilder<'a> { + pub fn acceleration_structures( + mut self, + acceleration_structures: &'a [AccelerationStructureNV], + ) -> WriteDescriptorSetAccelerationStructureNVBuilder<'a> { + self.inner.acceleration_structure_count = acceleration_structures.len() as _; + self.inner.p_acceleration_structures = acceleration_structures.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> WriteDescriptorSetAccelerationStructureNVBuilder<'a> + where + T: ExtendsWriteDescriptorSetAccelerationStructureNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> WriteDescriptorSetAccelerationStructureNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct AccelerationStructureMemoryRequirementsInfoNV { + pub s_type: StructureType, + pub p_next: *const c_void, + pub ty: AccelerationStructureMemoryRequirementsTypeNV, + pub acceleration_structure: AccelerationStructureNV, +} +impl ::std::default::Default for AccelerationStructureMemoryRequirementsInfoNV { + fn default() -> AccelerationStructureMemoryRequirementsInfoNV { + AccelerationStructureMemoryRequirementsInfoNV { + s_type: StructureType::ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV, + p_next: ::std::ptr::null(), + ty: AccelerationStructureMemoryRequirementsTypeNV::default(), + acceleration_structure: AccelerationStructureNV::default(), + } + } +} +impl AccelerationStructureMemoryRequirementsInfoNV { + pub fn builder<'a>() -> AccelerationStructureMemoryRequirementsInfoNVBuilder<'a> { + AccelerationStructureMemoryRequirementsInfoNVBuilder { + inner: AccelerationStructureMemoryRequirementsInfoNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct AccelerationStructureMemoryRequirementsInfoNVBuilder<'a> { + inner: AccelerationStructureMemoryRequirementsInfoNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsAccelerationStructureMemoryRequirementsInfoNV {} +impl<'a> ::std::ops::Deref for AccelerationStructureMemoryRequirementsInfoNVBuilder<'a> { + type Target = AccelerationStructureMemoryRequirementsInfoNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> AccelerationStructureMemoryRequirementsInfoNVBuilder<'a> { + pub fn ty( + mut self, + ty: AccelerationStructureMemoryRequirementsTypeNV, + ) -> AccelerationStructureMemoryRequirementsInfoNVBuilder<'a> { + self.inner.ty = ty; + self + } + pub fn acceleration_structure( + mut self, + acceleration_structure: AccelerationStructureNV, + ) -> AccelerationStructureMemoryRequirementsInfoNVBuilder<'a> { + self.inner.acceleration_structure = acceleration_structure; + self + } + pub fn next( + mut self, + next: &'a T, + ) -> AccelerationStructureMemoryRequirementsInfoNVBuilder<'a> + where + T: ExtendsAccelerationStructureMemoryRequirementsInfoNV, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> AccelerationStructureMemoryRequirementsInfoNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceRayTracingPropertiesNV { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub shader_group_handle_size: u32, + pub max_recursion_depth: u32, + pub max_shader_group_stride: u32, + pub shader_group_base_alignment: u32, + pub max_geometry_count: u64, + pub max_instance_count: u64, + pub max_triangle_count: u64, + pub max_descriptor_set_acceleration_structures: u32, +} +impl ::std::default::Default for PhysicalDeviceRayTracingPropertiesNV { + fn default() -> PhysicalDeviceRayTracingPropertiesNV { + PhysicalDeviceRayTracingPropertiesNV { + s_type: StructureType::PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV, + p_next: ::std::ptr::null_mut(), + shader_group_handle_size: u32::default(), + max_recursion_depth: u32::default(), + max_shader_group_stride: u32::default(), + shader_group_base_alignment: u32::default(), + max_geometry_count: u64::default(), + max_instance_count: u64::default(), + max_triangle_count: u64::default(), + max_descriptor_set_acceleration_structures: u32::default(), + } + } +} +impl PhysicalDeviceRayTracingPropertiesNV { + pub fn builder<'a>() -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + PhysicalDeviceRayTracingPropertiesNVBuilder { + inner: PhysicalDeviceRayTracingPropertiesNV::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + inner: PhysicalDeviceRayTracingPropertiesNV, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceRayTracingPropertiesNV {} +unsafe impl ExtendsPhysicalDeviceProperties2 for PhysicalDeviceRayTracingPropertiesNV {} +impl<'a> ::std::ops::Deref for PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + type Target = PhysicalDeviceRayTracingPropertiesNV; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + pub fn shader_group_handle_size( + mut self, + shader_group_handle_size: u32, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.shader_group_handle_size = shader_group_handle_size; + self + } + pub fn max_recursion_depth( + mut self, + max_recursion_depth: u32, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.max_recursion_depth = max_recursion_depth; + self + } + pub fn max_shader_group_stride( + mut self, + max_shader_group_stride: u32, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.max_shader_group_stride = max_shader_group_stride; + self + } + pub fn shader_group_base_alignment( + mut self, + shader_group_base_alignment: u32, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.shader_group_base_alignment = shader_group_base_alignment; + self + } + pub fn max_geometry_count( + mut self, + max_geometry_count: u64, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.max_geometry_count = max_geometry_count; + self + } + pub fn max_instance_count( + mut self, + max_instance_count: u64, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.max_instance_count = max_instance_count; + self + } + pub fn max_triangle_count( + mut self, + max_triangle_count: u64, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.max_triangle_count = max_triangle_count; + self + } + pub fn max_descriptor_set_acceleration_structures( + mut self, + max_descriptor_set_acceleration_structures: u32, + ) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> { + self.inner.max_descriptor_set_acceleration_structures = + max_descriptor_set_acceleration_structures; + self + } + pub fn next(mut self, next: &'a mut T) -> PhysicalDeviceRayTracingPropertiesNVBuilder<'a> + where + T: ExtendsPhysicalDeviceRayTracingPropertiesNV, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> PhysicalDeviceRayTracingPropertiesNV { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct DrmFormatModifierPropertiesListEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub drm_format_modifier_count: u32, + pub p_drm_format_modifier_properties: *mut DrmFormatModifierPropertiesEXT, +} +impl ::std::default::Default for DrmFormatModifierPropertiesListEXT { + fn default() -> DrmFormatModifierPropertiesListEXT { + DrmFormatModifierPropertiesListEXT { + s_type: StructureType::DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT, + p_next: ::std::ptr::null_mut(), + drm_format_modifier_count: u32::default(), + p_drm_format_modifier_properties: ::std::ptr::null_mut(), + } + } +} +impl DrmFormatModifierPropertiesListEXT { + pub fn builder<'a>() -> DrmFormatModifierPropertiesListEXTBuilder<'a> { + DrmFormatModifierPropertiesListEXTBuilder { + inner: DrmFormatModifierPropertiesListEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct DrmFormatModifierPropertiesListEXTBuilder<'a> { + inner: DrmFormatModifierPropertiesListEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsDrmFormatModifierPropertiesListEXT {} +unsafe impl ExtendsFormatProperties2 for DrmFormatModifierPropertiesListEXT {} +impl<'a> ::std::ops::Deref for DrmFormatModifierPropertiesListEXTBuilder<'a> { + type Target = DrmFormatModifierPropertiesListEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> DrmFormatModifierPropertiesListEXTBuilder<'a> { + pub fn drm_format_modifier_properties( + mut self, + drm_format_modifier_properties: &'a mut [DrmFormatModifierPropertiesEXT], + ) -> DrmFormatModifierPropertiesListEXTBuilder<'a> { + self.inner.drm_format_modifier_count = drm_format_modifier_properties.len() as _; + self.inner.p_drm_format_modifier_properties = drm_format_modifier_properties.as_mut_ptr(); + self + } + pub fn next(mut self, next: &'a mut T) -> DrmFormatModifierPropertiesListEXTBuilder<'a> + where + T: ExtendsDrmFormatModifierPropertiesListEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> DrmFormatModifierPropertiesListEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Default, Debug)] +pub struct DrmFormatModifierPropertiesEXT { + pub drm_format_modifier: u64, + pub drm_format_modifier_plane_count: u32, + pub drm_format_modifier_tiling_features: FormatFeatureFlags, +} +impl DrmFormatModifierPropertiesEXT { + pub fn builder<'a>() -> DrmFormatModifierPropertiesEXTBuilder<'a> { + DrmFormatModifierPropertiesEXTBuilder { + inner: DrmFormatModifierPropertiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct DrmFormatModifierPropertiesEXTBuilder<'a> { + inner: DrmFormatModifierPropertiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +impl<'a> ::std::ops::Deref for DrmFormatModifierPropertiesEXTBuilder<'a> { + type Target = DrmFormatModifierPropertiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> DrmFormatModifierPropertiesEXTBuilder<'a> { + pub fn drm_format_modifier( + mut self, + drm_format_modifier: u64, + ) -> DrmFormatModifierPropertiesEXTBuilder<'a> { + self.inner.drm_format_modifier = drm_format_modifier; + self + } + pub fn drm_format_modifier_plane_count( + mut self, + drm_format_modifier_plane_count: u32, + ) -> DrmFormatModifierPropertiesEXTBuilder<'a> { + self.inner.drm_format_modifier_plane_count = drm_format_modifier_plane_count; + self + } + pub fn drm_format_modifier_tiling_features( + mut self, + drm_format_modifier_tiling_features: FormatFeatureFlags, + ) -> DrmFormatModifierPropertiesEXTBuilder<'a> { + self.inner.drm_format_modifier_tiling_features = drm_format_modifier_tiling_features; + self + } + pub fn build(self) -> DrmFormatModifierPropertiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct PhysicalDeviceImageDrmFormatModifierInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub drm_format_modifier: u64, + pub sharing_mode: SharingMode, + pub queue_family_index_count: u32, + pub p_queue_family_indices: *const u32, +} +impl ::std::default::Default for PhysicalDeviceImageDrmFormatModifierInfoEXT { + fn default() -> PhysicalDeviceImageDrmFormatModifierInfoEXT { + PhysicalDeviceImageDrmFormatModifierInfoEXT { + s_type: StructureType::PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT, + p_next: ::std::ptr::null(), + drm_format_modifier: u64::default(), + sharing_mode: SharingMode::default(), + queue_family_index_count: u32::default(), + p_queue_family_indices: ::std::ptr::null(), + } + } +} +impl PhysicalDeviceImageDrmFormatModifierInfoEXT { + pub fn builder<'a>() -> PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> { + PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder { + inner: PhysicalDeviceImageDrmFormatModifierInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> { + inner: PhysicalDeviceImageDrmFormatModifierInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsPhysicalDeviceImageDrmFormatModifierInfoEXT {} +unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for PhysicalDeviceImageDrmFormatModifierInfoEXT {} +impl<'a> ::std::ops::Deref for PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> { + type Target = PhysicalDeviceImageDrmFormatModifierInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> { + pub fn drm_format_modifier( + mut self, + drm_format_modifier: u64, + ) -> PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> { + self.inner.drm_format_modifier = drm_format_modifier; + self + } + pub fn sharing_mode( + mut self, + sharing_mode: SharingMode, + ) -> PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> { + self.inner.sharing_mode = sharing_mode; + self + } + pub fn queue_family_indices( + mut self, + queue_family_indices: &'a [u32], + ) -> PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> { + self.inner.queue_family_index_count = queue_family_indices.len() as _; + self.inner.p_queue_family_indices = queue_family_indices.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> PhysicalDeviceImageDrmFormatModifierInfoEXTBuilder<'a> + where + T: ExtendsPhysicalDeviceImageDrmFormatModifierInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> PhysicalDeviceImageDrmFormatModifierInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct ImageDrmFormatModifierListCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub drm_format_modifier_count: u32, + pub p_drm_format_modifiers: *const u64, +} +impl ::std::default::Default for ImageDrmFormatModifierListCreateInfoEXT { + fn default() -> ImageDrmFormatModifierListCreateInfoEXT { + ImageDrmFormatModifierListCreateInfoEXT { + s_type: StructureType::IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + drm_format_modifier_count: u32::default(), + p_drm_format_modifiers: ::std::ptr::null(), + } + } +} +impl ImageDrmFormatModifierListCreateInfoEXT { + pub fn builder<'a>() -> ImageDrmFormatModifierListCreateInfoEXTBuilder<'a> { + ImageDrmFormatModifierListCreateInfoEXTBuilder { + inner: ImageDrmFormatModifierListCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ImageDrmFormatModifierListCreateInfoEXTBuilder<'a> { + inner: ImageDrmFormatModifierListCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsImageDrmFormatModifierListCreateInfoEXT {} +unsafe impl ExtendsImageCreateInfo for ImageDrmFormatModifierListCreateInfoEXT {} +impl<'a> ::std::ops::Deref for ImageDrmFormatModifierListCreateInfoEXTBuilder<'a> { + type Target = ImageDrmFormatModifierListCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ImageDrmFormatModifierListCreateInfoEXTBuilder<'a> { + pub fn drm_format_modifiers( + mut self, + drm_format_modifiers: &'a [u64], + ) -> ImageDrmFormatModifierListCreateInfoEXTBuilder<'a> { + self.inner.drm_format_modifier_count = drm_format_modifiers.len() as _; + self.inner.p_drm_format_modifiers = drm_format_modifiers.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> ImageDrmFormatModifierListCreateInfoEXTBuilder<'a> + where + T: ExtendsImageDrmFormatModifierListCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> ImageDrmFormatModifierListCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct ImageDrmFormatModifierExplicitCreateInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub drm_format_modifier: u64, + pub drm_format_modifier_plane_count: u32, + pub p_plane_layouts: *const SubresourceLayout, +} +impl ::std::default::Default for ImageDrmFormatModifierExplicitCreateInfoEXT { + fn default() -> ImageDrmFormatModifierExplicitCreateInfoEXT { + ImageDrmFormatModifierExplicitCreateInfoEXT { + s_type: StructureType::IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT, + p_next: ::std::ptr::null(), + drm_format_modifier: u64::default(), + drm_format_modifier_plane_count: u32::default(), + p_plane_layouts: ::std::ptr::null(), + } + } +} +impl ImageDrmFormatModifierExplicitCreateInfoEXT { + pub fn builder<'a>() -> ImageDrmFormatModifierExplicitCreateInfoEXTBuilder<'a> { + ImageDrmFormatModifierExplicitCreateInfoEXTBuilder { + inner: ImageDrmFormatModifierExplicitCreateInfoEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ImageDrmFormatModifierExplicitCreateInfoEXTBuilder<'a> { + inner: ImageDrmFormatModifierExplicitCreateInfoEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsImageDrmFormatModifierExplicitCreateInfoEXT {} +unsafe impl ExtendsImageCreateInfo for ImageDrmFormatModifierExplicitCreateInfoEXT {} +impl<'a> ::std::ops::Deref for ImageDrmFormatModifierExplicitCreateInfoEXTBuilder<'a> { + type Target = ImageDrmFormatModifierExplicitCreateInfoEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ImageDrmFormatModifierExplicitCreateInfoEXTBuilder<'a> { + pub fn drm_format_modifier( + mut self, + drm_format_modifier: u64, + ) -> ImageDrmFormatModifierExplicitCreateInfoEXTBuilder<'a> { + self.inner.drm_format_modifier = drm_format_modifier; + self + } + pub fn plane_layouts( + mut self, + plane_layouts: &'a [SubresourceLayout], + ) -> ImageDrmFormatModifierExplicitCreateInfoEXTBuilder<'a> { + self.inner.drm_format_modifier_plane_count = plane_layouts.len() as _; + self.inner.p_plane_layouts = plane_layouts.as_ptr(); + self + } + pub fn next(mut self, next: &'a T) -> ImageDrmFormatModifierExplicitCreateInfoEXTBuilder<'a> + where + T: ExtendsImageDrmFormatModifierExplicitCreateInfoEXT, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> ImageDrmFormatModifierExplicitCreateInfoEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct ImageDrmFormatModifierPropertiesEXT { + pub s_type: StructureType, + pub p_next: *mut c_void, + pub drm_format_modifier: u64, +} +impl ::std::default::Default for ImageDrmFormatModifierPropertiesEXT { + fn default() -> ImageDrmFormatModifierPropertiesEXT { + ImageDrmFormatModifierPropertiesEXT { + s_type: StructureType::IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT, + p_next: ::std::ptr::null_mut(), + drm_format_modifier: u64::default(), + } + } +} +impl ImageDrmFormatModifierPropertiesEXT { + pub fn builder<'a>() -> ImageDrmFormatModifierPropertiesEXTBuilder<'a> { + ImageDrmFormatModifierPropertiesEXTBuilder { + inner: ImageDrmFormatModifierPropertiesEXT::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct ImageDrmFormatModifierPropertiesEXTBuilder<'a> { + inner: ImageDrmFormatModifierPropertiesEXT, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsImageDrmFormatModifierPropertiesEXT {} +impl<'a> ::std::ops::Deref for ImageDrmFormatModifierPropertiesEXTBuilder<'a> { + type Target = ImageDrmFormatModifierPropertiesEXT; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> ImageDrmFormatModifierPropertiesEXTBuilder<'a> { + pub fn drm_format_modifier( + mut self, + drm_format_modifier: u64, + ) -> ImageDrmFormatModifierPropertiesEXTBuilder<'a> { + self.inner.drm_format_modifier = drm_format_modifier; + self + } + pub fn next(mut self, next: &'a mut T) -> ImageDrmFormatModifierPropertiesEXTBuilder<'a> + where + T: ExtendsImageDrmFormatModifierPropertiesEXT, + { + self.inner.p_next = next as *mut T as *mut c_void; + self + } + pub fn build(self) -> ImageDrmFormatModifierPropertiesEXT { + self.inner + } +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +pub struct DeviceMemoryOverallocationCreateInfoAMD { + pub s_type: StructureType, + pub p_next: *const c_void, + pub overallocation_behavior: MemoryOverallocationBehaviorAMD, +} +impl ::std::default::Default for DeviceMemoryOverallocationCreateInfoAMD { + fn default() -> DeviceMemoryOverallocationCreateInfoAMD { + DeviceMemoryOverallocationCreateInfoAMD { + s_type: StructureType::DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD, + p_next: ::std::ptr::null(), + overallocation_behavior: MemoryOverallocationBehaviorAMD::default(), + } + } +} +impl DeviceMemoryOverallocationCreateInfoAMD { + pub fn builder<'a>() -> DeviceMemoryOverallocationCreateInfoAMDBuilder<'a> { + DeviceMemoryOverallocationCreateInfoAMDBuilder { + inner: DeviceMemoryOverallocationCreateInfoAMD::default(), + marker: ::std::marker::PhantomData, + } + } +} +pub struct DeviceMemoryOverallocationCreateInfoAMDBuilder<'a> { + inner: DeviceMemoryOverallocationCreateInfoAMD, + marker: ::std::marker::PhantomData<&'a ()>, +} +pub unsafe trait ExtendsDeviceMemoryOverallocationCreateInfoAMD {} +unsafe impl ExtendsDeviceCreateInfo for DeviceMemoryOverallocationCreateInfoAMD {} +impl<'a> ::std::ops::Deref for DeviceMemoryOverallocationCreateInfoAMDBuilder<'a> { + type Target = DeviceMemoryOverallocationCreateInfoAMD; + fn deref(&self) -> &Self::Target { + &self.inner + } +} +impl<'a> DeviceMemoryOverallocationCreateInfoAMDBuilder<'a> { + pub fn overallocation_behavior( + mut self, + overallocation_behavior: MemoryOverallocationBehaviorAMD, + ) -> DeviceMemoryOverallocationCreateInfoAMDBuilder<'a> { + self.inner.overallocation_behavior = overallocation_behavior; + self + } + pub fn next(mut self, next: &'a T) -> DeviceMemoryOverallocationCreateInfoAMDBuilder<'a> + where + T: ExtendsDeviceMemoryOverallocationCreateInfoAMD, + { + self.inner.p_next = next as *const T as *const c_void; + self + } + pub fn build(self) -> DeviceMemoryOverallocationCreateInfoAMD { + self.inner + } +} #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] pub struct ImageLayout(pub(crate) i32); @@ -28926,6 +36749,23 @@ impl ColorSpaceKHR { } #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[repr(transparent)] +pub struct TimeDomainEXT(pub(crate) i32); +impl TimeDomainEXT { + pub fn from_raw(x: i32) -> Self { + TimeDomainEXT(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl TimeDomainEXT { + pub const DEVICE: Self = TimeDomainEXT(0); + pub const CLOCK_MONOTONIC: Self = TimeDomainEXT(1); + pub const CLOCK_MONOTONIC_RAW: Self = TimeDomainEXT(2); + pub const QUERY_PERFORMANCE_COUNTER: Self = TimeDomainEXT(3); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] pub struct DebugReportObjectTypeEXT(pub(crate) i32); impl DebugReportObjectTypeEXT { pub fn from_raw(x: i32) -> Self { @@ -29335,6 +37175,172 @@ impl VendorId { #[doc = "Kazan Software Renderer"] pub const KAZAN: Self = VendorId(0x10003); } +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct DriverIdKHR(pub(crate) i32); +impl DriverIdKHR { + pub fn from_raw(x: i32) -> Self { + DriverIdKHR(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl DriverIdKHR { + #[doc = "Advanced Micro Devices, Inc."] + pub const AMD_PROPRIETARY: Self = DriverIdKHR(1); + #[doc = "Advanced Micro Devices, Inc."] + pub const AMD_OPEN_SOURCE: Self = DriverIdKHR(2); + #[doc = "Mesa open source project"] + pub const MESA_RADV: Self = DriverIdKHR(3); + #[doc = "NVIDIA Corporation"] + pub const NVIDIA_PROPRIETARY: Self = DriverIdKHR(4); + #[doc = "Intel Corporation"] + pub const INTEL_PROPRIETARY_WINDOWS: Self = DriverIdKHR(5); + #[doc = "Intel Corporation"] + pub const INTEL_OPEN_SOURCE_MESA: Self = DriverIdKHR(6); + #[doc = "Imagination Technologies"] + pub const IMAGINATION_PROPRIETARY: Self = DriverIdKHR(7); + #[doc = "Qualcomm Technologies, Inc."] + pub const QUALCOMM_PROPRIETARY: Self = DriverIdKHR(8); + #[doc = "Arm Limited"] + pub const ARM_PROPRIETARY: Self = DriverIdKHR(9); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct ShadingRatePaletteEntryNV(pub(crate) i32); +impl ShadingRatePaletteEntryNV { + pub fn from_raw(x: i32) -> Self { + ShadingRatePaletteEntryNV(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl ShadingRatePaletteEntryNV { + pub const NO_INVOCATIONS: Self = ShadingRatePaletteEntryNV(0); + pub const TYPE_16_INVOCATIONS_PER_PIXEL: Self = ShadingRatePaletteEntryNV(1); + pub const TYPE_8_INVOCATIONS_PER_PIXEL: Self = ShadingRatePaletteEntryNV(2); + pub const TYPE_4_INVOCATIONS_PER_PIXEL: Self = ShadingRatePaletteEntryNV(3); + pub const TYPE_2_INVOCATIONS_PER_PIXEL: Self = ShadingRatePaletteEntryNV(4); + pub const TYPE_1_INVOCATION_PER_PIXEL: Self = ShadingRatePaletteEntryNV(5); + pub const TYPE_1_INVOCATION_PER_2X1_PIXELS: Self = ShadingRatePaletteEntryNV(6); + pub const TYPE_1_INVOCATION_PER_1X2_PIXELS: Self = ShadingRatePaletteEntryNV(7); + pub const TYPE_1_INVOCATION_PER_2X2_PIXELS: Self = ShadingRatePaletteEntryNV(8); + pub const TYPE_1_INVOCATION_PER_4X2_PIXELS: Self = ShadingRatePaletteEntryNV(9); + pub const TYPE_1_INVOCATION_PER_2X4_PIXELS: Self = ShadingRatePaletteEntryNV(10); + pub const TYPE_1_INVOCATION_PER_4X4_PIXELS: Self = ShadingRatePaletteEntryNV(11); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct CoarseSampleOrderTypeNV(pub(crate) i32); +impl CoarseSampleOrderTypeNV { + pub fn from_raw(x: i32) -> Self { + CoarseSampleOrderTypeNV(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl CoarseSampleOrderTypeNV { + pub const DEFAULT: Self = CoarseSampleOrderTypeNV(0); + pub const CUSTOM: Self = CoarseSampleOrderTypeNV(1); + pub const PIXEL_MAJOR: Self = CoarseSampleOrderTypeNV(2); + pub const SAMPLE_MAJOR: Self = CoarseSampleOrderTypeNV(3); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct CopyAccelerationStructureModeNV(pub(crate) i32); +impl CopyAccelerationStructureModeNV { + pub fn from_raw(x: i32) -> Self { + CopyAccelerationStructureModeNV(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl CopyAccelerationStructureModeNV { + pub const CLONE: Self = CopyAccelerationStructureModeNV(0); + pub const COMPACT: Self = CopyAccelerationStructureModeNV(1); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct AccelerationStructureTypeNV(pub(crate) i32); +impl AccelerationStructureTypeNV { + pub fn from_raw(x: i32) -> Self { + AccelerationStructureTypeNV(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl AccelerationStructureTypeNV { + pub const TOP_LEVEL: Self = AccelerationStructureTypeNV(0); + pub const BOTTOM_LEVEL: Self = AccelerationStructureTypeNV(1); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct GeometryTypeNV(pub(crate) i32); +impl GeometryTypeNV { + pub fn from_raw(x: i32) -> Self { + GeometryTypeNV(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl GeometryTypeNV { + pub const TRIANGLES: Self = GeometryTypeNV(0); + pub const AABBS: Self = GeometryTypeNV(1); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct AccelerationStructureMemoryRequirementsTypeNV(pub(crate) i32); +impl AccelerationStructureMemoryRequirementsTypeNV { + pub fn from_raw(x: i32) -> Self { + AccelerationStructureMemoryRequirementsTypeNV(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl AccelerationStructureMemoryRequirementsTypeNV { + pub const OBJECT: Self = AccelerationStructureMemoryRequirementsTypeNV(0); + pub const BUILD_SCRATCH: Self = AccelerationStructureMemoryRequirementsTypeNV(1); + pub const UPDATE_SCRATCH: Self = AccelerationStructureMemoryRequirementsTypeNV(2); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct RayTracingShaderGroupTypeNV(pub(crate) i32); +impl RayTracingShaderGroupTypeNV { + pub fn from_raw(x: i32) -> Self { + RayTracingShaderGroupTypeNV(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl RayTracingShaderGroupTypeNV { + pub const GENERAL: Self = RayTracingShaderGroupTypeNV(0); + pub const TRIANGLES_HIT_GROUP: Self = RayTracingShaderGroupTypeNV(1); + pub const PROCEDURAL_HIT_GROUP: Self = RayTracingShaderGroupTypeNV(2); +} +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct MemoryOverallocationBehaviorAMD(pub(crate) i32); +impl MemoryOverallocationBehaviorAMD { + pub fn from_raw(x: i32) -> Self { + MemoryOverallocationBehaviorAMD(x) + } + pub fn as_raw(self) -> i32 { + self.0 + } +} +impl MemoryOverallocationBehaviorAMD { + pub const DEFAULT: Self = MemoryOverallocationBehaviorAMD(0); + pub const ALLOWED: Self = MemoryOverallocationBehaviorAMD(1); + pub const DISALLOWED: Self = MemoryOverallocationBehaviorAMD(2); +} #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct CullModeFlags(pub(crate) Flags); @@ -29361,6 +37367,11 @@ impl QueueFlags { } #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct RenderPassCreateFlags(pub(crate) Flags); +vk_bitflags_wrapped!(RenderPassCreateFlags, 0b0, Flags); +impl RenderPassCreateFlags {} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct DeviceQueueCreateFlags(pub(crate) Flags); vk_bitflags_wrapped!(DeviceQueueCreateFlags, 0b0, Flags); impl DeviceQueueCreateFlags {} @@ -30067,6 +38078,42 @@ impl DescriptorBindingFlagsEXT { pub const PARTIALLY_BOUND: Self = DescriptorBindingFlagsEXT(0b100); pub const VARIABLE_DESCRIPTOR_COUNT: Self = DescriptorBindingFlagsEXT(0b1000); } +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct ConditionalRenderingFlagsEXT(pub(crate) Flags); +vk_bitflags_wrapped!(ConditionalRenderingFlagsEXT, 0b1, Flags); +impl ConditionalRenderingFlagsEXT { + pub const INVERTED: Self = ConditionalRenderingFlagsEXT(0b1); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct GeometryInstanceFlagsNV(pub(crate) Flags); +vk_bitflags_wrapped!(GeometryInstanceFlagsNV, 0b1111, Flags); +impl GeometryInstanceFlagsNV { + pub const TRIANGLE_CULL_DISABLE: Self = GeometryInstanceFlagsNV(0b1); + pub const TRIANGLE_FRONT_COUNTERCLOCKWISE: Self = GeometryInstanceFlagsNV(0b10); + pub const FORCE_OPAQUE: Self = GeometryInstanceFlagsNV(0b100); + pub const FORCE_NO_OPAQUE: Self = GeometryInstanceFlagsNV(0b1000); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct GeometryFlagsNV(pub(crate) Flags); +vk_bitflags_wrapped!(GeometryFlagsNV, 0b11, Flags); +impl GeometryFlagsNV { + pub const OPAQUE: Self = GeometryFlagsNV(0b1); + pub const NO_DUPLICATE_ANY_HIT_INVOCATION: Self = GeometryFlagsNV(0b10); +} +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct BuildAccelerationStructureFlagsNV(pub(crate) Flags); +vk_bitflags_wrapped!(BuildAccelerationStructureFlagsNV, 0b11111, Flags); +impl BuildAccelerationStructureFlagsNV { + pub const ALLOW_UPDATE: Self = BuildAccelerationStructureFlagsNV(0b1); + pub const ALLOW_COMPACTION: Self = BuildAccelerationStructureFlagsNV(0b10); + pub const PREFER_FAST_TRACE: Self = BuildAccelerationStructureFlagsNV(0b100); + pub const PREFER_FAST_BUILD: Self = BuildAccelerationStructureFlagsNV(0b1000); + pub const LOW_MEMORY: Self = BuildAccelerationStructureFlagsNV(0b10000); +} pub const MAX_PHYSICAL_DEVICE_NAME_SIZE: usize = 256; pub const UUID_SIZE: usize = 16; pub const LUID_SIZE: usize = 8; @@ -30086,38 +38133,71 @@ pub const QUEUE_FAMILY_EXTERNAL: u32 = !0 - 1; pub const QUEUE_FAMILY_FOREIGN_EXT: u32 = !0 - 2; pub const SUBPASS_EXTERNAL: u32 = !0; pub const MAX_DEVICE_GROUP_SIZE: usize = 32; +pub const MAX_DRIVER_NAME_SIZE_KHR: usize = 256; +pub const MAX_DRIVER_INFO_SIZE_KHR: usize = 256; +pub const SHADER_UNUSED_NV: u32 = !0; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroySurfaceKHR = extern "system" fn( + instance: Instance, + surface: SurfaceKHR, + 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; +#[allow(non_camel_case_types)] +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; +#[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 struct KhrSurfaceFn { - destroy_surface_khr: extern "system" fn( + pub destroy_surface_khr: extern "system" fn( instance: Instance, surface: SurfaceKHR, p_allocator: *const AllocationCallbacks, ) -> c_void, - get_physical_device_surface_support_khr: extern "system" fn( + pub get_physical_device_surface_support_khr: extern "system" fn( physical_device: PhysicalDevice, queue_family_index: u32, surface: SurfaceKHR, p_supported: *mut Bool32, ) -> Result, - get_physical_device_surface_capabilities_khr: - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_surface_capabilities: *mut SurfaceCapabilitiesKHR, - ) -> Result, - 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, - 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_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 {} @@ -30126,11 +38206,11 @@ impl ::std::clone::Clone for KhrSurfaceFn { KhrSurfaceFn { destroy_surface_khr: self.destroy_surface_khr, get_physical_device_surface_support_khr: self.get_physical_device_surface_support_khr, - get_physical_device_surface_capabilities_khr: - self.get_physical_device_surface_capabilities_khr, + get_physical_device_surface_capabilities_khr: self + .get_physical_device_surface_capabilities_khr, get_physical_device_surface_formats_khr: self.get_physical_device_surface_formats_khr, - get_physical_device_surface_present_modes_khr: - self.get_physical_device_surface_present_modes_khr, + get_physical_device_surface_present_modes_khr: self + .get_physical_device_surface_present_modes_khr, } } } @@ -30317,7 +38397,111 @@ impl Result { impl ObjectType { pub const SURFACE_KHR: Self = ObjectType(1000000000); } -pub struct KhrSwapchainFn { create_swapchain_khr : extern "system" fn ( device : Device , p_create_info : *const SwapchainCreateInfoKHR , p_allocator : *const AllocationCallbacks , p_swapchain : *mut SwapchainKHR , ) -> Result , destroy_swapchain_khr : extern "system" fn ( device : Device , swapchain : SwapchainKHR , p_allocator : *const AllocationCallbacks , ) -> c_void , get_swapchain_images_khr : extern "system" fn ( device : Device , swapchain : SwapchainKHR , p_swapchain_image_count : *mut u32 , p_swapchain_images : *mut Image , ) -> Result , acquire_next_image_khr : extern "system" fn ( device : Device , swapchain : SwapchainKHR , timeout : u64 , semaphore : Semaphore , fence : Fence , p_image_index : *mut u32 , ) -> Result , queue_present_khr : extern "system" fn ( queue : Queue , p_present_info : *const PresentInfoKHR , ) -> Result , get_device_group_present_capabilities_khr : extern "system" fn ( device : Device , p_device_group_present_capabilities : *mut DeviceGroupPresentCapabilitiesKHR , ) -> Result , get_device_group_surface_present_modes_khr : extern "system" fn ( device : Device , surface : SurfaceKHR , p_modes : *mut DeviceGroupPresentModeFlagsKHR , ) -> Result , get_physical_device_present_rectangles_khr : extern "system" fn ( physical_device : PhysicalDevice , surface : SurfaceKHR , p_rect_count : *mut u32 , p_rects : *mut Rect2D , ) -> Result , acquire_next_image2_khr : extern "system" fn ( device : Device , p_acquire_info : *const AcquireNextImageInfoKHR , p_image_index : *mut u32 , ) -> Result , } +#[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; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroySwapchainKHR = extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_allocator: *const AllocationCallbacks, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkGetSwapchainImagesKHR = extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + p_swapchain_image_count: *mut u32, + p_swapchain_images: *mut Image, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkAcquireNextImageKHR = extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + timeout: u64, + semaphore: Semaphore, + fence: Fence, + p_image_index: *mut u32, +) -> Result; +#[allow(non_camel_case_types)] +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( + 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, + 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 KhrSwapchainFn {} unsafe impl Sync for KhrSwapchainFn {} impl ::std::clone::Clone for KhrSwapchainFn { @@ -30670,53 +38854,96 @@ impl SwapchainCreateFlagsKHR { impl SwapchainCreateFlagsKHR { pub const PROTECTED: Self = SwapchainCreateFlagsKHR(0b10); } +#[allow(non_camel_case_types)] +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 { - get_physical_device_display_properties_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayPropertiesKHR, - ) -> Result, - get_physical_device_display_plane_properties_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayPlanePropertiesKHR, - ) -> Result, - get_display_plane_supported_displays_khr: extern "system" fn( + 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, - get_display_mode_properties_khr: - extern "system" fn( - physical_device: PhysicalDevice, - display: DisplayKHR, - p_property_count: *mut u32, - p_properties: *mut DisplayModePropertiesKHR, - ) -> Result, - create_display_mode_khr: extern "system" fn( + pub get_display_mode_properties_khr: extern "system" fn( + physical_device: PhysicalDevice, + display: DisplayKHR, + p_property_count: *mut u32, + p_properties: *mut DisplayModePropertiesKHR, + ) -> Result, + pub create_display_mode_khr: extern "system" fn( physical_device: PhysicalDevice, display: DisplayKHR, p_create_info: *const DisplayModeCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_mode: *mut DisplayModeKHR, ) -> Result, - get_display_plane_capabilities_khr: - extern "system" fn( - physical_device: PhysicalDevice, - mode: DisplayModeKHR, - plane_index: u32, - p_capabilities: *mut DisplayPlaneCapabilitiesKHR, - ) -> Result, - 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 {} @@ -30725,8 +38952,8 @@ impl ::std::clone::Clone for KhrDisplayFn { KhrDisplayFn { get_physical_device_display_properties_khr: self .get_physical_device_display_properties_khr, - get_physical_device_display_plane_properties_khr: - self.get_physical_device_display_plane_properties_khr, + get_physical_device_display_plane_properties_khr: self + .get_physical_device_display_plane_properties_khr, get_display_plane_supported_displays_khr: self.get_display_plane_supported_displays_khr, get_display_mode_properties_khr: self.get_display_mode_properties_khr, create_display_mode_khr: self.create_display_mode_khr, @@ -30991,8 +39218,16 @@ impl ObjectType { impl ObjectType { pub const DISPLAY_MODE_KHR: Self = ObjectType(1000002001); } +#[allow(non_camel_case_types)] +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 { - create_shared_swapchains_khr: extern "system" fn( + pub create_shared_swapchains_khr: extern "system" fn( device: Device, swapchain_count: u32, p_create_infos: *const SwapchainCreateInfoKHR, @@ -31064,20 +39299,33 @@ impl StructureType { 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; +#[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 struct KhrXlibSurfaceFn { - create_xlib_surface_khr: extern "system" fn( + pub create_xlib_surface_khr: extern "system" fn( instance: Instance, p_create_info: *const XlibSurfaceCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, ) -> Result, - 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 {} @@ -31085,8 +39333,8 @@ impl ::std::clone::Clone for KhrXlibSurfaceFn { fn clone(&self) -> Self { KhrXlibSurfaceFn { create_xlib_surface_khr: self.create_xlib_surface_khr, - get_physical_device_xlib_presentation_support_khr: - self.get_physical_device_xlib_presentation_support_khr, + get_physical_device_xlib_presentation_support_khr: self + .get_physical_device_xlib_presentation_support_khr, } } } @@ -31168,20 +39416,33 @@ impl KhrXlibSurfaceFn { 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; +#[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 struct KhrXcbSurfaceFn { - create_xcb_surface_khr: extern "system" fn( + pub create_xcb_surface_khr: extern "system" fn( instance: Instance, p_create_info: *const XcbSurfaceCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, ) -> Result, - 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 {} @@ -31189,8 +39450,8 @@ impl ::std::clone::Clone for KhrXcbSurfaceFn { fn clone(&self) -> Self { KhrXcbSurfaceFn { create_xcb_surface_khr: self.create_xcb_surface_khr, - get_physical_device_xcb_presentation_support_khr: - self.get_physical_device_xcb_presentation_support_khr, + get_physical_device_xcb_presentation_support_khr: self + .get_physical_device_xcb_presentation_support_khr, } } } @@ -31272,20 +39533,31 @@ impl KhrXcbSurfaceFn { impl StructureType { pub const XCB_SURFACE_CREATE_INFO_KHR: Self = StructureType(1000005000); } +#[allow(non_camel_case_types)] +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 { - create_wayland_surface_khr: - extern "system" fn( - instance: Instance, - p_create_info: *const WaylandSurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, - get_physical_device_wayland_presentation_support_khr: - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - display: *mut wl_display, - ) -> Bool32, + 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, } unsafe impl Send for KhrWaylandSurfaceFn {} unsafe impl Sync for KhrWaylandSurfaceFn {} @@ -31293,8 +39565,8 @@ impl ::std::clone::Clone for KhrWaylandSurfaceFn { fn clone(&self) -> Self { KhrWaylandSurfaceFn { create_wayland_surface_khr: self.create_wayland_surface_khr, - get_physical_device_wayland_presentation_support_khr: - self.get_physical_device_wayland_presentation_support_khr, + get_physical_device_wayland_presentation_support_khr: self + .get_physical_device_wayland_presentation_support_khr, } } } @@ -31373,29 +39645,12 @@ impl KhrWaylandSurfaceFn { impl StructureType { pub const WAYLAND_SURFACE_CREATE_INFO_KHR: Self = StructureType(1000006000); } -pub struct KhrMirSurfaceFn { - create_mir_surface_khr: extern "system" fn( - instance: Instance, - p_create_info: *const MirSurfaceCreateInfoKHR, - p_allocator: *const AllocationCallbacks, - p_surface: *mut SurfaceKHR, - ) -> Result, - get_physical_device_mir_presentation_support_khr: - extern "system" fn( - physical_device: PhysicalDevice, - queue_family_index: u32, - connection: *mut MirConnection, - ) -> Bool32, -} +pub struct KhrMirSurfaceFn {} unsafe impl Send for KhrMirSurfaceFn {} unsafe impl Sync for KhrMirSurfaceFn {} impl ::std::clone::Clone for KhrMirSurfaceFn { fn clone(&self) -> Self { - KhrMirSurfaceFn { - create_mir_surface_khr: self.create_mir_surface_khr, - get_physical_device_mir_presentation_support_khr: - self.get_physical_device_mir_presentation_support_khr, - } + KhrMirSurfaceFn {} } } impl KhrMirSurfaceFn { @@ -31403,84 +39658,23 @@ impl KhrMirSurfaceFn { where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - KhrMirSurfaceFn { - create_mir_surface_khr: unsafe { - extern "system" fn create_mir_surface_khr( - _instance: Instance, - _p_create_info: *const MirSurfaceCreateInfoKHR, - _p_allocator: *const AllocationCallbacks, - _p_surface: *mut SurfaceKHR, - ) -> Result { - panic!(concat!( - "Unable to load ", - stringify!(create_mir_surface_khr) - )) - } - let raw_name = stringify!(vkCreateMirSurfaceKHR); - let cname = ::std::ffi::CString::new(raw_name).unwrap(); - let val = _f(&cname); - if val.is_null() { - create_mir_surface_khr - } else { - ::std::mem::transmute(val) - } - }, - get_physical_device_mir_presentation_support_khr: unsafe { - extern "system" fn get_physical_device_mir_presentation_support_khr( - _physical_device: PhysicalDevice, - _queue_family_index: u32, - _connection: *mut MirConnection, - ) -> Bool32 { - panic!(concat!( - "Unable to load ", - stringify!(get_physical_device_mir_presentation_support_khr) - )) - } - let raw_name = stringify!(vkGetPhysicalDeviceMirPresentationSupportKHR); - let cname = ::std::ffi::CString::new(raw_name).unwrap(); - let val = _f(&cname); - if val.is_null() { - get_physical_device_mir_presentation_support_khr - } else { - ::std::mem::transmute(val) - } - }, - } + KhrMirSurfaceFn {} } - pub unsafe fn create_mir_surface_khr( - &self, +} +#[allow(non_camel_case_types)] +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 MirSurfaceCreateInfoKHR, + p_create_info: *const AndroidSurfaceCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, - ) -> Result { - (self.create_mir_surface_khr)(instance, p_create_info, p_allocator, p_surface) - } - pub unsafe fn get_physical_device_mir_presentation_support_khr( - &self, - physical_device: PhysicalDevice, - queue_family_index: u32, - connection: *mut MirConnection, - ) -> Bool32 { - (self.get_physical_device_mir_presentation_support_khr)( - physical_device, - queue_family_index, - connection, - ) - } -} -#[doc = "Generated from \'VK_KHR_mir_surface\'"] -impl StructureType { - pub const MIR_SURFACE_CREATE_INFO_KHR: Self = StructureType(1000007000); -} -pub struct KhrAndroidSurfaceFn { - 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 {} @@ -31534,14 +39728,24 @@ impl KhrAndroidSurfaceFn { 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; +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR = + extern "system" fn(physical_device: PhysicalDevice, queue_family_index: u32) -> Bool32; pub struct KhrWin32SurfaceFn { - create_win32_surface_khr: extern "system" fn( + pub create_win32_surface_khr: extern "system" fn( instance: Instance, p_create_info: *const Win32SurfaceCreateInfoKHR, p_allocator: *const AllocationCallbacks, p_surface: *mut SurfaceKHR, ) -> Result, - get_physical_device_win32_presentation_support_khr: + pub get_physical_device_win32_presentation_support_khr: extern "system" fn(physical_device: PhysicalDevice, queue_family_index: u32) -> Bool32, } unsafe impl Send for KhrWin32SurfaceFn {} @@ -31550,8 +39754,8 @@ impl ::std::clone::Clone for KhrWin32SurfaceFn { fn clone(&self) -> Self { KhrWin32SurfaceFn { create_win32_surface_khr: self.create_win32_surface_khr, - get_physical_device_win32_presentation_support_khr: - self.get_physical_device_win32_presentation_support_khr, + get_physical_device_win32_presentation_support_khr: self + .get_physical_device_win32_presentation_support_khr, } } } @@ -31627,21 +39831,44 @@ impl KhrWin32SurfaceFn { impl StructureType { pub const WIN32_SURFACE_CREATE_INFO_KHR: Self = StructureType(1000009000); } +#[allow(non_camel_case_types)] +pub type PFN_vkGetSwapchainGrallocUsageANDROID = extern "system" fn( + device: Device, + format: Format, + image_usage: ImageUsageFlags, + gralloc_usage: *mut c_int, +) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkAcquireImageANDROID = extern "system" fn( + device: Device, + image: Image, + native_fence_fd: c_int, + semaphore: Semaphore, + 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 struct AndroidNativeBufferFn { - get_swapchain_gralloc_usage_android: extern "system" fn( + pub get_swapchain_gralloc_usage_android: extern "system" fn( device: Device, format: Format, image_usage: ImageUsageFlags, gralloc_usage: *mut c_int, ) -> Result, - acquire_image_android: extern "system" fn( + pub acquire_image_android: extern "system" fn( device: Device, image: Image, native_fence_fd: c_int, semaphore: Semaphore, fence: Fence, ) -> Result, - queue_signal_release_image_android: extern "system" fn( + pub queue_signal_release_image_android: extern "system" fn( queue: Queue, wait_semaphore_count: u32, p_wait_semaphores: *const Semaphore, @@ -31773,20 +40000,43 @@ impl AndroidNativeBufferFn { 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; +#[allow(non_camel_case_types)] +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, + flags: DebugReportFlagsEXT, + object_type: DebugReportObjectTypeEXT, + object: u64, + location: usize, + message_code: i32, + p_layer_prefix: *const c_char, + p_message: *const c_char, +) -> c_void; pub struct ExtDebugReportFn { - create_debug_report_callback_ext: - extern "system" fn( - instance: Instance, - p_create_info: *const DebugReportCallbackCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_callback: *mut DebugReportCallbackEXT, - ) -> Result, - destroy_debug_report_callback_ext: extern "system" fn( + 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, - debug_report_message_ext: extern "system" fn( + pub debug_report_message_ext: extern "system" fn( instance: Instance, flags: DebugReportFlagsEXT, object_type: DebugReportObjectTypeEXT, @@ -32119,19 +40369,39 @@ impl AmdShaderExplicitVertexParameterFn { AmdShaderExplicitVertexParameterFn {} } } +#[allow(non_camel_case_types)] +pub type PFN_vkDebugMarkerSetObjectTagEXT = + extern "system" fn(device: Device, p_tag_info: *const DebugMarkerObjectTagInfoEXT) -> Result; +#[allow(non_camel_case_types)] +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; +#[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( + command_buffer: CommandBuffer, + p_marker_info: *const DebugMarkerMarkerInfoEXT, +) -> c_void; pub struct ExtDebugMarkerFn { - debug_marker_set_object_tag_ext: - extern "system" fn(device: Device, p_tag_info: *const DebugMarkerObjectTagInfoEXT) - -> Result, - debug_marker_set_object_name_ext: - extern "system" fn(device: Device, p_name_info: *const DebugMarkerObjectNameInfoEXT) - -> Result, - cmd_debug_marker_begin_ext: extern "system" fn( + 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, - cmd_debug_marker_end_ext: extern "system" fn(command_buffer: CommandBuffer) -> c_void, - cmd_debug_marker_insert_ext: extern "system" fn( + 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, @@ -32387,21 +40657,389 @@ impl ExtExtension28Fn { ExtExtension28Fn {} } } -pub struct NvxExtension29Fn {} -unsafe impl Send for NvxExtension29Fn {} -unsafe impl Sync for NvxExtension29Fn {} -impl ::std::clone::Clone for NvxExtension29Fn { +#[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; +#[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; +#[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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBeginQueryIndexedEXT = extern "system" fn( + command_buffer: CommandBuffer, + query_pool: QueryPool, + query: u32, + flags: QueryControlFlags, + index: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdEndQueryIndexedEXT = extern "system" fn( + command_buffer: CommandBuffer, + query_pool: QueryPool, + query: u32, + index: u32, +) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndirectByteCountEXT = extern "system" fn( + command_buffer: CommandBuffer, + instance_count: u32, + first_instance: u32, + counter_buffer: Buffer, + counter_buffer_offset: DeviceSize, + counter_offset: u32, + vertex_stride: u32, +) -> c_void; +pub struct ExtTransformFeedbackFn { + pub cmd_bind_transform_feedback_buffers_ext: 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 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, + query: u32, + flags: QueryControlFlags, + index: u32, + ) -> c_void, + pub cmd_end_query_indexed_ext: extern "system" fn( + command_buffer: CommandBuffer, + query_pool: QueryPool, + query: u32, + index: u32, + ) -> c_void, + pub cmd_draw_indirect_byte_count_ext: extern "system" fn( + command_buffer: CommandBuffer, + instance_count: u32, + first_instance: u32, + counter_buffer: Buffer, + counter_buffer_offset: DeviceSize, + counter_offset: u32, + vertex_stride: u32, + ) -> c_void, +} +unsafe impl Send for ExtTransformFeedbackFn {} +unsafe impl Sync for ExtTransformFeedbackFn {} +impl ::std::clone::Clone for ExtTransformFeedbackFn { fn clone(&self) -> Self { - NvxExtension29Fn {} + ExtTransformFeedbackFn { + cmd_bind_transform_feedback_buffers_ext: self.cmd_bind_transform_feedback_buffers_ext, + cmd_begin_transform_feedback_ext: self.cmd_begin_transform_feedback_ext, + cmd_end_transform_feedback_ext: self.cmd_end_transform_feedback_ext, + cmd_begin_query_indexed_ext: self.cmd_begin_query_indexed_ext, + cmd_end_query_indexed_ext: self.cmd_end_query_indexed_ext, + cmd_draw_indirect_byte_count_ext: self.cmd_draw_indirect_byte_count_ext, + } } } -impl NvxExtension29Fn { +impl ExtTransformFeedbackFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvxExtension29Fn {} + ExtTransformFeedbackFn { + cmd_bind_transform_feedback_buffers_ext: unsafe { + extern "system" fn cmd_bind_transform_feedback_buffers_ext( + _command_buffer: CommandBuffer, + _first_binding: u32, + _binding_count: u32, + _p_buffers: *const Buffer, + _p_offsets: *const DeviceSize, + _p_sizes: *const DeviceSize, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_bind_transform_feedback_buffers_ext) + )) + } + let raw_name = stringify!(vkCmdBindTransformFeedbackBuffersEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_bind_transform_feedback_buffers_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_begin_transform_feedback_ext: unsafe { + extern "system" fn cmd_begin_transform_feedback_ext( + _command_buffer: CommandBuffer, + _first_counter_buffer: u32, + _counter_buffer_count: u32, + _p_counter_buffers: *const Buffer, + _p_counter_buffer_offsets: *const DeviceSize, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_begin_transform_feedback_ext) + )) + } + let raw_name = stringify!(vkCmdBeginTransformFeedbackEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_begin_transform_feedback_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_end_transform_feedback_ext: unsafe { + extern "system" fn cmd_end_transform_feedback_ext( + _command_buffer: CommandBuffer, + _first_counter_buffer: u32, + _counter_buffer_count: u32, + _p_counter_buffers: *const Buffer, + _p_counter_buffer_offsets: *const DeviceSize, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_end_transform_feedback_ext) + )) + } + let raw_name = stringify!(vkCmdEndTransformFeedbackEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_end_transform_feedback_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_begin_query_indexed_ext: unsafe { + extern "system" fn cmd_begin_query_indexed_ext( + _command_buffer: CommandBuffer, + _query_pool: QueryPool, + _query: u32, + _flags: QueryControlFlags, + _index: u32, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_begin_query_indexed_ext) + )) + } + let raw_name = stringify!(vkCmdBeginQueryIndexedEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_begin_query_indexed_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_end_query_indexed_ext: unsafe { + extern "system" fn cmd_end_query_indexed_ext( + _command_buffer: CommandBuffer, + _query_pool: QueryPool, + _query: u32, + _index: u32, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_end_query_indexed_ext) + )) + } + let raw_name = stringify!(vkCmdEndQueryIndexedEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_end_query_indexed_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_draw_indirect_byte_count_ext: unsafe { + extern "system" fn cmd_draw_indirect_byte_count_ext( + _command_buffer: CommandBuffer, + _instance_count: u32, + _first_instance: u32, + _counter_buffer: Buffer, + _counter_buffer_offset: DeviceSize, + _counter_offset: u32, + _vertex_stride: u32, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_draw_indirect_byte_count_ext) + )) + } + let raw_name = stringify!(vkCmdDrawIndirectByteCountEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_draw_indirect_byte_count_ext + } else { + ::std::mem::transmute(val) + } + }, + } } + pub unsafe fn cmd_bind_transform_feedback_buffers_ext( + &self, + command_buffer: CommandBuffer, + first_binding: u32, + binding_count: u32, + p_buffers: *const Buffer, + p_offsets: *const DeviceSize, + p_sizes: *const DeviceSize, + ) -> c_void { + (self.cmd_bind_transform_feedback_buffers_ext)( + command_buffer, + first_binding, + binding_count, + p_buffers, + p_offsets, + p_sizes, + ) + } + pub unsafe fn cmd_begin_transform_feedback_ext( + &self, + command_buffer: CommandBuffer, + first_counter_buffer: u32, + counter_buffer_count: u32, + p_counter_buffers: *const Buffer, + p_counter_buffer_offsets: *const DeviceSize, + ) -> c_void { + (self.cmd_begin_transform_feedback_ext)( + command_buffer, + first_counter_buffer, + counter_buffer_count, + p_counter_buffers, + p_counter_buffer_offsets, + ) + } + pub unsafe fn cmd_end_transform_feedback_ext( + &self, + command_buffer: CommandBuffer, + first_counter_buffer: u32, + counter_buffer_count: u32, + p_counter_buffers: *const Buffer, + p_counter_buffer_offsets: *const DeviceSize, + ) -> c_void { + (self.cmd_end_transform_feedback_ext)( + command_buffer, + first_counter_buffer, + counter_buffer_count, + p_counter_buffers, + p_counter_buffer_offsets, + ) + } + pub unsafe fn cmd_begin_query_indexed_ext( + &self, + command_buffer: CommandBuffer, + query_pool: QueryPool, + query: u32, + flags: QueryControlFlags, + index: u32, + ) -> c_void { + (self.cmd_begin_query_indexed_ext)(command_buffer, query_pool, query, flags, index) + } + pub unsafe fn cmd_end_query_indexed_ext( + &self, + command_buffer: CommandBuffer, + query_pool: QueryPool, + query: u32, + index: u32, + ) -> c_void { + (self.cmd_end_query_indexed_ext)(command_buffer, query_pool, query, index) + } + pub unsafe fn cmd_draw_indirect_byte_count_ext( + &self, + command_buffer: CommandBuffer, + instance_count: u32, + first_instance: u32, + counter_buffer: Buffer, + counter_buffer_offset: DeviceSize, + counter_offset: u32, + vertex_stride: u32, + ) -> c_void { + (self.cmd_draw_indirect_byte_count_ext)( + command_buffer, + instance_count, + first_instance, + counter_buffer, + counter_buffer_offset, + counter_offset, + vertex_stride, + ) + } +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: Self = StructureType(1000028000); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: Self = StructureType(1000028001); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl StructureType { + pub const PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: Self = StructureType(1000028002); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl QueryType { + pub const TRANSFORM_FEEDBACK_STREAM_EXT: Self = QueryType(1000028004); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl BufferUsageFlags { + pub const TRANSFORM_FEEDBACK_BUFFER_EXT: Self = BufferUsageFlags(0b100000000000); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl BufferUsageFlags { + pub const TRANSFORM_FEEDBACK_COUNTER_BUFFER_EXT: Self = BufferUsageFlags(0b1000000000000); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl AccessFlags { + pub const TRANSFORM_FEEDBACK_WRITE_EXT: Self = AccessFlags(0b10000000000000000000000000); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl AccessFlags { + pub const TRANSFORM_FEEDBACK_COUNTER_READ_EXT: Self = + AccessFlags(0b100000000000000000000000000); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl AccessFlags { + pub const TRANSFORM_FEEDBACK_COUNTER_WRITE_EXT: Self = + AccessFlags(0b1000000000000000000000000000); +} +#[doc = "Generated from \'VK_EXT_transform_feedback\'"] +impl PipelineStageFlags { + pub const TRANSFORM_FEEDBACK_EXT: Self = PipelineStageFlags(0b1000000000000000000000000); } pub struct NvxExtension30Fn {} unsafe impl Send for NvxExtension30Fn {} @@ -32467,8 +41105,28 @@ impl AmdExtension33Fn { AmdExtension33Fn {} } } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndirectCountAMD = 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndexedIndirectCountAMD = 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 AmdDrawIndirectCountFn { - cmd_draw_indirect_count_amd: extern "system" fn( + pub cmd_draw_indirect_count_amd: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, @@ -32477,7 +41135,7 @@ pub struct AmdDrawIndirectCountFn { max_draw_count: u32, stride: u32, ) -> c_void, - cmd_draw_indexed_indirect_count_amd: extern "system" fn( + pub cmd_draw_indexed_indirect_count_amd: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, @@ -32726,8 +41384,17 @@ impl AmdTextureGatherBiasLodFn { impl StructureType { pub const TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: Self = StructureType(1000041000); } +#[allow(non_camel_case_types)] +pub type PFN_vkGetShaderInfoAMD = extern "system" fn( + device: Device, + pipeline: Pipeline, + shader_stage: ShaderStageFlags, + info_type: ShaderInfoTypeAMD, + p_info_size: *mut usize, + p_info: *mut c_void, +) -> Result; pub struct AmdShaderInfoFn { - get_shader_info_amd: extern "system" fn( + pub get_shader_info_amd: extern "system" fn( device: Device, pipeline: Pipeline, shader_stage: ShaderStageFlags, @@ -32904,22 +41571,30 @@ impl GoogleExtension50Fn { GoogleExtension50Fn {} } } -pub struct NvxExtension51Fn {} -unsafe impl Send for NvxExtension51Fn {} -unsafe impl Sync for NvxExtension51Fn {} -impl ::std::clone::Clone for NvxExtension51Fn { +pub struct NvCornerSampledImageFn {} +unsafe impl Send for NvCornerSampledImageFn {} +unsafe impl Sync for NvCornerSampledImageFn {} +impl ::std::clone::Clone for NvCornerSampledImageFn { fn clone(&self) -> Self { - NvxExtension51Fn {} + NvCornerSampledImageFn {} } } -impl NvxExtension51Fn { +impl NvCornerSampledImageFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvxExtension51Fn {} + NvCornerSampledImageFn {} } } +#[doc = "Generated from \'VK_NV_corner_sampled_image\'"] +impl ImageCreateFlags { + pub const CORNER_SAMPLED_NV: Self = ImageCreateFlags(0b10000000000000); +} +#[doc = "Generated from \'VK_NV_corner_sampled_image\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV: Self = StructureType(1000050000); +} pub struct NvxExtension52Fn {} unsafe impl Send for NvxExtension52Fn {} unsafe impl Sync for NvxExtension52Fn {} @@ -33016,14 +41691,36 @@ impl Format { impl Format { pub const PVRTC2_4BPP_SRGB_BLOCK_IMG: Self = Format(1000054007); } -pub struct NvExternalMemoryCapabilitiesFn { 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 , } +#[allow(non_camel_case_types)] +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, + tiling: ImageTiling, + usage: ImageUsageFlags, + flags: ImageCreateFlags, + external_handle_type: ExternalMemoryHandleTypeFlagsNV, + p_external_image_format_properties: *mut ExternalImageFormatPropertiesNV, + ) -> Result, +} unsafe impl Send for NvExternalMemoryCapabilitiesFn {} unsafe impl Sync for NvExternalMemoryCapabilitiesFn {} impl ::std::clone::Clone for NvExternalMemoryCapabilitiesFn { fn clone(&self) -> Self { NvExternalMemoryCapabilitiesFn { - get_physical_device_external_image_format_properties_nv: - self.get_physical_device_external_image_format_properties_nv, + get_physical_device_external_image_format_properties_nv: self + .get_physical_device_external_image_format_properties_nv, } } } @@ -33107,8 +41804,15 @@ impl StructureType { impl StructureType { pub const EXPORT_MEMORY_ALLOCATE_INFO_NV: Self = StructureType(1000056001); } +#[allow(non_camel_case_types)] +pub type PFN_vkGetMemoryWin32HandleNV = extern "system" fn( + device: Device, + memory: DeviceMemory, + handle_type: ExternalMemoryHandleTypeFlagsNV, + p_handle: *mut HANDLE, +) -> Result; pub struct NvExternalMemoryWin32Fn { - get_memory_win32_handle_nv: extern "system" fn( + pub get_memory_win32_handle_nv: extern "system" fn( device: Device, memory: DeviceMemory, handle_type: ExternalMemoryHandleTypeFlagsNV, @@ -33207,7 +41911,28 @@ impl KhrGetPhysicalDeviceProperties2Fn { KhrGetPhysicalDeviceProperties2Fn {} } } -pub struct KhrDeviceGroupFn { get_device_group_present_capabilities_khr : extern "system" fn ( device : Device , p_device_group_present_capabilities : *mut DeviceGroupPresentCapabilitiesKHR , ) -> Result , get_device_group_surface_present_modes_khr : extern "system" fn ( device : Device , surface : SurfaceKHR , p_modes : *mut DeviceGroupPresentModeFlagsKHR , ) -> Result , get_physical_device_present_rectangles_khr : extern "system" fn ( physical_device : PhysicalDevice , surface : SurfaceKHR , p_rect_count : *mut u32 , p_rects : *mut Rect2D , ) -> Result , 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 { @@ -33372,8 +42097,15 @@ impl ExtValidationFlagsFn { impl StructureType { pub const VALIDATION_FLAGS_EXT: Self = StructureType(1000061000); } +#[allow(non_camel_case_types)] +pub type PFN_vkCreateViSurfaceNN = extern "system" fn( + instance: Instance, + p_create_info: *const ViSurfaceCreateInfoNN, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, +) -> Result; pub struct NnViSurfaceFn { - create_vi_surface_nn: extern "system" fn( + pub create_vi_surface_nn: extern "system" fn( instance: Instance, p_create_info: *const ViSurfaceCreateInfoNN, p_allocator: *const AllocationCallbacks, @@ -33493,22 +42225,30 @@ impl ArmExtension01Fn { ArmExtension01Fn {} } } -pub struct ArmExtension02Fn {} -unsafe impl Send for ArmExtension02Fn {} -unsafe impl Sync for ArmExtension02Fn {} -impl ::std::clone::Clone for ArmExtension02Fn { +pub struct ExtAstcDecodeModeFn {} +unsafe impl Send for ExtAstcDecodeModeFn {} +unsafe impl Sync for ExtAstcDecodeModeFn {} +impl ::std::clone::Clone for ExtAstcDecodeModeFn { fn clone(&self) -> Self { - ArmExtension02Fn {} + ExtAstcDecodeModeFn {} } } -impl ArmExtension02Fn { +impl ExtAstcDecodeModeFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ArmExtension02Fn {} + ExtAstcDecodeModeFn {} } } +#[doc = "Generated from \'VK_EXT_astc_decode_mode\'"] +impl StructureType { + pub const IMAGE_VIEW_ASTC_DECODE_MODE_EXT: Self = StructureType(1000067000); +} +#[doc = "Generated from \'VK_EXT_astc_decode_mode\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT: Self = StructureType(1000067001); +} pub struct ImgExtension69Fn {} unsafe impl Send for ImgExtension69Fn {} unsafe impl Sync for ImgExtension69Fn {} @@ -33589,20 +42329,31 @@ impl KhrExternalMemoryFn { KhrExternalMemoryFn {} } } +#[allow(non_camel_case_types)] +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 { - get_memory_win32_handle_khr: - extern "system" fn( - device: Device, - p_get_win32_handle_info: *const MemoryGetWin32HandleInfoKHR, - p_handle: *mut HANDLE, - ) -> Result, - 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 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, } unsafe impl Send for KhrExternalMemoryWin32Fn {} unsafe impl Sync for KhrExternalMemoryWin32Fn {} @@ -33702,19 +42453,31 @@ impl StructureType { 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; +#[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 struct KhrExternalMemoryFdFn { - get_memory_fd_khr: extern "system" fn( + pub get_memory_fd_khr: extern "system" fn( device: Device, p_get_fd_info: *const MemoryGetFdInfoKHR, p_fd: *mut c_int, ) -> Result, - 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 {} @@ -33854,7 +42617,28 @@ impl KhrExternalSemaphoreFn { KhrExternalSemaphoreFn {} } } -pub struct KhrExternalSemaphoreWin32Fn { import_semaphore_win32_handle_khr : extern "system" fn ( device : Device , p_import_semaphore_win32_handle_info : *const ImportSemaphoreWin32HandleInfoKHR , ) -> Result , get_semaphore_win32_handle_khr : extern "system" fn ( device : Device , p_get_win32_handle_info : *const SemaphoreGetWin32HandleInfoKHR , p_handle : *mut HANDLE , ) -> Result , } +#[allow(non_camel_case_types)] +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( + 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, +} unsafe impl Send for KhrExternalSemaphoreWin32Fn {} unsafe impl Sync for KhrExternalSemaphoreWin32Fn {} impl ::std::clone::Clone for KhrExternalSemaphoreWin32Fn { @@ -33944,13 +42728,23 @@ impl StructureType { 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; +#[allow(non_camel_case_types)] +pub type PFN_vkGetSemaphoreFdKHR = extern "system" fn( + device: Device, + p_get_fd_info: *const SemaphoreGetFdInfoKHR, + p_fd: *mut c_int, +) -> Result; pub struct KhrExternalSemaphoreFdFn { - import_semaphore_fd_khr: - extern "system" fn( - device: Device, - p_import_semaphore_fd_info: *const ImportSemaphoreFdInfoKHR, - ) -> Result, - get_semaphore_fd_khr: extern "system" fn( + 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, p_fd: *mut c_int, @@ -34034,8 +42828,25 @@ impl StructureType { impl StructureType { pub const SEMAPHORE_GET_FD_INFO_KHR: Self = StructureType(1000079001); } +#[allow(non_camel_case_types)] +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 { - cmd_push_descriptor_set_khr: extern "system" fn( + pub cmd_push_descriptor_set_khr: extern "system" fn( command_buffer: CommandBuffer, pipeline_bind_point: PipelineBindPoint, layout: PipelineLayout, @@ -34043,14 +42854,13 @@ pub struct KhrPushDescriptorFn { descriptor_write_count: u32, p_descriptor_writes: *const WriteDescriptorSet, ) -> c_void, - 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 KhrPushDescriptorFn {} unsafe impl Sync for KhrPushDescriptorFn {} @@ -34159,21 +42969,115 @@ impl StructureType { impl DescriptorSetLayoutCreateFlags { pub const PUSH_DESCRIPTOR_KHR: Self = DescriptorSetLayoutCreateFlags(0b1); } -pub struct ExtExtension82Fn {} -unsafe impl Send for ExtExtension82Fn {} -unsafe impl Sync for ExtExtension82Fn {} -impl ::std::clone::Clone for ExtExtension82Fn { +#[allow(non_camel_case_types)] +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_end_conditional_rendering_ext: + extern "system" fn(command_buffer: CommandBuffer) -> c_void, +} +unsafe impl Send for ExtConditionalRenderingFn {} +unsafe impl Sync for ExtConditionalRenderingFn {} +impl ::std::clone::Clone for ExtConditionalRenderingFn { fn clone(&self) -> Self { - ExtExtension82Fn {} + ExtConditionalRenderingFn { + cmd_begin_conditional_rendering_ext: self.cmd_begin_conditional_rendering_ext, + cmd_end_conditional_rendering_ext: self.cmd_end_conditional_rendering_ext, + } } } -impl ExtExtension82Fn { +impl ExtConditionalRenderingFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension82Fn {} + ExtConditionalRenderingFn { + cmd_begin_conditional_rendering_ext: unsafe { + extern "system" fn cmd_begin_conditional_rendering_ext( + _command_buffer: CommandBuffer, + _p_conditional_rendering_begin: *const ConditionalRenderingBeginInfoEXT, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_begin_conditional_rendering_ext) + )) + } + let raw_name = stringify!(vkCmdBeginConditionalRenderingEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_begin_conditional_rendering_ext + } else { + ::std::mem::transmute(val) + } + }, + cmd_end_conditional_rendering_ext: unsafe { + extern "system" fn cmd_end_conditional_rendering_ext( + _command_buffer: CommandBuffer, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_end_conditional_rendering_ext) + )) + } + let raw_name = stringify!(vkCmdEndConditionalRenderingEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_end_conditional_rendering_ext + } else { + ::std::mem::transmute(val) + } + }, + } } + pub unsafe fn cmd_begin_conditional_rendering_ext( + &self, + command_buffer: CommandBuffer, + p_conditional_rendering_begin: *const ConditionalRenderingBeginInfoEXT, + ) -> c_void { + (self.cmd_begin_conditional_rendering_ext)(command_buffer, p_conditional_rendering_begin) + } + pub unsafe fn cmd_end_conditional_rendering_ext( + &self, + command_buffer: CommandBuffer, + ) -> c_void { + (self.cmd_end_conditional_rendering_ext)(command_buffer) + } +} +#[doc = "Generated from \'VK_EXT_conditional_rendering\'"] +impl StructureType { + pub const COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: Self = + StructureType(1000081000); +} +#[doc = "Generated from \'VK_EXT_conditional_rendering\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: Self = StructureType(1000081001); +} +#[doc = "Generated from \'VK_EXT_conditional_rendering\'"] +impl StructureType { + pub const CONDITIONAL_RENDERING_BEGIN_INFO_EXT: Self = StructureType(1000081002); +} +#[doc = "Generated from \'VK_EXT_conditional_rendering\'"] +impl AccessFlags { + pub const CONDITIONAL_RENDERING_READ_EXT: Self = AccessFlags(0b100000000000000000000); +} +#[doc = "Generated from \'VK_EXT_conditional_rendering\'"] +impl BufferUsageFlags { + pub const CONDITIONAL_RENDERING_EXT: Self = BufferUsageFlags(0b1000000000); +} +#[doc = "Generated from \'VK_EXT_conditional_rendering\'"] +impl PipelineStageFlags { + pub const CONDITIONAL_RENDERING_EXT: Self = PipelineStageFlags(0b1000000000000000000); } pub struct KhrExtension83Fn {} unsafe impl Send for KhrExtension83Fn {} @@ -34228,14 +43132,13 @@ impl StructureType { pub const PRESENT_REGIONS_KHR: Self = StructureType(1000084000); } pub struct KhrDescriptorUpdateTemplateFn { - 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 {} @@ -34294,62 +43197,114 @@ 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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkDestroyObjectTableNVX = extern "system" fn( + device: Device, + object_table: ObjectTableNVX, + 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; +#[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; +#[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 struct NvxDeviceGeneratedCommandsFn { - cmd_process_commands_nvx: - extern "system" fn( - command_buffer: CommandBuffer, - p_process_commands_info: *const CmdProcessCommandsInfoNVX, - ) -> c_void, - cmd_reserve_space_for_commands_nvx: - extern "system" fn( - command_buffer: CommandBuffer, - p_reserve_space_info: *const CmdReserveSpaceForCommandsInfoNVX, - ) -> c_void, - 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, - destroy_indirect_commands_layout_nvx: - extern "system" fn( - device: Device, - indirect_commands_layout: IndirectCommandsLayoutNVX, - p_allocator: *const AllocationCallbacks, - ) -> c_void, - create_object_table_nvx: extern "system" fn( + 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, p_allocator: *const AllocationCallbacks, p_object_table: *mut ObjectTableNVX, ) -> Result, - destroy_object_table_nvx: extern "system" fn( + pub destroy_object_table_nvx: extern "system" fn( device: Device, object_table: ObjectTableNVX, p_allocator: *const AllocationCallbacks, ) -> c_void, - 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, - unregister_objects_nvx: extern "system" fn( + 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, object_count: u32, p_object_entry_types: *const ObjectEntryTypeNVX, p_object_indices: *const u32, ) -> Result, - 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 {} @@ -34364,8 +43319,8 @@ impl ::std::clone::Clone for NvxDeviceGeneratedCommandsFn { destroy_object_table_nvx: self.destroy_object_table_nvx, register_objects_nvx: self.register_objects_nvx, unregister_objects_nvx: self.unregister_objects_nvx, - get_physical_device_generated_commands_properties_nvx: - self.get_physical_device_generated_commands_properties_nvx, + get_physical_device_generated_commands_properties_nvx: self + .get_physical_device_generated_commands_properties_nvx, } } } @@ -34700,14 +43655,20 @@ impl ObjectType { impl ObjectType { pub const INDIRECT_COMMANDS_LAYOUT_NVX: Self = ObjectType(1000086001); } +#[allow(non_camel_case_types)] +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 { - 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 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, } unsafe impl Send for NvClipSpaceWScalingFn {} unsafe impl Sync for NvClipSpaceWScalingFn {} @@ -34770,8 +43731,11 @@ impl StructureType { impl DynamicState { pub const VIEWPORT_W_SCALING_NV: Self = DynamicState(1000087000); } +#[allow(non_camel_case_types)] +pub type PFN_vkReleaseDisplayEXT = + extern "system" fn(physical_device: PhysicalDevice, display: DisplayKHR) -> Result; pub struct ExtDirectModeDisplayFn { - release_display_ext: + pub release_display_ext: extern "system" fn(physical_device: PhysicalDevice, display: DisplayKHR) -> Result, } unsafe impl Send for ExtDirectModeDisplayFn {} @@ -34815,11 +43779,26 @@ impl ExtDirectModeDisplayFn { (self.release_display_ext)(physical_device, display) } } +#[allow(non_camel_case_types)] +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, + dpy: *mut Display, + rr_output: RROutput, + p_display: *mut DisplayKHR, +) -> Result; pub struct ExtAcquireXlibDisplayFn { - acquire_xlib_display_ext: - extern "system" fn(physical_device: PhysicalDevice, dpy: *mut Display, display: DisplayKHR) - -> Result, - get_rand_r_output_display_ext: extern "system" fn( + 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, rr_output: RROutput, @@ -34903,21 +43882,26 @@ impl ExtAcquireXlibDisplayFn { (self.get_rand_r_output_display_ext)(physical_device, dpy, rr_output, p_display) } } +#[allow(non_camel_case_types)] +pub type PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT = extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_surface_capabilities: *mut SurfaceCapabilities2EXT, +) -> Result; pub struct ExtDisplaySurfaceCounterFn { - get_physical_device_surface_capabilities2_ext: - extern "system" fn( - physical_device: PhysicalDevice, - surface: SurfaceKHR, - p_surface_capabilities: *mut SurfaceCapabilities2EXT, - ) -> Result, + pub get_physical_device_surface_capabilities2_ext: extern "system" fn( + physical_device: PhysicalDevice, + surface: SurfaceKHR, + p_surface_capabilities: *mut SurfaceCapabilities2EXT, + ) -> Result, } unsafe impl Send for ExtDisplaySurfaceCounterFn {} unsafe impl Sync for ExtDisplaySurfaceCounterFn {} impl ::std::clone::Clone for ExtDisplaySurfaceCounterFn { fn clone(&self) -> Self { ExtDisplaySurfaceCounterFn { - get_physical_device_surface_capabilities2_ext: - self.get_physical_device_surface_capabilities2_ext, + get_physical_device_surface_capabilities2_ext: self + .get_physical_device_surface_capabilities2_ext, } } } @@ -34966,27 +43950,54 @@ impl ExtDisplaySurfaceCounterFn { 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; +#[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; +#[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; +#[allow(non_camel_case_types)] +pub type PFN_vkGetSwapchainCounterEXT = extern "system" fn( + device: Device, + swapchain: SwapchainKHR, + counter: SurfaceCounterFlagsEXT, + p_counter_value: *mut u64, +) -> Result; pub struct ExtDisplayControlFn { - display_power_control_ext: extern "system" fn( + pub display_power_control_ext: extern "system" fn( device: Device, display: DisplayKHR, p_display_power_info: *const DisplayPowerInfoEXT, ) -> Result, - register_device_event_ext: extern "system" fn( + 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, - 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, - get_swapchain_counter_ext: extern "system" fn( + 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, counter: SurfaceCounterFlagsEXT, @@ -35156,20 +44167,31 @@ impl StructureType { impl StructureType { pub const SWAPCHAIN_COUNTER_CREATE_INFO_EXT: Self = StructureType(1000091003); } +#[allow(non_camel_case_types)] +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 { - get_refresh_cycle_duration_google: - extern "system" fn( - device: Device, - swapchain: SwapchainKHR, - p_display_timing_properties: *mut RefreshCycleDurationGOOGLE, - ) -> Result, - 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 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, } unsafe impl Send for GoogleDisplayTimingFn {} unsafe impl Sync for GoogleDisplayTimingFn {} @@ -35354,8 +44376,15 @@ impl NvViewportSwizzleFn { impl StructureType { pub const PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: Self = StructureType(1000098000); } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetDiscardRectangleEXT = extern "system" fn( + command_buffer: CommandBuffer, + first_discard_rectangle: u32, + discard_rectangle_count: u32, + p_discard_rectangles: *const Rect2D, +) -> c_void; pub struct ExtDiscardRectanglesFn { - cmd_set_discard_rectangle_ext: extern "system" fn( + pub cmd_set_discard_rectangle_ext: extern "system" fn( command_buffer: CommandBuffer, first_discard_rectangle: u32, discard_rectangle_count: u32, @@ -35573,8 +44602,15 @@ impl ColorSpaceKHR { impl ColorSpaceKHR { pub const EXTENDED_SRGB_NONLINEAR_EXT: Self = ColorSpaceKHR(1000104014); } +#[allow(non_camel_case_types)] +pub type PFN_vkSetHdrMetadataEXT = extern "system" fn( + device: Device, + swapchain_count: u32, + p_swapchains: *const SwapchainKHR, + p_metadata: *const HdrMetadataEXT, +) -> c_void; pub struct ExtHdrMetadataFn { - set_hdr_metadata_ext: extern "system" fn( + pub set_hdr_metadata_ext: extern "system" fn( device: Device, swapchain_count: u32, p_swapchains: *const SwapchainKHR, @@ -35678,21 +44714,212 @@ impl ImgExtension109Fn { ImgExtension109Fn {} } } -pub struct ImgExtension110Fn {} -unsafe impl Send for ImgExtension110Fn {} -unsafe impl Sync for ImgExtension110Fn {} -impl ::std::clone::Clone for ImgExtension110Fn { +#[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; +#[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; +#[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; +#[allow(non_camel_case_types)] +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, + p_create_info: *const RenderPassCreateInfo2KHR, + 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_next_subpass2_khr: extern "system" fn( + command_buffer: CommandBuffer, + p_subpass_begin_info: *const SubpassBeginInfoKHR, + p_subpass_end_info: *const SubpassEndInfoKHR, + ) -> c_void, + pub cmd_end_render_pass2_khr: extern "system" fn( + command_buffer: CommandBuffer, + p_subpass_end_info: *const SubpassEndInfoKHR, + ) -> c_void, +} +unsafe impl Send for KhrCreateRenderpass2Fn {} +unsafe impl Sync for KhrCreateRenderpass2Fn {} +impl ::std::clone::Clone for KhrCreateRenderpass2Fn { fn clone(&self) -> Self { - ImgExtension110Fn {} + KhrCreateRenderpass2Fn { + create_render_pass2_khr: self.create_render_pass2_khr, + cmd_begin_render_pass2_khr: self.cmd_begin_render_pass2_khr, + cmd_next_subpass2_khr: self.cmd_next_subpass2_khr, + cmd_end_render_pass2_khr: self.cmd_end_render_pass2_khr, + } } } -impl ImgExtension110Fn { +impl KhrCreateRenderpass2Fn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ImgExtension110Fn {} + KhrCreateRenderpass2Fn { + create_render_pass2_khr: unsafe { + extern "system" fn create_render_pass2_khr( + _device: Device, + _p_create_info: *const RenderPassCreateInfo2KHR, + _p_allocator: *const AllocationCallbacks, + _p_render_pass: *mut RenderPass, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(create_render_pass2_khr) + )) + } + let raw_name = stringify!(vkCreateRenderPass2KHR); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + create_render_pass2_khr + } else { + ::std::mem::transmute(val) + } + }, + cmd_begin_render_pass2_khr: unsafe { + extern "system" fn cmd_begin_render_pass2_khr( + _command_buffer: CommandBuffer, + _p_render_pass_begin: *const RenderPassBeginInfo, + _p_subpass_begin_info: *const SubpassBeginInfoKHR, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_begin_render_pass2_khr) + )) + } + let raw_name = stringify!(vkCmdBeginRenderPass2KHR); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_begin_render_pass2_khr + } else { + ::std::mem::transmute(val) + } + }, + cmd_next_subpass2_khr: unsafe { + extern "system" fn cmd_next_subpass2_khr( + _command_buffer: CommandBuffer, + _p_subpass_begin_info: *const SubpassBeginInfoKHR, + _p_subpass_end_info: *const SubpassEndInfoKHR, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_next_subpass2_khr) + )) + } + let raw_name = stringify!(vkCmdNextSubpass2KHR); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_next_subpass2_khr + } else { + ::std::mem::transmute(val) + } + }, + cmd_end_render_pass2_khr: unsafe { + extern "system" fn cmd_end_render_pass2_khr( + _command_buffer: CommandBuffer, + _p_subpass_end_info: *const SubpassEndInfoKHR, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_end_render_pass2_khr) + )) + } + let raw_name = stringify!(vkCmdEndRenderPass2KHR); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_end_render_pass2_khr + } else { + ::std::mem::transmute(val) + } + }, + } } + pub unsafe fn create_render_pass2_khr( + &self, + device: Device, + p_create_info: *const RenderPassCreateInfo2KHR, + p_allocator: *const AllocationCallbacks, + p_render_pass: *mut RenderPass, + ) -> Result { + (self.create_render_pass2_khr)(device, p_create_info, p_allocator, p_render_pass) + } + pub unsafe fn cmd_begin_render_pass2_khr( + &self, + command_buffer: CommandBuffer, + p_render_pass_begin: *const RenderPassBeginInfo, + p_subpass_begin_info: *const SubpassBeginInfoKHR, + ) -> c_void { + (self.cmd_begin_render_pass2_khr)(command_buffer, p_render_pass_begin, p_subpass_begin_info) + } + pub unsafe fn cmd_next_subpass2_khr( + &self, + command_buffer: CommandBuffer, + p_subpass_begin_info: *const SubpassBeginInfoKHR, + p_subpass_end_info: *const SubpassEndInfoKHR, + ) -> c_void { + (self.cmd_next_subpass2_khr)(command_buffer, p_subpass_begin_info, p_subpass_end_info) + } + pub unsafe fn cmd_end_render_pass2_khr( + &self, + command_buffer: CommandBuffer, + p_subpass_end_info: *const SubpassEndInfoKHR, + ) -> c_void { + (self.cmd_end_render_pass2_khr)(command_buffer, p_subpass_end_info) + } +} +#[doc = "Generated from \'VK_KHR_create_renderpass2\'"] +impl StructureType { + pub const ATTACHMENT_DESCRIPTION_2_KHR: Self = StructureType(1000109000); +} +#[doc = "Generated from \'VK_KHR_create_renderpass2\'"] +impl StructureType { + pub const ATTACHMENT_REFERENCE_2_KHR: Self = StructureType(1000109001); +} +#[doc = "Generated from \'VK_KHR_create_renderpass2\'"] +impl StructureType { + pub const SUBPASS_DESCRIPTION_2_KHR: Self = StructureType(1000109002); +} +#[doc = "Generated from \'VK_KHR_create_renderpass2\'"] +impl StructureType { + pub const SUBPASS_DEPENDENCY_2_KHR: Self = StructureType(1000109003); +} +#[doc = "Generated from \'VK_KHR_create_renderpass2\'"] +impl StructureType { + pub const RENDER_PASS_CREATE_INFO_2_KHR: Self = StructureType(1000109004); +} +#[doc = "Generated from \'VK_KHR_create_renderpass2\'"] +impl StructureType { + pub const SUBPASS_BEGIN_INFO_KHR: Self = StructureType(1000109005); +} +#[doc = "Generated from \'VK_KHR_create_renderpass2\'"] +impl StructureType { + pub const SUBPASS_END_INFO_KHR: Self = StructureType(1000109006); } pub struct ImgExtension111Fn {} unsafe impl Send for ImgExtension111Fn {} @@ -35710,8 +44937,12 @@ impl ImgExtension111Fn { ImgExtension111Fn {} } } +#[allow(non_camel_case_types)] +pub type PFN_vkGetSwapchainStatusKHR = + extern "system" fn(device: Device, swapchain: SwapchainKHR) -> Result; pub struct KhrSharedPresentableImageFn { - get_swapchain_status_khr: extern "system" fn(device: Device, swapchain: SwapchainKHR) -> Result, + pub get_swapchain_status_khr: + extern "system" fn(device: Device, swapchain: SwapchainKHR) -> Result, } unsafe impl Send for KhrSharedPresentableImageFn {} unsafe impl Sync for KhrSharedPresentableImageFn {} @@ -35805,18 +45036,27 @@ impl KhrExternalFenceFn { KhrExternalFenceFn {} } } +#[allow(non_camel_case_types)] +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 { - import_fence_win32_handle_khr: - extern "system" fn( - device: Device, - p_import_fence_win32_handle_info: *const ImportFenceWin32HandleInfoKHR, - ) -> Result, - get_fence_win32_handle_khr: - extern "system" fn( - device: Device, - p_get_win32_handle_info: *const FenceGetWin32HandleInfoKHR, - p_handle: *mut HANDLE, - ) -> Result, + 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, } unsafe impl Send for KhrExternalFenceWin32Fn {} unsafe impl Sync for KhrExternalFenceWin32Fn {} @@ -35903,11 +45143,23 @@ impl StructureType { 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; +#[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 struct KhrExternalFenceFdFn { - import_fence_fd_khr: - extern "system" fn(device: Device, p_import_fence_fd_info: *const ImportFenceFdInfoKHR) - -> Result, - get_fence_fd_khr: extern "system" fn( + 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, p_fd: *mut c_int, @@ -36036,28 +45288,39 @@ impl KhrExtension119Fn { KhrExtension119Fn {} } } +#[allow(non_camel_case_types)] +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 { - get_physical_device_surface_capabilities2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR, - p_surface_capabilities: *mut SurfaceCapabilities2KHR, - ) -> Result, - 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 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, } unsafe impl Send for KhrGetSurfaceCapabilities2Fn {} unsafe impl Sync for KhrGetSurfaceCapabilities2Fn {} impl ::std::clone::Clone for KhrGetSurfaceCapabilities2Fn { fn clone(&self) -> Self { KhrGetSurfaceCapabilities2Fn { - get_physical_device_surface_capabilities2_khr: - self.get_physical_device_surface_capabilities2_khr, + get_physical_device_surface_capabilities2_khr: self + .get_physical_device_surface_capabilities2_khr, get_physical_device_surface_formats2_khr: self.get_physical_device_surface_formats2_khr, } } @@ -36166,42 +45429,63 @@ impl KhrVariablePointersFn { KhrVariablePointersFn {} } } +#[allow(non_camel_case_types)] +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 { - get_physical_device_display_properties2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayProperties2KHR, - ) -> Result, - get_physical_device_display_plane_properties2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_property_count: *mut u32, - p_properties: *mut DisplayPlaneProperties2KHR, - ) -> Result, - get_display_mode_properties2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - display: DisplayKHR, - p_property_count: *mut u32, - p_properties: *mut DisplayModeProperties2KHR, - ) -> Result, - get_display_plane_capabilities2_khr: - extern "system" fn( - physical_device: PhysicalDevice, - p_display_plane_info: *const DisplayPlaneInfo2KHR, - p_capabilities: *mut DisplayPlaneCapabilities2KHR, - ) -> Result, + 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, } unsafe impl Send for KhrGetDisplayProperties2Fn {} unsafe impl Sync for KhrGetDisplayProperties2Fn {} impl ::std::clone::Clone for KhrGetDisplayProperties2Fn { fn clone(&self) -> Self { KhrGetDisplayProperties2Fn { - get_physical_device_display_properties2_khr: - self.get_physical_device_display_properties2_khr, - get_physical_device_display_plane_properties2_khr: - self.get_physical_device_display_plane_properties2_khr, + get_physical_device_display_properties2_khr: self + .get_physical_device_display_properties2_khr, + get_physical_device_display_plane_properties2_khr: self + .get_physical_device_display_plane_properties2_khr, get_display_mode_properties2_khr: self.get_display_mode_properties2_khr, get_display_plane_capabilities2_khr: self.get_display_plane_capabilities2_khr, } @@ -36367,8 +45651,15 @@ impl StructureType { 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 struct MvkIosSurfaceFn { - create_ios_surface_mvk: extern "system" fn( + pub create_ios_surface_mvk: extern "system" fn( instance: Instance, p_create_info: *const IOSSurfaceCreateInfoMVK, p_allocator: *const AllocationCallbacks, @@ -36427,8 +45718,15 @@ impl MvkIosSurfaceFn { impl StructureType { pub const IOS_SURFACE_CREATE_INFO_M: Self = StructureType(1000122000); } +#[allow(non_camel_case_types)] +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 { - create_mac_os_surface_mvk: extern "system" fn( + pub create_mac_os_surface_mvk: extern "system" fn( instance: Instance, p_create_info: *const MacOSSurfaceCreateInfoMVK, p_allocator: *const AllocationCallbacks, @@ -36556,43 +45854,91 @@ impl KhrDedicatedAllocationFn { KhrDedicatedAllocationFn {} } } +#[allow(non_camel_case_types)] +pub type PFN_vkSetDebugUtilsObjectNameEXT = + extern "system" fn(device: Device, p_name_info: *const DebugUtilsObjectNameInfoEXT) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkSetDebugUtilsObjectTagEXT = + extern "system" fn(device: Device, p_tag_info: *const DebugUtilsObjectTagInfoEXT) -> Result; +#[allow(non_camel_case_types)] +pub type PFN_vkQueueBeginDebugUtilsLabelEXT = + extern "system" fn(queue: Queue, p_label_info: *const DebugUtilsLabelEXT) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkQueueEndDebugUtilsLabelEXT = extern "system" fn(queue: Queue) -> c_void; +#[allow(non_camel_case_types)] +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; +#[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; +#[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; +#[allow(non_camel_case_types)] +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 struct ExtDebugUtilsFn { - set_debug_utils_object_name_ext: - extern "system" fn(device: Device, p_name_info: *const DebugUtilsObjectNameInfoEXT) - -> Result, - set_debug_utils_object_tag_ext: + 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, - queue_begin_debug_utils_label_ext: + pub queue_begin_debug_utils_label_ext: extern "system" fn(queue: Queue, p_label_info: *const DebugUtilsLabelEXT) -> c_void, - queue_end_debug_utils_label_ext: extern "system" fn(queue: Queue) -> c_void, - queue_insert_debug_utils_label_ext: + 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, - cmd_begin_debug_utils_label_ext: - extern "system" fn(command_buffer: CommandBuffer, p_label_info: *const DebugUtilsLabelEXT) - -> c_void, - cmd_end_debug_utils_label_ext: extern "system" fn(command_buffer: CommandBuffer) -> c_void, - cmd_insert_debug_utils_label_ext: - extern "system" fn(command_buffer: CommandBuffer, p_label_info: *const DebugUtilsLabelEXT) - -> c_void, - create_debug_utils_messenger_ext: - extern "system" fn( - instance: Instance, - p_create_info: *const DebugUtilsMessengerCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_messenger: *mut DebugUtilsMessengerEXT, - ) -> Result, - destroy_debug_utils_messenger_ext: extern "system" fn( + 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, - submit_debug_utils_message_ext: - extern "system" fn( - instance: Instance, - message_severity: DebugUtilsMessageSeverityFlagsEXT, - message_types: DebugUtilsMessageTypeFlagsEXT, - p_callback_data: *const DebugUtilsMessengerCallbackDataEXT, - ) -> 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 {} @@ -36935,27 +46281,37 @@ impl StructureType { impl ObjectType { pub const DEBUG_UTILS_MESSENGER_EXT: Self = ObjectType(1000128000); } +#[allow(non_camel_case_types)] +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 { - get_android_hardware_buffer_properties_android: - extern "system" fn( - device: Device, - buffer: *const AHardwareBuffer, - p_properties: *mut AndroidHardwareBufferPropertiesANDROID, - ) -> Result, - get_memory_android_hardware_buffer_android: - extern "system" fn( - device: Device, - p_info: *const MemoryGetAndroidHardwareBufferInfoANDROID, - p_buffer: *mut *mut AHardwareBuffer, - ) -> Result, + 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, } unsafe impl Send for AndroidExternalMemoryAndroidHardwareBufferFn {} unsafe impl Sync for AndroidExternalMemoryAndroidHardwareBufferFn {} impl ::std::clone::Clone for AndroidExternalMemoryAndroidHardwareBufferFn { fn clone(&self) -> Self { AndroidExternalMemoryAndroidHardwareBufferFn { - get_android_hardware_buffer_properties_android: - self.get_android_hardware_buffer_properties_android, + get_android_hardware_buffer_properties_android: self + .get_android_hardware_buffer_properties_android, get_memory_android_hardware_buffer_android: self .get_memory_android_hardware_buffer_android, } @@ -37196,22 +46552,43 @@ impl AmdShaderFragmentMaskFn { AmdShaderFragmentMaskFn {} } } -pub struct AmdExtension139Fn {} -unsafe impl Send for AmdExtension139Fn {} -unsafe impl Sync for AmdExtension139Fn {} -impl ::std::clone::Clone for AmdExtension139Fn { +pub struct ExtInlineUniformBlockFn {} +unsafe impl Send for ExtInlineUniformBlockFn {} +unsafe impl Sync for ExtInlineUniformBlockFn {} +impl ::std::clone::Clone for ExtInlineUniformBlockFn { fn clone(&self) -> Self { - AmdExtension139Fn {} + ExtInlineUniformBlockFn {} } } -impl AmdExtension139Fn { +impl ExtInlineUniformBlockFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension139Fn {} + ExtInlineUniformBlockFn {} } } +#[doc = "Generated from \'VK_EXT_inline_uniform_block\'"] +impl DescriptorType { + pub const INLINE_UNIFORM_BLOCK_EXT: Self = DescriptorType(1000138000); +} +#[doc = "Generated from \'VK_EXT_inline_uniform_block\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT: Self = StructureType(1000138000); +} +#[doc = "Generated from \'VK_EXT_inline_uniform_block\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT: Self = StructureType(1000138001); +} +#[doc = "Generated from \'VK_EXT_inline_uniform_block\'"] +impl StructureType { + pub const WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT: Self = StructureType(1000138002); +} +#[doc = "Generated from \'VK_EXT_inline_uniform_block\'"] +impl StructureType { + pub const DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT: Self = + StructureType(1000138003); +} pub struct AmdExtension140Fn {} unsafe impl Send for AmdExtension140Fn {} unsafe impl Sync for AmdExtension140Fn {} @@ -37276,18 +46653,27 @@ impl AmdExtension143Fn { AmdExtension143Fn {} } } +#[allow(non_camel_case_types)] +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 { - cmd_set_sample_locations_ext: - extern "system" fn( - command_buffer: CommandBuffer, - p_sample_locations_info: *const SampleLocationsInfoEXT, - ) -> c_void, - get_physical_device_multisample_properties_ext: - extern "system" fn( - physical_device: PhysicalDevice, - samples: SampleCountFlags, - p_multisample_properties: *mut MultisamplePropertiesEXT, - ) -> c_void, + 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, } unsafe impl Send for ExtSampleLocationsFn {} unsafe impl Sync for ExtSampleLocationsFn {} @@ -37295,8 +46681,8 @@ impl ::std::clone::Clone for ExtSampleLocationsFn { fn clone(&self) -> Self { ExtSampleLocationsFn { cmd_set_sample_locations_ext: self.cmd_set_sample_locations_ext, - get_physical_device_multisample_properties_ext: - self.get_physical_device_multisample_properties_ext, + get_physical_device_multisample_properties_ext: self + .get_physical_device_multisample_properties_ext, } } } @@ -37821,21 +47207,113 @@ impl KhrBindMemory2Fn { KhrBindMemory2Fn {} } } -pub struct ExtExtension159Fn {} -unsafe impl Send for ExtExtension159Fn {} -unsafe impl Sync for ExtExtension159Fn {} -impl ::std::clone::Clone for ExtExtension159Fn { +#[allow(non_camel_case_types)] +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, +} +unsafe impl Send for ExtImageDrmFormatModifierFn {} +unsafe impl Sync for ExtImageDrmFormatModifierFn {} +impl ::std::clone::Clone for ExtImageDrmFormatModifierFn { fn clone(&self) -> Self { - ExtExtension159Fn {} + ExtImageDrmFormatModifierFn { + get_image_drm_format_modifier_properties_ext: self + .get_image_drm_format_modifier_properties_ext, + } } } -impl ExtExtension159Fn { +impl ExtImageDrmFormatModifierFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension159Fn {} + ExtImageDrmFormatModifierFn { + get_image_drm_format_modifier_properties_ext: unsafe { + extern "system" fn get_image_drm_format_modifier_properties_ext( + _device: Device, + _image: Image, + _p_properties: *mut ImageDrmFormatModifierPropertiesEXT, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_image_drm_format_modifier_properties_ext) + )) + } + let raw_name = stringify!(vkGetImageDrmFormatModifierPropertiesEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + get_image_drm_format_modifier_properties_ext + } else { + ::std::mem::transmute(val) + } + }, + } } + pub unsafe fn get_image_drm_format_modifier_properties_ext( + &self, + device: Device, + image: Image, + p_properties: *mut ImageDrmFormatModifierPropertiesEXT, + ) -> Result { + (self.get_image_drm_format_modifier_properties_ext)(device, image, p_properties) + } +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl Result { + pub const ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: Self = Result(-1000158000); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl StructureType { + pub const DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT: Self = StructureType(1000158000); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl StructureType { + pub const DRM_FORMAT_MODIFIER_PROPERTIES_EXT: Self = StructureType(1000158001); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: Self = StructureType(1000158002); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl StructureType { + pub const IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: Self = StructureType(1000158003); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl StructureType { + pub const IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: Self = StructureType(1000158004); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl StructureType { + pub const IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT: Self = StructureType(1000158005); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl ImageTiling { + pub const DRM_FORMAT_MODIFIER_EXT: Self = ImageTiling(1000158000); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl ImageAspectFlags { + pub const MEMORY_PLANE_0_EXT: Self = ImageAspectFlags(0b10000000); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl ImageAspectFlags { + pub const MEMORY_PLANE_1_EXT: Self = ImageAspectFlags(0b100000000); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl ImageAspectFlags { + pub const MEMORY_PLANE_2_EXT: Self = ImageAspectFlags(0b1000000000); +} +#[doc = "Generated from \'VK_EXT_image_drm_format_modifier\'"] +impl ImageAspectFlags { + pub const MEMORY_PLANE_3_EXT: Self = ImageAspectFlags(0b10000000000); } pub struct ExtExtension160Fn {} unsafe impl Send for ExtExtension160Fn {} @@ -37853,26 +47331,52 @@ impl ExtExtension160Fn { 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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +pub type PFN_vkGetValidationCacheDataEXT = extern "system" fn( + device: Device, + validation_cache: ValidationCacheEXT, + p_data_size: *mut usize, + p_data: *mut c_void, +) -> Result; pub struct ExtValidationCacheFn { - create_validation_cache_ext: - extern "system" fn( - device: Device, - p_create_info: *const ValidationCacheCreateInfoEXT, - p_allocator: *const AllocationCallbacks, - p_validation_cache: *mut ValidationCacheEXT, - ) -> Result, - destroy_validation_cache_ext: extern "system" fn( + 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, p_allocator: *const AllocationCallbacks, ) -> c_void, - merge_validation_caches_ext: extern "system" fn( + pub merge_validation_caches_ext: extern "system" fn( device: Device, dst_cache: ValidationCacheEXT, src_cache_count: u32, p_src_caches: *const ValidationCacheEXT, ) -> Result, - get_validation_cache_data_ext: extern "system" fn( + pub get_validation_cache_data_ext: extern "system" fn( device: Device, validation_cache: ValidationCacheEXT, p_data_size: *mut usize, @@ -38112,54 +47616,1018 @@ impl NvExtension164Fn { NvExtension164Fn {} } } -pub struct NvExtension165Fn {} -unsafe impl Send for NvExtension165Fn {} -unsafe impl Sync for NvExtension165Fn {} -impl ::std::clone::Clone for NvExtension165Fn { +#[allow(non_camel_case_types)] +pub type PFN_vkCmdBindShadingRateImageNV = extern "system" fn( + command_buffer: CommandBuffer, + image_view: ImageView, + 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; +#[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 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, +} +unsafe impl Send for NvShadingRateImageFn {} +unsafe impl Sync for NvShadingRateImageFn {} +impl ::std::clone::Clone for NvShadingRateImageFn { fn clone(&self) -> Self { - NvExtension165Fn {} + NvShadingRateImageFn { + cmd_bind_shading_rate_image_nv: self.cmd_bind_shading_rate_image_nv, + cmd_set_viewport_shading_rate_palette_nv: self.cmd_set_viewport_shading_rate_palette_nv, + cmd_set_coarse_sample_order_nv: self.cmd_set_coarse_sample_order_nv, + } } } -impl NvExtension165Fn { +impl NvShadingRateImageFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension165Fn {} + NvShadingRateImageFn { + cmd_bind_shading_rate_image_nv: unsafe { + extern "system" fn cmd_bind_shading_rate_image_nv( + _command_buffer: CommandBuffer, + _image_view: ImageView, + _image_layout: ImageLayout, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_bind_shading_rate_image_nv) + )) + } + let raw_name = stringify!(vkCmdBindShadingRateImageNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_bind_shading_rate_image_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_set_viewport_shading_rate_palette_nv: unsafe { + extern "system" fn cmd_set_viewport_shading_rate_palette_nv( + _command_buffer: CommandBuffer, + _first_viewport: u32, + _viewport_count: u32, + _p_shading_rate_palettes: *const ShadingRatePaletteNV, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_viewport_shading_rate_palette_nv) + )) + } + let raw_name = stringify!(vkCmdSetViewportShadingRatePaletteNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_set_viewport_shading_rate_palette_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_set_coarse_sample_order_nv: unsafe { + extern "system" fn cmd_set_coarse_sample_order_nv( + _command_buffer: CommandBuffer, + _sample_order_type: CoarseSampleOrderTypeNV, + _custom_sample_order_count: u32, + _p_custom_sample_orders: *const CoarseSampleOrderCustomNV, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_coarse_sample_order_nv) + )) + } + let raw_name = stringify!(vkCmdSetCoarseSampleOrderNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_set_coarse_sample_order_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } + pub unsafe fn cmd_bind_shading_rate_image_nv( + &self, + command_buffer: CommandBuffer, + image_view: ImageView, + image_layout: ImageLayout, + ) -> c_void { + (self.cmd_bind_shading_rate_image_nv)(command_buffer, image_view, image_layout) + } + pub unsafe fn cmd_set_viewport_shading_rate_palette_nv( + &self, + command_buffer: CommandBuffer, + first_viewport: u32, + viewport_count: u32, + p_shading_rate_palettes: *const ShadingRatePaletteNV, + ) -> c_void { + (self.cmd_set_viewport_shading_rate_palette_nv)( + command_buffer, + first_viewport, + viewport_count, + p_shading_rate_palettes, + ) + } + pub unsafe fn cmd_set_coarse_sample_order_nv( + &self, + command_buffer: CommandBuffer, + sample_order_type: CoarseSampleOrderTypeNV, + custom_sample_order_count: u32, + p_custom_sample_orders: *const CoarseSampleOrderCustomNV, + ) -> c_void { + (self.cmd_set_coarse_sample_order_nv)( + command_buffer, + sample_order_type, + custom_sample_order_count, + p_custom_sample_orders, + ) } } -pub struct NvExtension166Fn {} -unsafe impl Send for NvExtension166Fn {} -unsafe impl Sync for NvExtension166Fn {} -impl ::std::clone::Clone for NvExtension166Fn { +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl StructureType { + pub const PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV: Self = + StructureType(1000164000); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV: Self = StructureType(1000164001); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV: Self = StructureType(1000164002); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl ImageLayout { + pub const SHADING_RATE_OPTIMAL_NV: Self = ImageLayout(1000164003); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl DynamicState { + pub const VIEWPORT_SHADING_RATE_PALETTE_NV: Self = DynamicState(1000164004); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl AccessFlags { + pub const SHADING_RATE_IMAGE_READ_NV: Self = AccessFlags(0b100000000000000000000000); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl ImageUsageFlags { + pub const SHADING_RATE_IMAGE_NV: Self = ImageUsageFlags(0b100000000); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl PipelineStageFlags { + pub const SHADING_RATE_IMAGE_NV: Self = PipelineStageFlags(0b10000000000000000000000); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +impl StructureType { + pub const PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV: Self = + StructureType(1000164005); +} +#[doc = "Generated from \'VK_NV_shading_rate_image\'"] +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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +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; +#[allow(non_camel_case_types)] +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, + raygen_shader_binding_table_buffer: Buffer, + raygen_shader_binding_offset: DeviceSize, + miss_shader_binding_table_buffer: Buffer, + miss_shader_binding_offset: DeviceSize, + miss_shader_binding_stride: DeviceSize, + hit_shader_binding_table_buffer: Buffer, + hit_shader_binding_offset: DeviceSize, + hit_shader_binding_stride: DeviceSize, + callable_shader_binding_table_buffer: Buffer, + callable_shader_binding_offset: DeviceSize, + callable_shader_binding_stride: DeviceSize, + width: u32, + height: u32, + 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; +#[allow(non_camel_case_types)] +pub type PFN_vkGetRayTracingShaderGroupHandlesNV = extern "system" fn( + device: Device, + pipeline: Pipeline, + first_group: u32, + group_count: u32, + data_size: usize, + 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; +#[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; +#[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 cmd_trace_rays_nv: extern "system" fn( + command_buffer: CommandBuffer, + raygen_shader_binding_table_buffer: Buffer, + raygen_shader_binding_offset: DeviceSize, + miss_shader_binding_table_buffer: Buffer, + miss_shader_binding_offset: DeviceSize, + miss_shader_binding_stride: DeviceSize, + hit_shader_binding_table_buffer: Buffer, + hit_shader_binding_offset: DeviceSize, + hit_shader_binding_stride: DeviceSize, + callable_shader_binding_table_buffer: Buffer, + callable_shader_binding_offset: DeviceSize, + callable_shader_binding_stride: DeviceSize, + width: u32, + 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 get_ray_tracing_shader_group_handles_nv: extern "system" fn( + device: Device, + pipeline: Pipeline, + first_group: u32, + group_count: u32, + 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 compile_deferred_nv: + extern "system" fn(device: Device, pipeline: Pipeline, shader: u32) -> Result, +} +unsafe impl Send for NvRayTracingFn {} +unsafe impl Sync for NvRayTracingFn {} +impl ::std::clone::Clone for NvRayTracingFn { fn clone(&self) -> Self { - NvExtension166Fn {} + NvRayTracingFn { + create_acceleration_structure_nv: self.create_acceleration_structure_nv, + destroy_acceleration_structure_nv: self.destroy_acceleration_structure_nv, + get_acceleration_structure_memory_requirements_nv: self + .get_acceleration_structure_memory_requirements_nv, + bind_acceleration_structure_memory_nv: self.bind_acceleration_structure_memory_nv, + cmd_build_acceleration_structure_nv: self.cmd_build_acceleration_structure_nv, + cmd_copy_acceleration_structure_nv: self.cmd_copy_acceleration_structure_nv, + cmd_trace_rays_nv: self.cmd_trace_rays_nv, + create_ray_tracing_pipelines_nv: self.create_ray_tracing_pipelines_nv, + get_ray_tracing_shader_group_handles_nv: self.get_ray_tracing_shader_group_handles_nv, + get_acceleration_structure_handle_nv: self.get_acceleration_structure_handle_nv, + cmd_write_acceleration_structures_properties_nv: self + .cmd_write_acceleration_structures_properties_nv, + compile_deferred_nv: self.compile_deferred_nv, + } } } -impl NvExtension166Fn { +impl NvRayTracingFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension166Fn {} + NvRayTracingFn { + create_acceleration_structure_nv: unsafe { + extern "system" fn create_acceleration_structure_nv( + _device: Device, + _p_create_info: *const AccelerationStructureCreateInfoNV, + _p_allocator: *const AllocationCallbacks, + _p_acceleration_structure: *mut AccelerationStructureNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(create_acceleration_structure_nv) + )) + } + let raw_name = stringify!(vkCreateAccelerationStructureNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + create_acceleration_structure_nv + } else { + ::std::mem::transmute(val) + } + }, + destroy_acceleration_structure_nv: unsafe { + extern "system" fn destroy_acceleration_structure_nv( + _device: Device, + _acceleration_structure: AccelerationStructureNV, + _p_allocator: *const AllocationCallbacks, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(destroy_acceleration_structure_nv) + )) + } + let raw_name = stringify!(vkDestroyAccelerationStructureNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + destroy_acceleration_structure_nv + } else { + ::std::mem::transmute(val) + } + }, + get_acceleration_structure_memory_requirements_nv: unsafe { + extern "system" fn get_acceleration_structure_memory_requirements_nv( + _device: Device, + _p_info: *const AccelerationStructureMemoryRequirementsInfoNV, + _p_memory_requirements: *mut MemoryRequirements2KHR, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(get_acceleration_structure_memory_requirements_nv) + )) + } + let raw_name = stringify!(vkGetAccelerationStructureMemoryRequirementsNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + get_acceleration_structure_memory_requirements_nv + } else { + ::std::mem::transmute(val) + } + }, + bind_acceleration_structure_memory_nv: unsafe { + extern "system" fn bind_acceleration_structure_memory_nv( + _device: Device, + _bind_info_count: u32, + _p_bind_infos: *const BindAccelerationStructureMemoryInfoNV, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(bind_acceleration_structure_memory_nv) + )) + } + let raw_name = stringify!(vkBindAccelerationStructureMemoryNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + bind_acceleration_structure_memory_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_build_acceleration_structure_nv: unsafe { + extern "system" fn cmd_build_acceleration_structure_nv( + _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 { + panic!(concat!( + "Unable to load ", + stringify!(cmd_build_acceleration_structure_nv) + )) + } + let raw_name = stringify!(vkCmdBuildAccelerationStructureNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_build_acceleration_structure_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_copy_acceleration_structure_nv: unsafe { + extern "system" fn cmd_copy_acceleration_structure_nv( + _command_buffer: CommandBuffer, + _dst: AccelerationStructureNV, + _src: AccelerationStructureNV, + _mode: CopyAccelerationStructureModeNV, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_copy_acceleration_structure_nv) + )) + } + let raw_name = stringify!(vkCmdCopyAccelerationStructureNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_copy_acceleration_structure_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_trace_rays_nv: unsafe { + extern "system" fn cmd_trace_rays_nv( + _command_buffer: CommandBuffer, + _raygen_shader_binding_table_buffer: Buffer, + _raygen_shader_binding_offset: DeviceSize, + _miss_shader_binding_table_buffer: Buffer, + _miss_shader_binding_offset: DeviceSize, + _miss_shader_binding_stride: DeviceSize, + _hit_shader_binding_table_buffer: Buffer, + _hit_shader_binding_offset: DeviceSize, + _hit_shader_binding_stride: DeviceSize, + _callable_shader_binding_table_buffer: Buffer, + _callable_shader_binding_offset: DeviceSize, + _callable_shader_binding_stride: DeviceSize, + _width: u32, + _height: u32, + _depth: u32, + ) -> c_void { + panic!(concat!("Unable to load ", stringify!(cmd_trace_rays_nv))) + } + let raw_name = stringify!(vkCmdTraceRaysNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_trace_rays_nv + } else { + ::std::mem::transmute(val) + } + }, + create_ray_tracing_pipelines_nv: unsafe { + extern "system" fn create_ray_tracing_pipelines_nv( + _device: Device, + _pipeline_cache: PipelineCache, + _create_info_count: u32, + _p_create_infos: *const RayTracingPipelineCreateInfoNV, + _p_allocator: *const AllocationCallbacks, + _p_pipelines: *mut Pipeline, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(create_ray_tracing_pipelines_nv) + )) + } + let raw_name = stringify!(vkCreateRayTracingPipelinesNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + create_ray_tracing_pipelines_nv + } else { + ::std::mem::transmute(val) + } + }, + get_ray_tracing_shader_group_handles_nv: unsafe { + extern "system" fn get_ray_tracing_shader_group_handles_nv( + _device: Device, + _pipeline: Pipeline, + _first_group: u32, + _group_count: u32, + _data_size: usize, + _p_data: *mut c_void, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_ray_tracing_shader_group_handles_nv) + )) + } + let raw_name = stringify!(vkGetRayTracingShaderGroupHandlesNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + get_ray_tracing_shader_group_handles_nv + } else { + ::std::mem::transmute(val) + } + }, + get_acceleration_structure_handle_nv: unsafe { + extern "system" fn get_acceleration_structure_handle_nv( + _device: Device, + _acceleration_structure: AccelerationStructureNV, + _data_size: usize, + _p_data: *mut c_void, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_acceleration_structure_handle_nv) + )) + } + let raw_name = stringify!(vkGetAccelerationStructureHandleNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + get_acceleration_structure_handle_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_write_acceleration_structures_properties_nv: unsafe { + extern "system" fn cmd_write_acceleration_structures_properties_nv( + _command_buffer: CommandBuffer, + _acceleration_structure_count: u32, + _p_acceleration_structures: *const AccelerationStructureNV, + _query_type: QueryType, + _query_pool: QueryPool, + _first_query: u32, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_write_acceleration_structures_properties_nv) + )) + } + let raw_name = stringify!(vkCmdWriteAccelerationStructuresPropertiesNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_write_acceleration_structures_properties_nv + } else { + ::std::mem::transmute(val) + } + }, + compile_deferred_nv: unsafe { + extern "system" fn compile_deferred_nv( + _device: Device, + _pipeline: Pipeline, + _shader: u32, + ) -> Result { + panic!(concat!("Unable to load ", stringify!(compile_deferred_nv))) + } + let raw_name = stringify!(vkCompileDeferredNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + compile_deferred_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } + pub unsafe fn create_acceleration_structure_nv( + &self, + device: Device, + p_create_info: *const AccelerationStructureCreateInfoNV, + p_allocator: *const AllocationCallbacks, + p_acceleration_structure: *mut AccelerationStructureNV, + ) -> Result { + (self.create_acceleration_structure_nv)( + device, + p_create_info, + p_allocator, + p_acceleration_structure, + ) + } + pub unsafe fn destroy_acceleration_structure_nv( + &self, + device: Device, + acceleration_structure: AccelerationStructureNV, + p_allocator: *const AllocationCallbacks, + ) -> c_void { + (self.destroy_acceleration_structure_nv)(device, acceleration_structure, p_allocator) + } + pub unsafe fn get_acceleration_structure_memory_requirements_nv( + &self, + device: Device, + p_info: *const AccelerationStructureMemoryRequirementsInfoNV, + p_memory_requirements: *mut MemoryRequirements2KHR, + ) -> c_void { + (self.get_acceleration_structure_memory_requirements_nv)( + device, + p_info, + p_memory_requirements, + ) + } + pub unsafe fn bind_acceleration_structure_memory_nv( + &self, + device: Device, + bind_info_count: u32, + p_bind_infos: *const BindAccelerationStructureMemoryInfoNV, + ) -> Result { + (self.bind_acceleration_structure_memory_nv)(device, bind_info_count, p_bind_infos) + } + pub unsafe fn cmd_build_acceleration_structure_nv( + &self, + 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 { + (self.cmd_build_acceleration_structure_nv)( + command_buffer, + p_info, + instance_data, + instance_offset, + update, + dst, + src, + scratch, + scratch_offset, + ) + } + pub unsafe fn cmd_copy_acceleration_structure_nv( + &self, + command_buffer: CommandBuffer, + dst: AccelerationStructureNV, + src: AccelerationStructureNV, + mode: CopyAccelerationStructureModeNV, + ) -> c_void { + (self.cmd_copy_acceleration_structure_nv)(command_buffer, dst, src, mode) + } + pub unsafe fn cmd_trace_rays_nv( + &self, + command_buffer: CommandBuffer, + raygen_shader_binding_table_buffer: Buffer, + raygen_shader_binding_offset: DeviceSize, + miss_shader_binding_table_buffer: Buffer, + miss_shader_binding_offset: DeviceSize, + miss_shader_binding_stride: DeviceSize, + hit_shader_binding_table_buffer: Buffer, + hit_shader_binding_offset: DeviceSize, + hit_shader_binding_stride: DeviceSize, + callable_shader_binding_table_buffer: Buffer, + callable_shader_binding_offset: DeviceSize, + callable_shader_binding_stride: DeviceSize, + width: u32, + height: u32, + depth: u32, + ) -> c_void { + (self.cmd_trace_rays_nv)( + command_buffer, + raygen_shader_binding_table_buffer, + raygen_shader_binding_offset, + miss_shader_binding_table_buffer, + miss_shader_binding_offset, + miss_shader_binding_stride, + hit_shader_binding_table_buffer, + hit_shader_binding_offset, + hit_shader_binding_stride, + callable_shader_binding_table_buffer, + callable_shader_binding_offset, + callable_shader_binding_stride, + width, + height, + depth, + ) + } + pub unsafe fn create_ray_tracing_pipelines_nv( + &self, + device: Device, + pipeline_cache: PipelineCache, + create_info_count: u32, + p_create_infos: *const RayTracingPipelineCreateInfoNV, + p_allocator: *const AllocationCallbacks, + p_pipelines: *mut Pipeline, + ) -> Result { + (self.create_ray_tracing_pipelines_nv)( + device, + pipeline_cache, + create_info_count, + p_create_infos, + p_allocator, + p_pipelines, + ) + } + pub unsafe fn get_ray_tracing_shader_group_handles_nv( + &self, + device: Device, + pipeline: Pipeline, + first_group: u32, + group_count: u32, + data_size: usize, + p_data: *mut c_void, + ) -> Result { + (self.get_ray_tracing_shader_group_handles_nv)( + device, + pipeline, + first_group, + group_count, + data_size, + p_data, + ) + } + pub unsafe fn get_acceleration_structure_handle_nv( + &self, + device: Device, + acceleration_structure: AccelerationStructureNV, + data_size: usize, + p_data: *mut c_void, + ) -> Result { + (self.get_acceleration_structure_handle_nv)( + device, + acceleration_structure, + data_size, + p_data, + ) + } + pub unsafe fn cmd_write_acceleration_structures_properties_nv( + &self, + command_buffer: CommandBuffer, + acceleration_structure_count: u32, + p_acceleration_structures: *const AccelerationStructureNV, + query_type: QueryType, + query_pool: QueryPool, + first_query: u32, + ) -> c_void { + (self.cmd_write_acceleration_structures_properties_nv)( + command_buffer, + acceleration_structure_count, + p_acceleration_structures, + query_type, + query_pool, + first_query, + ) + } + pub unsafe fn compile_deferred_nv( + &self, + device: Device, + pipeline: Pipeline, + shader: u32, + ) -> Result { + (self.compile_deferred_nv)(device, pipeline, shader) } } -pub struct NvExtension167Fn {} -unsafe impl Send for NvExtension167Fn {} -unsafe impl Sync for NvExtension167Fn {} -impl ::std::clone::Clone for NvExtension167Fn { +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const RAY_TRACING_PIPELINE_CREATE_INFO_NV: Self = StructureType(1000165000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const ACCELERATION_STRUCTURE_CREATE_INFO_NV: Self = StructureType(1000165001); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const GEOMETRY_NV: Self = StructureType(1000165003); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const GEOMETRY_TRIANGLES_NV: Self = StructureType(1000165004); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const GEOMETRY_AABB_NV: Self = StructureType(1000165005); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV: Self = StructureType(1000165006); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV: Self = StructureType(1000165007); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV: Self = StructureType(1000165008); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV: Self = StructureType(1000165009); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV: Self = StructureType(1000165011); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl StructureType { + pub const ACCELERATION_STRUCTURE_INFO_NV: Self = StructureType(1000165012); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl ShaderStageFlags { + pub const RAYGEN_NV: Self = ShaderStageFlags(0b100000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl ShaderStageFlags { + pub const ANY_HIT_NV: Self = ShaderStageFlags(0b1000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl ShaderStageFlags { + pub const CLOSEST_HIT_NV: Self = ShaderStageFlags(0b10000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl ShaderStageFlags { + pub const MISS_NV: Self = ShaderStageFlags(0b100000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl ShaderStageFlags { + pub const INTERSECTION_NV: Self = ShaderStageFlags(0b1000000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl ShaderStageFlags { + pub const CALLABLE_NV: Self = ShaderStageFlags(0b10000000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl PipelineStageFlags { + pub const RAY_TRACING_SHADER_NV: Self = PipelineStageFlags(0b1000000000000000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl PipelineStageFlags { + pub const ACCELERATION_STRUCTURE_BUILD_NV: Self = + PipelineStageFlags(0b10000000000000000000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl BufferUsageFlags { + pub const RAY_TRACING_NV: Self = BufferUsageFlags(0b10000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl PipelineBindPoint { + pub const RAY_TRACING_NV: Self = PipelineBindPoint(1000165000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl DescriptorType { + pub const ACCELERATION_STRUCTURE_NV: Self = DescriptorType(1000165000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl AccessFlags { + pub const ACCELERATION_STRUCTURE_READ_NV: Self = AccessFlags(0b1000000000000000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl AccessFlags { + pub const ACCELERATION_STRUCTURE_WRITE_NV: Self = AccessFlags(0b10000000000000000000000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl QueryType { + pub const ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV: Self = QueryType(1000165000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl PipelineCreateFlags { + pub const DEFER_COMPILE_NV: Self = PipelineCreateFlags(0b100000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl ObjectType { + pub const ACCELERATION_STRUCTURE_NV: Self = ObjectType(1000165000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl DebugReportObjectTypeEXT { + pub const ACCELERATION_STRUCTURE_NV: Self = DebugReportObjectTypeEXT(1000165000); +} +#[doc = "Generated from \'VK_NV_ray_tracing\'"] +impl IndexType { + pub const NONE_NV: Self = IndexType(1000165000); +} +pub struct NvRepresentativeFragmentTestFn {} +unsafe impl Send for NvRepresentativeFragmentTestFn {} +unsafe impl Sync for NvRepresentativeFragmentTestFn {} +impl ::std::clone::Clone for NvRepresentativeFragmentTestFn { fn clone(&self) -> Self { - NvExtension167Fn {} + NvRepresentativeFragmentTestFn {} } } -impl NvExtension167Fn { +impl NvRepresentativeFragmentTestFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension167Fn {} + NvRepresentativeFragmentTestFn {} } } +#[doc = "Generated from \'VK_NV_representative_fragment_test\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV: Self = + StructureType(1000166000); +} +#[doc = "Generated from \'VK_NV_representative_fragment_test\'"] +impl StructureType { + pub const PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV: Self = + StructureType(1000166001); +} pub struct NvExtension168Fn {} unsafe impl Send for NvExtension168Fn {} unsafe impl Sync for NvExtension168Fn {} @@ -38192,8 +48660,28 @@ impl KhrMaintenance3Fn { KhrMaintenance3Fn {} } } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndirectCountKHR = 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; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawIndexedIndirectCountKHR = 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 KhrDrawIndirectCountFn { - cmd_draw_indirect_count_khr: extern "system" fn( + pub cmd_draw_indirect_count_khr: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, @@ -38202,7 +48690,7 @@ pub struct KhrDrawIndirectCountFn { max_draw_count: u32, stride: u32, ) -> c_void, - cmd_draw_indexed_indirect_count_khr: extern "system" fn( + pub cmd_draw_indexed_indirect_count_khr: extern "system" fn( command_buffer: CommandBuffer, buffer: Buffer, offset: DeviceSize, @@ -38439,30 +48927,40 @@ impl ExtExtension177Fn { ExtExtension177Fn {} } } -pub struct ExtExtension178Fn {} -unsafe impl Send for ExtExtension178Fn {} -unsafe impl Sync for ExtExtension178Fn {} -impl ::std::clone::Clone for ExtExtension178Fn { +pub struct Khr8bitStorageFn {} +unsafe impl Send for Khr8bitStorageFn {} +unsafe impl Sync for Khr8bitStorageFn {} +impl ::std::clone::Clone for Khr8bitStorageFn { fn clone(&self) -> Self { - ExtExtension178Fn {} + Khr8bitStorageFn {} } } -impl ExtExtension178Fn { +impl Khr8bitStorageFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension178Fn {} + Khr8bitStorageFn {} } } +#[doc = "Generated from \'VK_KHR_8bit_storage\'"] +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( + device: Device, + handle_type: ExternalMemoryHandleTypeFlags, + p_host_pointer: *const c_void, + p_memory_host_pointer_properties: *mut MemoryHostPointerPropertiesEXT, +) -> Result; pub struct ExtExternalMemoryHostFn { - 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 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, } unsafe impl Send for ExtExternalMemoryHostFn {} unsafe impl Sync for ExtExternalMemoryHostFn {} @@ -38539,8 +49037,16 @@ impl ExternalMemoryHandleTypeFlags { pub const EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY: Self = ExternalMemoryHandleTypeFlags(0b100000000); } +#[allow(non_camel_case_types)] +pub type PFN_vkCmdWriteBufferMarkerAMD = extern "system" fn( + command_buffer: CommandBuffer, + pipeline_stage: PipelineStageFlags, + dst_buffer: Buffer, + dst_offset: DeviceSize, + marker: u32, +) -> c_void; pub struct AmdBufferMarkerFn { - cmd_write_buffer_marker_amd: extern "system" fn( + pub cmd_write_buffer_marker_amd: extern "system" fn( command_buffer: CommandBuffer, pipeline_stage: PipelineStageFlags, dst_buffer: Buffer, @@ -38604,22 +49110,26 @@ impl AmdBufferMarkerFn { ) } } -pub struct AmdExtension181Fn {} -unsafe impl Send for AmdExtension181Fn {} -unsafe impl Sync for AmdExtension181Fn {} -impl ::std::clone::Clone for AmdExtension181Fn { +pub struct KhrShaderAtomicInt64Fn {} +unsafe impl Send for KhrShaderAtomicInt64Fn {} +unsafe impl Sync for KhrShaderAtomicInt64Fn {} +impl ::std::clone::Clone for KhrShaderAtomicInt64Fn { fn clone(&self) -> Self { - AmdExtension181Fn {} + KhrShaderAtomicInt64Fn {} } } -impl AmdExtension181Fn { +impl KhrShaderAtomicInt64Fn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension181Fn {} + KhrShaderAtomicInt64Fn {} } } +#[doc = "Generated from \'VK_KHR_shader_atomic_int64\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR: Self = StructureType(1000180000); +} pub struct AmdExtension182Fn {} unsafe impl Send for AmdExtension182Fn {} unsafe impl Sync for AmdExtension182Fn {} @@ -38668,21 +49178,127 @@ impl AmdExtension184Fn { AmdExtension184Fn {} } } -pub struct AmdExtension185Fn {} -unsafe impl Send for AmdExtension185Fn {} -unsafe impl Sync for AmdExtension185Fn {} -impl ::std::clone::Clone for AmdExtension185Fn { +#[allow(non_camel_case_types)] +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, + 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, +} +unsafe impl Send for ExtCalibratedTimestampsFn {} +unsafe impl Sync for ExtCalibratedTimestampsFn {} +impl ::std::clone::Clone for ExtCalibratedTimestampsFn { fn clone(&self) -> Self { - AmdExtension185Fn {} + ExtCalibratedTimestampsFn { + get_physical_device_calibrateable_time_domains_ext: self + .get_physical_device_calibrateable_time_domains_ext, + get_calibrated_timestamps_ext: self.get_calibrated_timestamps_ext, + } } } -impl AmdExtension185Fn { +impl ExtCalibratedTimestampsFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension185Fn {} + ExtCalibratedTimestampsFn { + get_physical_device_calibrateable_time_domains_ext: unsafe { + extern "system" fn get_physical_device_calibrateable_time_domains_ext( + _physical_device: PhysicalDevice, + _p_time_domain_count: *mut u32, + _p_time_domains: *mut TimeDomainEXT, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_physical_device_calibrateable_time_domains_ext) + )) + } + let raw_name = stringify!(vkGetPhysicalDeviceCalibrateableTimeDomainsEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + get_physical_device_calibrateable_time_domains_ext + } else { + ::std::mem::transmute(val) + } + }, + get_calibrated_timestamps_ext: unsafe { + extern "system" fn get_calibrated_timestamps_ext( + _device: Device, + _timestamp_count: u32, + _p_timestamp_infos: *const CalibratedTimestampInfoEXT, + _p_timestamps: *mut u64, + _p_max_deviation: *mut u64, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(get_calibrated_timestamps_ext) + )) + } + let raw_name = stringify!(vkGetCalibratedTimestampsEXT); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + get_calibrated_timestamps_ext + } else { + ::std::mem::transmute(val) + } + }, + } } + pub unsafe fn get_physical_device_calibrateable_time_domains_ext( + &self, + physical_device: PhysicalDevice, + p_time_domain_count: *mut u32, + p_time_domains: *mut TimeDomainEXT, + ) -> Result { + (self.get_physical_device_calibrateable_time_domains_ext)( + physical_device, + p_time_domain_count, + p_time_domains, + ) + } + pub unsafe fn get_calibrated_timestamps_ext( + &self, + device: Device, + timestamp_count: u32, + p_timestamp_infos: *const CalibratedTimestampInfoEXT, + p_timestamps: *mut u64, + p_max_deviation: *mut u64, + ) -> Result { + (self.get_calibrated_timestamps_ext)( + device, + timestamp_count, + p_timestamp_infos, + p_timestamps, + p_max_deviation, + ) + } +} +#[doc = "Generated from \'VK_EXT_calibrated_timestamps\'"] +impl StructureType { + pub const CALIBRATED_TIMESTAMP_INFO_EXT: Self = StructureType(1000184000); } pub struct AmdShaderCorePropertiesFn {} unsafe impl Send for AmdShaderCorePropertiesFn {} @@ -38752,22 +49368,26 @@ impl AmdExtension189Fn { AmdExtension189Fn {} } } -pub struct AmdExtension190Fn {} -unsafe impl Send for AmdExtension190Fn {} -unsafe impl Sync for AmdExtension190Fn {} -impl ::std::clone::Clone for AmdExtension190Fn { +pub struct AmdMemoryOverallocationBehaviorFn {} +unsafe impl Send for AmdMemoryOverallocationBehaviorFn {} +unsafe impl Sync for AmdMemoryOverallocationBehaviorFn {} +impl ::std::clone::Clone for AmdMemoryOverallocationBehaviorFn { fn clone(&self) -> Self { - AmdExtension190Fn {} + AmdMemoryOverallocationBehaviorFn {} } } -impl AmdExtension190Fn { +impl AmdMemoryOverallocationBehaviorFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - AmdExtension190Fn {} + AmdMemoryOverallocationBehaviorFn {} } } +#[doc = "Generated from \'VK_AMD_memory_overallocation_behavior\'"] +impl StructureType { + pub const DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD: Self = StructureType(1000189000); +} pub struct ExtVertexAttributeDivisorFn {} unsafe impl Send for ExtVertexAttributeDivisorFn {} unsafe impl Sync for ExtVertexAttributeDivisorFn {} @@ -38793,6 +49413,11 @@ impl StructureType { impl StructureType { pub const PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: Self = StructureType(1000190001); } +#[doc = "Generated from \'VK_EXT_vertex_attribute_divisor\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: Self = + StructureType(1000190002); +} pub struct GoogleExtension192Fn {} unsafe impl Send for GoogleExtension192Fn {} unsafe impl Sync for GoogleExtension192Fn {} @@ -38873,22 +49498,26 @@ impl GoogleExtension196Fn { GoogleExtension196Fn {} } } -pub struct ExtExtension197Fn {} -unsafe impl Send for ExtExtension197Fn {} -unsafe impl Sync for ExtExtension197Fn {} -impl ::std::clone::Clone for ExtExtension197Fn { +pub struct KhrDriverPropertiesFn {} +unsafe impl Send for KhrDriverPropertiesFn {} +unsafe impl Sync for KhrDriverPropertiesFn {} +impl ::std::clone::Clone for KhrDriverPropertiesFn { fn clone(&self) -> Self { - ExtExtension197Fn {} + KhrDriverPropertiesFn {} } } -impl ExtExtension197Fn { +impl KhrDriverPropertiesFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - ExtExtension197Fn {} + KhrDriverPropertiesFn {} } } +#[doc = "Generated from \'VK_KHR_driver_properties\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR: Self = StructureType(1000196000); +} pub struct ArmExtension198Fn {} unsafe impl Send for ArmExtension198Fn {} unsafe impl Sync for ArmExtension198Fn {} @@ -38957,101 +49586,441 @@ impl KhrExtension201Fn { KhrExtension201Fn {} } } -pub struct NvExtension202Fn {} -unsafe impl Send for NvExtension202Fn {} -unsafe impl Sync for NvExtension202Fn {} -impl ::std::clone::Clone for NvExtension202Fn { +pub struct NvComputeShaderDerivativesFn {} +unsafe impl Send for NvComputeShaderDerivativesFn {} +unsafe impl Sync for NvComputeShaderDerivativesFn {} +impl ::std::clone::Clone for NvComputeShaderDerivativesFn { fn clone(&self) -> Self { - NvExtension202Fn {} + NvComputeShaderDerivativesFn {} } } -impl NvExtension202Fn { +impl NvComputeShaderDerivativesFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension202Fn {} + NvComputeShaderDerivativesFn {} } } -pub struct NvExtension203Fn {} -unsafe impl Send for NvExtension203Fn {} -unsafe impl Sync for NvExtension203Fn {} -impl ::std::clone::Clone for NvExtension203Fn { +#[doc = "Generated from \'VK_NV_compute_shader_derivatives\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: Self = + StructureType(1000201000); +} +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawMeshTasksNV = + extern "system" fn(command_buffer: CommandBuffer, task_count: u32, first_task: u32) -> c_void; +#[allow(non_camel_case_types)] +pub type PFN_vkCmdDrawMeshTasksIndirectNV = extern "system" fn( + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + draw_count: u32, + 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 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_indirect_nv: extern "system" fn( + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + draw_count: u32, + stride: u32, + ) -> c_void, + pub cmd_draw_mesh_tasks_indirect_count_nv: 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, +} +unsafe impl Send for NvMeshShaderFn {} +unsafe impl Sync for NvMeshShaderFn {} +impl ::std::clone::Clone for NvMeshShaderFn { fn clone(&self) -> Self { - NvExtension203Fn {} + NvMeshShaderFn { + cmd_draw_mesh_tasks_nv: self.cmd_draw_mesh_tasks_nv, + cmd_draw_mesh_tasks_indirect_nv: self.cmd_draw_mesh_tasks_indirect_nv, + cmd_draw_mesh_tasks_indirect_count_nv: self.cmd_draw_mesh_tasks_indirect_count_nv, + } } } -impl NvExtension203Fn { +impl NvMeshShaderFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension203Fn {} + NvMeshShaderFn { + cmd_draw_mesh_tasks_nv: unsafe { + extern "system" fn cmd_draw_mesh_tasks_nv( + _command_buffer: CommandBuffer, + _task_count: u32, + _first_task: u32, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_draw_mesh_tasks_nv) + )) + } + let raw_name = stringify!(vkCmdDrawMeshTasksNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_draw_mesh_tasks_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_draw_mesh_tasks_indirect_nv: unsafe { + extern "system" fn cmd_draw_mesh_tasks_indirect_nv( + _command_buffer: CommandBuffer, + _buffer: Buffer, + _offset: DeviceSize, + _draw_count: u32, + _stride: u32, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_draw_mesh_tasks_indirect_nv) + )) + } + let raw_name = stringify!(vkCmdDrawMeshTasksIndirectNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_draw_mesh_tasks_indirect_nv + } else { + ::std::mem::transmute(val) + } + }, + cmd_draw_mesh_tasks_indirect_count_nv: unsafe { + extern "system" fn cmd_draw_mesh_tasks_indirect_count_nv( + _command_buffer: CommandBuffer, + _buffer: Buffer, + _offset: DeviceSize, + _count_buffer: Buffer, + _count_buffer_offset: DeviceSize, + _max_draw_count: u32, + _stride: u32, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_draw_mesh_tasks_indirect_count_nv) + )) + } + let raw_name = stringify!(vkCmdDrawMeshTasksIndirectCountNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_draw_mesh_tasks_indirect_count_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } + pub unsafe fn cmd_draw_mesh_tasks_nv( + &self, + command_buffer: CommandBuffer, + task_count: u32, + first_task: u32, + ) -> c_void { + (self.cmd_draw_mesh_tasks_nv)(command_buffer, task_count, first_task) + } + pub unsafe fn cmd_draw_mesh_tasks_indirect_nv( + &self, + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + draw_count: u32, + stride: u32, + ) -> c_void { + (self.cmd_draw_mesh_tasks_indirect_nv)(command_buffer, buffer, offset, draw_count, stride) + } + pub unsafe fn cmd_draw_mesh_tasks_indirect_count_nv( + &self, + command_buffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + count_buffer: Buffer, + count_buffer_offset: DeviceSize, + max_draw_count: u32, + stride: u32, + ) -> c_void { + (self.cmd_draw_mesh_tasks_indirect_count_nv)( + command_buffer, + buffer, + offset, + count_buffer, + count_buffer_offset, + max_draw_count, + stride, + ) } } -pub struct NvExtension204Fn {} -unsafe impl Send for NvExtension204Fn {} -unsafe impl Sync for NvExtension204Fn {} -impl ::std::clone::Clone for NvExtension204Fn { +#[doc = "Generated from \'VK_NV_mesh_shader\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: Self = StructureType(1000202000); +} +#[doc = "Generated from \'VK_NV_mesh_shader\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV: Self = StructureType(1000202001); +} +#[doc = "Generated from \'VK_NV_mesh_shader\'"] +impl ShaderStageFlags { + pub const TASK_NV: Self = ShaderStageFlags(0b1000000); +} +#[doc = "Generated from \'VK_NV_mesh_shader\'"] +impl ShaderStageFlags { + pub const MESH_NV: Self = ShaderStageFlags(0b10000000); +} +#[doc = "Generated from \'VK_NV_mesh_shader\'"] +impl PipelineStageFlags { + pub const TASK_SHADER_NV: Self = PipelineStageFlags(0b10000000000000000000); +} +#[doc = "Generated from \'VK_NV_mesh_shader\'"] +impl PipelineStageFlags { + pub const MESH_SHADER_NV: Self = PipelineStageFlags(0b100000000000000000000); +} +pub struct NvFragmentShaderBarycentricFn {} +unsafe impl Send for NvFragmentShaderBarycentricFn {} +unsafe impl Sync for NvFragmentShaderBarycentricFn {} +impl ::std::clone::Clone for NvFragmentShaderBarycentricFn { fn clone(&self) -> Self { - NvExtension204Fn {} + NvFragmentShaderBarycentricFn {} } } -impl NvExtension204Fn { +impl NvFragmentShaderBarycentricFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension204Fn {} + NvFragmentShaderBarycentricFn {} } } -pub struct NvExtension205Fn {} -unsafe impl Send for NvExtension205Fn {} -unsafe impl Sync for NvExtension205Fn {} -impl ::std::clone::Clone for NvExtension205Fn { +#[doc = "Generated from \'VK_NV_fragment_shader_barycentric\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV: Self = + StructureType(1000203000); +} +pub struct NvShaderImageFootprintFn {} +unsafe impl Send for NvShaderImageFootprintFn {} +unsafe impl Sync for NvShaderImageFootprintFn {} +impl ::std::clone::Clone for NvShaderImageFootprintFn { fn clone(&self) -> Self { - NvExtension205Fn {} + NvShaderImageFootprintFn {} } } -impl NvExtension205Fn { +impl NvShaderImageFootprintFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension205Fn {} + NvShaderImageFootprintFn {} } } -pub struct NvExtension206Fn {} -unsafe impl Send for NvExtension206Fn {} -unsafe impl Sync for NvExtension206Fn {} -impl ::std::clone::Clone for NvExtension206Fn { +#[doc = "Generated from \'VK_NV_shader_image_footprint\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV: Self = StructureType(1000204000); +} +#[allow(non_camel_case_types)] +pub type PFN_vkCmdSetExclusiveScissorNV = extern "system" fn( + command_buffer: CommandBuffer, + first_exclusive_scissor: u32, + exclusive_scissor_count: u32, + p_exclusive_scissors: *const Rect2D, +) -> c_void; +pub struct NvScissorExclusiveFn { + pub cmd_set_exclusive_scissor_nv: extern "system" fn( + command_buffer: CommandBuffer, + first_exclusive_scissor: u32, + exclusive_scissor_count: u32, + p_exclusive_scissors: *const Rect2D, + ) -> c_void, +} +unsafe impl Send for NvScissorExclusiveFn {} +unsafe impl Sync for NvScissorExclusiveFn {} +impl ::std::clone::Clone for NvScissorExclusiveFn { fn clone(&self) -> Self { - NvExtension206Fn {} + NvScissorExclusiveFn { + cmd_set_exclusive_scissor_nv: self.cmd_set_exclusive_scissor_nv, + } } } -impl NvExtension206Fn { +impl NvScissorExclusiveFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension206Fn {} + NvScissorExclusiveFn { + cmd_set_exclusive_scissor_nv: unsafe { + extern "system" fn cmd_set_exclusive_scissor_nv( + _command_buffer: CommandBuffer, + _first_exclusive_scissor: u32, + _exclusive_scissor_count: u32, + _p_exclusive_scissors: *const Rect2D, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_exclusive_scissor_nv) + )) + } + let raw_name = stringify!(vkCmdSetExclusiveScissorNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_set_exclusive_scissor_nv + } else { + ::std::mem::transmute(val) + } + }, + } + } + pub unsafe fn cmd_set_exclusive_scissor_nv( + &self, + command_buffer: CommandBuffer, + first_exclusive_scissor: u32, + exclusive_scissor_count: u32, + p_exclusive_scissors: *const Rect2D, + ) -> c_void { + (self.cmd_set_exclusive_scissor_nv)( + command_buffer, + first_exclusive_scissor, + exclusive_scissor_count, + p_exclusive_scissors, + ) } } -pub struct NvExtension207Fn {} -unsafe impl Send for NvExtension207Fn {} -unsafe impl Sync for NvExtension207Fn {} -impl ::std::clone::Clone for NvExtension207Fn { +#[doc = "Generated from \'VK_NV_scissor_exclusive\'"] +impl StructureType { + pub const PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV: Self = + StructureType(1000205000); +} +#[doc = "Generated from \'VK_NV_scissor_exclusive\'"] +impl DynamicState { + pub const EXCLUSIVE_SCISSOR_NV: Self = DynamicState(1000205001); +} +#[doc = "Generated from \'VK_NV_scissor_exclusive\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV: Self = StructureType(1000205002); +} +#[allow(non_camel_case_types)] +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 struct NvDeviceDiagnosticCheckpointsFn { + 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, + p_checkpoint_data: *mut CheckpointDataNV, + ) -> c_void, +} +unsafe impl Send for NvDeviceDiagnosticCheckpointsFn {} +unsafe impl Sync for NvDeviceDiagnosticCheckpointsFn {} +impl ::std::clone::Clone for NvDeviceDiagnosticCheckpointsFn { fn clone(&self) -> Self { - NvExtension207Fn {} + NvDeviceDiagnosticCheckpointsFn { + cmd_set_checkpoint_nv: self.cmd_set_checkpoint_nv, + get_queue_checkpoint_data_nv: self.get_queue_checkpoint_data_nv, + } } } -impl NvExtension207Fn { +impl NvDeviceDiagnosticCheckpointsFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - NvExtension207Fn {} + NvDeviceDiagnosticCheckpointsFn { + cmd_set_checkpoint_nv: unsafe { + extern "system" fn cmd_set_checkpoint_nv( + _command_buffer: CommandBuffer, + _p_checkpoint_marker: *const c_void, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(cmd_set_checkpoint_nv) + )) + } + let raw_name = stringify!(vkCmdSetCheckpointNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + cmd_set_checkpoint_nv + } else { + ::std::mem::transmute(val) + } + }, + get_queue_checkpoint_data_nv: unsafe { + extern "system" fn get_queue_checkpoint_data_nv( + _queue: Queue, + _p_checkpoint_data_count: *mut u32, + _p_checkpoint_data: *mut CheckpointDataNV, + ) -> c_void { + panic!(concat!( + "Unable to load ", + stringify!(get_queue_checkpoint_data_nv) + )) + } + let raw_name = stringify!(vkGetQueueCheckpointDataNV); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + get_queue_checkpoint_data_nv + } else { + ::std::mem::transmute(val) + } + }, + } } + pub unsafe fn cmd_set_checkpoint_nv( + &self, + command_buffer: CommandBuffer, + p_checkpoint_marker: *const c_void, + ) -> c_void { + (self.cmd_set_checkpoint_nv)(command_buffer, p_checkpoint_marker) + } + pub unsafe fn get_queue_checkpoint_data_nv( + &self, + queue: Queue, + p_checkpoint_data_count: *mut u32, + p_checkpoint_data: *mut CheckpointDataNV, + ) -> c_void { + (self.get_queue_checkpoint_data_nv)(queue, p_checkpoint_data_count, p_checkpoint_data) + } +} +#[doc = "Generated from \'VK_NV_device_diagnostic_checkpoints\'"] +impl StructureType { + pub const CHECKPOINT_DATA_NV: Self = StructureType(1000206000); +} +#[doc = "Generated from \'VK_NV_device_diagnostic_checkpoints\'"] +impl StructureType { + pub const QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: Self = StructureType(1000206001); } pub struct KhrExtension208Fn {} unsafe impl Send for KhrExtension208Fn {} @@ -39117,20 +50086,679 @@ impl IntelExtension211Fn { IntelExtension211Fn {} } } -pub struct KhrExtension212Fn {} -unsafe impl Send for KhrExtension212Fn {} -unsafe impl Sync for KhrExtension212Fn {} -impl ::std::clone::Clone for KhrExtension212Fn { +pub struct KhrVulkanMemoryModelFn {} +unsafe impl Send for KhrVulkanMemoryModelFn {} +unsafe impl Sync for KhrVulkanMemoryModelFn {} +impl ::std::clone::Clone for KhrVulkanMemoryModelFn { fn clone(&self) -> Self { - KhrExtension212Fn {} + KhrVulkanMemoryModelFn {} } } -impl KhrExtension212Fn { +impl KhrVulkanMemoryModelFn { pub fn load(mut _f: F) -> Self where F: FnMut(&::std::ffi::CStr) -> *const c_void, { - KhrExtension212Fn {} + KhrVulkanMemoryModelFn {} + } +} +#[doc = "Generated from \'VK_KHR_vulkan_memory_model\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR: Self = StructureType(1000211000); +} +pub struct ExtPciBusInfoFn {} +unsafe impl Send for ExtPciBusInfoFn {} +unsafe impl Sync for ExtPciBusInfoFn {} +impl ::std::clone::Clone for ExtPciBusInfoFn { + fn clone(&self) -> Self { + ExtPciBusInfoFn {} + } +} +impl ExtPciBusInfoFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtPciBusInfoFn {} + } +} +#[doc = "Generated from \'VK_EXT_pci_bus_info\'"] +impl StructureType { + pub const PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT: Self = StructureType(1000212000); +} +pub struct AmdExtension214Fn {} +unsafe impl Send for AmdExtension214Fn {} +unsafe impl Sync for AmdExtension214Fn {} +impl ::std::clone::Clone for AmdExtension214Fn { + fn clone(&self) -> Self { + AmdExtension214Fn {} + } +} +impl AmdExtension214Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension214Fn {} + } +} +#[allow(non_camel_case_types)] +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, +} +unsafe impl Send for FuchsiaImagepipeSurfaceFn {} +unsafe impl Sync for FuchsiaImagepipeSurfaceFn {} +impl ::std::clone::Clone for FuchsiaImagepipeSurfaceFn { + fn clone(&self) -> Self { + FuchsiaImagepipeSurfaceFn { + create_image_pipe_surface_fuchsia: self.create_image_pipe_surface_fuchsia, + } + } +} +impl FuchsiaImagepipeSurfaceFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + FuchsiaImagepipeSurfaceFn { + create_image_pipe_surface_fuchsia: unsafe { + extern "system" fn create_image_pipe_surface_fuchsia( + _instance: Instance, + _p_create_info: *const ImagePipeSurfaceCreateInfoFUCHSIA, + _p_allocator: *const AllocationCallbacks, + _p_surface: *mut SurfaceKHR, + ) -> Result { + panic!(concat!( + "Unable to load ", + stringify!(create_image_pipe_surface_fuchsia) + )) + } + let raw_name = stringify!(vkCreateImagePipeSurfaceFUCHSIA); + let cname = ::std::ffi::CString::new(raw_name).unwrap(); + let val = _f(&cname); + if val.is_null() { + create_image_pipe_surface_fuchsia + } else { + ::std::mem::transmute(val) + } + }, + } + } + pub unsafe fn create_image_pipe_surface_fuchsia( + &self, + instance: Instance, + p_create_info: *const ImagePipeSurfaceCreateInfoFUCHSIA, + p_allocator: *const AllocationCallbacks, + p_surface: *mut SurfaceKHR, + ) -> Result { + (self.create_image_pipe_surface_fuchsia)(instance, p_create_info, p_allocator, p_surface) + } +} +#[doc = "Generated from \'VK_FUCHSIA_imagepipe_surface\'"] +impl StructureType { + pub const IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA: Self = StructureType(1000214000); +} +pub struct GoogleExtension216Fn {} +unsafe impl Send for GoogleExtension216Fn {} +unsafe impl Sync for GoogleExtension216Fn {} +impl ::std::clone::Clone for GoogleExtension216Fn { + fn clone(&self) -> Self { + GoogleExtension216Fn {} + } +} +impl GoogleExtension216Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + GoogleExtension216Fn {} + } +} +pub struct GoogleExtension217Fn {} +unsafe impl Send for GoogleExtension217Fn {} +unsafe impl Sync for GoogleExtension217Fn {} +impl ::std::clone::Clone for GoogleExtension217Fn { + fn clone(&self) -> Self { + GoogleExtension217Fn {} + } +} +impl GoogleExtension217Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + GoogleExtension217Fn {} + } +} +pub struct ExtMacosIosWindowFn {} +unsafe impl Send for ExtMacosIosWindowFn {} +unsafe impl Sync for ExtMacosIosWindowFn {} +impl ::std::clone::Clone for ExtMacosIosWindowFn { + fn clone(&self) -> Self { + ExtMacosIosWindowFn {} + } +} +impl ExtMacosIosWindowFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtMacosIosWindowFn {} + } +} +pub struct ExtExtension219Fn {} +unsafe impl Send for ExtExtension219Fn {} +unsafe impl Sync for ExtExtension219Fn {} +impl ::std::clone::Clone for ExtExtension219Fn { + fn clone(&self) -> Self { + ExtExtension219Fn {} + } +} +impl ExtExtension219Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension219Fn {} + } +} +#[doc = "Generated from \'VK_EXT_extension_219\'"] +impl ImageCreateFlags { + pub const RESERVED_14_EXT: Self = ImageCreateFlags(0b100000000000000); +} +#[doc = "Generated from \'VK_EXT_extension_219\'"] +impl AccessFlags { + pub const RESERVED_24_EXT: Self = AccessFlags(0b1000000000000000000000000); +} +#[doc = "Generated from \'VK_EXT_extension_219\'"] +impl FormatFeatureFlags { + pub const RESERVED_24_EXT: Self = FormatFeatureFlags(0b1000000000000000000000000); +} +#[doc = "Generated from \'VK_EXT_extension_219\'"] +impl ImageUsageFlags { + pub const RESERVED_9_EXT: Self = ImageUsageFlags(0b1000000000); +} +#[doc = "Generated from \'VK_EXT_extension_219\'"] +impl PipelineStageFlags { + pub const RESERVED_23_EXT: Self = PipelineStageFlags(0b100000000000000000000000); +} +pub struct ExtExtension220Fn {} +unsafe impl Send for ExtExtension220Fn {} +unsafe impl Sync for ExtExtension220Fn {} +impl ::std::clone::Clone for ExtExtension220Fn { + fn clone(&self) -> Self { + ExtExtension220Fn {} + } +} +impl ExtExtension220Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension220Fn {} + } +} +pub struct KhrExtension221Fn {} +unsafe impl Send for KhrExtension221Fn {} +unsafe impl Sync for KhrExtension221Fn {} +impl ::std::clone::Clone for KhrExtension221Fn { + fn clone(&self) -> Self { + KhrExtension221Fn {} + } +} +impl KhrExtension221Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + KhrExtension221Fn {} + } +} +#[doc = "Generated from \'VK_KHR_extension_221\'"] +impl RenderPassCreateFlags { + pub const RESERVED_0_KHR: Self = RenderPassCreateFlags(0b1); +} +pub struct ExtExtension222Fn {} +unsafe impl Send for ExtExtension222Fn {} +unsafe impl Sync for ExtExtension222Fn {} +impl ::std::clone::Clone for ExtExtension222Fn { + fn clone(&self) -> Self { + ExtExtension222Fn {} + } +} +impl ExtExtension222Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension222Fn {} + } +} +pub struct ExtExtension223Fn {} +unsafe impl Send for ExtExtension223Fn {} +unsafe impl Sync for ExtExtension223Fn {} +impl ::std::clone::Clone for ExtExtension223Fn { + fn clone(&self) -> Self { + ExtExtension223Fn {} + } +} +impl ExtExtension223Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension223Fn {} + } +} +pub struct GoogleHlslFunctionality1Fn {} +unsafe impl Send for GoogleHlslFunctionality1Fn {} +unsafe impl Sync for GoogleHlslFunctionality1Fn {} +impl ::std::clone::Clone for GoogleHlslFunctionality1Fn { + fn clone(&self) -> Self { + GoogleHlslFunctionality1Fn {} + } +} +impl GoogleHlslFunctionality1Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + GoogleHlslFunctionality1Fn {} + } +} +pub struct GoogleDecorateStringFn {} +unsafe impl Send for GoogleDecorateStringFn {} +unsafe impl Sync for GoogleDecorateStringFn {} +impl ::std::clone::Clone for GoogleDecorateStringFn { + fn clone(&self) -> Self { + GoogleDecorateStringFn {} + } +} +impl GoogleDecorateStringFn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + GoogleDecorateStringFn {} + } +} +pub struct AmdExtension226Fn {} +unsafe impl Send for AmdExtension226Fn {} +unsafe impl Sync for AmdExtension226Fn {} +impl ::std::clone::Clone for AmdExtension226Fn { + fn clone(&self) -> Self { + AmdExtension226Fn {} + } +} +impl AmdExtension226Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension226Fn {} + } +} +pub struct AmdExtension227Fn {} +unsafe impl Send for AmdExtension227Fn {} +unsafe impl Sync for AmdExtension227Fn {} +impl ::std::clone::Clone for AmdExtension227Fn { + fn clone(&self) -> Self { + AmdExtension227Fn {} + } +} +impl AmdExtension227Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension227Fn {} + } +} +pub struct AmdExtension228Fn {} +unsafe impl Send for AmdExtension228Fn {} +unsafe impl Sync for AmdExtension228Fn {} +impl ::std::clone::Clone for AmdExtension228Fn { + fn clone(&self) -> Self { + AmdExtension228Fn {} + } +} +impl AmdExtension228Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension228Fn {} + } +} +pub struct AmdExtension229Fn {} +unsafe impl Send for AmdExtension229Fn {} +unsafe impl Sync for AmdExtension229Fn {} +impl ::std::clone::Clone for AmdExtension229Fn { + fn clone(&self) -> Self { + AmdExtension229Fn {} + } +} +impl AmdExtension229Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension229Fn {} + } +} +pub struct AmdExtension230Fn {} +unsafe impl Send for AmdExtension230Fn {} +unsafe impl Sync for AmdExtension230Fn {} +impl ::std::clone::Clone for AmdExtension230Fn { + fn clone(&self) -> Self { + AmdExtension230Fn {} + } +} +impl AmdExtension230Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension230Fn {} + } +} +pub struct AmdExtension231Fn {} +unsafe impl Send for AmdExtension231Fn {} +unsafe impl Sync for AmdExtension231Fn {} +impl ::std::clone::Clone for AmdExtension231Fn { + fn clone(&self) -> Self { + AmdExtension231Fn {} + } +} +impl AmdExtension231Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension231Fn {} + } +} +pub struct AmdExtension232Fn {} +unsafe impl Send for AmdExtension232Fn {} +unsafe impl Sync for AmdExtension232Fn {} +impl ::std::clone::Clone for AmdExtension232Fn { + fn clone(&self) -> Self { + AmdExtension232Fn {} + } +} +impl AmdExtension232Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension232Fn {} + } +} +pub struct AmdExtension233Fn {} +unsafe impl Send for AmdExtension233Fn {} +unsafe impl Sync for AmdExtension233Fn {} +impl ::std::clone::Clone for AmdExtension233Fn { + fn clone(&self) -> Self { + AmdExtension233Fn {} + } +} +impl AmdExtension233Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension233Fn {} + } +} +pub struct AmdExtension234Fn {} +unsafe impl Send for AmdExtension234Fn {} +unsafe impl Sync for AmdExtension234Fn {} +impl ::std::clone::Clone for AmdExtension234Fn { + fn clone(&self) -> Self { + AmdExtension234Fn {} + } +} +impl AmdExtension234Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension234Fn {} + } +} +pub struct AmdExtension235Fn {} +unsafe impl Send for AmdExtension235Fn {} +unsafe impl Sync for AmdExtension235Fn {} +impl ::std::clone::Clone for AmdExtension235Fn { + fn clone(&self) -> Self { + AmdExtension235Fn {} + } +} +impl AmdExtension235Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension235Fn {} + } +} +pub struct AmdExtension236Fn {} +unsafe impl Send for AmdExtension236Fn {} +unsafe impl Sync for AmdExtension236Fn {} +impl ::std::clone::Clone for AmdExtension236Fn { + fn clone(&self) -> Self { + AmdExtension236Fn {} + } +} +impl AmdExtension236Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + AmdExtension236Fn {} + } +} +pub struct KhrExtension237Fn {} +unsafe impl Send for KhrExtension237Fn {} +unsafe impl Sync for KhrExtension237Fn {} +impl ::std::clone::Clone for KhrExtension237Fn { + fn clone(&self) -> Self { + KhrExtension237Fn {} + } +} +impl KhrExtension237Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + KhrExtension237Fn {} + } +} +pub struct KhrExtension238Fn {} +unsafe impl Send for KhrExtension238Fn {} +unsafe impl Sync for KhrExtension238Fn {} +impl ::std::clone::Clone for KhrExtension238Fn { + fn clone(&self) -> Self { + KhrExtension238Fn {} + } +} +impl KhrExtension238Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + KhrExtension238Fn {} + } +} +pub struct KhrExtension239Fn {} +unsafe impl Send for KhrExtension239Fn {} +unsafe impl Sync for KhrExtension239Fn {} +impl ::std::clone::Clone for KhrExtension239Fn { + fn clone(&self) -> Self { + KhrExtension239Fn {} + } +} +impl KhrExtension239Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + KhrExtension239Fn {} + } +} +pub struct KhrExtension240Fn {} +unsafe impl Send for KhrExtension240Fn {} +unsafe impl Sync for KhrExtension240Fn {} +impl ::std::clone::Clone for KhrExtension240Fn { + fn clone(&self) -> Self { + KhrExtension240Fn {} + } +} +impl KhrExtension240Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + KhrExtension240Fn {} + } +} +pub struct NvExtension241Fn {} +unsafe impl Send for NvExtension241Fn {} +unsafe impl Sync for NvExtension241Fn {} +impl ::std::clone::Clone for NvExtension241Fn { + fn clone(&self) -> Self { + NvExtension241Fn {} + } +} +impl NvExtension241Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + NvExtension241Fn {} + } +} +pub struct NvExtension242Fn {} +unsafe impl Send for NvExtension242Fn {} +unsafe impl Sync for NvExtension242Fn {} +impl ::std::clone::Clone for NvExtension242Fn { + fn clone(&self) -> Self { + NvExtension242Fn {} + } +} +impl NvExtension242Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + NvExtension242Fn {} + } +} +pub struct IntelExtension243Fn {} +unsafe impl Send for IntelExtension243Fn {} +unsafe impl Sync for IntelExtension243Fn {} +impl ::std::clone::Clone for IntelExtension243Fn { + fn clone(&self) -> Self { + IntelExtension243Fn {} + } +} +impl IntelExtension243Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + IntelExtension243Fn {} + } +} +pub struct MesaExtension244Fn {} +unsafe impl Send for MesaExtension244Fn {} +unsafe impl Sync for MesaExtension244Fn {} +impl ::std::clone::Clone for MesaExtension244Fn { + fn clone(&self) -> Self { + MesaExtension244Fn {} + } +} +impl MesaExtension244Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + MesaExtension244Fn {} + } +} +pub struct NvExtension245Fn {} +unsafe impl Send for NvExtension245Fn {} +unsafe impl Sync for NvExtension245Fn {} +impl ::std::clone::Clone for NvExtension245Fn { + fn clone(&self) -> Self { + NvExtension245Fn {} + } +} +impl NvExtension245Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + NvExtension245Fn {} + } +} +pub struct ExtExtension246Fn {} +unsafe impl Send for ExtExtension246Fn {} +unsafe impl Sync for ExtExtension246Fn {} +impl ::std::clone::Clone for ExtExtension246Fn { + fn clone(&self) -> Self { + ExtExtension246Fn {} + } +} +impl ExtExtension246Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension246Fn {} + } +} +pub struct ExtExtension247Fn {} +unsafe impl Send for ExtExtension247Fn {} +unsafe impl Sync for ExtExtension247Fn {} +impl ::std::clone::Clone for ExtExtension247Fn { + fn clone(&self) -> Self { + ExtExtension247Fn {} + } +} +impl ExtExtension247Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension247Fn {} + } +} +pub struct ExtExtension248Fn {} +unsafe impl Send for ExtExtension248Fn {} +unsafe impl Sync for ExtExtension248Fn {} +impl ::std::clone::Clone for ExtExtension248Fn { + fn clone(&self) -> Self { + ExtExtension248Fn {} + } +} +impl ExtExtension248Fn { + pub fn load(mut _f: F) -> Self + where + F: FnMut(&::std::ffi::CStr) -> *const c_void, + { + ExtExtension248Fn {} } } #[doc = "Generated from \'VK_VERSION_1_1\'"] @@ -39699,78 +51327,27 @@ fn display_flags( } Ok(()) } -impl fmt::Display for SubpassContents { +impl fmt::Display for ImageLayout { 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 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 :: 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 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::SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_EXT.0, - "SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_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 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 PipelineCacheHeaderVersion { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::ONE => Some("ONE"), + Self::UNDEFINED => Some("UNDEFINED"), + Self::GENERAL => Some("GENERAL"), + Self::COLOR_ATTACHMENT_OPTIMAL => Some("COLOR_ATTACHMENT_OPTIMAL"), + Self::DEPTH_STENCIL_ATTACHMENT_OPTIMAL => Some("DEPTH_STENCIL_ATTACHMENT_OPTIMAL"), + Self::DEPTH_STENCIL_READ_ONLY_OPTIMAL => Some("DEPTH_STENCIL_READ_ONLY_OPTIMAL"), + Self::SHADER_READ_ONLY_OPTIMAL => Some("SHADER_READ_ONLY_OPTIMAL"), + Self::TRANSFER_SRC_OPTIMAL => Some("TRANSFER_SRC_OPTIMAL"), + Self::TRANSFER_DST_OPTIMAL => Some("TRANSFER_DST_OPTIMAL"), + Self::PREINITIALIZED => Some("PREINITIALIZED"), + Self::PRESENT_SRC_KHR => Some("PRESENT_SRC_KHR"), + Self::SHARED_PRESENT_KHR => Some("SHARED_PRESENT_KHR"), + Self::SHADING_RATE_OPTIMAL_NV => Some("SHADING_RATE_OPTIMAL_NV"), + Self::DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL => { + Some("DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL") + } + Self::DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL => { + Some("DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL") + } _ => None, }; if let Some(x) = name { @@ -39794,888 +51371,57 @@ impl fmt::Display for ValidationCheckEXT { } } } -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 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 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"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", 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 DebugReportObjectTypeEXT { - 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::DEBUG_REPORT_CALLBACK => Some("DEBUG_REPORT_CALLBACK"), - Self::DISPLAY_KHR => Some("DISPLAY_KHR"), - Self::DISPLAY_MODE_KHR => Some("DISPLAY_MODE_KHR"), - Self::OBJECT_TABLE_NVX => Some("OBJECT_TABLE_NVX"), - Self::INDIRECT_COMMANDS_LAYOUT_NVX => Some("INDIRECT_COMMANDS_LAYOUT_NVX"), - Self::VALIDATION_CACHE => Some("VALIDATION_CACHE"), - 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 ExternalFenceFeatureFlags { +impl fmt::Display for QueryPipelineStatisticFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ ( - ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_EXPORTABLE.0, - "EXTERNAL_FENCE_FEATURE_EXPORTABLE", + QueryPipelineStatisticFlags::INPUT_ASSEMBLY_VERTICES.0, + "INPUT_ASSEMBLY_VERTICES", ), ( - ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_IMPORTABLE.0, - "EXTERNAL_FENCE_FEATURE_IMPORTABLE", + 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 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 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 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 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::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 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 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 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 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 IndexType { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::UINT16 => Some("UINT16"), - Self::UINT32 => Some("UINT32"), - _ => 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 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 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"), - ]; - 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 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 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 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 LogicOp { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::CLEAR => Some("CLEAR"), - Self::AND => Some("AND"), - Self::AND_REVERSE => Some("AND_REVERSE"), - Self::COPY => Some("COPY"), - Self::AND_INVERTED => Some("AND_INVERTED"), - Self::NO_OP => Some("NO_OP"), - Self::XOR => Some("XOR"), - Self::OR => Some("OR"), - Self::NOR => Some("NOR"), - Self::EQUIVALENT => Some("EQUIVALENT"), - Self::INVERT => Some("INVERT"), - Self::OR_REVERSE => Some("OR_REVERSE"), - Self::COPY_INVERTED => Some("COPY_INVERTED"), - Self::OR_INVERTED => Some("OR_INVERTED"), - Self::NAND => Some("NAND"), - Self::SET => Some("SET"), - _ => 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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"), - ]; - display_flags(f, KNOWN, 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 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 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 SubpassDescriptionFlags { - 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", - ), - ]; - 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 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 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 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", - ), - ( - 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 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 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 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 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 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"), - _ => 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 ImageTiling { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::OPTIMAL => Some("OPTIMAL"), - Self::LINEAR => Some("LINEAR"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", self.0) - } - } -} impl fmt::Display for SurfaceTransformFlagsKHR { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ @@ -40704,83 +51450,44 @@ impl fmt::Display for SurfaceTransformFlagsKHR { display_flags(f, KNOWN, self.0) } } -impl fmt::Display for PipelineStageFlags { +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)] = &[ - (PipelineStageFlags::TOP_OF_PIPE.0, "TOP_OF_PIPE"), - (PipelineStageFlags::DRAW_INDIRECT.0, "DRAW_INDIRECT"), - (PipelineStageFlags::VERTEX_INPUT.0, "VERTEX_INPUT"), - (PipelineStageFlags::VERTEX_SHADER.0, "VERTEX_SHADER"), - ( - PipelineStageFlags::TESSELLATION_CONTROL_SHADER.0, - "TESSELLATION_CONTROL_SHADER", - ), - ( - PipelineStageFlags::TESSELLATION_EVALUATION_SHADER.0, - "TESSELLATION_EVALUATION_SHADER", - ), - (PipelineStageFlags::GEOMETRY_SHADER.0, "GEOMETRY_SHADER"), - (PipelineStageFlags::FRAGMENT_SHADER.0, "FRAGMENT_SHADER"), - ( - PipelineStageFlags::EARLY_FRAGMENT_TESTS.0, - "EARLY_FRAGMENT_TESTS", - ), - ( - PipelineStageFlags::LATE_FRAGMENT_TESTS.0, - "LATE_FRAGMENT_TESTS", - ), - ( - PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT.0, - "COLOR_ATTACHMENT_OUTPUT", - ), - (PipelineStageFlags::COMPUTE_SHADER.0, "COMPUTE_SHADER"), - (PipelineStageFlags::TRANSFER.0, "TRANSFER"), - (PipelineStageFlags::BOTTOM_OF_PIPE.0, "BOTTOM_OF_PIPE"), - (PipelineStageFlags::HOST.0, "HOST"), - (PipelineStageFlags::ALL_GRAPHICS.0, "ALL_GRAPHICS"), - (PipelineStageFlags::ALL_COMMANDS.0, "ALL_COMMANDS"), - ( - PipelineStageFlags::COMMAND_PROCESS_NVX.0, - "COMMAND_PROCESS_NVX", - ), + (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 IndirectCommandsLayoutUsageFlagsNVX { +impl fmt::Display for CommandPoolCreateFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ + (CommandPoolCreateFlags::TRANSIENT.0, "TRANSIENT"), ( - IndirectCommandsLayoutUsageFlagsNVX::UNORDERED_SEQUENCES.0, - "UNORDERED_SEQUENCES", - ), - ( - IndirectCommandsLayoutUsageFlagsNVX::SPARSE_SEQUENCES.0, - "SPARSE_SEQUENCES", - ), - ( - IndirectCommandsLayoutUsageFlagsNVX::EMPTY_EXECUTIONS.0, - "EMPTY_EXECUTIONS", - ), - ( - IndirectCommandsLayoutUsageFlagsNVX::INDEXED_SEQUENCES.0, - "INDEXED_SEQUENCES", + CommandPoolCreateFlags::RESET_COMMAND_BUFFER.0, + "RESET_COMMAND_BUFFER", ), + (CommandPoolCreateFlags::PROTECTED.0, "PROTECTED"), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for ViewportCoordinateSwizzleNV { +impl fmt::Display for AccelerationStructureTypeNV { 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::TOP_LEVEL => Some("TOP_LEVEL"), + Self::BOTTOM_LEVEL => Some("BOTTOM_LEVEL"), _ => None, }; if let Some(x) = name { @@ -40790,6 +51497,61 @@ impl fmt::Display for ViewportCoordinateSwizzleNV { } } } +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 { @@ -40828,6 +51590,7 @@ impl fmt::Display for ObjectType { 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, @@ -40839,6 +51602,797 @@ impl fmt::Display for ObjectType { } } } +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 { @@ -41106,337 +52660,9 @@ impl fmt::Display for Format { } } } -impl fmt::Display for DeviceGroupPresentModeFlagsKHR { +impl fmt::Display for ConditionalRenderingFlagsEXT { 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 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 ImageLayout { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::UNDEFINED => Some("UNDEFINED"), - Self::GENERAL => Some("GENERAL"), - Self::COLOR_ATTACHMENT_OPTIMAL => Some("COLOR_ATTACHMENT_OPTIMAL"), - Self::DEPTH_STENCIL_ATTACHMENT_OPTIMAL => Some("DEPTH_STENCIL_ATTACHMENT_OPTIMAL"), - Self::DEPTH_STENCIL_READ_ONLY_OPTIMAL => Some("DEPTH_STENCIL_READ_ONLY_OPTIMAL"), - Self::SHADER_READ_ONLY_OPTIMAL => Some("SHADER_READ_ONLY_OPTIMAL"), - Self::TRANSFER_SRC_OPTIMAL => Some("TRANSFER_SRC_OPTIMAL"), - Self::TRANSFER_DST_OPTIMAL => Some("TRANSFER_DST_OPTIMAL"), - Self::PREINITIALIZED => Some("PREINITIALIZED"), - Self::PRESENT_SRC_KHR => Some("PRESENT_SRC_KHR"), - Self::SHARED_PRESENT_KHR => Some("SHARED_PRESENT_KHR"), - Self::DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL => { - Some("DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL") - } - Self::DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL => { - Some("DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL") - } - _ => 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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", - ), - ]; + const KNOWN: &[(Flags, &str)] = &[(ConditionalRenderingFlagsEXT::INVERTED.0, "INVERTED")]; display_flags(f, KNOWN, self.0) } } @@ -41481,6 +52707,22 @@ impl fmt::Display for AccessFlags { (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", @@ -41493,27 +52735,35 @@ impl fmt::Display for AccessFlags { 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 ExternalMemoryFeatureFlagsNV { +impl fmt::Display for DiscardRectangleModeEXT { 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) + 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 { @@ -41532,9 +52782,134 @@ impl fmt::Display for SubgroupFeatureFlags { display_flags(f, KNOWN, self.0) } } -impl fmt::Display for FenceCreateFlags { +impl fmt::Display for CompositeAlphaFlagsKHR { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - const KNOWN: &[(Flags, &str)] = &[(FenceCreateFlags::SIGNALED.0, "SIGNALED")]; + 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) } } @@ -41555,90 +52930,39 @@ impl fmt::Display for ShaderStageFlags { (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 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 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 QueryPipelineStatisticFlags { +impl fmt::Display for ExternalFenceFeatureFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ ( - QueryPipelineStatisticFlags::INPUT_ASSEMBLY_VERTICES.0, - "INPUT_ASSEMBLY_VERTICES", + ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_EXPORTABLE.0, + "EXTERNAL_FENCE_FEATURE_EXPORTABLE", ), ( - 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", + ExternalFenceFeatureFlags::EXTERNAL_FENCE_FEATURE_IMPORTABLE.0, + "EXTERNAL_FENCE_FEATURE_IMPORTABLE", ), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for AttachmentStoreOp { +impl fmt::Display for DisplayPowerStateEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::STORE => Some("STORE"), - Self::DONT_CARE => Some("DONT_CARE"), + Self::OFF => Some("OFF"), + Self::SUSPEND => Some("SUSPEND"), + Self::ON => Some("ON"), _ => None, }; if let Some(x) = name { @@ -41648,96 +52972,25 @@ impl fmt::Display for AttachmentStoreOp { } } } -impl fmt::Display for ObjectEntryUsageFlagsNVX { +impl fmt::Display for QueueFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ - (ObjectEntryUsageFlagsNVX::GRAPHICS.0, "GRAPHICS"), - (ObjectEntryUsageFlagsNVX::COMPUTE.0, "COMPUTE"), + (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 QueryType { +impl fmt::Display for TimeDomainEXT { 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"), - _ => None, - }; - if let Some(x) = name { - f.write_str(x) - } else { - write!(f, "{}", 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 ConservativeRasterizationModeEXT { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let name = match *self { - Self::DISABLED => Some("DISABLED"), - Self::OVERESTIMATE => Some("OVERESTIMATE"), - Self::UNDERESTIMATE => Some("UNDERESTIMATE"), - _ => 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 { - Self::KEEP => Some("KEEP"), - Self::ZERO => Some("ZERO"), - Self::REPLACE => Some("REPLACE"), - Self::INCREMENT_AND_CLAMP => Some("INCREMENT_AND_CLAMP"), - Self::DECREMENT_AND_CLAMP => Some("DECREMENT_AND_CLAMP"), - Self::INVERT => Some("INVERT"), - Self::INCREMENT_AND_WRAP => Some("INCREMENT_AND_WRAP"), - Self::DECREMENT_AND_WRAP => Some("DECREMENT_AND_WRAP"), - _ => 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 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 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"), + 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 { @@ -41835,7 +53088,6 @@ impl fmt::Display for StructureType { Self::XLIB_SURFACE_CREATE_INFO_KHR => Some("XLIB_SURFACE_CREATE_INFO_KHR"), Self::XCB_SURFACE_CREATE_INFO_KHR => Some("XCB_SURFACE_CREATE_INFO_KHR"), Self::WAYLAND_SURFACE_CREATE_INFO_KHR => Some("WAYLAND_SURFACE_CREATE_INFO_KHR"), - Self::MIR_SURFACE_CREATE_INFO_KHR => Some("MIR_SURFACE_CREATE_INFO_KHR"), Self::ANDROID_SURFACE_CREATE_INFO_KHR => Some("ANDROID_SURFACE_CREATE_INFO_KHR"), Self::WIN32_SURFACE_CREATE_INFO_KHR => Some("WIN32_SURFACE_CREATE_INFO_KHR"), Self::NATIVE_BUFFER_ANDROID => Some("NATIVE_BUFFER_ANDROID"), @@ -41857,9 +53109,21 @@ impl fmt::Display for StructureType { Self::DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV => { Some("DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV") } + Self::PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT") + } + Self::PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT => { + Some("PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT") + } + Self::PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT => { + Some("PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT") + } Self::TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD => { Some("TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD") } + Self::PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV => { + Some("PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV") + } Self::EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV => { Some("EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV") } @@ -41871,6 +53135,10 @@ impl fmt::Display for StructureType { } Self::VALIDATION_FLAGS_EXT => Some("VALIDATION_FLAGS_EXT"), Self::VI_SURFACE_CREATE_INFO_NN => Some("VI_SURFACE_CREATE_INFO_NN"), + Self::IMAGE_VIEW_ASTC_DECODE_MODE_EXT => Some("IMAGE_VIEW_ASTC_DECODE_MODE_EXT"), + Self::PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT") + } Self::IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR => { Some("IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR") } @@ -41900,6 +53168,15 @@ impl fmt::Display for StructureType { Self::PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR => { Some("PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR") } + Self::COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT => { + Some("COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT") + } + Self::PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT") + } + Self::CONDITIONAL_RENDERING_BEGIN_INFO_EXT => { + Some("CONDITIONAL_RENDERING_BEGIN_INFO_EXT") + } Self::PRESENT_REGIONS_KHR => Some("PRESENT_REGIONS_KHR"), Self::OBJECT_TABLE_CREATE_INFO_NVX => Some("OBJECT_TABLE_CREATE_INFO_NVX"), Self::INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX => { @@ -41943,6 +53220,13 @@ impl fmt::Display for StructureType { Some("PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT") } Self::HDR_METADATA_EXT => Some("HDR_METADATA_EXT"), + Self::ATTACHMENT_DESCRIPTION_2_KHR => Some("ATTACHMENT_DESCRIPTION_2_KHR"), + Self::ATTACHMENT_REFERENCE_2_KHR => Some("ATTACHMENT_REFERENCE_2_KHR"), + Self::SUBPASS_DESCRIPTION_2_KHR => Some("SUBPASS_DESCRIPTION_2_KHR"), + Self::SUBPASS_DEPENDENCY_2_KHR => Some("SUBPASS_DEPENDENCY_2_KHR"), + Self::RENDER_PASS_CREATE_INFO_2_KHR => Some("RENDER_PASS_CREATE_INFO_2_KHR"), + Self::SUBPASS_BEGIN_INFO_KHR => Some("SUBPASS_BEGIN_INFO_KHR"), + Self::SUBPASS_END_INFO_KHR => Some("SUBPASS_END_INFO_KHR"), Self::SHARED_PRESENT_SURFACE_CAPABILITIES_KHR => { Some("SHARED_PRESENT_SURFACE_CAPABILITIES_KHR") } @@ -41992,6 +53276,18 @@ impl fmt::Display for StructureType { Self::SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT => { Some("SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT") } + Self::PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT") + } + Self::PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT => { + Some("PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT") + } + Self::WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT => { + Some("WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT") + } + Self::DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT => { + Some("DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT") + } Self::SAMPLE_LOCATIONS_INFO_EXT => Some("SAMPLE_LOCATIONS_INFO_EXT"), Self::RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT => { Some("RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT") @@ -42019,6 +53315,22 @@ impl fmt::Display for StructureType { Self::PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV => { Some("PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV") } + Self::DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT => { + Some("DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT") + } + Self::DRM_FORMAT_MODIFIER_PROPERTIES_EXT => Some("DRM_FORMAT_MODIFIER_PROPERTIES_EXT"), + Self::PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT => { + Some("PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT") + } + Self::IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT => { + Some("IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT") + } + Self::IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT => { + Some("IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT") + } + Self::IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT => { + Some("IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT") + } Self::VALIDATION_CACHE_CREATE_INFO_EXT => Some("VALIDATION_CACHE_CREATE_INFO_EXT"), Self::SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT => { Some("SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT") @@ -42038,9 +53350,55 @@ impl fmt::Display for StructureType { Self::DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT => { Some("DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT") } + Self::PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV => { + Some("PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV") + } + Self::PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV => { + Some("PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV") + } + Self::PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV => { + Some("PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV") + } + Self::PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV => { + Some("PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV") + } + Self::RAY_TRACING_PIPELINE_CREATE_INFO_NV => { + Some("RAY_TRACING_PIPELINE_CREATE_INFO_NV") + } + Self::ACCELERATION_STRUCTURE_CREATE_INFO_NV => { + Some("ACCELERATION_STRUCTURE_CREATE_INFO_NV") + } + Self::GEOMETRY_NV => Some("GEOMETRY_NV"), + Self::GEOMETRY_TRIANGLES_NV => Some("GEOMETRY_TRIANGLES_NV"), + Self::GEOMETRY_AABB_NV => Some("GEOMETRY_AABB_NV"), + Self::BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV => { + Some("BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV") + } + Self::WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV => { + Some("WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV") + } + Self::ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV => { + Some("ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV") + } + Self::PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV => { + Some("PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV") + } + Self::RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV => { + Some("RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV") + } + Self::ACCELERATION_STRUCTURE_INFO_NV => Some("ACCELERATION_STRUCTURE_INFO_NV"), + Self::PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV => { + Some("PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV") + } + Self::PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV => { + Some("PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV") + } Self::DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT => { Some("DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT") } + Self::PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR => { + Some("PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR") + } Self::IMPORT_MEMORY_HOST_POINTER_INFO_EXT => { Some("IMPORT_MEMORY_HOST_POINTER_INFO_EXT") } @@ -42048,15 +53406,62 @@ impl fmt::Display for StructureType { Self::PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT => { Some("PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT") } + Self::PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR => { + Some("PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR") + } + Self::CALIBRATED_TIMESTAMP_INFO_EXT => Some("CALIBRATED_TIMESTAMP_INFO_EXT"), Self::PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD => { Some("PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD") } + Self::DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD => { + Some("DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD") + } Self::PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT => { Some("PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT") } Self::PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT => { Some("PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT") } + Self::PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT => { + Some("PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT") + } + Self::PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR => { + Some("PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR") + } + Self::PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV => { + Some("PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV") + } + Self::PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV => { + Some("PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV") + } + Self::PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV => { + Some("PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV") + } + Self::PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV => { + Some("PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV") + } + Self::PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV => { + Some("PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV") + } + Self::PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV => { + Some("PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV") + } + Self::PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV => { + Some("PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV") + } + Self::CHECKPOINT_DATA_NV => Some("CHECKPOINT_DATA_NV"), + Self::QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV => { + Some("QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV") + } + Self::PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR => { + Some("PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR") + } + Self::PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT => { + Some("PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT") + } + Self::IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA => { + Some("IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA") + } Self::PHYSICAL_DEVICE_SUBGROUP_PROPERTIES => { Some("PHYSICAL_DEVICE_SUBGROUP_PROPERTIES") } @@ -42187,6 +53592,389 @@ impl fmt::Display for StructureType { } } } +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 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 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 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 ConservativeRasterizationModeEXT { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::DISABLED => Some("DISABLED"), + Self::OVERESTIMATE => Some("OVERESTIMATE"), + Self::UNDERESTIMATE => Some("UNDERESTIMATE"), + _ => 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 { + Self::KEEP => Some("KEEP"), + Self::ZERO => Some("ZERO"), + Self::REPLACE => Some("REPLACE"), + Self::INCREMENT_AND_CLAMP => Some("INCREMENT_AND_CLAMP"), + Self::DECREMENT_AND_CLAMP => Some("DECREMENT_AND_CLAMP"), + Self::INVERT => Some("INVERT"), + Self::INCREMENT_AND_WRAP => Some("INCREMENT_AND_WRAP"), + Self::DECREMENT_AND_WRAP => Some("DECREMENT_AND_WRAP"), + _ => 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 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 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 ObjectEntryUsageFlagsNVX { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (ObjectEntryUsageFlagsNVX::GRAPHICS.0, "GRAPHICS"), + (ObjectEntryUsageFlagsNVX::COMPUTE.0, "COMPUTE"), + ]; + display_flags(f, KNOWN, 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 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 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", + ), + ( + 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) + } +} +impl fmt::Display for BuildAccelerationStructureFlagsNV { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + ( + BuildAccelerationStructureFlagsNV::ALLOW_UPDATE.0, + "ALLOW_UPDATE", + ), + ( + BuildAccelerationStructureFlagsNV::ALLOW_COMPACTION.0, + "ALLOW_COMPACTION", + ), + ( + BuildAccelerationStructureFlagsNV::PREFER_FAST_TRACE.0, + "PREFER_FAST_TRACE", + ), + ( + BuildAccelerationStructureFlagsNV::PREFER_FAST_BUILD.0, + "PREFER_FAST_BUILD", + ), + ( + BuildAccelerationStructureFlagsNV::LOW_MEMORY.0, + "LOW_MEMORY", + ), + ]; + 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 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 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)] = &[ + (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 CullModeFlags { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ @@ -42198,6 +53986,306 @@ impl fmt::Display for CullModeFlags { 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::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 { + f.write_str(x) + } else { + write!(f, "{}", self.0) + } + } +} +impl fmt::Display for PipelineStageFlags { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + const KNOWN: &[(Flags, &str)] = &[ + (PipelineStageFlags::TOP_OF_PIPE.0, "TOP_OF_PIPE"), + (PipelineStageFlags::DRAW_INDIRECT.0, "DRAW_INDIRECT"), + (PipelineStageFlags::VERTEX_INPUT.0, "VERTEX_INPUT"), + (PipelineStageFlags::VERTEX_SHADER.0, "VERTEX_SHADER"), + ( + PipelineStageFlags::TESSELLATION_CONTROL_SHADER.0, + "TESSELLATION_CONTROL_SHADER", + ), + ( + PipelineStageFlags::TESSELLATION_EVALUATION_SHADER.0, + "TESSELLATION_EVALUATION_SHADER", + ), + (PipelineStageFlags::GEOMETRY_SHADER.0, "GEOMETRY_SHADER"), + (PipelineStageFlags::FRAGMENT_SHADER.0, "FRAGMENT_SHADER"), + ( + PipelineStageFlags::EARLY_FRAGMENT_TESTS.0, + "EARLY_FRAGMENT_TESTS", + ), + ( + PipelineStageFlags::LATE_FRAGMENT_TESTS.0, + "LATE_FRAGMENT_TESTS", + ), + ( + PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT.0, + "COLOR_ATTACHMENT_OUTPUT", + ), + (PipelineStageFlags::COMPUTE_SHADER.0, "COMPUTE_SHADER"), + (PipelineStageFlags::TRANSFER.0, "TRANSFER"), + (PipelineStageFlags::BOTTOM_OF_PIPE.0, "BOTTOM_OF_PIPE"), + (PipelineStageFlags::HOST.0, "HOST"), + (PipelineStageFlags::ALL_GRAPHICS.0, "ALL_GRAPHICS"), + (PipelineStageFlags::ALL_COMMANDS.0, "ALL_COMMANDS"), + ( + PipelineStageFlags::TRANSFORM_FEEDBACK_EXT.0, + "TRANSFORM_FEEDBACK_EXT", + ), + ( + PipelineStageFlags::CONDITIONAL_RENDERING_EXT.0, + "CONDITIONAL_RENDERING_EXT", + ), + ( + PipelineStageFlags::COMMAND_PROCESS_NVX.0, + "COMMAND_PROCESS_NVX", + ), + ( + PipelineStageFlags::SHADING_RATE_IMAGE_NV.0, + "SHADING_RATE_IMAGE_NV", + ), + ( + PipelineStageFlags::RAY_TRACING_SHADER_NV.0, + "RAY_TRACING_SHADER_NV", + ), + ( + PipelineStageFlags::ACCELERATION_STRUCTURE_BUILD_NV.0, + "ACCELERATION_STRUCTURE_BUILD_NV", + ), + (PipelineStageFlags::TASK_SHADER_NV.0, "TASK_SHADER_NV"), + (PipelineStageFlags::MESH_SHADER_NV.0, "MESH_SHADER_NV"), + (PipelineStageFlags::RESERVED_23_EXT.0, "RESERVED_23_EXT"), + ]; + display_flags(f, KNOWN, self.0) + } +} +impl fmt::Display for SubpassDescriptionFlags { + 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", + ), + ]; + display_flags(f, KNOWN, 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 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 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 { @@ -42225,20 +54313,11 @@ impl fmt::Display for ColorSpaceKHR { } } } -impl fmt::Display for PrimitiveTopology { +impl fmt::Display for GeometryTypeNV { 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"), + Self::TRIANGLES => Some("TRIANGLES"), + Self::AABBS => Some("AABBS"), _ => None, }; if let Some(x) = name { @@ -42248,88 +54327,46 @@ impl fmt::Display for PrimitiveTopology { } } } -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 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::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 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 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 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 FrontFace { +impl fmt::Display for DebugReportObjectTypeEXT { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::COUNTER_CLOCKWISE => Some("COUNTER_CLOCKWISE"), - Self::CLOCKWISE => Some("CLOCKWISE"), + 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::DEBUG_REPORT_CALLBACK => Some("DEBUG_REPORT_CALLBACK"), + Self::DISPLAY_KHR => Some("DISPLAY_KHR"), + Self::DISPLAY_MODE_KHR => Some("DISPLAY_MODE_KHR"), + Self::OBJECT_TABLE_NVX => Some("OBJECT_TABLE_NVX"), + Self::INDIRECT_COMMANDS_LAYOUT_NVX => Some("INDIRECT_COMMANDS_LAYOUT_NVX"), + Self::VALIDATION_CACHE => Some("VALIDATION_CACHE"), + Self::SAMPLER_YCBCR_CONVERSION => Some("SAMPLER_YCBCR_CONVERSION"), + Self::DESCRIPTOR_UPDATE_TEMPLATE => Some("DESCRIPTOR_UPDATE_TEMPLATE"), + Self::ACCELERATION_STRUCTURE_NV => Some("ACCELERATION_STRUCTURE_NV"), _ => None, }; if let Some(x) = name { @@ -42339,45 +54376,48 @@ impl fmt::Display for FrontFace { } } } -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 DescriptorBindingFlagsEXT { +impl fmt::Display for GeometryFlagsNV { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { const KNOWN: &[(Flags, &str)] = &[ + (GeometryFlagsNV::OPAQUE.0, "OPAQUE"), ( - 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", + GeometryFlagsNV::NO_DUPLICATE_ANY_HIT_INVOCATION.0, + "NO_DUPLICATE_ANY_HIT_INVOCATION", ), ]; display_flags(f, KNOWN, self.0) } } -impl fmt::Display for PipelineBindPoint { +impl fmt::Display for ImageViewType { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let name = match *self { - Self::GRAPHICS => Some("GRAPHICS"), - Self::COMPUTE => Some("COMPUTE"), + 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 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 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 { @@ -42400,12 +54440,25 @@ impl fmt::Display for DeviceEventTypeEXT { } } } -impl fmt::Display for VendorId { +impl fmt::Display for LogicOp { 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"), + Self::CLEAR => Some("CLEAR"), + Self::AND => Some("AND"), + Self::AND_REVERSE => Some("AND_REVERSE"), + Self::COPY => Some("COPY"), + Self::AND_INVERTED => Some("AND_INVERTED"), + Self::NO_OP => Some("NO_OP"), + Self::XOR => Some("XOR"), + Self::OR => Some("OR"), + Self::NOR => Some("NOR"), + Self::EQUIVALENT => Some("EQUIVALENT"), + Self::INVERT => Some("INVERT"), + Self::OR_REVERSE => Some("OR_REVERSE"), + Self::COPY_INVERTED => Some("COPY_INVERTED"), + Self::OR_INVERTED => Some("OR_INVERTED"), + Self::NAND => Some("NAND"), + Self::SET => Some("SET"), _ => None, }; if let Some(x) = name { @@ -42415,3 +54468,151 @@ impl fmt::Display for VendorId { } } } +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) + } + } +} +pub type DescriptorUpdateTemplateCreateFlagsKHR = DescriptorUpdateTemplateCreateFlags; +pub type PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags; +pub type MemoryAllocateFlagsKHR = MemoryAllocateFlags; +pub type CommandPoolTrimFlagsKHR = CommandPoolTrimFlags; +pub type ExternalMemoryHandleTypeFlagsKHR = ExternalMemoryHandleTypeFlags; +pub type ExternalMemoryFeatureFlagsKHR = ExternalMemoryFeatureFlags; +pub type ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags; +pub type ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags; +pub type SemaphoreImportFlagsKHR = SemaphoreImportFlags; +pub type ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags; +pub type ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags; +pub type FenceImportFlagsKHR = FenceImportFlags; +pub type DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate; +pub type SamplerYcbcrConversionKHR = SamplerYcbcrConversion; +pub type DescriptorUpdateTemplateTypeKHR = DescriptorUpdateTemplateType; +pub type PointClippingBehaviorKHR = PointClippingBehavior; +pub type TessellationDomainOriginKHR = TessellationDomainOrigin; +pub type SamplerYcbcrModelConversionKHR = SamplerYcbcrModelConversion; +pub type SamplerYcbcrRangeKHR = SamplerYcbcrRange; +pub type ChromaLocationKHR = ChromaLocation; +pub type PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2; +pub type PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2; +pub type FormatProperties2KHR = FormatProperties2; +pub type ImageFormatProperties2KHR = ImageFormatProperties2; +pub type PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2; +pub type QueueFamilyProperties2KHR = QueueFamilyProperties2; +pub type PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2; +pub type SparseImageFormatProperties2KHR = SparseImageFormatProperties2; +pub type PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2; +pub type PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointerFeatures; +pub type ExternalMemoryPropertiesKHR = ExternalMemoryProperties; +pub type PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo; +pub type ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties; +pub type PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo; +pub type ExternalBufferPropertiesKHR = ExternalBufferProperties; +pub type PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties; +pub type ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo; +pub type ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo; +pub type ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo; +pub type PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo; +pub type ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties; +pub type ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo; +pub type PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo; +pub type ExternalFencePropertiesKHR = ExternalFenceProperties; +pub type ExportFenceCreateInfoKHR = ExportFenceCreateInfo; +pub type PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures; +pub type PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties; +pub type RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo; +pub type PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties; +pub type MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo; +pub type BindBufferMemoryInfoKHR = BindBufferMemoryInfo; +pub type BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo; +pub type BindImageMemoryInfoKHR = BindImageMemoryInfo; +pub type BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo; +pub type DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo; +pub type DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo; +pub type DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo; +pub type DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo; +pub type DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo; +pub type DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry; +pub type DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo; +pub type InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference; +pub type RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo; +pub type PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures; +pub type BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2; +pub type ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2; +pub type ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2; +pub type MemoryRequirements2KHR = MemoryRequirements2; +pub type SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2; +pub type PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties; +pub type MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements; +pub type MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo; +pub type ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo; +pub type PipelineTessellationDomainOriginStateCreateInfoKHR = + PipelineTessellationDomainOriginStateCreateInfo; +pub type SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo; +pub type SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo; +pub type BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo; +pub type ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo; +pub type PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = + PhysicalDeviceSamplerYcbcrConversionFeatures; +pub type SamplerYcbcrConversionImageFormatPropertiesKHR = + SamplerYcbcrConversionImageFormatProperties; +pub type PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties; +pub type DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport; diff --git a/ash/tests/display.rs b/ash/tests/display.rs index 5ab861a..7f2eb1d 100644 --- a/ash/tests/display.rs +++ b/ash/tests/display.rs @@ -3,7 +3,11 @@ use ash::vk; #[test] fn display_flags() { - assert_eq!((vk::AccessFlags::INDIRECT_COMMAND_READ | vk::AccessFlags::VERTEX_ATTRIBUTE_READ).to_string(), "INDIRECT_COMMAND_READ | VERTEX_ATTRIBUTE_READ"); + assert_eq!( + (vk::AccessFlags::INDIRECT_COMMAND_READ | vk::AccessFlags::VERTEX_ATTRIBUTE_READ) + .to_string(), + "INDIRECT_COMMAND_READ | VERTEX_ATTRIBUTE_READ" + ); } #[test] 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 diff --git a/examples/src/bin/texture.rs b/examples/src/bin/texture.rs index 6435236..3e12002 100644 --- a/examples/src/bin/texture.rs +++ b/examples/src/bin/texture.rs @@ -5,11 +5,9 @@ extern crate image; use std::default::Default; use std::ffi::CString; use std::fs::File; -use std::io::Read; use std::mem::{self, align_of}; use std::os::raw::c_void; use std::path::Path; -use std::ptr; use ash::util::*; use ash::vk; @@ -33,91 +31,70 @@ pub struct Vector3 { fn main() { unsafe { let base = ExampleBase::new(1920, 1080); + let renderpass_attachments = [ vk::AttachmentDescription { format: base.surface_format.format, - flags: vk::AttachmentDescriptionFlags::empty(), samples: vk::SampleCountFlags::TYPE_1, load_op: vk::AttachmentLoadOp::CLEAR, store_op: vk::AttachmentStoreOp::STORE, - stencil_load_op: vk::AttachmentLoadOp::DONT_CARE, - stencil_store_op: vk::AttachmentStoreOp::DONT_CARE, - initial_layout: vk::ImageLayout::UNDEFINED, final_layout: vk::ImageLayout::PRESENT_SRC_KHR, + ..Default::default() }, vk::AttachmentDescription { format: vk::Format::D16_UNORM, - flags: vk::AttachmentDescriptionFlags::empty(), samples: vk::SampleCountFlags::TYPE_1, load_op: vk::AttachmentLoadOp::CLEAR, - store_op: vk::AttachmentStoreOp::DONT_CARE, - stencil_load_op: vk::AttachmentLoadOp::DONT_CARE, - stencil_store_op: vk::AttachmentStoreOp::DONT_CARE, initial_layout: vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL, final_layout: vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL, + ..Default::default() }, ]; - let color_attachment_ref = vk::AttachmentReference { + let color_attachment_refs = [vk::AttachmentReference { attachment: 0, layout: vk::ImageLayout::COLOR_ATTACHMENT_OPTIMAL, - }; + }]; let depth_attachment_ref = vk::AttachmentReference { attachment: 1, layout: vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL, }; - let dependency = vk::SubpassDependency { - dependency_flags: Default::default(), + let dependencies = [vk::SubpassDependency { src_subpass: vk::SUBPASS_EXTERNAL, - dst_subpass: Default::default(), src_stage_mask: vk::PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT, - src_access_mask: Default::default(), dst_access_mask: vk::AccessFlags::COLOR_ATTACHMENT_READ | vk::AccessFlags::COLOR_ATTACHMENT_WRITE, dst_stage_mask: vk::PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT, - }; - let subpass = vk::SubpassDescription { - color_attachment_count: 1, - p_color_attachments: &color_attachment_ref, - p_depth_stencil_attachment: &depth_attachment_ref, - flags: Default::default(), - pipeline_bind_point: vk::PipelineBindPoint::GRAPHICS, - input_attachment_count: 0, - p_input_attachments: ptr::null(), - p_resolve_attachments: ptr::null(), - preserve_attachment_count: 0, - p_preserve_attachments: ptr::null(), - }; - let renderpass_create_info = vk::RenderPassCreateInfo { - s_type: vk::StructureType::RENDER_PASS_CREATE_INFO, - flags: Default::default(), - p_next: ptr::null(), - attachment_count: renderpass_attachments.len() as u32, - p_attachments: renderpass_attachments.as_ptr(), - subpass_count: 1, - p_subpasses: &subpass, - dependency_count: 1, - p_dependencies: &dependency, - }; + ..Default::default() + }]; + + let subpasses = [vk::SubpassDescription::builder() + .color_attachments(&color_attachment_refs) + .depth_stencil_attachment(&depth_attachment_ref) + .pipeline_bind_point(vk::PipelineBindPoint::GRAPHICS) + .build()]; + + let renderpass_create_info = vk::RenderPassCreateInfo::builder() + .attachments(&renderpass_attachments) + .subpasses(&subpasses) + .dependencies(&dependencies); + let renderpass = base .device .create_render_pass(&renderpass_create_info, None) .unwrap(); + let framebuffers: Vec = base .present_image_views .iter() .map(|&present_image_view| { let framebuffer_attachments = [present_image_view, base.depth_image_view]; - let frame_buffer_create_info = vk::FramebufferCreateInfo { - s_type: vk::StructureType::FRAMEBUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - render_pass: renderpass, - attachment_count: framebuffer_attachments.len() as u32, - p_attachments: framebuffer_attachments.as_ptr(), - width: base.surface_resolution.width, - height: base.surface_resolution.height, - layers: 1, - }; + let frame_buffer_create_info = vk::FramebufferCreateInfo::builder() + .render_pass(renderpass) + .attachments(&framebuffer_attachments) + .width(base.surface_resolution.width) + .height(base.surface_resolution.height) + .layers(1); + base.device .create_framebuffer(&frame_buffer_create_info, None) .unwrap() @@ -125,28 +102,23 @@ fn main() { .collect(); let index_buffer_data = [0u32, 1, 2, 2, 3, 0]; let index_buffer_info = vk::BufferCreateInfo { - s_type: vk::StructureType::BUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: vk::BufferCreateFlags::empty(), size: std::mem::size_of_val(&index_buffer_data) as u64, usage: vk::BufferUsageFlags::INDEX_BUFFER, sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), + ..Default::default() }; let index_buffer = base.device.create_buffer(&index_buffer_info, None).unwrap(); let index_buffer_memory_req = base.device.get_buffer_memory_requirements(index_buffer); - let index_buffer_memory_index = - find_memorytype_index( - &index_buffer_memory_req, - &base.device_memory_properties, - vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the index buffer."); + let index_buffer_memory_index = find_memorytype_index( + &index_buffer_memory_req, + &base.device_memory_properties, + vk::MemoryPropertyFlags::HOST_VISIBLE, + ) + .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(), allocation_size: index_buffer_memory_req.size, memory_type_index: index_buffer_memory_index, + ..Default::default() }; let index_buffer_memory = base .device @@ -191,14 +163,10 @@ fn main() { }, ]; let vertex_input_buffer_info = vk::BufferCreateInfo { - s_type: vk::StructureType::BUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: vk::BufferCreateFlags::empty(), size: std::mem::size_of_val(&vertices) as u64, usage: vk::BufferUsageFlags::VERTEX_BUFFER, sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), + ..Default::default() }; let vertex_input_buffer = base .device @@ -207,23 +175,23 @@ fn main() { let vertex_input_buffer_memory_req = base .device .get_buffer_memory_requirements(vertex_input_buffer); - let vertex_input_buffer_memory_index = - find_memorytype_index( - &vertex_input_buffer_memory_req, - &base.device_memory_properties, - vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + let vertex_input_buffer_memory_index = find_memorytype_index( + &vertex_input_buffer_memory_req, + &base.device_memory_properties, + vk::MemoryPropertyFlags::HOST_VISIBLE, + ) + .expect("Unable to find suitable memorytype for the vertex buffer."); let vertex_buffer_allocate_info = vk::MemoryAllocateInfo { - s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, - p_next: ptr::null(), allocation_size: vertex_input_buffer_memory_req.size, memory_type_index: vertex_input_buffer_memory_index, + ..Default::default() }; let vertex_input_buffer_memory = base .device .allocate_memory(&vertex_buffer_allocate_info, None) .unwrap(); + let vert_ptr = base .device .map_memory( @@ -251,14 +219,10 @@ fn main() { _pad: 0.0, }; let uniform_color_buffer_info = vk::BufferCreateInfo { - s_type: vk::StructureType::BUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: vk::BufferCreateFlags::empty(), size: std::mem::size_of_val(&uniform_color_buffer_data) as u64, usage: vk::BufferUsageFlags::UNIFORM_BUFFER, sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), + ..Default::default() }; let uniform_color_buffer = base .device @@ -267,18 +231,17 @@ fn main() { let uniform_color_buffer_memory_req = base .device .get_buffer_memory_requirements(uniform_color_buffer); - let uniform_color_buffer_memory_index = - find_memorytype_index( - &uniform_color_buffer_memory_req, - &base.device_memory_properties, - vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + let uniform_color_buffer_memory_index = find_memorytype_index( + &uniform_color_buffer_memory_req, + &base.device_memory_properties, + vk::MemoryPropertyFlags::HOST_VISIBLE, + ) + .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, - p_next: ptr::null(), allocation_size: uniform_color_buffer_memory_req.size, memory_type_index: uniform_color_buffer_memory_index, + ..Default::default() }; let uniform_color_buffer_memory = base .device @@ -308,29 +271,24 @@ fn main() { let image_dimensions = image.dimensions(); let image_data = image.into_raw(); let image_buffer_info = vk::BufferCreateInfo { - s_type: vk::StructureType::BUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: vk::BufferCreateFlags::empty(), size: (std::mem::size_of::() * image_data.len()) as u64, usage: vk::BufferUsageFlags::TRANSFER_SRC, sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), + ..Default::default() }; let image_buffer = base.device.create_buffer(&image_buffer_info, None).unwrap(); let image_buffer_memory_req = base.device.get_buffer_memory_requirements(image_buffer); - let image_buffer_memory_index = - find_memorytype_index( - &image_buffer_memory_req, - &base.device_memory_properties, - vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + let image_buffer_memory_index = find_memorytype_index( + &image_buffer_memory_req, + &base.device_memory_properties, + vk::MemoryPropertyFlags::HOST_VISIBLE, + ) + .expect("Unable to find suitable memorytype for the vertex buffer."); let image_buffer_allocate_info = vk::MemoryAllocateInfo { - s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, - p_next: ptr::null(), allocation_size: image_buffer_memory_req.size, memory_type_index: image_buffer_memory_index, + ..Default::default() }; let image_buffer_memory = base .device @@ -357,9 +315,6 @@ fn main() { .unwrap(); let texture_create_info = vk::ImageCreateInfo { - s_type: vk::StructureType::IMAGE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), image_type: vk::ImageType::TYPE_2D, format: vk::Format::R8G8B8A8_UNORM, extent: vk::Extent3D { @@ -373,27 +328,24 @@ fn main() { tiling: vk::ImageTiling::OPTIMAL, usage: vk::ImageUsageFlags::TRANSFER_DST | vk::ImageUsageFlags::SAMPLED, sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), - initial_layout: vk::ImageLayout::UNDEFINED, + ..Default::default() }; let texture_image = base .device .create_image(&texture_create_info, None) .unwrap(); let texture_memory_req = base.device.get_image_memory_requirements(texture_image); - let texture_memory_index = - find_memorytype_index( - &texture_memory_req, - &base.device_memory_properties, - vk::MemoryPropertyFlags::DEVICE_LOCAL, - ).expect("Unable to find suitable memory index for depth image."); + let texture_memory_index = find_memorytype_index( + &texture_memory_req, + &base.device_memory_properties, + vk::MemoryPropertyFlags::DEVICE_LOCAL, + ) + .expect("Unable to find suitable memory index for depth image."); let texture_allocate_info = vk::MemoryAllocateInfo { - s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, - p_next: ptr::null(), allocation_size: texture_memory_req.size, memory_type_index: texture_memory_index, + ..Default::default() }; let texture_memory = base .device @@ -407,27 +359,21 @@ fn main() { &base.device, base.setup_command_buffer, base.present_queue, - &[vk::PipelineStageFlags::TOP_OF_PIPE], + &[], &[], &[], |device, texture_command_buffer| { let texture_barrier = vk::ImageMemoryBarrier { - s_type: vk::StructureType::IMAGE_MEMORY_BARRIER, - p_next: ptr::null(), - src_access_mask: Default::default(), dst_access_mask: vk::AccessFlags::TRANSFER_WRITE, - old_layout: vk::ImageLayout::UNDEFINED, new_layout: vk::ImageLayout::TRANSFER_DST_OPTIMAL, - src_queue_family_index: vk::QUEUE_FAMILY_IGNORED, - dst_queue_family_index: vk::QUEUE_FAMILY_IGNORED, image: texture_image, subresource_range: vk::ImageSubresourceRange { aspect_mask: vk::ImageAspectFlags::COLOR, - base_mip_level: 0, level_count: 1, - base_array_layer: 0, layer_count: 1, + ..Default::default() }, + ..Default::default() }; device.cmd_pipeline_barrier( texture_command_buffer, @@ -438,48 +384,39 @@ fn main() { &[], &[texture_barrier], ); - let buffer_copy_regions = [vk::BufferImageCopy { - image_subresource: vk::ImageSubresourceLayers { - aspect_mask: vk::ImageAspectFlags::COLOR, - mip_level: 0, - base_array_layer: 0, - layer_count: 1, - }, - image_extent: vk::Extent3D { + let buffer_copy_regions = vk::BufferImageCopy::builder() + .image_subresource( + vk::ImageSubresourceLayers::builder() + .aspect_mask(vk::ImageAspectFlags::COLOR) + .layer_count(1) + .build(), + ) + .image_extent(vk::Extent3D { width: image_dimensions.0, height: image_dimensions.1, depth: 1, - }, - buffer_offset: 0, - // FIX ME - buffer_image_height: 0, - buffer_row_length: 0, - image_offset: vk::Offset3D { x: 0, y: 0, z: 0 }, - }]; + }); + device.cmd_copy_buffer_to_image( texture_command_buffer, image_buffer, texture_image, vk::ImageLayout::TRANSFER_DST_OPTIMAL, - &buffer_copy_regions, + &[buffer_copy_regions.build()], ); let texture_barrier_end = vk::ImageMemoryBarrier { - s_type: vk::StructureType::IMAGE_MEMORY_BARRIER, - p_next: ptr::null(), src_access_mask: vk::AccessFlags::TRANSFER_WRITE, dst_access_mask: vk::AccessFlags::SHADER_READ, old_layout: vk::ImageLayout::TRANSFER_DST_OPTIMAL, new_layout: vk::ImageLayout::SHADER_READ_ONLY_OPTIMAL, - src_queue_family_index: vk::QUEUE_FAMILY_IGNORED, - dst_queue_family_index: vk::QUEUE_FAMILY_IGNORED, image: texture_image, subresource_range: vk::ImageSubresourceRange { aspect_mask: vk::ImageAspectFlags::COLOR, - base_mip_level: 0, level_count: 1, - base_array_layer: 0, layer_count: 1, + ..Default::default() }, + ..Default::default() }; device.cmd_pipeline_barrier( texture_command_buffer, @@ -494,32 +431,21 @@ fn main() { ); let sampler_info = vk::SamplerCreateInfo { - s_type: vk::StructureType::SAMPLER_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), mag_filter: vk::Filter::LINEAR, min_filter: vk::Filter::LINEAR, mipmap_mode: vk::SamplerMipmapMode::LINEAR, address_mode_u: vk::SamplerAddressMode::MIRRORED_REPEAT, address_mode_v: vk::SamplerAddressMode::MIRRORED_REPEAT, address_mode_w: vk::SamplerAddressMode::MIRRORED_REPEAT, - mip_lod_bias: 0.0, - min_lod: 0.0, - max_lod: 0.0, - anisotropy_enable: 0, max_anisotropy: 1.0, border_color: vk::BorderColor::FLOAT_OPAQUE_WHITE, - compare_enable: 0, compare_op: vk::CompareOp::NEVER, - unnormalized_coordinates: 0, + ..Default::default() }; let sampler = base.device.create_sampler(&sampler_info, None).unwrap(); let tex_image_view_info = vk::ImageViewCreateInfo { - s_type: vk::StructureType::IMAGE_VIEW_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), view_type: vk::ImageViewType::TYPE_2D, format: texture_create_info.format, components: vk::ComponentMapping { @@ -530,12 +456,12 @@ fn main() { }, subresource_range: vk::ImageSubresourceRange { aspect_mask: vk::ImageAspectFlags::COLOR, - base_mip_level: 0, level_count: 1, - base_array_layer: 0, layer_count: 1, + ..Default::default() }, image: texture_image, + ..Default::default() }; let tex_image_view = base .device @@ -551,53 +477,40 @@ fn main() { descriptor_count: 1, }, ]; - let descriptor_pool_info = vk::DescriptorPoolCreateInfo { - s_type: vk::StructureType::DESCRIPTOR_POOL_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - pool_size_count: descriptor_sizes.len() as u32, - p_pool_sizes: descriptor_sizes.as_ptr(), - max_sets: 1, - }; + let descriptor_pool_info = vk::DescriptorPoolCreateInfo::builder() + .pool_sizes(&descriptor_sizes) + .max_sets(1); + let descriptor_pool = base .device .create_descriptor_pool(&descriptor_pool_info, None) .unwrap(); let desc_layout_bindings = [ vk::DescriptorSetLayoutBinding { - binding: 0, descriptor_type: vk::DescriptorType::UNIFORM_BUFFER, descriptor_count: 1, stage_flags: vk::ShaderStageFlags::FRAGMENT, - p_immutable_samplers: ptr::null(), + ..Default::default() }, vk::DescriptorSetLayoutBinding { binding: 1, descriptor_type: vk::DescriptorType::COMBINED_IMAGE_SAMPLER, descriptor_count: 1, stage_flags: vk::ShaderStageFlags::FRAGMENT, - p_immutable_samplers: ptr::null(), + ..Default::default() }, ]; - let descriptor_info = vk::DescriptorSetLayoutCreateInfo { - s_type: vk::StructureType::DESCRIPTOR_SET_LAYOUT_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - binding_count: desc_layout_bindings.len() as u32, - p_bindings: desc_layout_bindings.as_ptr(), - }; + let descriptor_info = + vk::DescriptorSetLayoutCreateInfo::builder().bindings(&desc_layout_bindings); let desc_set_layouts = [base .device .create_descriptor_set_layout(&descriptor_info, None) .unwrap()]; - let desc_alloc_info = vk::DescriptorSetAllocateInfo { - s_type: vk::StructureType::DESCRIPTOR_SET_ALLOCATE_INFO, - p_next: ptr::null(), - descriptor_pool: descriptor_pool, - descriptor_set_count: desc_set_layouts.len() as u32, - p_set_layouts: desc_set_layouts.as_ptr(), - }; + + let desc_alloc_info = vk::DescriptorSetAllocateInfo::builder() + .descriptor_pool(descriptor_pool) + .set_layouts(&desc_set_layouts); let descriptor_sets = base .device .allocate_descriptor_sets(&desc_alloc_info) @@ -610,63 +523,43 @@ fn main() { }; let tex_descriptor = vk::DescriptorImageInfo { - image_layout: vk::ImageLayout::GENERAL, + image_layout: vk::ImageLayout::SHADER_READ_ONLY_OPTIMAL, image_view: tex_image_view, sampler: sampler, }; let write_desc_sets = [ vk::WriteDescriptorSet { - s_type: vk::StructureType::WRITE_DESCRIPTOR_SET, - p_next: ptr::null(), dst_set: descriptor_sets[0], - dst_binding: 0, - dst_array_element: 0, descriptor_count: 1, descriptor_type: vk::DescriptorType::UNIFORM_BUFFER, - p_image_info: ptr::null(), p_buffer_info: &uniform_color_buffer_descriptor, - p_texel_buffer_view: ptr::null(), + ..Default::default() }, vk::WriteDescriptorSet { - s_type: vk::StructureType::WRITE_DESCRIPTOR_SET, - p_next: ptr::null(), dst_set: descriptor_sets[0], dst_binding: 1, - dst_array_element: 0, descriptor_count: 1, descriptor_type: vk::DescriptorType::COMBINED_IMAGE_SAMPLER, p_image_info: &tex_descriptor, - p_buffer_info: ptr::null(), - p_texel_buffer_view: ptr::null(), + ..Default::default() }, ]; base.device.update_descriptor_sets(&write_desc_sets, &[]); - let vertex_spv_file = + let mut vertex_spv_file = File::open(Path::new("shader/texture/vert.spv")).expect("Could not find vert.spv."); - let frag_spv_file = + let mut frag_spv_file = File::open(Path::new("shader/texture/frag.spv")).expect("Could not find frag.spv."); - let vertex_bytes: Vec = vertex_spv_file - .bytes() - .filter_map(|byte| byte.ok()) - .collect(); - let vertex_shader_info = vk::ShaderModuleCreateInfo { - s_type: vk::StructureType::SHADER_MODULE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - code_size: vertex_bytes.len(), - p_code: vertex_bytes.as_ptr() as *const u32, - }; - let frag_bytes: Vec = frag_spv_file.bytes().filter_map(|byte| byte.ok()).collect(); - let frag_shader_info = vk::ShaderModuleCreateInfo { - s_type: vk::StructureType::SHADER_MODULE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - code_size: frag_bytes.len(), - p_code: frag_bytes.as_ptr() as *const u32, - }; + let vertex_code = + read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file"); + let vertex_shader_info = vk::ShaderModuleCreateInfo::builder().code(&vertex_code); + + let frag_code = + read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file"); + let frag_shader_info = vk::ShaderModuleCreateInfo::builder().code(&frag_code); + let vertex_shader_module = base .device .create_shader_module(&vertex_shader_info, None) @@ -677,15 +570,8 @@ fn main() { .create_shader_module(&frag_shader_info, None) .expect("Fragment shader module error"); - let layout_create_info = vk::PipelineLayoutCreateInfo { - s_type: vk::StructureType::PIPELINE_LAYOUT_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - set_layout_count: desc_set_layouts.len() as u32, - p_set_layouts: desc_set_layouts.as_ptr(), - push_constant_range_count: 0, - p_push_constant_ranges: ptr::null(), - }; + let layout_create_info = + vk::PipelineLayoutCreateInfo::builder().set_layouts(&desc_set_layouts); let pipeline_layout = base .device @@ -695,22 +581,16 @@ fn main() { let shader_entry_name = CString::new("main").unwrap(); let shader_stage_create_infos = [ vk::PipelineShaderStageCreateInfo { - s_type: vk::StructureType::PIPELINE_SHADER_STAGE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), module: vertex_shader_module, p_name: shader_entry_name.as_ptr(), - p_specialization_info: ptr::null(), stage: vk::ShaderStageFlags::VERTEX, + ..Default::default() }, vk::PipelineShaderStageCreateInfo { - s_type: vk::StructureType::PIPELINE_SHADER_STAGE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), module: fragment_shader_module, p_name: shader_entry_name.as_ptr(), - p_specialization_info: ptr::null(), stage: vk::ShaderStageFlags::FRAGMENT, + ..Default::default() }, ]; let vertex_input_binding_descriptions = [vk::VertexInputBindingDescription { @@ -732,21 +612,13 @@ fn main() { offset: offset_of!(Vertex, uv) as u32, }, ]; - let vertex_input_state_info = vk::PipelineVertexInputStateCreateInfo { - s_type: vk::StructureType::PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - vertex_attribute_description_count: vertex_input_attribute_descriptions.len() as u32, - p_vertex_attribute_descriptions: vertex_input_attribute_descriptions.as_ptr(), - vertex_binding_description_count: vertex_input_binding_descriptions.len() as u32, - p_vertex_binding_descriptions: vertex_input_binding_descriptions.as_ptr(), - }; + let vertex_input_state_info = vk::PipelineVertexInputStateCreateInfo::builder() + .vertex_attribute_descriptions(&vertex_input_attribute_descriptions) + .vertex_binding_descriptions(&vertex_input_binding_descriptions); + let vertex_input_assembly_state_info = vk::PipelineInputAssemblyStateCreateInfo { - s_type: vk::StructureType::PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, - flags: Default::default(), - p_next: ptr::null(), - primitive_restart_enable: 0, topology: vk::PrimitiveTopology::TRIANGLE_LIST, + ..Default::default() }; let viewports = [vk::Viewport { x: 0.0, @@ -757,67 +629,40 @@ fn main() { max_depth: 1.0, }]; let scissors = [vk::Rect2D { - offset: vk::Offset2D { x: 0, y: 0 }, extent: base.surface_resolution.clone(), + ..Default::default() }]; - let viewport_state_info = vk::PipelineViewportStateCreateInfo { - s_type: vk::StructureType::PIPELINE_VIEWPORT_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - scissor_count: scissors.len() as u32, - p_scissors: scissors.as_ptr(), - viewport_count: viewports.len() as u32, - p_viewports: viewports.as_ptr(), - }; + let viewport_state_info = vk::PipelineViewportStateCreateInfo::builder() + .scissors(&scissors) + .viewports(&viewports); + let rasterization_info = vk::PipelineRasterizationStateCreateInfo { - s_type: vk::StructureType::PIPELINE_RASTERIZATION_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - cull_mode: vk::CullModeFlags::NONE, - depth_bias_clamp: 0.0, - depth_bias_constant_factor: 0.0, - depth_bias_enable: 0, - depth_bias_slope_factor: 0.0, - depth_clamp_enable: 0, front_face: vk::FrontFace::COUNTER_CLOCKWISE, line_width: 1.0, polygon_mode: vk::PolygonMode::FILL, - rasterizer_discard_enable: 0, - }; - let multisample_state_info = vk::PipelineMultisampleStateCreateInfo { - s_type: vk::StructureType::PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, - flags: Default::default(), - p_next: ptr::null(), - rasterization_samples: vk::SampleCountFlags::TYPE_1, - sample_shading_enable: 0, - min_sample_shading: 0.0, - p_sample_mask: ptr::null(), - alpha_to_one_enable: 0, - alpha_to_coverage_enable: 0, + ..Default::default() }; + + let multisample_state_info = vk::PipelineMultisampleStateCreateInfo::builder() + .rasterization_samples(vk::SampleCountFlags::TYPE_1); + let noop_stencil_state = vk::StencilOpState { fail_op: vk::StencilOp::KEEP, pass_op: vk::StencilOp::KEEP, depth_fail_op: vk::StencilOp::KEEP, compare_op: vk::CompareOp::ALWAYS, - compare_mask: 0, - write_mask: 0, - reference: 0, + ..Default::default() }; let depth_state_info = vk::PipelineDepthStencilStateCreateInfo { - s_type: vk::StructureType::PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), depth_test_enable: 1, depth_write_enable: 1, depth_compare_op: vk::CompareOp::LESS_OR_EQUAL, - depth_bounds_test_enable: 0, - stencil_test_enable: 0, front: noop_stencil_state.clone(), back: noop_stencil_state.clone(), max_depth_bounds: 1.0, - min_depth_bounds: 0.0, + ..Default::default() }; + let color_blend_attachment_states = [vk::PipelineColorBlendAttachmentState { blend_enable: 0, src_color_blend_factor: vk::BlendFactor::SRC_COLOR, @@ -828,48 +673,34 @@ fn main() { alpha_blend_op: vk::BlendOp::ADD, color_write_mask: vk::ColorComponentFlags::all(), }]; - let color_blend_state = vk::PipelineColorBlendStateCreateInfo { - s_type: vk::StructureType::PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - logic_op_enable: 0, - logic_op: vk::LogicOp::CLEAR, - attachment_count: color_blend_attachment_states.len() as u32, - p_attachments: color_blend_attachment_states.as_ptr(), - blend_constants: [0.0, 0.0, 0.0, 0.0], - }; + let color_blend_state = vk::PipelineColorBlendStateCreateInfo::builder() + .logic_op(vk::LogicOp::CLEAR) + .attachments(&color_blend_attachment_states); + let dynamic_state = [vk::DynamicState::VIEWPORT, vk::DynamicState::SCISSOR]; - let dynamic_state_info = vk::PipelineDynamicStateCreateInfo { - s_type: vk::StructureType::PIPELINE_DYNAMIC_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - dynamic_state_count: dynamic_state.len() as u32, - p_dynamic_states: dynamic_state.as_ptr(), - }; - let graphic_pipeline_info = vk::GraphicsPipelineCreateInfo { - s_type: vk::StructureType::GRAPHICS_PIPELINE_CREATE_INFO, - p_next: ptr::null(), - flags: vk::PipelineCreateFlags::empty(), - stage_count: shader_stage_create_infos.len() as u32, - p_stages: shader_stage_create_infos.as_ptr(), - p_vertex_input_state: &vertex_input_state_info, - p_input_assembly_state: &vertex_input_assembly_state_info, - p_tessellation_state: ptr::null(), - p_viewport_state: &viewport_state_info, - p_rasterization_state: &rasterization_info, - p_multisample_state: &multisample_state_info, - p_depth_stencil_state: &depth_state_info, - p_color_blend_state: &color_blend_state, - p_dynamic_state: &dynamic_state_info, - layout: pipeline_layout, - render_pass: renderpass, - subpass: 0, - base_pipeline_handle: vk::Pipeline::null(), - base_pipeline_index: 0, - }; + let dynamic_state_info = + vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state); + + let graphic_pipeline_infos = vk::GraphicsPipelineCreateInfo::builder() + .stages(&shader_stage_create_infos) + .vertex_input_state(&vertex_input_state_info) + .input_assembly_state(&vertex_input_assembly_state_info) + .viewport_state(&viewport_state_info) + .rasterization_state(&rasterization_info) + .multisample_state(&multisample_state_info) + .depth_stencil_state(&depth_state_info) + .color_blend_state(&color_blend_state) + .dynamic_state(&dynamic_state_info) + .layout(pipeline_layout) + .render_pass(renderpass); + let graphics_pipelines = base .device - .create_graphics_pipelines(vk::PipelineCache::null(), &[graphic_pipeline_info], None) + .create_graphics_pipelines( + vk::PipelineCache::null(), + &[graphic_pipeline_infos.build()], + None, + ) .unwrap(); let graphic_pipeline = graphics_pipelines[0]; @@ -877,7 +708,7 @@ fn main() { base.render_loop(|| { let (present_index, _) = base .swapchain_loader - .acquire_next_image_khr( + .acquire_next_image( base.swapchain, std::u64::MAX, base.present_complete_semaphore, @@ -898,18 +729,15 @@ fn main() { }, ]; - let render_pass_begin_info = vk::RenderPassBeginInfo { - s_type: vk::StructureType::RENDER_PASS_BEGIN_INFO, - p_next: ptr::null(), - render_pass: renderpass, - framebuffer: framebuffers[present_index as usize], - render_area: vk::Rect2D { + let render_pass_begin_info = vk::RenderPassBeginInfo::builder() + .render_pass(renderpass) + .framebuffer(framebuffers[present_index as usize]) + .render_area(vk::Rect2D { offset: vk::Offset2D { x: 0, y: 0 }, extent: base.surface_resolution.clone(), - }, - clear_value_count: clear_values.len() as u32, - p_clear_values: clear_values.as_ptr(), - }; + }) + .clear_values(&clear_values); + record_submit_commandbuffer( &base.device, base.draw_command_buffer, @@ -965,17 +793,15 @@ fn main() { ); //let mut present_info_err = mem::uninitialized(); let present_info = vk::PresentInfoKHR { - s_type: vk::StructureType::PRESENT_INFO_KHR, - p_next: ptr::null(), wait_semaphore_count: 1, p_wait_semaphores: &base.rendering_complete_semaphore, swapchain_count: 1, p_swapchains: &base.swapchain, p_image_indices: &present_index, - p_results: ptr::null_mut(), + ..Default::default() }; base.swapchain_loader - .queue_present_khr(base.present_queue, &present_info) + .queue_present(base.present_queue, &present_info) .unwrap(); }); base.device.device_wait_idle().unwrap(); diff --git a/examples/src/bin/triangle.rs b/examples/src/bin/triangle.rs index f213b6e..267c315 100644 --- a/examples/src/bin/triangle.rs +++ b/examples/src/bin/triangle.rs @@ -7,11 +7,9 @@ use examples::*; use std::default::Default; use std::ffi::CString; use std::fs::File; -use std::io::Read; use std::mem; use std::mem::align_of; use std::path::Path; -use std::ptr; #[derive(Clone, Debug, Copy)] struct Vertex { @@ -25,117 +23,91 @@ fn main() { let renderpass_attachments = [ vk::AttachmentDescription { format: base.surface_format.format, - flags: vk::AttachmentDescriptionFlags::empty(), samples: vk::SampleCountFlags::TYPE_1, load_op: vk::AttachmentLoadOp::CLEAR, store_op: vk::AttachmentStoreOp::STORE, - stencil_load_op: vk::AttachmentLoadOp::DONT_CARE, - stencil_store_op: vk::AttachmentStoreOp::DONT_CARE, - initial_layout: vk::ImageLayout::UNDEFINED, final_layout: vk::ImageLayout::PRESENT_SRC_KHR, + ..Default::default() }, vk::AttachmentDescription { format: vk::Format::D16_UNORM, - flags: vk::AttachmentDescriptionFlags::empty(), samples: vk::SampleCountFlags::TYPE_1, load_op: vk::AttachmentLoadOp::CLEAR, - store_op: vk::AttachmentStoreOp::DONT_CARE, - stencil_load_op: vk::AttachmentLoadOp::DONT_CARE, - stencil_store_op: vk::AttachmentStoreOp::DONT_CARE, initial_layout: vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL, final_layout: vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL, + ..Default::default() }, ]; - let color_attachment_ref = vk::AttachmentReference { + let color_attachment_refs = [vk::AttachmentReference { attachment: 0, layout: vk::ImageLayout::COLOR_ATTACHMENT_OPTIMAL, - }; + }]; let depth_attachment_ref = vk::AttachmentReference { attachment: 1, layout: vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL, }; - let dependency = vk::SubpassDependency { - dependency_flags: Default::default(), + let dependencies = [vk::SubpassDependency { src_subpass: vk::SUBPASS_EXTERNAL, - dst_subpass: Default::default(), src_stage_mask: vk::PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT, - src_access_mask: Default::default(), dst_access_mask: vk::AccessFlags::COLOR_ATTACHMENT_READ | vk::AccessFlags::COLOR_ATTACHMENT_WRITE, dst_stage_mask: vk::PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT, - }; - let subpass = vk::SubpassDescription { - color_attachment_count: 1, - p_color_attachments: &color_attachment_ref, - p_depth_stencil_attachment: &depth_attachment_ref, - flags: Default::default(), - pipeline_bind_point: vk::PipelineBindPoint::GRAPHICS, - input_attachment_count: 0, - p_input_attachments: ptr::null(), - p_resolve_attachments: ptr::null(), - preserve_attachment_count: 0, - p_preserve_attachments: ptr::null(), - }; - let renderpass_create_info = vk::RenderPassCreateInfo { - s_type: vk::StructureType::RENDER_PASS_CREATE_INFO, - flags: Default::default(), - p_next: ptr::null(), - attachment_count: renderpass_attachments.len() as u32, - p_attachments: renderpass_attachments.as_ptr(), - subpass_count: 1, - p_subpasses: &subpass, - dependency_count: 1, - p_dependencies: &dependency, - }; + ..Default::default() + }]; + + let subpasses = [vk::SubpassDescription::builder() + .color_attachments(&color_attachment_refs) + .depth_stencil_attachment(&depth_attachment_ref) + .pipeline_bind_point(vk::PipelineBindPoint::GRAPHICS) + .build()]; + + let renderpass_create_info = vk::RenderPassCreateInfo::builder() + .attachments(&renderpass_attachments) + .subpasses(&subpasses) + .dependencies(&dependencies); + let renderpass = base .device .create_render_pass(&renderpass_create_info, None) .unwrap(); + let framebuffers: Vec = base .present_image_views .iter() .map(|&present_image_view| { let framebuffer_attachments = [present_image_view, base.depth_image_view]; - let frame_buffer_create_info = vk::FramebufferCreateInfo { - s_type: vk::StructureType::FRAMEBUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - render_pass: renderpass, - attachment_count: framebuffer_attachments.len() as u32, - p_attachments: framebuffer_attachments.as_ptr(), - width: base.surface_resolution.width, - height: base.surface_resolution.height, - layers: 1, - }; + let frame_buffer_create_info = vk::FramebufferCreateInfo::builder() + .render_pass(renderpass) + .attachments(&framebuffer_attachments) + .width(base.surface_resolution.width) + .height(base.surface_resolution.height) + .layers(1); + base.device .create_framebuffer(&frame_buffer_create_info, None) .unwrap() }) .collect(); + let index_buffer_data = [0u32, 1, 2]; - let index_buffer_info = vk::BufferCreateInfo { - s_type: vk::StructureType::BUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: vk::BufferCreateFlags::empty(), - size: std::mem::size_of_val(&index_buffer_data) as u64, - usage: vk::BufferUsageFlags::INDEX_BUFFER, - sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), - }; + let index_buffer_info = vk::BufferCreateInfo::builder() + .size(std::mem::size_of_val(&index_buffer_data) as u64) + .usage(vk::BufferUsageFlags::INDEX_BUFFER) + .sharing_mode(vk::SharingMode::EXCLUSIVE); + let index_buffer = base.device.create_buffer(&index_buffer_info, None).unwrap(); let index_buffer_memory_req = base.device.get_buffer_memory_requirements(index_buffer); - let index_buffer_memory_index = - find_memorytype_index( - &index_buffer_memory_req, - &base.device_memory_properties, - vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the index buffer."); + let index_buffer_memory_index = find_memorytype_index( + &index_buffer_memory_req, + &base.device_memory_properties, + vk::MemoryPropertyFlags::HOST_VISIBLE, + ) + .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(), allocation_size: index_buffer_memory_req.size, memory_type_index: index_buffer_memory_index, + ..Default::default() }; let index_buffer_memory = base .device @@ -162,39 +134,39 @@ fn main() { .unwrap(); let vertex_input_buffer_info = vk::BufferCreateInfo { - s_type: vk::StructureType::BUFFER_CREATE_INFO, - p_next: ptr::null(), - flags: vk::BufferCreateFlags::empty(), size: 3 * std::mem::size_of::() as u64, usage: vk::BufferUsageFlags::VERTEX_BUFFER, sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), + ..Default::default() }; + let vertex_input_buffer = base .device .create_buffer(&vertex_input_buffer_info, None) .unwrap(); + let vertex_input_buffer_memory_req = base .device .get_buffer_memory_requirements(vertex_input_buffer); - let vertex_input_buffer_memory_index = - find_memorytype_index( - &vertex_input_buffer_memory_req, - &base.device_memory_properties, - vk::MemoryPropertyFlags::HOST_VISIBLE, - ).expect("Unable to find suitable memorytype for the vertex buffer."); + + let vertex_input_buffer_memory_index = find_memorytype_index( + &vertex_input_buffer_memory_req, + &base.device_memory_properties, + vk::MemoryPropertyFlags::HOST_VISIBLE, + ) + .expect("Unable to find suitable memorytype for the vertex buffer."); let vertex_buffer_allocate_info = vk::MemoryAllocateInfo { - s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, - p_next: ptr::null(), allocation_size: vertex_input_buffer_memory_req.size, memory_type_index: vertex_input_buffer_memory_index, + ..Default::default() }; + let vertex_input_buffer_memory = base .device .allocate_memory(&vertex_buffer_allocate_info, None) .unwrap(); + let vertices = [ Vertex { pos: [-1.0, 1.0, 0.0, 1.0], @@ -209,6 +181,7 @@ fn main() { color: [1.0, 0.0, 0.0, 1.0], }, ]; + let vert_ptr = base .device .map_memory( @@ -218,6 +191,7 @@ fn main() { vk::MemoryMapFlags::empty(), ) .unwrap(); + let mut vert_align = Align::new( vert_ptr, align_of::() as u64, @@ -228,30 +202,19 @@ fn main() { base.device .bind_buffer_memory(vertex_input_buffer, vertex_input_buffer_memory, 0) .unwrap(); - let vertex_spv_file = + let mut vertex_spv_file = File::open(Path::new("shader/triangle/vert.spv")).expect("Could not find vert.spv."); - let frag_spv_file = + let mut frag_spv_file = File::open(Path::new("shader/triangle/frag.spv")).expect("Could not find frag.spv."); - let vertex_bytes: Vec = vertex_spv_file - .bytes() - .filter_map(|byte| byte.ok()) - .collect(); - let vertex_shader_info = vk::ShaderModuleCreateInfo { - s_type: vk::StructureType::SHADER_MODULE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - code_size: vertex_bytes.len(), - p_code: vertex_bytes.as_ptr() as *const u32, - }; - let frag_bytes: Vec = frag_spv_file.bytes().filter_map(|byte| byte.ok()).collect(); - let frag_shader_info = vk::ShaderModuleCreateInfo { - s_type: vk::StructureType::SHADER_MODULE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - code_size: frag_bytes.len(), - p_code: frag_bytes.as_ptr() as *const u32, - }; + let vertex_code = + read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file"); + let vertex_shader_info = vk::ShaderModuleCreateInfo::builder().code(&vertex_code); + + let frag_code = + read_spv(&mut frag_spv_file).expect("Failed to read fragment shader spv file"); + let frag_shader_info = vk::ShaderModuleCreateInfo::builder().code(&frag_code); + let vertex_shader_module = base .device .create_shader_module(&vertex_shader_info, None) @@ -262,15 +225,7 @@ fn main() { .create_shader_module(&frag_shader_info, None) .expect("Fragment shader module error"); - let layout_create_info = vk::PipelineLayoutCreateInfo { - s_type: vk::StructureType::PIPELINE_LAYOUT_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - set_layout_count: 0, - p_set_layouts: ptr::null(), - push_constant_range_count: 0, - p_push_constant_ranges: ptr::null(), - }; + let layout_create_info = vk::PipelineLayoutCreateInfo::default(); let pipeline_layout = base .device @@ -280,22 +235,17 @@ fn main() { let shader_entry_name = CString::new("main").unwrap(); let shader_stage_create_infos = [ vk::PipelineShaderStageCreateInfo { - s_type: vk::StructureType::PIPELINE_SHADER_STAGE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), module: vertex_shader_module, p_name: shader_entry_name.as_ptr(), - p_specialization_info: ptr::null(), stage: vk::ShaderStageFlags::VERTEX, + ..Default::default() }, vk::PipelineShaderStageCreateInfo { s_type: vk::StructureType::PIPELINE_SHADER_STAGE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), module: fragment_shader_module, p_name: shader_entry_name.as_ptr(), - p_specialization_info: ptr::null(), stage: vk::ShaderStageFlags::FRAGMENT, + ..Default::default() }, ]; let vertex_input_binding_descriptions = [vk::VertexInputBindingDescription { @@ -317,21 +267,17 @@ fn main() { offset: offset_of!(Vertex, color) as u32, }, ]; + let vertex_input_state_info = vk::PipelineVertexInputStateCreateInfo { - s_type: vk::StructureType::PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), vertex_attribute_description_count: vertex_input_attribute_descriptions.len() as u32, p_vertex_attribute_descriptions: vertex_input_attribute_descriptions.as_ptr(), vertex_binding_description_count: vertex_input_binding_descriptions.len() as u32, p_vertex_binding_descriptions: vertex_input_binding_descriptions.as_ptr(), + ..Default::default() }; let vertex_input_assembly_state_info = vk::PipelineInputAssemblyStateCreateInfo { - s_type: vk::StructureType::PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, - flags: Default::default(), - p_next: ptr::null(), - primitive_restart_enable: 0, topology: vk::PrimitiveTopology::TRIANGLE_LIST, + ..Default::default() }; let viewports = [vk::Viewport { x: 0.0, @@ -345,63 +291,35 @@ fn main() { offset: vk::Offset2D { x: 0, y: 0 }, extent: base.surface_resolution.clone(), }]; - let viewport_state_info = vk::PipelineViewportStateCreateInfo { - s_type: vk::StructureType::PIPELINE_VIEWPORT_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - scissor_count: scissors.len() as u32, - p_scissors: scissors.as_ptr(), - viewport_count: viewports.len() as u32, - p_viewports: viewports.as_ptr(), - }; + let viewport_state_info = vk::PipelineViewportStateCreateInfo::builder() + .scissors(&scissors) + .viewports(&viewports); + let rasterization_info = vk::PipelineRasterizationStateCreateInfo { - s_type: vk::StructureType::PIPELINE_RASTERIZATION_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - cull_mode: vk::CullModeFlags::NONE, - depth_bias_clamp: 0.0, - depth_bias_constant_factor: 0.0, - depth_bias_enable: 0, - depth_bias_slope_factor: 0.0, - depth_clamp_enable: 0, front_face: vk::FrontFace::COUNTER_CLOCKWISE, line_width: 1.0, polygon_mode: vk::PolygonMode::FILL, - rasterizer_discard_enable: 0, + ..Default::default() }; let multisample_state_info = vk::PipelineMultisampleStateCreateInfo { - s_type: vk::StructureType::PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, - flags: Default::default(), - p_next: ptr::null(), rasterization_samples: vk::SampleCountFlags::TYPE_1, - sample_shading_enable: 0, - min_sample_shading: 0.0, - p_sample_mask: ptr::null(), - alpha_to_one_enable: 0, - alpha_to_coverage_enable: 0, + ..Default::default() }; let noop_stencil_state = vk::StencilOpState { fail_op: vk::StencilOp::KEEP, pass_op: vk::StencilOp::KEEP, depth_fail_op: vk::StencilOp::KEEP, compare_op: vk::CompareOp::ALWAYS, - compare_mask: 0, - write_mask: 0, - reference: 0, + ..Default::default() }; let depth_state_info = vk::PipelineDepthStencilStateCreateInfo { - s_type: vk::StructureType::PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), depth_test_enable: 1, depth_write_enable: 1, depth_compare_op: vk::CompareOp::LESS_OR_EQUAL, - depth_bounds_test_enable: 0, - stencil_test_enable: 0, front: noop_stencil_state.clone(), back: noop_stencil_state.clone(), max_depth_bounds: 1.0, - min_depth_bounds: 0.0, + ..Default::default() }; let color_blend_attachment_states = [vk::PipelineColorBlendAttachmentState { blend_enable: 0, @@ -413,48 +331,34 @@ fn main() { alpha_blend_op: vk::BlendOp::ADD, color_write_mask: vk::ColorComponentFlags::all(), }]; - let color_blend_state = vk::PipelineColorBlendStateCreateInfo { - s_type: vk::StructureType::PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - logic_op_enable: 0, - logic_op: vk::LogicOp::CLEAR, - attachment_count: color_blend_attachment_states.len() as u32, - p_attachments: color_blend_attachment_states.as_ptr(), - blend_constants: [0.0, 0.0, 0.0, 0.0], - }; + let color_blend_state = vk::PipelineColorBlendStateCreateInfo::builder() + .logic_op(vk::LogicOp::CLEAR) + .attachments(&color_blend_attachment_states); + let dynamic_state = [vk::DynamicState::VIEWPORT, vk::DynamicState::SCISSOR]; - let dynamic_state_info = vk::PipelineDynamicStateCreateInfo { - s_type: vk::StructureType::PIPELINE_DYNAMIC_STATE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - dynamic_state_count: dynamic_state.len() as u32, - p_dynamic_states: dynamic_state.as_ptr(), - }; - let graphic_pipeline_info = vk::GraphicsPipelineCreateInfo { - s_type: vk::StructureType::GRAPHICS_PIPELINE_CREATE_INFO, - p_next: ptr::null(), - flags: vk::PipelineCreateFlags::empty(), - stage_count: shader_stage_create_infos.len() as u32, - p_stages: shader_stage_create_infos.as_ptr(), - p_vertex_input_state: &vertex_input_state_info, - p_input_assembly_state: &vertex_input_assembly_state_info, - p_tessellation_state: ptr::null(), - p_viewport_state: &viewport_state_info, - p_rasterization_state: &rasterization_info, - p_multisample_state: &multisample_state_info, - p_depth_stencil_state: &depth_state_info, - p_color_blend_state: &color_blend_state, - p_dynamic_state: &dynamic_state_info, - layout: pipeline_layout, - render_pass: renderpass, - subpass: 0, - base_pipeline_handle: vk::Pipeline::null(), - base_pipeline_index: 0, - }; + let dynamic_state_info = + vk::PipelineDynamicStateCreateInfo::builder().dynamic_states(&dynamic_state); + + let graphic_pipeline_info = vk::GraphicsPipelineCreateInfo::builder() + .stages(&shader_stage_create_infos) + .vertex_input_state(&vertex_input_state_info) + .input_assembly_state(&vertex_input_assembly_state_info) + .viewport_state(&viewport_state_info) + .rasterization_state(&rasterization_info) + .multisample_state(&multisample_state_info) + .depth_stencil_state(&depth_state_info) + .color_blend_state(&color_blend_state) + .dynamic_state(&dynamic_state_info) + .layout(pipeline_layout) + .render_pass(renderpass); + let graphics_pipelines = base .device - .create_graphics_pipelines(vk::PipelineCache::null(), &[graphic_pipeline_info], None) + .create_graphics_pipelines( + vk::PipelineCache::null(), + &[graphic_pipeline_info.build()], + None, + ) .expect("Unable to create graphics pipeline"); let graphic_pipeline = graphics_pipelines[0]; @@ -462,7 +366,7 @@ fn main() { base.render_loop(|| { let (present_index, _) = base .swapchain_loader - .acquire_next_image_khr( + .acquire_next_image( base.swapchain, std::u64::MAX, base.present_complete_semaphore, @@ -483,18 +387,15 @@ fn main() { }, ]; - let render_pass_begin_info = vk::RenderPassBeginInfo { - s_type: vk::StructureType::RENDER_PASS_BEGIN_INFO, - p_next: ptr::null(), - render_pass: renderpass, - framebuffer: framebuffers[present_index as usize], - render_area: vk::Rect2D { + let render_pass_begin_info = vk::RenderPassBeginInfo::builder() + .render_pass(renderpass) + .framebuffer(framebuffers[present_index as usize]) + .render_area(vk::Rect2D { offset: vk::Offset2D { x: 0, y: 0 }, extent: base.surface_resolution.clone(), - }, - clear_value_count: clear_values.len() as u32, - p_clear_values: clear_values.as_ptr(), - }; + }) + .clear_values(&clear_values); + record_submit_commandbuffer( &base.device, base.draw_command_buffer, @@ -541,18 +442,16 @@ fn main() { }, ); //let mut present_info_err = mem::uninitialized(); - let present_info = vk::PresentInfoKHR { - s_type: vk::StructureType::PRESENT_INFO_KHR, - p_next: ptr::null(), - wait_semaphore_count: 1, - p_wait_semaphores: &base.rendering_complete_semaphore, - swapchain_count: 1, - p_swapchains: &base.swapchain, - p_image_indices: &present_index, - p_results: ptr::null_mut(), - }; + let wait_semaphors = [base.rendering_complete_semaphore]; + let swapchains = [base.swapchain]; + let image_indices = [present_index]; + let present_info = vk::PresentInfoKHR::builder() + .wait_semaphores(&wait_semaphors) // &base.rendering_complete_semaphore) + .swapchains(&swapchains) + .image_indices(&image_indices); + base.swapchain_loader - .queue_present_khr(base.present_queue, &present_info) + .queue_present(base.present_queue, &present_info) .unwrap(); }); diff --git a/examples/src/lib.rs b/examples/src/lib.rs index 91b7c1b..b2463b1 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs @@ -2,15 +2,16 @@ extern crate ash; #[cfg(target_os = "windows")] extern crate winapi; + extern crate winit; -#[cfg(target_os = "macos")] -extern crate objc; #[cfg(target_os = "macos")] extern crate cocoa; #[cfg(target_os = "macos")] extern crate metal_rs as metal; #[cfg(target_os = "macos")] +extern crate objc; +#[cfg(target_os = "macos")] use cocoa::appkit::{NSView, NSWindow}; #[cfg(target_os = "macos")] use cocoa::base::id as cocoa_id; @@ -21,24 +22,24 @@ use objc::runtime::YES; #[cfg(target_os = "macos")] use std::mem; -use ash::vk; -use ash::Device; -use ash::Entry; -use ash::Instance; -pub use ash::version::{DeviceV1_0, EntryV1_0, InstanceV1_0}; -use ash::extensions::{DebugReport, Surface, Swapchain}; -#[cfg(target_os = "windows")] -use ash::extensions::Win32Surface; #[cfg(all(unix, not(target_os = "android"), not(target_os = "macos")))] -use ash::extensions::XlibSurface; +use ash::extensions::khr::XlibSurface; +use ash::extensions::{ + ext::DebugReport, + khr::{Surface, Swapchain}, +}; + +#[cfg(target_os = "windows")] +use ash::extensions::khr::Win32Surface; #[cfg(target_os = "macos")] -use ash::extensions::MacOSSurface; +use ash::extensions::mvk::MacOSSurface; +pub use ash::version::{DeviceV1_0, EntryV1_0, InstanceV1_0}; +use ash::{vk, Device, Entry, Instance}; use std::cell::RefCell; use std::default::Default; use std::ffi::{CStr, CString}; use std::ops::Drop; use std::os::raw::{c_char, c_void}; -use std::ptr; // Simple offset_of macro akin to C++ offsetof #[macro_export] @@ -66,13 +67,12 @@ pub fn record_submit_commandbuffer( use winit::os::unix::WindowExt; let x11_display = window.get_xlib_display().unwrap(); let x11_window = window.get_xlib_window().unwrap(); - let x11_create_info = vk::XlibSurfaceCreateInfoKHR { - s_type: vk::StructureType::XLIB_SURFACE_CREATE_INFO_KHR, - p_next: ptr::null(), - flags: Default::default(), - window: x11_window as vk::Window, - dpy: x11_display as *mut vk::Display, - }; - let xlib_surface_loader = - XlibSurface::new(entry, instance); - xlib_surface_loader.create_xlib_surface_khr(&x11_create_info, None) + let x11_create_info = vk::XlibSurfaceCreateInfoKHR::builder() + .window(x11_window) + .dpy(x11_display as *mut vk::Display); + + let xlib_surface_loader = XlibSurface::new(entry, instance); + xlib_surface_loader.create_xlib_surface(&x11_create_info, None) } #[cfg(target_os = "macos")] @@ -136,6 +126,7 @@ unsafe fn create_surface( instance: &I, window: &winit::Window, ) -> Result { + use std::ptr; use winit::os::macos::WindowExt; let wnd: cocoa_id = mem::transmute(window.get_nswindow()); @@ -153,15 +144,14 @@ unsafe fn create_surface( view.setWantsLayer(YES); let create_info = vk::MacOSSurfaceCreateInfoMVK { - s_type: vk::StructureType::MacOSSurfaceCreateInfoMvk, + s_type: vk::StructureType::MACOS_SURFACE_CREATE_INFO_M, p_next: ptr::null(), flags: Default::default(), - p_view: window.get_nsview() as *const vk::types::c_void + p_view: window.get_nsview() as *const c_void, }; - let macos_surface_loader = - MacOSSurface::new(entry, instance).expect("Unable to load macOS surface"); - macos_surface_loader.create_macos_surface_mvk(&create_info, None) + let macos_surface_loader = MacOSSurface::new(entry, instance); + macos_surface_loader.create_mac_os_surface_mvk(&create_info, None) } #[cfg(target_os = "windows")] @@ -170,6 +160,7 @@ unsafe fn create_surface( instance: &I, window: &winit::Window, ) -> Result { + use std::ptr; use winapi::shared::windef::HWND; use winapi::um::libloaderapi::GetModuleHandleW; use winit::os::windows::WindowExt; @@ -183,9 +174,8 @@ unsafe fn create_surface( hinstance: hinstance, hwnd: hwnd as *const c_void, }; - let win32_surface_loader = - Win32Surface::new(entry, instance); - win32_surface_loader.create_win32_surface_khr(&win32_create_info, None) + let win32_surface_loader = Win32Surface::new(entry, instance); + win32_surface_loader.create_win32_surface(&win32_create_info, None) } #[cfg(all(unix, not(target_os = "android"), not(target_os = "macos")))] @@ -332,11 +322,11 @@ impl ExampleBase { .with_dimensions(winit::dpi::LogicalSize::new( window_width as f64, window_height as f64, - )).build(&events_loop) + )) + .build(&events_loop) .unwrap(); let entry = Entry::new().unwrap(); let app_name = CString::new("VulkanTriangle").unwrap(); - let raw_name = app_name.as_ptr(); let layer_names = [CString::new("VK_LAYER_LUNARG_standard_validation").unwrap()]; let layers_names_raw: Vec<*const i8> = layer_names @@ -345,48 +335,40 @@ impl ExampleBase { .collect(); let extension_names_raw = extension_names(); - let appinfo = vk::ApplicationInfo { - p_application_name: raw_name, - s_type: vk::StructureType::APPLICATION_INFO, - p_next: ptr::null(), - application_version: 0, - p_engine_name: raw_name, - engine_version: 0, - api_version: vk_make_version!(1, 0, 36), - }; - let create_info = vk::InstanceCreateInfo { - s_type: vk::StructureType::INSTANCE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - p_application_info: &appinfo, - pp_enabled_layer_names: layers_names_raw.as_ptr(), - enabled_layer_count: layers_names_raw.len() as u32, - pp_enabled_extension_names: extension_names_raw.as_ptr(), - enabled_extension_count: extension_names_raw.len() as u32, - }; + + let appinfo = vk::ApplicationInfo::builder() + .application_name(&app_name) + .application_version(0) + .engine_name(&app_name) + .engine_version(0) + .api_version(vk_make_version!(1, 0, 36)); + + let create_info = vk::InstanceCreateInfo::builder() + .application_info(&appinfo) + .enabled_layer_names(&layers_names_raw) + .enabled_extension_names(&extension_names_raw); + let instance: Instance = entry .create_instance(&create_info, None) .expect("Instance creation error"); - let debug_info = vk::DebugReportCallbackCreateInfoEXT { - s_type: vk::StructureType::DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, - p_next: ptr::null(), - flags: vk::DebugReportFlagsEXT::ERROR - | vk::DebugReportFlagsEXT::WARNING - | vk::DebugReportFlagsEXT::PERFORMANCE_WARNING, - pfn_callback: Some(vulkan_debug_callback), - p_user_data: ptr::null_mut(), - }; - let debug_report_loader = - DebugReport::new(&entry, &instance); + + let debug_info = vk::DebugReportCallbackCreateInfoEXT::builder() + .flags( + vk::DebugReportFlagsEXT::ERROR + | vk::DebugReportFlagsEXT::WARNING + | vk::DebugReportFlagsEXT::PERFORMANCE_WARNING, + ) + .pfn_callback(Some(vulkan_debug_callback)); + + let debug_report_loader = DebugReport::new(&entry, &instance); let debug_call_back = debug_report_loader - .create_debug_report_callback_ext(&debug_info, None) + .create_debug_report_callback(&debug_info, None) .unwrap(); let surface = create_surface(&entry, &instance, &window).unwrap(); let pdevices = instance .enumerate_physical_devices() .expect("Physical device error"); - let surface_loader = - Surface::new(&entry, &instance); + let surface_loader = Surface::new(&entry, &instance); let (pdevice, queue_family_index) = pdevices .iter() .map(|pdevice| { @@ -396,8 +378,8 @@ impl ExampleBase { .enumerate() .filter_map(|(index, ref info)| { let supports_graphic_and_surface = - info.queue_flags.contains(vk::QueueFlags::GRAPHICS) && surface_loader - .get_physical_device_surface_support_khr( + info.queue_flags.contains(vk::QueueFlags::GRAPHICS) + && surface_loader.get_physical_device_surface_support( *pdevice, index as u32, surface, @@ -406,8 +388,10 @@ impl ExampleBase { true => 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; @@ -417,33 +401,24 @@ impl ExampleBase { ..Default::default() }; let priorities = [1.0]; - let queue_info = vk::DeviceQueueCreateInfo { - s_type: vk::StructureType::DEVICE_QUEUE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - queue_family_index: queue_family_index as u32, - p_queue_priorities: priorities.as_ptr(), - queue_count: priorities.len() as u32, - }; - let device_create_info = vk::DeviceCreateInfo { - s_type: vk::StructureType::DEVICE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - queue_create_info_count: 1, - p_queue_create_infos: &queue_info, - enabled_layer_count: 0, - pp_enabled_layer_names: ptr::null(), - enabled_extension_count: device_extension_names_raw.len() as u32, - pp_enabled_extension_names: device_extension_names_raw.as_ptr(), - p_enabled_features: &features, - }; + + let queue_info = [vk::DeviceQueueCreateInfo::builder() + .queue_family_index(queue_family_index) + .queue_priorities(&priorities) + .build()]; + + let device_create_info = vk::DeviceCreateInfo::builder() + .queue_create_infos(&queue_info) + .enabled_extension_names(&device_extension_names_raw) + .enabled_features(&features); + let device: Device = instance .create_device(pdevice, &device_create_info, None) .unwrap(); let present_queue = device.get_device_queue(queue_family_index as u32, 0); let surface_formats = surface_loader - .get_physical_device_surface_formats_khr(pdevice, surface) + .get_physical_device_surface_formats(pdevice, surface) .unwrap(); let surface_format = surface_formats .iter() @@ -453,10 +428,11 @@ 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_khr(pdevice, surface) + .get_physical_device_surface_capabilities(pdevice, surface) .unwrap(); let mut desired_image_count = surface_capabilities.min_image_count + 1; if surface_capabilities.max_image_count > 0 @@ -480,156 +456,135 @@ impl ExampleBase { surface_capabilities.current_transform }; let present_modes = surface_loader - .get_physical_device_surface_present_modes_khr(pdevice, surface) + .get_physical_device_surface_present_modes(pdevice, surface) .unwrap(); let present_mode = present_modes .iter() .cloned() .find(|&mode| mode == vk::PresentModeKHR::MAILBOX) .unwrap_or(vk::PresentModeKHR::FIFO); - let swapchain_loader = - Swapchain::new(&instance, &device); - let swapchain_create_info = vk::SwapchainCreateInfoKHR { - s_type: vk::StructureType::SWAPCHAIN_CREATE_INFO_KHR, - p_next: ptr::null(), - flags: Default::default(), - surface: surface, - min_image_count: desired_image_count, - image_color_space: surface_format.color_space, - image_format: surface_format.format, - image_extent: surface_resolution.clone(), - image_usage: vk::ImageUsageFlags::COLOR_ATTACHMENT, - image_sharing_mode: vk::SharingMode::EXCLUSIVE, - pre_transform: pre_transform, - composite_alpha: vk::CompositeAlphaFlagsKHR::OPAQUE, - present_mode: present_mode, - clipped: 1, - old_swapchain: vk::SwapchainKHR::null(), - image_array_layers: 1, - p_queue_family_indices: ptr::null(), - queue_family_index_count: 0, - }; + let swapchain_loader = Swapchain::new(&instance, &device); + + let swapchain_create_info = vk::SwapchainCreateInfoKHR::builder() + .surface(surface) + .min_image_count(desired_image_count) + .image_color_space(surface_format.color_space) + .image_format(surface_format.format) + .image_extent(surface_resolution.clone()) + .image_usage(vk::ImageUsageFlags::COLOR_ATTACHMENT) + .image_sharing_mode(vk::SharingMode::EXCLUSIVE) + .pre_transform(pre_transform) + .composite_alpha(vk::CompositeAlphaFlagsKHR::OPAQUE) + .present_mode(present_mode) + .clipped(true) + .image_array_layers(1); + let swapchain = swapchain_loader - .create_swapchain_khr(&swapchain_create_info, None) + .create_swapchain(&swapchain_create_info, None) .unwrap(); - let pool_create_info = vk::CommandPoolCreateInfo { - s_type: vk::StructureType::COMMAND_POOL_CREATE_INFO, - p_next: ptr::null(), - flags: vk::CommandPoolCreateFlags::RESET_COMMAND_BUFFER, - queue_family_index: queue_family_index, - }; + + let pool_create_info = vk::CommandPoolCreateInfo::builder() + .flags(vk::CommandPoolCreateFlags::RESET_COMMAND_BUFFER) + .queue_family_index(queue_family_index); + let pool = device.create_command_pool(&pool_create_info, None).unwrap(); - let command_buffer_allocate_info = vk::CommandBufferAllocateInfo { - s_type: vk::StructureType::COMMAND_BUFFER_ALLOCATE_INFO, - p_next: ptr::null(), - command_buffer_count: 2, - command_pool: pool, - level: vk::CommandBufferLevel::PRIMARY, - }; + + let command_buffer_allocate_info = vk::CommandBufferAllocateInfo::builder() + .command_buffer_count(2) + .command_pool(pool) + .level(vk::CommandBufferLevel::PRIMARY); + let command_buffers = device .allocate_command_buffers(&command_buffer_allocate_info) .unwrap(); let setup_command_buffer = command_buffers[0]; let draw_command_buffer = command_buffers[1]; - let present_images = swapchain_loader - .get_swapchain_images_khr(swapchain) - .unwrap(); + let present_images = swapchain_loader.get_swapchain_images(swapchain).unwrap(); let present_image_views: Vec = present_images .iter() .map(|&image| { - let create_view_info = vk::ImageViewCreateInfo { - s_type: vk::StructureType::IMAGE_VIEW_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - view_type: vk::ImageViewType::TYPE_2D, - format: surface_format.format, - components: vk::ComponentMapping { + let create_view_info = vk::ImageViewCreateInfo::builder() + .view_type(vk::ImageViewType::TYPE_2D) + .format(surface_format.format) + .components(vk::ComponentMapping { r: vk::ComponentSwizzle::R, g: vk::ComponentSwizzle::G, b: vk::ComponentSwizzle::B, a: vk::ComponentSwizzle::A, - }, - subresource_range: vk::ImageSubresourceRange { + }) + .subresource_range(vk::ImageSubresourceRange { aspect_mask: vk::ImageAspectFlags::COLOR, base_mip_level: 0, level_count: 1, base_array_layer: 0, layer_count: 1, - }, - image: image, - }; + }) + .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, - p_next: ptr::null(), - flags: Default::default(), - image_type: vk::ImageType::TYPE_2D, - format: vk::Format::D16_UNORM, - extent: vk::Extent3D { + let depth_image_create_info = vk::ImageCreateInfo::builder() + .image_type(vk::ImageType::TYPE_2D) + .format(vk::Format::D16_UNORM) + .extent(vk::Extent3D { width: surface_resolution.width, height: surface_resolution.height, depth: 1, - }, - mip_levels: 1, - array_layers: 1, - samples: vk::SampleCountFlags::TYPE_1, - tiling: vk::ImageTiling::OPTIMAL, - usage: vk::ImageUsageFlags::DEPTH_STENCIL_ATTACHMENT, - sharing_mode: vk::SharingMode::EXCLUSIVE, - queue_family_index_count: 0, - p_queue_family_indices: ptr::null(), - initial_layout: vk::ImageLayout::UNDEFINED, - }; + }) + .mip_levels(1) + .array_layers(1) + .samples(vk::SampleCountFlags::TYPE_1) + .tiling(vk::ImageTiling::OPTIMAL) + .usage(vk::ImageUsageFlags::DEPTH_STENCIL_ATTACHMENT) + .sharing_mode(vk::SharingMode::EXCLUSIVE); + let depth_image = device.create_image(&depth_image_create_info, None).unwrap(); let depth_image_memory_req = device.get_image_memory_requirements(depth_image); let depth_image_memory_index = find_memorytype_index( &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::builder() + .allocation_size(depth_image_memory_req.size) + .memory_type_index(depth_image_memory_index); - let depth_image_allocate_info = vk::MemoryAllocateInfo { - s_type: vk::StructureType::MEMORY_ALLOCATE_INFO, - p_next: ptr::null(), - allocation_size: depth_image_memory_req.size, - memory_type_index: depth_image_memory_index, - }; let depth_image_memory = device .allocate_memory(&depth_image_allocate_info, None) .unwrap(); + device .bind_image_memory(depth_image, depth_image_memory, 0) .expect("Unable to bind depth image memory"); + record_submit_commandbuffer( &device, setup_command_buffer, present_queue, - &[vk::PipelineStageFlags::BOTTOM_OF_PIPE], + &[], &[], &[], |device, setup_command_buffer| { - let layout_transition_barrier = vk::ImageMemoryBarrier { - s_type: vk::StructureType::IMAGE_MEMORY_BARRIER, - p_next: ptr::null(), - src_access_mask: Default::default(), - dst_access_mask: vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ - | vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE, - old_layout: vk::ImageLayout::UNDEFINED, - new_layout: vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL, - src_queue_family_index: vk::QUEUE_FAMILY_IGNORED, - dst_queue_family_index: vk::QUEUE_FAMILY_IGNORED, - image: depth_image, - subresource_range: vk::ImageSubresourceRange { - aspect_mask: vk::ImageAspectFlags::DEPTH, - base_mip_level: 0, - level_count: 1, - base_array_layer: 0, - layer_count: 1, - }, - }; + let layout_transition_barriers = vk::ImageMemoryBarrier::builder() + .image(depth_image) + .dst_access_mask( + vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_READ + | vk::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE, + ) + .new_layout(vk::ImageLayout::DEPTH_STENCIL_ATTACHMENT_OPTIMAL) + .old_layout(vk::ImageLayout::UNDEFINED) + .subresource_range( + vk::ImageSubresourceRange::builder() + .aspect_mask(vk::ImageAspectFlags::DEPTH) + .layer_count(1) + .level_count(1) + .build(), + ); + device.cmd_pipeline_barrier( setup_command_buffer, vk::PipelineStageFlags::BOTTOM_OF_PIPE, @@ -637,39 +592,29 @@ impl ExampleBase { vk::DependencyFlags::empty(), &[], &[], - &[layout_transition_barrier], + &[layout_transition_barriers.build()], ); }, ); - let depth_image_view_info = vk::ImageViewCreateInfo { - s_type: vk::StructureType::IMAGE_VIEW_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - view_type: vk::ImageViewType::TYPE_2D, - format: depth_image_create_info.format, - components: vk::ComponentMapping { - r: vk::ComponentSwizzle::IDENTITY, - g: vk::ComponentSwizzle::IDENTITY, - b: vk::ComponentSwizzle::IDENTITY, - a: vk::ComponentSwizzle::IDENTITY, - }, - subresource_range: vk::ImageSubresourceRange { - aspect_mask: vk::ImageAspectFlags::DEPTH, - base_mip_level: 0, - level_count: 1, - base_array_layer: 0, - layer_count: 1, - }, - image: depth_image, - }; + + let depth_image_view_info = vk::ImageViewCreateInfo::builder() + .subresource_range( + vk::ImageSubresourceRange::builder() + .aspect_mask(vk::ImageAspectFlags::DEPTH) + .level_count(1) + .layer_count(1) + .build(), + ) + .image(depth_image) + .format(depth_image_create_info.format) + .view_type(vk::ImageViewType::TYPE_2D); + let depth_image_view = device .create_image_view(&depth_image_view_info, None) .unwrap(); - let semaphore_create_info = vk::SemaphoreCreateInfo { - s_type: vk::StructureType::SEMAPHORE_CREATE_INFO, - p_next: ptr::null(), - flags: Default::default(), - }; + + let semaphore_create_info = vk::SemaphoreCreateInfo::default(); + let present_complete_semaphore = device .create_semaphore(&semaphore_create_info, None) .unwrap(); @@ -725,11 +670,11 @@ impl Drop for ExampleBase { } self.device.destroy_command_pool(self.pool, None); self.swapchain_loader - .destroy_swapchain_khr(self.swapchain, None); + .destroy_swapchain(self.swapchain, None); self.device.destroy_device(None); - self.surface_loader.destroy_surface_khr(self.surface, None); + self.surface_loader.destroy_surface(self.surface, None); self.debug_report_loader - .destroy_debug_report_callback_ext(self.debug_call_back, None); + .destroy_debug_report_callback(self.debug_call_back, None); self.instance.destroy_instance(None); } } diff --git a/generator/Cargo.toml b/generator/Cargo.toml index 6202abb..12ffbd5 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Maik Klein "] [dependencies] -vk-parse = "0.1" +vk-parse = "0.2" vkxml = "0.3" nom = "4.0" heck = "0.3" diff --git a/generator/Vulkan-Headers b/generator/Vulkan-Headers index 718a04e..114c354 160000 --- a/generator/Vulkan-Headers +++ b/generator/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 718a04e51b967fbe6de9d09ecfc15397f0eae5bd +Subproject commit 114c3546e195819bd53a34b39f5194b2989a5b12 diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 8af5596..08c1757 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1,11 +1,11 @@ #![recursion_limit = "256"] +extern crate heck; +extern crate itertools; #[macro_use] extern crate nom; -extern crate heck; extern crate proc_macro2; #[macro_use] extern crate quote; -extern crate itertools; extern crate syn; pub extern crate vk_parse; pub extern crate vkxml; @@ -36,7 +36,7 @@ impl CType { CType::Float => Term::intern("f32"), CType::Bool32 => Term::intern("Bool32"), }; - quote!{#term} + quote! {#term} } } @@ -87,6 +87,7 @@ named!(cfloat<&str, f32>, pub fn define_handle_macro() -> Tokens { quote! { + #[macro_export] macro_rules! define_handle{ ($name: ident, $ty: ident) => { #[repr(transparent)] @@ -130,7 +131,8 @@ pub fn define_handle_macro() -> Tokens { } pub fn handle_nondispatchable_macro() -> Tokens { - quote!{ + quote! { + #[macro_export] macro_rules! handle_nondispatchable { ($name: ident, $ty: ident) => { #[repr(transparent)] @@ -165,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) => { @@ -196,7 +198,8 @@ 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) => { @@ -350,8 +353,10 @@ pub fn platform_specific_types() -> Tokens { pub type HANDLE = *mut c_void; pub type DWORD = c_ulong; pub type LPCWSTR = *const u16; + #[allow(non_camel_case_types)] + pub type zx_handle_t = u32; - // FIXME: Platform specific types that should come from a library + // FIXME: Platform specific types that should come from a library id:0 // typedefs are only here so that the code compiles for now #[allow(non_camel_case_types)] pub type SECURITY_ATTRIBUTES = (); @@ -449,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} } } } @@ -534,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" @@ -587,7 +593,7 @@ impl ToTokens for vkxml::ReferenceType { } }; let ident = Term::intern(ptr_name); - quote!{ + quote! { #ident } } @@ -621,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 { @@ -644,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 { @@ -659,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] }) } @@ -671,7 +677,11 @@ impl FieldExt for vkxml::Field { pub type CommandMap<'a> = HashMap; -fn generate_function_pointers(ident: Ident, commands: &[&vkxml::Command]) -> quote::Tokens { +fn generate_function_pointers<'a>( + ident: Ident, + commands: &[&'a vkxml::Command], + fn_cache: &mut HashSet<&'a str>, +) -> quote::Tokens { let names: Vec<_> = commands.iter().map(|cmd| cmd.command_ident()).collect(); let names_ref = &names; let names_ref1 = &names; @@ -685,6 +695,19 @@ fn generate_function_pointers(ident: Ident, commands: &[&vkxml::Command]) -> quo let names_left = &names; let names_right = &names; + let pfn_commands: Vec<_> = commands + .iter() + .filter(|cmd| { + let ident = cmd.name.as_str(); + if !fn_cache.contains(ident) { + fn_cache.insert(ident); + return true; + } else { + return false; + } + }) + .collect(); + let params: Vec> = commands .iter() .map(|cmd| { @@ -695,9 +718,11 @@ fn generate_function_pointers(ident: Ident, commands: &[&vkxml::Command]) -> quo let name = field.param_ident(); let ty = field.type_tokens(); (name, ty) - }).collect(); + }) + .collect(); params - }).collect(); + }) + .collect(); let params_names: Vec> = params .iter() @@ -706,29 +731,32 @@ fn generate_function_pointers(ident: Ident, commands: &[&vkxml::Command]) -> quo .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 @@ -736,10 +764,45 @@ fn generate_function_pointers(ident: Ident, commands: &[&vkxml::Command]) -> quo .map(|cmd| cmd.return_type.type_tokens()) .collect(); let return_types_ref = &return_types; - quote!{ + + let pfn_names: Vec<_> = pfn_commands + .iter() + .map(|cmd| Ident::from(format!("PFN_{}", cmd.name.as_str()))) + .collect(); + let pfn_names_ref = &pfn_names; + + let signature_params: Vec> = pfn_commands + .iter() + .map(|cmd| { + let params: Vec<_> = cmd + .param + .iter() + .map(|field| { + let name = field.param_ident(); + let ty = field.type_tokens(); + quote! { #name: #ty } + }) + .collect(); + params + }) + .collect(); + let signature_params_ref = &signature_params; + + let pfn_return_types: Vec<_> = pfn_commands + .iter() + .map(|cmd| cmd.return_type.type_tokens()) + .collect(); + let pfn_return_types_ref = &pfn_return_types; + + quote! { + #( + #[allow(non_camel_case_types)] + pub type #pfn_names_ref = extern "system" fn(#(#signature_params_ref),*) -> #pfn_return_types_ref; + )* + pub struct #ident { #( - #names_ref: extern "system" fn(#expanded_params_ref) -> #return_types_ref, + pub #names_ref: extern "system" fn(#expanded_params_ref) -> #return_types_ref, )* } @@ -804,16 +867,17 @@ impl<'a> ConstantExt for ExtensionConstant<'a> { pub fn generate_extension_constants<'a>( extension_name: &str, extension_number: i64, - extension_items: &'a [vk_parse::ExtensionItem], + extension_items: &'a [vk_parse::ExtensionChild], const_cache: &mut HashSet<&'a str>, const_values: &mut HashMap>, ) -> quote::Tokens { let items = extension_items .iter() .filter_map(|item| match item { - vk_parse::ExtensionItem::Require { items, .. } => Some(items.iter()), + 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; @@ -821,8 +885,6 @@ pub fn generate_extension_constants<'a>( return None; } let (constant, extends) = match &_enum.spec { - EnumSpec::Alias { .. } => None, - EnumSpec::Value { .. } => None, EnumSpec::Bitpos { bitpos, extends } => { Some((Constant::BitPos(*bitpos as u32), extends.clone())) } @@ -847,11 +909,13 @@ pub fn generate_extension_constants<'a>( constant, }; let ident = name_to_tokens(&extends); - const_values.entry(ident.clone()).or_insert_with(Vec::new) + const_values + .entry(ident.clone()) + .or_insert_with(Vec::new) .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 }; @@ -861,36 +925,41 @@ pub fn generate_extension_constants<'a>( } _ => None, }); - quote!{ + quote! { #(#enum_tokens)* } } -pub fn generate_extension_commands( +pub fn generate_extension_commands<'a>( extension_name: &str, - items: &[vk_parse::ExtensionItem], - cmd_map: &CommandMap, + items: &[vk_parse::ExtensionChild], + cmd_map: &CommandMap<'a>, + fn_cache: &mut HashSet<&'a str>, ) -> Tokens { let commands = items .iter() .filter_map(|ext_item| match ext_item { - vk_parse::ExtensionItem::Require { items, .. } => { + vk_parse::ExtensionChild::Require { items, .. } => { Some(items.iter().filter_map(|item| match item { - vk_parse::InterfaceItem::Command { name, .. } => cmd_map.get(name).map(|c| *c), + vk_parse::InterfaceItem::Command { ref name, .. } => { + cmd_map.get(name).map(|c| *c) + } _ => None, })) } _ => 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..]); - generate_function_pointers(ident, &commands) + generate_function_pointers(ident, &commands, fn_cache) } pub fn generate_extension<'a>( extension: &'a vk_parse::Extension, - cmd_map: &CommandMap, + cmd_map: &CommandMap<'a>, const_cache: &mut HashSet<&'a str>, - const_values: &mut HashMap> + const_values: &mut HashMap>, + fn_cache: &mut HashSet<&'a str>, ) -> Option { // Okay this is a little bit odd. We need to generate all extensions, even disabled ones, // because otherwise some StructureTypes won't get generated. But we don't generate extensions @@ -901,12 +970,12 @@ pub fn generate_extension<'a>( let extension_tokens = generate_extension_constants( &extension.name, extension.number.unwrap_or(0), - &extension.items, + &extension.children, const_cache, const_values, ); - let fp = generate_extension_commands(&extension.name, &extension.items, cmd_map); - let q = quote!{ + let fp = generate_extension_commands(&extension.name, &extension.children, cmd_map, fn_cache); + let q = quote! { #fp #extension_tokens }; @@ -915,11 +984,14 @@ 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; } } -pub fn generate_bitmask(bitmask: &vkxml::Bitmask) -> Option { +pub fn generate_bitmask( + bitmask: &vkxml::Bitmask, + bitflags_cache: &mut HashSet, +) -> Option { // Workaround for empty bitmask if bitmask.name.is_empty() { return None; @@ -931,7 +1003,11 @@ pub fn generate_bitmask(bitmask: &vkxml::Bitmask) -> Option { let name = &bitmask.name[2..]; let ident = Ident::from(name); - Some(quote!{ + if bitflags_cache.contains(&ident) { + return None; + }; + bitflags_cache.insert(ident.clone()); + Some(quote! { #[repr(transparent)] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct #ident(Flags); @@ -946,8 +1022,8 @@ pub enum EnumType { pub fn variant_ident(enum_name: &str, variant_name: &str) -> Ident { let _name = enum_name.replace("FlagBits", ""); - // TODO: Should be read from vk.xml - // TODO: Also needs to be more robust, vendor names can be substrings from itself, + // TODO: Should be read from vk.xml id:2 + // TODO: Also needs to be more robust, vendor names can be substrings from itself, id:4 // like NVX and NV let vendors = ["_NVX", "_KHR", "_EXT", "_NV", "_AMD", "_ANDROID", "_GOOGLE"]; let mut struct_name = _name.to_shouty_snake_case(); @@ -986,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] } }) @@ -1001,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)* } @@ -1016,7 +1093,8 @@ pub fn bitflags_impl_block( pub fn generate_enum<'a>( _enum: &'a vkxml::Enumeration, const_cache: &mut HashSet<&'a str>, - const_values: &mut HashMap> + const_values: &mut HashMap>, + bitflags_cache: &mut HashSet, ) -> EnumType { let name = &_enum.name[2..]; let _name = name.replace("FlagBits", "Flags"); @@ -1027,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()); @@ -1043,17 +1122,22 @@ pub fn generate_enum<'a>( let all_bits_term = Term::intern(&format!("0b{:b}", all_bits)); let impl_bitflags = bitflags_impl_block(ident, &_enum.name, &constants); - let q = quote!{ - #[repr(transparent)] - #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct #ident(pub(crate) Flags); - vk_bitflags_wrapped!(#ident, #all_bits_term, Flags); - #impl_bitflags - }; - EnumType::Bitflags(q) + if bitflags_cache.contains(&ident) { + EnumType::Bitflags(quote! {}) + } else { + bitflags_cache.insert(ident.clone()); + let q = quote! { + #[repr(transparent)] + #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct #ident(pub(crate) Flags); + vk_bitflags_wrapped!(#ident, #all_bits_term, Flags); + #impl_bitflags + }; + EnumType::Bitflags(q) + } } 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); @@ -1067,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 @@ -1092,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 { @@ -1131,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); @@ -1160,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() } } } @@ -1172,46 +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!{ + } else if is_static_array(field) || handles.contains(&field.basetype.as_str()) { + 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 { @@ -1237,7 +1320,9 @@ pub fn derive_debug(_struct: &vkxml::Struct, union_types: &HashSet<&str>) -> Opt .map(|n| n.contains("pfn")) .unwrap_or(false) }); - let contains_static_array = members.clone().any(|x| is_static_array(x) && x.basetype == "char"); + let contains_static_array = members + .clone() + .any(|x| is_static_array(x) && x.basetype == "char"); let contains_union = members .clone() .any(|field| union_types.contains(field.basetype.as_str())); @@ -1248,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) + ::std::ffi::CStr::from_ptr(self.#param_ident.as_ptr() as *const c_char) } } } 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) @@ -1282,35 +1367,68 @@ pub fn derive_debug(_struct: &vkxml::Struct, union_types: &HashSet<&str>) -> Opt } pub fn derive_setters(_struct: &vkxml::Struct) -> Option { + if &_struct.name == "VkBaseInStructure" || &_struct.name == "VkBaseOutStructure" { + return None; + } + let name = name_to_tokens(&_struct.name); - let name_builder = name_to_tokens(&(_struct.name.to_string() + "Builder")); + let name_builder = name_to_tokens(&(_struct.name.clone() + "Builder")); let members = _struct.elements.iter().filter_map(|elem| match *elem { vkxml::StructElement::Member(ref field) => Some(field), _ => None, }); - let filter_members: Vec = members.clone().filter_map(|field| { - // Associated _count members - if field.array.is_some() { - if let Some(ref array_size) = field.size { - if !array_size.starts_with("latexmath") { - return Some((*array_size).clone()); - } + let (has_next, is_next_const) = match members + .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) } } + None => (false, false), + }; - // VkShaderModuleCreateInfo requiers a custom setter - if field.name.as_ref().unwrap() == "codeSize" { - return Some(field.name.clone().unwrap()); - } - - None - }).collect(); + let nofilter_count_members = [ + "VkPipelineViewportStateCreateInfo.pViewports", + "VkPipelineViewportStateCreateInfo.pScissors", + "VkDescriptorSetLayoutBinding.pImmutableSamplers", + ]; + let filter_members: Vec = members + .clone() + .filter_map(|field| { + let field_name = field.name.as_ref().unwrap(); + + // 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)) + { + return Some((*array_size).clone()); + } + } + } + + // VkShaderModuleCreateInfo requiers a custom setter + if field_name == "codeSize" { + return Some(field_name.clone()); + } + + None + }) + .collect(); let setters = members.clone().filter_map(|field| { let param_ident = field.param_ident(); let param_ty_tokens = field.type_tokens(); + let param_ty_string = param_ty_tokens.to_string(); let param_ident_string = param_ident.to_string(); if param_ident_string == "s_type" || param_ident_string == "p_next" { @@ -1326,8 +1444,8 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { }; let param_ident_short = Term::intern(¶m_ident_short); - if let Some(name) = field.name.as_ref() { - // Fiter + if let Some(name) = field.name.as_ref() { + // Fiter if filter_members.iter().any(|n| *n == *name) { return None; } @@ -1340,65 +1458,75 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { self.inner.p_code = code.as_ptr() as *const u32; self } - }); + }); + } + + if name == "pSampleMask" { + return Some(quote!{ + pub fn sample_mask(mut self, sample_mask: &'a [SampleMask]) -> #name_builder<'a> { + self.inner.p_sample_mask = sample_mask.as_ptr() as *const SampleMask; + self + } + }); } } - // TODO: Improve in future when https://github.com/rust-lang/rust/issues/53667 is merged + // TODO: Improve in future when https://github.com/rust-lang/rust/issues/53667 is merged id:6 if param_ident_string.starts_with("p_") || param_ident_string.starts_with("pp_") { - let param_ty_string = param_ty_tokens.to_string(); - if param_ty_string == "*const c_char" { return Some(quote!{ pub fn #param_ident_short(mut self, #param_ident_short: &'a ::std::ffi::CStr) -> #name_builder<'a> { self.inner.#param_ident = #param_ident_short.as_ptr(); self } - }); + }); } if let Some(ref array_type) = field.array { if let Some(ref array_size) = field.size { if !array_size.starts_with("latexmath") { - let length_type; - let array_size_ident = Ident::from(array_size.to_snake_case().as_str()); - if array_size_ident.to_string().contains("_count") { - length_type = Term::intern("u32"); - } else { - length_type = Term::intern("usize"); - } - + let array_size_ident = Ident::from(array_size.to_snake_case().as_str()); if param_ty_string == "*const *const c_char" { return Some(quote!{ pub fn #param_ident_short(mut self, #param_ident_short: &'a [*const c_char]) -> #name_builder<'a> { self.inner.#param_ident = #param_ident_short.as_ptr(); - self.inner.#array_size_ident = #param_ident_short.len() as #length_type; + self.inner.#array_size_ident = #param_ident_short.len() as _; self } - }); - } + }); + } 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 #length_type; - self.inner.#param_ident = #param_ident_short#ptr_mutability; + self.inner.#array_size_ident = #param_ident_short.len() as _; + self.inner.#param_ident = #param_ident_short#ptr; self } }); @@ -1417,10 +1545,19 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { self.inner.#param_ident = #param_ident_short; self } - }); + }); } } + if param_ty_string == "Bool32" { + return Some(quote!{ + pub fn #param_ident_short(mut self, #param_ident_short: bool) -> #name_builder<'a> { + self.inner.#param_ident = #param_ident_short.into(); + self + } + }); + } + Some(quote!{ pub fn #param_ident_short(mut self, #param_ident_short: #param_ty_tokens) -> #name_builder<'a> { self.inner.#param_ident = #param_ident_short; @@ -1429,21 +1566,69 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { }) }); - let q = quote!{ + let mut nexts = Vec::new(); + let extends_name = name_to_tokens(&format!("Extends{}", name)); + if let Some(extends) = &_struct.extends { + for target in extends.split(',') { + let target = match target { + // https://github.com/KhronosGroup/Vulkan-Docs/pull/870 + "VkPhysicalDeviceProperties" => "VkPhysicalDeviceProperties2", + x => x, + }; + let target_ident = name_to_tokens(&format!("Extends{}", name_to_tokens(target))); + nexts.push(quote! { + unsafe impl #target_ident for #name {} + }); + } + } + + let next_function = if has_next { + if is_next_const { + 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! { + 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 + } + } + } + } else { + quote! {} + }; + + let next_trait = if has_next { + quote! { + pub unsafe trait #extends_name {} + } + } else { + quote! {} + }; + + let q = quote! { impl #name { - pub fn builder<'a>() -> #name_builder<'a> { + pub fn builder<'a>() -> #name_builder<'a> { #name_builder { inner: #name::default(), marker: ::std::marker::PhantomData, } - } - } + } + } pub struct #name_builder<'a> { inner: #name, marker: ::std::marker::PhantomData<&'a ()>, } + #next_trait + + #(#nexts)* + impl<'a> ::std::ops::Deref for #name_builder<'a> { type Target = #name; @@ -1455,6 +1640,8 @@ pub fn derive_setters(_struct: &vkxml::Struct) -> Option { impl<'a> #name_builder<'a> { #(#setters)* + #next_function + pub fn build(self) -> #name { self.inner } @@ -1470,8 +1657,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 { @@ -1484,7 +1671,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); @@ -1501,7 +1688,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 { @@ -1543,11 +1730,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>; } @@ -1558,11 +1745,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 { @@ -1578,20 +1765,25 @@ fn generate_union(union: &vkxml::Union) -> Tokens { pub fn generate_definition( definition: &vkxml::DefinitionsElement, union_types: &HashSet<&str>, + bitflags_cache: &mut HashSet, ) -> Option { match *definition { vkxml::DefinitionsElement::Typedef(ref typedef) => Some(generate_typedef(typedef)), vkxml::DefinitionsElement::Struct(ref _struct) => { Some(generate_struct(_struct, union_types)) } - vkxml::DefinitionsElement::Bitmask(ref mask) => generate_bitmask(mask), + vkxml::DefinitionsElement::Bitmask(ref mask) => generate_bitmask(mask, bitflags_cache), vkxml::DefinitionsElement::Handle(ref handle) => generate_handle(handle), vkxml::DefinitionsElement::FuncPtr(ref fp) => Some(generate_funcptr(fp)), vkxml::DefinitionsElement::Union(ref union) => Some(generate_union(union)), _ => None, } } -pub fn generate_feature(feature: &vkxml::Feature, commands: &CommandMap) -> quote::Tokens { +pub fn generate_feature<'a>( + feature: &vkxml::Feature, + commands: &CommandMap<'a>, + fn_cache: &mut HashSet<&'a str>, +) -> quote::Tokens { let (static_commands, entry_commands, device_commands, instance_commands) = feature .elements .iter() @@ -1606,11 +1798,13 @@ pub fn generate_feature(feature: &vkxml::Feature, commands: &CommandMap) -> quot } 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| { @@ -1633,21 +1827,24 @@ pub fn generate_feature(feature: &vkxml::Feature, commands: &CommandMap) -> quot ); let version = feature.version_string(); let static_fn = if feature.version == 1.0 { - generate_function_pointers(Ident::from("StaticFn"), &static_commands) + 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()), &entry_commands, + fn_cache, ); let instance = generate_function_pointers( Ident::from(format!("InstanceFnV{}", version).as_str()), &instance_commands, + fn_cache, ); let device = generate_function_pointers( Ident::from(format!("DeviceFnV{}", version).as_str()), &device_commands, + fn_cache, ); quote! { #static_fn @@ -1675,7 +1872,7 @@ pub fn generate_constant<'a>( c.ty() }; let ty = ty.to_tokens(); - quote!{ + quote! { pub const #ident: #ty = #value; } } @@ -1683,29 +1880,34 @@ pub fn generate_constant<'a>( pub fn generate_feature_extension<'a>( registry: &'a vk_parse::Registry, const_cache: &mut HashSet<&'a str>, - const_values: &mut HashMap> + const_values: &mut HashMap>, ) -> Tokens { let constants = registry.0.iter().filter_map(|item| match item { - vk_parse::RegistryItem::Feature { name, items, .. } => { - Some(generate_extension_constants(name, 0, items, const_cache, const_values)) - } + vk_parse::RegistryChild::Feature(feature) => Some(generate_extension_constants( + &feature.name, + 0, + &feature.children, + const_cache, + const_values, + )), _ => None, }); - quote!{ + quote! { #(#constants)* } } pub fn generate_const_displays<'a>(const_values: &HashMap>) -> Tokens { - let impls = const_values.iter() + let impls = const_values + .iter() .filter(|(ty, _)| *ty != "Result") .map(|(ty, values)| { 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),*]; @@ -1716,9 +1918,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 { @@ -1735,7 +1937,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; @@ -1757,7 +1959,33 @@ pub fn generate_const_displays<'a>(const_values: &HashMap>) -> #(#impls)* } } - +pub fn generate_aliases_of_types<'a>( + types: &'a vk_parse::Types, + ty_cache: &mut HashSet, +) -> Tokens { + let aliases = types + .children + .iter() + .filter_map(|child| match child { + vk_parse::TypesChild::Type(ty) => Some((ty.name.as_ref()?, ty.alias.as_ref()?)), + _ => None, + }) + .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! { + pub type #name_ident = #alias_ident; + }; + Some(tokens) + }); + quote! { + #(#aliases)* + } +} pub fn write_source_code(path: &Path) { use std::fs::File; use std::io::Write; @@ -1766,10 +1994,22 @@ pub fn write_source_code(path: &Path) { .0 .iter() .filter_map(|item| match item { - vk_parse::RegistryItem::Extensions { items: ext, .. } => Some(ext), + 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 + .0 + .iter() + .filter_map(|item| match item { + vk_parse::RegistryChild::Types(ref ty) => { + Some(generate_aliases_of_types(ty, &mut ty_cache)) + } + _ => None, + }) + .collect(); let spec = vk_parse::parse_file_as_vkxml(path); let commands: HashMap = spec @@ -1778,7 +2018,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 @@ -1787,7 +2028,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 @@ -1796,7 +2038,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 @@ -1805,12 +2048,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 @@ -1818,16 +2063,19 @@ 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(); + let mut bitflags_cache = HashSet::new(); let mut const_cache = HashSet::new(); let mut const_values: HashMap> = HashMap::new(); let (enum_code, bitflags_code) = enums .into_iter() - .map(|e| generate_enum(e, &mut const_cache, &mut const_values)) + .map(|e| generate_enum(e, &mut const_cache, &mut const_values, &mut bitflags_cache)) .fold((Vec::new(), Vec::new()), |mut acc, elem| { match elem { EnumType::Enum(token) => acc.0.push(token), @@ -1842,7 +2090,15 @@ pub fn write_source_code(path: &Path) { .collect(); let extension_code = extensions .iter() - .filter_map(|ext| generate_extension(ext, &commands, &mut const_cache, &mut const_values)) + .filter_map(|ext| { + generate_extension( + ext, + &commands, + &mut const_cache, + &mut const_values, + &mut fn_cache, + ) + }) .collect_vec(); let union_types = definitions @@ -1850,18 +2106,20 @@ pub fn write_source_code(path: &Path) { .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() - .filter_map(|def| generate_definition(def, &union_types)) + .filter_map(|def| generate_definition(def, &union_types, &mut bitflags_cache)) .collect(); let feature_code: Vec<_> = features .iter() - .map(|feature| generate_feature(feature, &commands)) + .map(|feature| generate_feature(feature, &commands, &mut fn_cache)) .collect(); - let feature_extensions_code = generate_feature_extension(&spec2, &mut const_cache, &mut const_values); + let feature_extensions_code = + generate_feature_extension(&spec2, &mut const_cache, &mut const_values); let const_displays = generate_const_displays(&const_values); @@ -1871,7 +2129,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::*; @@ -1894,6 +2152,7 @@ pub fn write_source_code(path: &Path) { #(#extension_code)* #feature_extensions_code #const_displays + #(#aliases)* }; write!(&mut file, "{}", source_code).expect("Unable to write to file"); } diff --git a/imdone-help.md b/imdone-help.md new file mode 100644 index 0000000..11e1d59 --- /dev/null +++ b/imdone-help.md @@ -0,0 +1,17 @@ +imdone-help +==== +#HELP: Try dragging this card to your new list id:8 +imdone-help +#HELP: Ignore files by adding `.imdoneignore` to the root of your project. id:1 +imdone-help +- [imdone.io](https://imdone.io) implements this with the [ignore package](https://www.npmjs.com/package/ignore) + +#HELP: Use markdown in todo comments or in the description id:3 +imdone-help +- **This is a description...** + +#HELP: Add tags to your comments like this `+mvp` id:5 +imdone-help + +#HELP: Add metadata like this... points:5 id:7 +imdone-help +- [imdone.io](https://imdone.io) adds `id:n` to all your todo comments, so take care to leave that one alone + +#HELP: Include subtasks using GFM task lists id:9 +imdone-help +- [ ] A task yet to be done +- [x] This is done diff --git a/rustfmt.toml b/rustfmt.toml index 5bcb444..d100efd 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1 @@ -max_width = 100 -error_on_line_overflow = false \ No newline at end of file +max_width = 100 \ No newline at end of file