From a526d8d02520a982370ad355420c840d02e6f32a Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Mon, 25 Mar 2024 19:39:51 -0700 Subject: [PATCH] Unify extension module hierarchies --- ash-examples/src/lib.rs | 2 +- ash-window/examples/winit.rs | 2 +- ash-window/src/lib.rs | 7 +- ash/src/entry.rs | 4 +- ash/src/extensions/amd/buffer_marker.rs | 21 +- ash/src/extensions/amd/shader_info.rs | 27 +- ash/src/extensions/amdx/shader_enqueue.rs | 27 +- ...external_memory_android_hardware_buffer.rs | 28 +- ash/src/extensions/ext/acquire_drm_display.rs | 21 +- .../extensions/ext/buffer_device_address.rs | 28 +- .../extensions/ext/calibrated_timestamps.rs | 49 +- ash/src/extensions/ext/debug_marker.rs | 28 +- ash/src/extensions/ext/debug_report.rs | 27 +- ash/src/extensions/ext/debug_utils.rs | 55 +- ash/src/extensions/ext/descriptor_buffer.rs | 27 +- .../extensions/ext/extended_dynamic_state.rs | 21 +- .../extensions/ext/extended_dynamic_state2.rs | 21 +- .../extensions/ext/extended_dynamic_state3.rs | 21 +- .../extensions/ext/full_screen_exclusive.rs | 49 +- ash/src/extensions/ext/hdr_metadata.rs | 28 +- ash/src/extensions/ext/headless_surface.rs | 27 +- ash/src/extensions/ext/host_image_copy.rs | 34 +- .../ext/image_compression_control.rs | 34 +- .../ext/image_drm_format_modifier.rs | 28 +- ash/src/extensions/ext/mesh_shader.rs | 21 +- ash/src/extensions/ext/metal_surface.rs | 27 +- ash/src/extensions/ext/pipeline_properties.rs | 28 +- ash/src/extensions/ext/private_data.rs | 27 +- ash/src/extensions/ext/sample_locations.rs | 42 +- ash/src/extensions/ext/shader_object.rs | 28 +- .../extensions/ext/swapchain_maintenance1.rs | 28 +- ash/src/extensions/ext/tooling_info.rs | 21 +- .../ext/vertex_input_dynamic_state.rs | 21 +- ash/src/extensions/google/display_timing.rs | 27 +- .../extensions/khr/acceleration_structure.rs | 27 +- ash/src/extensions/khr/android_surface.rs | 27 +- .../extensions/khr/buffer_device_address.rs | 28 +- .../extensions/khr/calibrated_timestamps.rs | 43 +- ash/src/extensions/khr/cooperative_matrix.rs | 22 +- ash/src/extensions/khr/copy_commands2.rs | 21 +- ash/src/extensions/khr/create_render_pass2.rs | 29 +- .../khr/deferred_host_operations.rs | 27 +- ash/src/extensions/khr/device_group.rs | 59 +- .../extensions/khr/device_group_creation.rs | 27 +- ash/src/extensions/khr/display.rs | 27 +- ash/src/extensions/khr/display_swapchain.rs | 28 +- ash/src/extensions/khr/draw_indirect_count.rs | 21 +- ash/src/extensions/khr/dynamic_rendering.rs | 21 +- .../khr/dynamic_rendering_local_read.rs | 21 +- ash/src/extensions/khr/external_fence_fd.rs | 27 +- .../extensions/khr/external_fence_win32.rs | 27 +- ash/src/extensions/khr/external_memory_fd.rs | 27 +- .../extensions/khr/external_memory_win32.rs | 27 +- .../extensions/khr/external_semaphore_fd.rs | 27 +- .../khr/external_semaphore_win32.rs | 27 +- .../khr/get_memory_requirements2.rs | 27 +- .../khr/get_physical_device_properties2.rs | 20 +- .../khr/get_surface_capabilities2.rs | 20 +- ash/src/extensions/khr/line_rasterization.rs | 21 +- ash/src/extensions/khr/maintenance1.rs | 28 +- ash/src/extensions/khr/maintenance3.rs | 28 +- ash/src/extensions/khr/maintenance4.rs | 27 +- ash/src/extensions/khr/maintenance5.rs | 33 +- ash/src/extensions/khr/maintenance6.rs | 22 +- ash/src/extensions/khr/performance_query.rs | 48 +- .../khr/pipeline_executable_properties.rs | 28 +- ash/src/extensions/khr/present_wait.rs | 28 +- ash/src/extensions/khr/push_descriptor.rs | 21 +- .../khr/ray_tracing_maintenance1.rs | 22 +- .../extensions/khr/ray_tracing_pipeline.rs | 28 +- .../khr/sampler_ycbcr_conversion.rs | 27 +- ash/src/extensions/khr/surface.rs | 27 +- ash/src/extensions/khr/swapchain.rs | 58 +- ash/src/extensions/khr/synchronization2.rs | 21 +- ash/src/extensions/khr/timeline_semaphore.rs | 27 +- ash/src/extensions/khr/wayland_surface.rs | 27 +- ash/src/extensions/khr/win32_surface.rs | 27 +- ash/src/extensions/khr/xcb_surface.rs | 27 +- ash/src/extensions/khr/xlib_surface.rs | 27 +- ash/src/extensions/mvk/ios_surface.rs | 27 +- ash/src/extensions/mvk/macos_surface.rs | 27 +- ash/src/extensions/nn/vi_surface.rs | 27 +- ash/src/extensions/nv/copy_memory_indirect.rs | 22 +- .../extensions/nv/coverage_reduction_mode.rs | 20 +- ash/src/extensions/nv/cuda_kernel_launch.rs | 27 +- .../nv/device_diagnostic_checkpoints.rs | 20 +- .../nv/device_generated_commands_compute.rs | 28 +- ash/src/extensions/nv/low_latency2.rs | 28 +- ash/src/extensions/nv/memory_decompression.rs | 21 +- ash/src/extensions/nv/mesh_shader.rs | 21 +- ash/src/extensions/nv/ray_tracing.rs | 27 +- ash/src/lib.rs | 3 +- ash/src/vk.rs | 3 +- ash/src/vk/extensions.rs | 4646 +++++++++++++++-- ash/src/vk/features.rs | 414 +- generator/src/lib.rs | 103 +- 96 files changed, 4625 insertions(+), 2984 deletions(-) diff --git a/ash-examples/src/lib.rs b/ash-examples/src/lib.rs index a8c159865..be2a0a03a 100644 --- a/ash-examples/src/lib.rs +++ b/ash-examples/src/lib.rs @@ -11,7 +11,7 @@ use std::{ borrow::Cow, cell::RefCell, default::Default, error::Error, ffi, ops::Drop, os::raw::c_char, }; -use ash::extensions::{ +use ash::vk::{ ext::debug_utils, khr::{surface, swapchain}, }; diff --git a/ash-window/examples/winit.rs b/ash-window/examples/winit.rs index 5ceb1e04b..e641dd7a2 100644 --- a/ash-window/examples/winit.rs +++ b/ash-window/examples/winit.rs @@ -35,7 +35,7 @@ fn main() -> Result<(), Box> { .build(&event_loop)?; // Load the surface extensions - let surface_fn = ash::extensions::khr::surface::Instance::new(&entry, &instance); + let surface_fn = vk::khr::surface::Instance::new(&entry, &instance); let mut surface = None; let _ = event_loop.run(move |event, elwp| match event { diff --git a/ash-window/src/lib.rs b/ash-window/src/lib.rs index c6d17662d..bfab2f238 100644 --- a/ash-window/src/lib.rs +++ b/ash-window/src/lib.rs @@ -3,14 +3,15 @@ use std::os::raw::c_char; use ash::{ - extensions::{ + prelude::*, + vk, + vk::{ ext::metal_surface, khr::{ android_surface, surface, wayland_surface, win32_surface, xcb_surface, xlib_surface, }, }, - prelude::*, - vk, Entry, Instance, + Entry, Instance, }; use raw_window_handle::{RawDisplayHandle, RawWindowHandle}; diff --git a/ash/src/entry.rs b/ash/src/entry.rs index dfe138f3d..6148399a8 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -235,8 +235,8 @@ impl Entry { /// # Safety /// /// The resulting [`Instance`] and any function-pointer objects (e.g. [`Device`][crate::Device] - /// and [extensions][crate::extensions]) loaded from it may not be used after this [`Entry`] - /// object is dropped, unless it was crated using [`Entry::linked()`] or + /// and extensions like [`vk::khr::swapchain::Device`]) loaded from it may not be used after + /// this [`Entry`] object is dropped, unless it was crated using [`Entry::linked()`] or /// [`Entry::from_parts_1_1()`]. /// /// [`Instance`] does _not_ implement [drop][drop()] semantics and can only be destroyed via diff --git a/ash/src/extensions/amd/buffer_marker.rs b/ash/src/extensions/amd/buffer_marker.rs index c05cf5e76..f95ecb20b 100644 --- a/ash/src/extensions/amd/buffer_marker.rs +++ b/ash/src/extensions/amd/buffer_marker.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::amd::buffer_marker::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::amd::buffer_marker::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::amd::buffer_marker::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::amd::buffer_marker::Device { /// #[inline] pub unsafe fn cmd_write_buffer_marker( @@ -35,9 +21,4 @@ impl Device { marker, ) } - - #[inline] - pub fn fp(&self) -> &vk::amd::buffer_marker::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/amd/shader_info.rs b/ash/src/extensions/amd/shader_info.rs index e3f36e8aa..e573721a1 100644 --- a/ash/src/extensions/amd/shader_info.rs +++ b/ash/src/extensions/amd/shader_info.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; use core::mem; -pub use vk::amd::shader_info::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::amd::shader_info::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::amd::shader_info::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::amd::shader_info::Device { /// #[inline] pub unsafe fn get_shader_info( @@ -64,16 +49,6 @@ impl Device { x => unimplemented!("ShaderInfoTypeAMD {}", x.0), } } - - #[inline] - pub fn fp(&self) -> &vk::amd::shader_info::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } #[derive(Clone)] diff --git a/ash/src/extensions/amdx/shader_enqueue.rs b/ash/src/extensions/amdx/shader_enqueue.rs index 6d792b514..ac800db08 100644 --- a/ash/src/extensions/amdx/shader_enqueue.rs +++ b/ash/src/extensions/amdx/shader_enqueue.rs @@ -5,23 +5,8 @@ use crate::vk; use crate::RawPtr; use alloc::vec::Vec; use core::mem; -pub use vk::amdx::shader_enqueue::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::amdx::shader_enqueue::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::amdx::shader_enqueue::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::amdx::shader_enqueue::Device { /// #[inline] pub unsafe fn create_execution_graph_pipelines( @@ -116,14 +101,4 @@ impl Device { ) { (self.fp.cmd_dispatch_graph_indirect_count_amdx)(command_buffer, scratch, count_info) } - - #[inline] - pub fn fp(&self) -> &vk::amdx::shader_enqueue::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/android/external_memory_android_hardware_buffer.rs b/ash/src/extensions/android/external_memory_android_hardware_buffer.rs index f9988545b..594cc6946 100644 --- a/ash/src/extensions/android/external_memory_android_hardware_buffer.rs +++ b/ash/src/extensions/android/external_memory_android_hardware_buffer.rs @@ -3,24 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::android::external_memory_android_hardware_buffer::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::android::external_memory_android_hardware_buffer::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = - vk::android::external_memory_android_hardware_buffer::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::android::external_memory_android_hardware_buffer::Device { /// #[inline] pub unsafe fn get_android_hardware_buffer_properties( @@ -42,14 +26,4 @@ impl Device { (self.fp.get_memory_android_hardware_buffer_android)(self.handle, info, buffer.as_mut_ptr()) .assume_init_on_success(buffer) } - - #[inline] - pub fn fp(&self) -> &vk::android::external_memory_android_hardware_buffer::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/acquire_drm_display.rs b/ash/src/extensions/ext/acquire_drm_display.rs index 5f82d9b7f..959c60ad9 100644 --- a/ash/src/extensions/ext/acquire_drm_display.rs +++ b/ash/src/extensions/ext/acquire_drm_display.rs @@ -3,22 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::ext::acquire_drm_display::NAME; - -#[derive(Clone)] -pub struct Instance { - fp: vk::ext::acquire_drm_display::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::ext::acquire_drm_display::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::acquire_drm_display::Instance { /// #[inline] pub unsafe fn acquire_drm_display( @@ -42,9 +28,4 @@ impl Instance { (self.fp.get_drm_display_ext)(physical_device, drm_fd, connector_id, display.as_mut_ptr()) .assume_init_on_success(display) } - - #[inline] - pub fn fp(&self) -> &vk::ext::acquire_drm_display::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/buffer_device_address.rs b/ash/src/extensions/ext/buffer_device_address.rs index 2a6a08339..89d4cf540 100644 --- a/ash/src/extensions/ext/buffer_device_address.rs +++ b/ash/src/extensions/ext/buffer_device_address.rs @@ -1,24 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::ext::buffer_device_address::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::buffer_device_address::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::buffer_device_address::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::buffer_device_address::Device { /// #[inline] pub unsafe fn get_buffer_device_address( @@ -27,14 +11,4 @@ impl Device { ) -> vk::DeviceAddress { (self.fp.get_buffer_device_address_ext)(self.handle, info) } - - #[inline] - pub fn fp(&self) -> &vk::ext::buffer_device_address::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/calibrated_timestamps.rs b/ash/src/extensions/ext/calibrated_timestamps.rs index 475eb5b39..52da074a8 100644 --- a/ash/src/extensions/ext/calibrated_timestamps.rs +++ b/ash/src/extensions/ext/calibrated_timestamps.rs @@ -4,24 +4,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; use core::mem; -pub use vk::ext::calibrated_timestamps::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::calibrated_timestamps::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::calibrated_timestamps::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::calibrated_timestamps::Device { /// /// /// Returns a tuple containing `(timestamps, max_deviation)` @@ -43,33 +27,9 @@ impl Device { timestamps.set_len(info.len()); Ok((timestamps, max_deviation)) } - - #[inline] - pub fn fp(&self) -> &vk::ext::calibrated_timestamps::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } -} - -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - fp: vk::ext::calibrated_timestamps::InstanceFn, } -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::ext::calibrated_timestamps::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } - +impl vk::ext::calibrated_timestamps::Instance { /// #[inline] pub unsafe fn get_physical_device_calibrateable_time_domains( @@ -84,9 +44,4 @@ impl Instance { ) }) } - - #[inline] - pub fn fp(&self) -> &vk::ext::calibrated_timestamps::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/debug_marker.rs b/ash/src/extensions/ext/debug_marker.rs index 144c8b0ad..83697a794 100755 --- a/ash/src/extensions/ext/debug_marker.rs +++ b/ash/src/extensions/ext/debug_marker.rs @@ -2,24 +2,8 @@ use crate::prelude::*; use crate::vk; -use core::mem; -pub use vk::ext::debug_marker::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::debug_marker::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::debug_marker::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::debug_marker::Device { /// #[inline] pub unsafe fn debug_marker_set_object_name( @@ -54,14 +38,4 @@ impl Device { ) { (self.fp.cmd_debug_marker_insert_ext)(command_buffer, marker_info); } - - #[inline] - pub fn fp(&self) -> &vk::ext::debug_marker::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/debug_report.rs b/ash/src/extensions/ext/debug_report.rs index 6cdc24d82..077745f8a 100755 --- a/ash/src/extensions/ext/debug_report.rs +++ b/ash/src/extensions/ext/debug_report.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::ext::debug_report::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::ext::debug_report::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::ext::debug_report::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::debug_report::Instance { /// #[inline] pub unsafe fn destroy_debug_report_callback( @@ -51,14 +36,4 @@ impl Instance { ) .assume_init_on_success(debug_cb) } - - #[inline] - pub fn fp(&self) -> &vk::ext::debug_report::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/ext/debug_utils.rs b/ash/src/extensions/ext/debug_utils.rs index 1cbabc137..fd8e3e8f8 100755 --- a/ash/src/extensions/ext/debug_utils.rs +++ b/ash/src/extensions/ext/debug_utils.rs @@ -4,24 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::ext::debug_utils::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::debug_utils::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::debug_utils::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::debug_utils::Device { /// #[inline] pub unsafe fn set_debug_utils_object_name( @@ -91,34 +75,9 @@ impl Device { ) { (self.fp.queue_insert_debug_utils_label_ext)(queue, label); } - - #[inline] - pub fn fp(&self) -> &vk::ext::debug_utils::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::ext::debug_utils::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::ext::debug_utils::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } - +impl vk::ext::debug_utils::Instance { /// #[inline] pub unsafe fn create_debug_utils_messenger( @@ -161,14 +120,4 @@ impl Instance { callback_data, ); } - - #[inline] - pub fn fp(&self) -> &vk::ext::debug_utils::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/ext/descriptor_buffer.rs b/ash/src/extensions/ext/descriptor_buffer.rs index 19a1a4767..fc09c2730 100644 --- a/ash/src/extensions/ext/descriptor_buffer.rs +++ b/ash/src/extensions/ext/descriptor_buffer.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::ext::descriptor_buffer::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::descriptor_buffer::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::descriptor_buffer::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::descriptor_buffer::Device { /// #[inline] pub unsafe fn get_descriptor_set_layout_size( @@ -193,14 +178,4 @@ impl Device { ) .result() } - - #[inline] - pub fn fp(&self) -> &vk::ext::descriptor_buffer::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/extended_dynamic_state.rs b/ash/src/extensions/ext/extended_dynamic_state.rs index 6928d0a47..fa212e51d 100644 --- a/ash/src/extensions/ext/extended_dynamic_state.rs +++ b/ash/src/extensions/ext/extended_dynamic_state.rs @@ -1,23 +1,9 @@ //! use crate::vk; -use core::mem; use core::ptr; -pub use vk::ext::extended_dynamic_state::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::ext::extended_dynamic_state::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::ext::extended_dynamic_state::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::extended_dynamic_state::Device { /// #[inline] pub unsafe fn cmd_set_cull_mode( @@ -184,9 +170,4 @@ impl Device { compare_op, ) } - - #[inline] - pub fn fp(&self) -> &vk::ext::extended_dynamic_state::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/extended_dynamic_state2.rs b/ash/src/extensions/ext/extended_dynamic_state2.rs index ac10cd02d..fc28de45c 100644 --- a/ash/src/extensions/ext/extended_dynamic_state2.rs +++ b/ash/src/extensions/ext/extended_dynamic_state2.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::ext::extended_dynamic_state2::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::ext::extended_dynamic_state2::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::ext::extended_dynamic_state2::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::extended_dynamic_state2::Device { /// #[inline] pub unsafe fn cmd_set_patch_control_points( @@ -72,9 +58,4 @@ impl Device { primitive_restart_enable.into(), ) } - - #[inline] - pub fn fp(&self) -> &vk::ext::extended_dynamic_state2::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/extended_dynamic_state3.rs b/ash/src/extensions/ext/extended_dynamic_state3.rs index c9dfbc3f5..dbc688cf0 100644 --- a/ash/src/extensions/ext/extended_dynamic_state3.rs +++ b/ash/src/extensions/ext/extended_dynamic_state3.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::ext::extended_dynamic_state3::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::ext::extended_dynamic_state3::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::ext::extended_dynamic_state3::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::extended_dynamic_state3::Device { /// #[inline] pub unsafe fn cmd_set_tessellation_domain_origin( @@ -396,9 +382,4 @@ impl Device { ) { (self.fp.cmd_set_coverage_reduction_mode_nv)(command_buffer, coverage_reduction_mode) } - - #[inline] - pub fn fp(&self) -> &vk::ext::extended_dynamic_state3::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/full_screen_exclusive.rs b/ash/src/extensions/ext/full_screen_exclusive.rs index eb20135b2..ebe596d6c 100644 --- a/ash/src/extensions/ext/full_screen_exclusive.rs +++ b/ash/src/extensions/ext/full_screen_exclusive.rs @@ -4,24 +4,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; use core::mem; -pub use vk::ext::full_screen_exclusive::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::full_screen_exclusive::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::full_screen_exclusive::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::full_screen_exclusive::Device { /// #[inline] pub unsafe fn acquire_full_screen_exclusive_mode( @@ -54,33 +38,9 @@ impl Device { ) .assume_init_on_success(present_modes) } - - #[inline] - pub fn fp(&self) -> &vk::ext::full_screen_exclusive::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } -} - -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - fp: vk::ext::full_screen_exclusive::InstanceFn, } -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::ext::full_screen_exclusive::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } - +impl vk::ext::full_screen_exclusive::Instance { /// #[inline] pub unsafe fn get_physical_device_surface_present_modes2( @@ -97,9 +57,4 @@ impl Instance { ) }) } - - #[inline] - pub fn fp(&self) -> &vk::ext::full_screen_exclusive::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/hdr_metadata.rs b/ash/src/extensions/ext/hdr_metadata.rs index e6f12ae84..c44b05c6f 100644 --- a/ash/src/extensions/ext/hdr_metadata.rs +++ b/ash/src/extensions/ext/hdr_metadata.rs @@ -1,24 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::ext::hdr_metadata::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::hdr_metadata::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::hdr_metadata::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::hdr_metadata::Device { /// #[inline] pub unsafe fn set_hdr_metadata( @@ -34,14 +18,4 @@ impl Device { metadata.as_ptr(), ) } - - #[inline] - pub fn fp(&self) -> &vk::ext::hdr_metadata::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/headless_surface.rs b/ash/src/extensions/ext/headless_surface.rs index 023e048dd..68fe9439b 100644 --- a/ash/src/extensions/ext/headless_surface.rs +++ b/ash/src/extensions/ext/headless_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::ext::headless_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::ext::headless_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::ext::headless_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::headless_surface::Instance { /// #[inline] pub unsafe fn create_headless_surface( @@ -37,14 +22,4 @@ impl Instance { ) .assume_init_on_success(surface) } - - #[inline] - pub fn fp(&self) -> &vk::ext::headless_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/ext/host_image_copy.rs b/ash/src/extensions/ext/host_image_copy.rs index 9e0eb4f5d..6af4caa62 100644 --- a/ash/src/extensions/ext/host_image_copy.rs +++ b/ash/src/extensions/ext/host_image_copy.rs @@ -1,27 +1,9 @@ //! -#[cfg(doc)] -use super::{super::khr::maintenance5, image_compression_control}; use crate::prelude::*; use crate::vk; -use core::mem; -pub use vk::ext::host_image_copy::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::host_image_copy::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::host_image_copy::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::host_image_copy::Device { /// #[inline] pub unsafe fn copy_memory_to_image( @@ -65,10 +47,10 @@ impl Device { /// /// - /// Also available as [`maintenance5::Device::get_image_subresource_layout2()`] + /// Also available as [`vk::khr::maintenance5::Device::get_image_subresource_layout2()`] /// when [`VK_KHR_maintenance5`] is enabled. /// - /// Also available as [`image_compression_control::Device::get_image_subresource_layout2()`] + /// Also available as [`vk::ext::image_compression_control::Device::get_image_subresource_layout2()`] /// when [`VK_EXT_image_compression_control`] is enabled. /// /// [`VK_KHR_maintenance5`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_maintenance5.html @@ -82,14 +64,4 @@ impl Device { ) { (self.fp.get_image_subresource_layout2_ext)(self.handle, image, subresource, layout) } - - #[inline] - pub fn fp(&self) -> &vk::ext::host_image_copy::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/image_compression_control.rs b/ash/src/extensions/ext/image_compression_control.rs index e1293b656..a849cf0a1 100644 --- a/ash/src/extensions/ext/image_compression_control.rs +++ b/ash/src/extensions/ext/image_compression_control.rs @@ -1,32 +1,14 @@ //! -#[cfg(doc)] -use super::{super::khr::maintenance5, host_image_copy}; use crate::vk; -use core::mem; -pub use vk::ext::image_compression_control::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::image_compression_control::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::image_compression_control::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::image_compression_control::Device { /// /// - /// Also available as [`maintenance5::Device::get_image_subresource_layout2()`] + /// Also available as [`vk::khr::maintenance5::Device::get_image_subresource_layout2()`] /// when [`VK_KHR_maintenance5`] is enabled. /// - /// Also available as [`host_image_copy::Device::get_image_subresource_layout2()`] + /// Also available as [`vk::ext::host_image_copy::Device::get_image_subresource_layout2()`] /// when [`VK_EXT_host_image_copy`] is enabled. /// /// [`VK_KHR_maintenance5`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_maintenance5.html @@ -40,14 +22,4 @@ impl Device { ) { (self.fp.get_image_subresource_layout2_ext)(self.handle, image, subresource, layout) } - - #[inline] - pub fn fp(&self) -> &vk::ext::image_compression_control::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/image_drm_format_modifier.rs b/ash/src/extensions/ext/image_drm_format_modifier.rs index 558581a68..e6233177e 100644 --- a/ash/src/extensions/ext/image_drm_format_modifier.rs +++ b/ash/src/extensions/ext/image_drm_format_modifier.rs @@ -2,24 +2,8 @@ use crate::prelude::*; use crate::vk; -use core::mem; -pub use vk::ext::image_drm_format_modifier::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::image_drm_format_modifier::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::image_drm_format_modifier::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::image_drm_format_modifier::Device { /// #[inline] pub unsafe fn get_image_drm_format_modifier_properties( @@ -30,14 +14,4 @@ impl Device { (self.fp.get_image_drm_format_modifier_properties_ext)(self.handle, image, properties) .result() } - - #[inline] - pub fn fp(&self) -> &vk::ext::image_drm_format_modifier::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/mesh_shader.rs b/ash/src/extensions/ext/mesh_shader.rs index 2440fd4a0..a87451eee 100644 --- a/ash/src/extensions/ext/mesh_shader.rs +++ b/ash/src/extensions/ext/mesh_shader.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::ext::mesh_shader::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::ext::mesh_shader::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::ext::mesh_shader::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::mesh_shader::Device { /// #[inline] pub unsafe fn cmd_draw_mesh_tasks( @@ -81,9 +67,4 @@ impl Device { stride, ) } - - #[inline] - pub fn fp(&self) -> &vk::ext::mesh_shader::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/metal_surface.rs b/ash/src/extensions/ext/metal_surface.rs index 3a7cf84ce..e11730c3d 100644 --- a/ash/src/extensions/ext/metal_surface.rs +++ b/ash/src/extensions/ext/metal_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::ext::metal_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::ext::metal_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::ext::metal_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::metal_surface::Instance { /// #[inline] pub unsafe fn create_metal_surface( @@ -37,14 +22,4 @@ impl Instance { ) .assume_init_on_success(surface) } - - #[inline] - pub fn fp(&self) -> &vk::ext::metal_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/ext/pipeline_properties.rs b/ash/src/extensions/ext/pipeline_properties.rs index c6e3cebbe..e8603b55b 100644 --- a/ash/src/extensions/ext/pipeline_properties.rs +++ b/ash/src/extensions/ext/pipeline_properties.rs @@ -2,24 +2,8 @@ use crate::prelude::*; use crate::vk; -use core::mem; -pub use vk::ext::pipeline_properties::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::pipeline_properties::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::pipeline_properties::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::pipeline_properties::Device { /// #[inline] pub unsafe fn get_pipeline_properties( @@ -34,14 +18,4 @@ impl Device { ) .result() } - - #[inline] - pub fn fp(&self) -> &vk::ext::pipeline_properties::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/private_data.rs b/ash/src/extensions/ext/private_data.rs index 4dbafc700..1181bd4b1 100644 --- a/ash/src/extensions/ext/private_data.rs +++ b/ash/src/extensions/ext/private_data.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::ext::private_data::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::private_data::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::private_data::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::private_data::Device { /// #[inline] pub unsafe fn create_private_data_slot( @@ -87,14 +72,4 @@ impl Device { ); data.assume_init() } - - #[inline] - pub fn fp(&self) -> &vk::ext::private_data::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/sample_locations.rs b/ash/src/extensions/ext/sample_locations.rs index 116858505..df699f8e6 100644 --- a/ash/src/extensions/ext/sample_locations.rs +++ b/ash/src/extensions/ext/sample_locations.rs @@ -1,23 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::ext::sample_locations::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - fp: vk::ext::sample_locations::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::ext::sample_locations::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::sample_locations::Device { /// #[inline] pub unsafe fn cmd_set_sample_locations( @@ -27,27 +12,9 @@ impl Device { ) { (self.fp.cmd_set_sample_locations_ext)(command_buffer, sample_locations_info) } - - #[inline] - pub fn fp(&self) -> &vk::ext::sample_locations::DeviceFn { - &self.fp - } } -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - fp: vk::ext::sample_locations::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let fp = vk::ext::sample_locations::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - }); - Self { fp } - } - +impl vk::ext::sample_locations::Instance { /// #[inline] pub unsafe fn get_physical_device_multisample_properties( @@ -62,9 +29,4 @@ impl Instance { multisample_properties, ) } - - #[inline] - pub fn fp(&self) -> &vk::ext::sample_locations::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/shader_object.rs b/ash/src/extensions/ext/shader_object.rs index 501b1d507..e8c30a113 100644 --- a/ash/src/extensions/ext/shader_object.rs +++ b/ash/src/extensions/ext/shader_object.rs @@ -4,25 +4,9 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use alloc::vec::Vec; -use core::mem; use core::ptr; -pub use vk::ext::shader_object::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::shader_object::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::shader_object::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::shader_object::Device { /// #[inline] pub unsafe fn create_shaders( @@ -701,14 +685,4 @@ impl Device { ) { (self.fp.cmd_set_coverage_reduction_mode_nv)(command_buffer, coverage_reduction_mode) } - - #[inline] - pub fn fp(&self) -> &vk::ext::shader_object::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/swapchain_maintenance1.rs b/ash/src/extensions/ext/swapchain_maintenance1.rs index 8a0be08e6..42f7a6e62 100644 --- a/ash/src/extensions/ext/swapchain_maintenance1.rs +++ b/ash/src/extensions/ext/swapchain_maintenance1.rs @@ -2,24 +2,8 @@ use crate::prelude::*; use crate::vk; -use core::mem; -pub use vk::ext::swapchain_maintenance1::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::ext::swapchain_maintenance1::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::ext::swapchain_maintenance1::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::ext::swapchain_maintenance1::Device { /// #[inline] pub unsafe fn release_swapchain_images( @@ -28,14 +12,4 @@ impl Device { ) -> VkResult<()> { (self.fp.release_swapchain_images_ext)(self.handle, release_info).result() } - - #[inline] - pub fn fp(&self) -> &vk::ext::swapchain_maintenance1::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/ext/tooling_info.rs b/ash/src/extensions/ext/tooling_info.rs index dc483f672..592f1aaa7 100644 --- a/ash/src/extensions/ext/tooling_info.rs +++ b/ash/src/extensions/ext/tooling_info.rs @@ -3,22 +3,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; -use core::mem; -pub use vk::ext::tooling_info::NAME; - -#[derive(Clone)] -pub struct Instance { - fp: vk::ext::tooling_info::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let fp = vk::ext::tooling_info::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::tooling_info::Instance { /// #[inline] pub unsafe fn get_physical_device_tool_properties( @@ -29,9 +15,4 @@ impl Instance { (self.fp.get_physical_device_tool_properties_ext)(physical_device, count, data) }) } - - #[inline] - pub fn fp(&self) -> &vk::ext::tooling_info::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/ext/vertex_input_dynamic_state.rs b/ash/src/extensions/ext/vertex_input_dynamic_state.rs index 8e255c585..796b81bdc 100644 --- a/ash/src/extensions/ext/vertex_input_dynamic_state.rs +++ b/ash/src/extensions/ext/vertex_input_dynamic_state.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::ext::vertex_input_dynamic_state::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::ext::vertex_input_dynamic_state::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::ext::vertex_input_dynamic_state::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::ext::vertex_input_dynamic_state::Device { /// #[inline] pub unsafe fn cmd_set_vertex_input( @@ -33,9 +19,4 @@ impl Device { vertex_attribute_descriptions.as_ptr(), ) } - - #[inline] - pub fn fp(&self) -> &vk::ext::vertex_input_dynamic_state::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/google/display_timing.rs b/ash/src/extensions/google/display_timing.rs index dbedfc80d..b95437da1 100644 --- a/ash/src/extensions/google/display_timing.rs +++ b/ash/src/extensions/google/display_timing.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; use core::mem; -pub use vk::google::display_timing::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::google::display_timing::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::google::display_timing::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::google::display_timing::Device { /// #[inline] pub unsafe fn get_past_presentation_timing( @@ -42,14 +27,4 @@ impl Device { (self.fp.get_refresh_cycle_duration_google)(self.handle, swapchain, properties.as_mut_ptr()) .assume_init_on_success(properties) } - - #[inline] - pub fn fp(&self) -> &vk::google::display_timing::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/acceleration_structure.rs b/ash/src/extensions/khr/acceleration_structure.rs index 39468543f..07c4e7069 100644 --- a/ash/src/extensions/khr/acceleration_structure.rs +++ b/ash/src/extensions/khr/acceleration_structure.rs @@ -5,23 +5,8 @@ use crate::vk; use crate::RawPtr; use alloc::vec::Vec; use core::mem; -pub use vk::khr::acceleration_structure::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::acceleration_structure::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::acceleration_structure::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::acceleration_structure::Device { /// #[inline] pub unsafe fn create_acceleration_structure( @@ -288,14 +273,4 @@ impl Device { size_info, ) } - - #[inline] - pub fn fp(&self) -> &vk::khr::acceleration_structure::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/android_surface.rs b/ash/src/extensions/khr/android_surface.rs index c0ae280eb..dcf54707d 100755 --- a/ash/src/extensions/khr/android_surface.rs +++ b/ash/src/extensions/khr/android_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::android_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::android_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::android_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::android_surface::Instance { /// #[inline] pub unsafe fn create_android_surface( @@ -37,14 +22,4 @@ impl Instance { ) .assume_init_on_success(surface) } - - #[inline] - pub fn fp(&self) -> &vk::khr::android_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/khr/buffer_device_address.rs b/ash/src/extensions/khr/buffer_device_address.rs index 5db3207ff..be260f895 100644 --- a/ash/src/extensions/khr/buffer_device_address.rs +++ b/ash/src/extensions/khr/buffer_device_address.rs @@ -1,24 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::buffer_device_address::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::buffer_device_address::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::buffer_device_address::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::buffer_device_address::Device { /// #[inline] pub unsafe fn get_buffer_device_address( @@ -45,14 +29,4 @@ impl Device { ) -> u64 { (self.fp.get_device_memory_opaque_capture_address_khr)(self.handle, info) } - - #[inline] - pub fn fp(&self) -> &vk::khr::buffer_device_address::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/calibrated_timestamps.rs b/ash/src/extensions/khr/calibrated_timestamps.rs index fc8f31ff6..7cc6b9290 100644 --- a/ash/src/extensions/khr/calibrated_timestamps.rs +++ b/ash/src/extensions/khr/calibrated_timestamps.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; use core::mem; -pub use vk::khr::calibrated_timestamps::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - fp: vk::khr::calibrated_timestamps::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::calibrated_timestamps::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::calibrated_timestamps::Device { /// /// /// Returns a tuple containing `(timestamps, max_deviation)` @@ -43,28 +28,9 @@ impl Device { timestamps.set_len(info.len()); Ok((timestamps, max_deviation)) } - - #[inline] - pub fn fp(&self) -> &vk::khr::calibrated_timestamps::DeviceFn { - &self.fp - } } -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - fp: vk::khr::calibrated_timestamps::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::calibrated_timestamps::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } - +impl vk::khr::calibrated_timestamps::Instance { /// #[inline] pub unsafe fn get_physical_device_calibrateable_time_domains( @@ -79,9 +45,4 @@ impl Instance { ) }) } - - #[inline] - pub fn fp(&self) -> &vk::khr::calibrated_timestamps::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/cooperative_matrix.rs b/ash/src/extensions/khr/cooperative_matrix.rs index 388e99357..1524e1de1 100644 --- a/ash/src/extensions/khr/cooperative_matrix.rs +++ b/ash/src/extensions/khr/cooperative_matrix.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; -use core::mem; -pub use vk::khr::cooperative_matrix::NAME; - -#[derive(Clone)] -pub struct Instance { - fp: vk::khr::cooperative_matrix::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::cooperative_matrix::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::cooperative_matrix::Instance { /// #[inline] pub unsafe fn get_physical_device_cooperative_matrix_properties( @@ -36,9 +21,4 @@ impl Instance { ) }) } - - #[inline] - pub fn fp(&self) -> &vk::khr::cooperative_matrix::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/copy_commands2.rs b/ash/src/extensions/khr/copy_commands2.rs index a3daa5e55..c2a47b531 100644 --- a/ash/src/extensions/khr/copy_commands2.rs +++ b/ash/src/extensions/khr/copy_commands2.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::copy_commands2::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::copy_commands2::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::khr::copy_commands2::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::copy_commands2::Device { /// #[inline] pub unsafe fn cmd_copy_buffer2( @@ -71,9 +57,4 @@ impl Device { ) { (self.fp.cmd_resolve_image2_khr)(command_buffer, resolve_image_info) } - - #[inline] - pub fn fp(&self) -> &vk::khr::copy_commands2::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/create_render_pass2.rs b/ash/src/extensions/khr/create_render_pass2.rs index fa3615573..f85b7e00d 100644 --- a/ash/src/extensions/khr/create_render_pass2.rs +++ b/ash/src/extensions/khr/create_render_pass2.rs @@ -1,26 +1,11 @@ -//! +//! use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::create_renderpass2::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::create_renderpass2::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::create_renderpass2::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::create_renderpass2::Device { /// #[inline] pub unsafe fn create_render_pass2( @@ -73,14 +58,4 @@ impl Device { ) { (self.fp.cmd_end_render_pass2_khr)(command_buffer, subpass_end_info); } - - #[inline] - pub fn fp(&self) -> &vk::khr::create_renderpass2::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/deferred_host_operations.rs b/ash/src/extensions/khr/deferred_host_operations.rs index b6f30ee6f..a84631512 100644 --- a/ash/src/extensions/khr/deferred_host_operations.rs +++ b/ash/src/extensions/khr/deferred_host_operations.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::deferred_host_operations::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::deferred_host_operations::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::deferred_host_operations::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::deferred_host_operations::Device { /// #[inline] pub unsafe fn create_deferred_operation( @@ -76,14 +61,4 @@ impl Device { ) -> VkResult<()> { (self.fp.get_deferred_operation_result_khr)(self.handle, operation).result() } - - #[inline] - pub fn fp(&self) -> &vk::khr::deferred_host_operations::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/device_group.rs b/ash/src/extensions/khr/device_group.rs index 48c3bc075..9f1278fc1 100644 --- a/ash/src/extensions/khr/device_group.rs +++ b/ash/src/extensions/khr/device_group.rs @@ -1,29 +1,11 @@ //! -#[cfg(doc)] -use super::swapchain; use crate::prelude::*; use crate::vk; use alloc::vec::Vec; use core::mem; -pub use vk::khr::device_group::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::device_group::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::device_group::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::device_group::Device { /// #[inline] pub unsafe fn get_device_group_peer_memory_features( @@ -70,7 +52,7 @@ impl Device { /// Requires [`VK_KHR_surface`] to be enabled. /// - /// Also available as [`swapchain::Device::get_device_group_present_capabilities()`] since [Vulkan 1.1]. + /// Also available as [`vk::khr::swapchain::Device::get_device_group_present_capabilities()`] since [Vulkan 1.1]. /// /// /// @@ -90,7 +72,7 @@ impl Device { /// Requires [`VK_KHR_surface`] to be enabled. /// - /// Also available as [`swapchain::Device::get_device_group_surface_present_modes()`] since [Vulkan 1.1]. + /// Also available as [`vk::khr::swapchain::Device::get_device_group_surface_present_modes()`] since [Vulkan 1.1]. /// /// /// @@ -114,7 +96,7 @@ impl Device { /// /// Requires [`VK_KHR_swapchain`] to be enabled. /// - /// Also available as [`swapchain::Device::acquire_next_image2()`] since [Vulkan 1.1]. + /// Also available as [`vk::khr::swapchain::Device::acquire_next_image2()`] since [Vulkan 1.1]. /// /// /// @@ -134,36 +116,12 @@ impl Device { _ => Err(err_code), } } - - #[inline] - pub fn fp(&self) -> &vk::khr::device_group::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } -} - -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - fp: vk::khr::device_group::InstanceFn, } -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::device_group::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } - +impl vk::khr::device_group::Instance { /// Requires [`VK_KHR_surface`] to be enabled. /// - /// Also available as [`swapchain::Instance::get_physical_device_present_rectangles()`] since [Vulkan 1.1]. + /// Also available as [`vk::khr::swapchain::Instance::get_physical_device_present_rectangles()`] since [Vulkan 1.1]. /// /// /// @@ -184,9 +142,4 @@ impl Instance { ) }) } - - #[inline] - pub fn fp(&self) -> &vk::khr::device_group::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/device_group_creation.rs b/ash/src/extensions/khr/device_group_creation.rs index 9233cbb35..fbcd8ef7b 100644 --- a/ash/src/extensions/khr/device_group_creation.rs +++ b/ash/src/extensions/khr/device_group_creation.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use core::mem; use core::ptr; -pub use vk::khr::device_group_creation::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::device_group_creation::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::device_group_creation::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::device_group_creation::Instance { /// Retrieve the number of elements to pass to [`enumerate_physical_device_groups()`][Self::enumerate_physical_device_groups()] #[inline] pub unsafe fn enumerate_physical_device_groups_len(&self) -> VkResult { @@ -49,14 +34,4 @@ impl Instance { assert_eq!(count as usize, out.len()); Ok(()) } - - #[inline] - pub fn fp(&self) -> &vk::khr::device_group_creation::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/khr/display.rs b/ash/src/extensions/khr/display.rs index baa97fe4a..79d1ff704 100755 --- a/ash/src/extensions/khr/display.rs +++ b/ash/src/extensions/khr/display.rs @@ -5,23 +5,8 @@ use crate::vk; use crate::RawPtr; use alloc::vec::Vec; use core::mem; -pub use vk::khr::display::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::display::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::display::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::display::Instance { /// #[inline] pub unsafe fn get_physical_device_display_properties( @@ -127,14 +112,4 @@ impl Instance { ) .assume_init_on_success(surface) } - - #[inline] - pub fn fp(&self) -> &vk::khr::display::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/khr/display_swapchain.rs b/ash/src/extensions/khr/display_swapchain.rs index 8a6e8d94c..eef4ec7ba 100755 --- a/ash/src/extensions/khr/display_swapchain.rs +++ b/ash/src/extensions/khr/display_swapchain.rs @@ -4,24 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use alloc::vec::Vec; -use core::mem; -pub use vk::khr::display_swapchain::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::display_swapchain::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::display_swapchain::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::display_swapchain::Device { /// #[inline] pub unsafe fn create_shared_swapchains( @@ -39,14 +23,4 @@ impl Device { ) .set_vec_len_on_success(swapchains, create_infos.len()) } - - #[inline] - pub fn fp(&self) -> &vk::khr::display_swapchain::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/draw_indirect_count.rs b/ash/src/extensions/khr/draw_indirect_count.rs index 451363694..d137da3c3 100644 --- a/ash/src/extensions/khr/draw_indirect_count.rs +++ b/ash/src/extensions/khr/draw_indirect_count.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::draw_indirect_count::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::draw_indirect_count::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::khr::draw_indirect_count::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::draw_indirect_count::Device { /// #[inline] pub unsafe fn cmd_draw_indexed_indirect_count( @@ -62,9 +48,4 @@ impl Device { stride, ); } - - #[inline] - pub fn fp(&self) -> &vk::khr::draw_indirect_count::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/dynamic_rendering.rs b/ash/src/extensions/khr/dynamic_rendering.rs index 2988dd2d2..3bf81dc8c 100644 --- a/ash/src/extensions/khr/dynamic_rendering.rs +++ b/ash/src/extensions/khr/dynamic_rendering.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::dynamic_rendering::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::dynamic_rendering::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::khr::dynamic_rendering::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::dynamic_rendering::Device { /// #[inline] pub unsafe fn cmd_begin_rendering( @@ -32,9 +18,4 @@ impl Device { pub unsafe fn cmd_end_rendering(&self, command_buffer: vk::CommandBuffer) { (self.fp.cmd_end_rendering_khr)(command_buffer) } - - #[inline] - pub fn fp(&self) -> &vk::khr::dynamic_rendering::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/dynamic_rendering_local_read.rs b/ash/src/extensions/khr/dynamic_rendering_local_read.rs index 116afb1c5..5586785cb 100644 --- a/ash/src/extensions/khr/dynamic_rendering_local_read.rs +++ b/ash/src/extensions/khr/dynamic_rendering_local_read.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::dynamic_rendering_local_read::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::dynamic_rendering_local_read::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::khr::dynamic_rendering_local_read::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::dynamic_rendering_local_read::Device { /// #[inline] pub unsafe fn cmd_set_rendering_attachment_locations( @@ -36,9 +22,4 @@ impl Device { ) { (self.fp.cmd_set_rendering_input_attachment_indices_khr)(command_buffer, location_info) } - - #[inline] - pub fn fp(&self) -> &vk::khr::dynamic_rendering_local_read::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/external_fence_fd.rs b/ash/src/extensions/khr/external_fence_fd.rs index 5fbf5d0e9..612ad0a1d 100644 --- a/ash/src/extensions/khr/external_fence_fd.rs +++ b/ash/src/extensions/khr/external_fence_fd.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::khr::external_fence_fd::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::external_fence_fd::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::external_fence_fd::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::external_fence_fd::Device { /// #[inline] pub unsafe fn import_fence_fd( @@ -36,14 +21,4 @@ impl Device { (self.fp.get_fence_fd_khr)(self.handle, get_info, fd.as_mut_ptr()) .assume_init_on_success(fd) } - - #[inline] - pub fn fp(&self) -> &vk::khr::external_fence_fd::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/external_fence_win32.rs b/ash/src/extensions/khr/external_fence_win32.rs index faaf549de..edd87382b 100644 --- a/ash/src/extensions/khr/external_fence_win32.rs +++ b/ash/src/extensions/khr/external_fence_win32.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::khr::external_fence_win32::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::external_fence_win32::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::external_fence_win32::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::external_fence_win32::Device { /// #[inline] pub unsafe fn import_fence_win32_handle( @@ -39,14 +24,4 @@ impl Device { (self.fp.get_fence_win32_handle_khr)(self.handle, get_info, handle.as_mut_ptr()) .assume_init_on_success(handle) } - - #[inline] - pub fn fp(&self) -> &vk::khr::external_fence_win32::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/external_memory_fd.rs b/ash/src/extensions/khr/external_memory_fd.rs index a053570af..5035502e3 100644 --- a/ash/src/extensions/khr/external_memory_fd.rs +++ b/ash/src/extensions/khr/external_memory_fd.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::khr::external_memory_fd::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::external_memory_fd::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::external_memory_fd::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::external_memory_fd::Device { /// #[inline] pub unsafe fn get_memory_fd(&self, get_fd_info: &vk::MemoryGetFdInfoKHR<'_>) -> VkResult { @@ -39,14 +24,4 @@ impl Device { (self.fp.get_memory_fd_properties_khr)(self.handle, handle_type, fd, memory_fd_properties) .result() } - - #[inline] - pub fn fp(&self) -> &vk::khr::external_memory_fd::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/external_memory_win32.rs b/ash/src/extensions/khr/external_memory_win32.rs index 974a57562..2a76bd213 100644 --- a/ash/src/extensions/khr/external_memory_win32.rs +++ b/ash/src/extensions/khr/external_memory_win32.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::khr::external_memory_win32::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::external_memory_win32::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::external_memory_win32::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::external_memory_win32::Device { /// #[inline] pub unsafe fn get_memory_win32_handle( @@ -47,14 +32,4 @@ impl Device { ) .result() } - - #[inline] - pub fn fp(&self) -> &vk::khr::external_memory_win32::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/external_semaphore_fd.rs b/ash/src/extensions/khr/external_semaphore_fd.rs index 62d2a25a0..8883130c7 100644 --- a/ash/src/extensions/khr/external_semaphore_fd.rs +++ b/ash/src/extensions/khr/external_semaphore_fd.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::khr::external_semaphore_fd::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::external_semaphore_fd::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::external_semaphore_fd::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::external_semaphore_fd::Device { /// #[inline] pub unsafe fn import_semaphore_fd( @@ -39,14 +24,4 @@ impl Device { (self.fp.get_semaphore_fd_khr)(self.handle, get_info, fd.as_mut_ptr()) .assume_init_on_success(fd) } - - #[inline] - pub fn fp(&self) -> &vk::khr::external_semaphore_fd::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/external_semaphore_win32.rs b/ash/src/extensions/khr/external_semaphore_win32.rs index 9c9d178c4..dcedd02c2 100644 --- a/ash/src/extensions/khr/external_semaphore_win32.rs +++ b/ash/src/extensions/khr/external_semaphore_win32.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::khr::external_semaphore_win32::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::external_semaphore_win32::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::external_semaphore_win32::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::external_semaphore_win32::Device { /// #[inline] pub unsafe fn import_semaphore_win32_handle( @@ -39,14 +24,4 @@ impl Device { (self.fp.get_semaphore_win32_handle_khr)(self.handle, get_info, handle.as_mut_ptr()) .assume_init_on_success(handle) } - - #[inline] - pub fn fp(&self) -> &vk::khr::external_semaphore_win32::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/get_memory_requirements2.rs b/ash/src/extensions/khr/get_memory_requirements2.rs index 56b089176..60a959184 100644 --- a/ash/src/extensions/khr/get_memory_requirements2.rs +++ b/ash/src/extensions/khr/get_memory_requirements2.rs @@ -3,23 +3,8 @@ use crate::vk; use core::mem; use core::ptr; -pub use vk::khr::get_memory_requirements2::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::get_memory_requirements2::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::get_memory_requirements2::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::get_memory_requirements2::Device { /// #[inline] pub unsafe fn get_buffer_memory_requirements2( @@ -75,14 +60,4 @@ impl Device { ); assert_eq!(count as usize, out.len()); } - - #[inline] - pub fn fp(&self) -> &vk::khr::get_memory_requirements2::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/get_physical_device_properties2.rs b/ash/src/extensions/khr/get_physical_device_properties2.rs index 2a49c10f7..0c363d735 100644 --- a/ash/src/extensions/khr/get_physical_device_properties2.rs +++ b/ash/src/extensions/khr/get_physical_device_properties2.rs @@ -4,21 +4,8 @@ use crate::prelude::*; use crate::vk; use core::mem; use core::ptr; -pub use vk::khr::get_physical_device_properties2::NAME; - -#[derive(Clone)] -pub struct Instance { - fp: vk::khr::get_physical_device_properties2::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let fp = vk::khr::get_physical_device_properties2::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::get_physical_device_properties2::Instance { /// #[inline] pub unsafe fn get_physical_device_features2( @@ -155,9 +142,4 @@ impl Instance { ); assert_eq!(count as usize, out.len()); } - - #[inline] - pub fn fp(&self) -> &vk::khr::get_physical_device_properties2::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/get_surface_capabilities2.rs b/ash/src/extensions/khr/get_surface_capabilities2.rs index 744c9c996..5c8577d4e 100644 --- a/ash/src/extensions/khr/get_surface_capabilities2.rs +++ b/ash/src/extensions/khr/get_surface_capabilities2.rs @@ -4,21 +4,8 @@ use crate::prelude::*; use crate::vk; use core::mem; use core::ptr; -pub use vk::khr::get_surface_capabilities2::NAME; - -#[derive(Clone)] -pub struct Instance { - fp: vk::khr::get_surface_capabilities2::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let fp = vk::khr::get_surface_capabilities2::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::get_surface_capabilities2::Instance { /// #[inline] pub unsafe fn get_physical_device_surface_capabilities2( @@ -73,9 +60,4 @@ impl Instance { assert_eq!(count as usize, out.len()); err_code.result() } - - #[inline] - pub fn fp(&self) -> &vk::khr::get_surface_capabilities2::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/line_rasterization.rs b/ash/src/extensions/khr/line_rasterization.rs index 14e02dfb7..758bb40ad 100644 --- a/ash/src/extensions/khr/line_rasterization.rs +++ b/ash/src/extensions/khr/line_rasterization.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::line_rasterization::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::line_rasterization::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::khr::line_rasterization::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::line_rasterization::Device { /// #[inline] pub unsafe fn cmd_set_line_stipple( @@ -31,9 +17,4 @@ impl Device { line_stipple_pattern, ) } - - #[inline] - pub fn fp(&self) -> &vk::khr::line_rasterization::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/maintenance1.rs b/ash/src/extensions/khr/maintenance1.rs index f2983110f..01d85789e 100644 --- a/ash/src/extensions/khr/maintenance1.rs +++ b/ash/src/extensions/khr/maintenance1.rs @@ -1,24 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::maintenance1::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::maintenance1::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::maintenance1::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::maintenance1::Device { /// #[inline] pub unsafe fn trim_command_pool( @@ -28,14 +12,4 @@ impl Device { ) { (self.fp.trim_command_pool_khr)(self.handle, command_pool, flags); } - - #[inline] - pub fn fp(&self) -> &vk::khr::maintenance1::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/maintenance3.rs b/ash/src/extensions/khr/maintenance3.rs index 03cf0d8aa..6b8016b25 100644 --- a/ash/src/extensions/khr/maintenance3.rs +++ b/ash/src/extensions/khr/maintenance3.rs @@ -1,24 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::maintenance3::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::maintenance3::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::maintenance3::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::maintenance3::Device { /// #[inline] pub unsafe fn get_descriptor_set_layout_support( @@ -28,14 +12,4 @@ impl Device { ) { (self.fp.get_descriptor_set_layout_support_khr)(self.handle, create_info, out); } - - #[inline] - pub fn fp(&self) -> &vk::khr::maintenance3::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/maintenance4.rs b/ash/src/extensions/khr/maintenance4.rs index c8751d907..57a042460 100644 --- a/ash/src/extensions/khr/maintenance4.rs +++ b/ash/src/extensions/khr/maintenance4.rs @@ -3,23 +3,8 @@ use crate::vk; use core::mem; use core::ptr; -pub use vk::khr::maintenance4::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::maintenance4::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::maintenance4::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::maintenance4::Device { /// #[inline] pub unsafe fn get_device_buffer_memory_requirements( @@ -75,14 +60,4 @@ impl Device { ); assert_eq!(count as usize, out.len()); } - - #[inline] - pub fn fp(&self) -> &vk::khr::maintenance4::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/maintenance5.rs b/ash/src/extensions/khr/maintenance5.rs index 8b7ab72b7..fdd57066d 100644 --- a/ash/src/extensions/khr/maintenance5.rs +++ b/ash/src/extensions/khr/maintenance5.rs @@ -1,26 +1,9 @@ //! -#[cfg(doc)] -use super::super::ext::{host_image_copy, image_compression_control}; use crate::vk; use core::mem; -pub use vk::khr::maintenance5::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::maintenance5::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::maintenance5::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::maintenance5::Device { /// #[inline] pub unsafe fn cmd_bind_index_buffer2( @@ -61,10 +44,10 @@ impl Device { /// /// - /// Also available as [`host_image_copy::Device::get_image_subresource_layout2()`] + /// Also available as [`vk::ext::host_image_copy::Device::get_image_subresource_layout2()`] /// when [`VK_EXT_host_image_copy`] is enabled. /// - /// Also available as [`image_compression_control::Device::get_image_subresource_layout2()`] + /// Also available as [`vk::ext::image_compression_control::Device::get_image_subresource_layout2()`] /// when [`VK_EXT_image_compression_control`] is enabled. /// /// [`VK_EXT_host_image_copy`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_host_image_copy.html @@ -78,14 +61,4 @@ impl Device { ) { (self.fp.get_image_subresource_layout2_khr)(self.handle, image, subresource, layout) } - - #[inline] - pub fn fp(&self) -> &vk::khr::maintenance5::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/maintenance6.rs b/ash/src/extensions/khr/maintenance6.rs index f7e3a4cba..de50e2224 100644 --- a/ash/src/extensions/khr/maintenance6.rs +++ b/ash/src/extensions/khr/maintenance6.rs @@ -1,23 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::maintenance6::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::maintenance6::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::maintenance6::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::maintenance6::Device { /// #[inline] pub unsafe fn cmd_bind_descriptor_sets2( @@ -86,9 +71,4 @@ impl Device { bind_descriptor_buffer_embedded_samplers_info, ) } - - #[inline] - pub fn fp(&self) -> &vk::khr::maintenance6::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/performance_query.rs b/ash/src/extensions/khr/performance_query.rs index 97445f816..5d8c23a7d 100644 --- a/ash/src/extensions/khr/performance_query.rs +++ b/ash/src/extensions/khr/performance_query.rs @@ -4,24 +4,8 @@ use crate::prelude::*; use crate::vk; use core::mem; use core::ptr; -pub use vk::khr::performance_query::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::performance_query::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::performance_query::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::performance_query::Device { /// #[inline] pub unsafe fn acquire_profiling_lock( @@ -36,32 +20,9 @@ impl Device { pub unsafe fn release_profiling_lock(&self) { (self.fp.release_profiling_lock_khr)(self.handle) } - - #[inline] - pub fn fp(&self) -> &vk::khr::performance_query::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } -} - -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - fp: vk::khr::performance_query::InstanceFn, } -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let fp = vk::khr::performance_query::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - }); - Self { fp } - } - +impl vk::khr::performance_query::Instance { /// Retrieve the number of elements to pass to [`enumerate_physical_device_queue_family_performance_query_counters()`][Self::enumerate_physical_device_queue_family_performance_query_counters()] #[inline] pub unsafe fn enumerate_physical_device_queue_family_performance_query_counters_len( @@ -129,9 +90,4 @@ impl Instance { ); num_passes.assume_init() } - - #[inline] - pub fn fp(&self) -> &vk::khr::performance_query::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/pipeline_executable_properties.rs b/ash/src/extensions/khr/pipeline_executable_properties.rs index 3da53b6a1..e33188d13 100644 --- a/ash/src/extensions/khr/pipeline_executable_properties.rs +++ b/ash/src/extensions/khr/pipeline_executable_properties.rs @@ -3,24 +3,8 @@ use crate::prelude::*; use crate::vk; use alloc::vec::Vec; -use core::mem; -pub use vk::khr::pipeline_executable_properties::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::pipeline_executable_properties::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::pipeline_executable_properties::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::pipeline_executable_properties::Device { /// #[inline] pub unsafe fn get_pipeline_executable_internal_representations( @@ -68,14 +52,4 @@ impl Device { ) }) } - - #[inline] - pub fn fp(&self) -> &vk::khr::pipeline_executable_properties::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/present_wait.rs b/ash/src/extensions/khr/present_wait.rs index 89ed13fc9..8b202741f 100644 --- a/ash/src/extensions/khr/present_wait.rs +++ b/ash/src/extensions/khr/present_wait.rs @@ -2,24 +2,8 @@ use crate::prelude::*; use crate::vk; -use core::mem; -pub use vk::khr::present_wait::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::present_wait::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::present_wait::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::present_wait::Device { /// #[inline] pub unsafe fn wait_for_present( @@ -30,14 +14,4 @@ impl Device { ) -> VkResult<()> { (self.fp.wait_for_present_khr)(self.handle, swapchain, present_id, timeout).result() } - - #[inline] - pub fn fp(&self) -> &vk::khr::present_wait::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/push_descriptor.rs b/ash/src/extensions/khr/push_descriptor.rs index 4a64cef96..09877d645 100644 --- a/ash/src/extensions/khr/push_descriptor.rs +++ b/ash/src/extensions/khr/push_descriptor.rs @@ -2,22 +2,8 @@ use crate::vk; use core::ffi; -use core::mem; -pub use vk::khr::push_descriptor::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::push_descriptor::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::khr::push_descriptor::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::push_descriptor::Device { /// #[inline] pub unsafe fn cmd_push_descriptor_set( @@ -56,9 +42,4 @@ impl Device { p_data, ) } - - #[inline] - pub fn fp(&self) -> &vk::khr::push_descriptor::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/ray_tracing_maintenance1.rs b/ash/src/extensions/khr/ray_tracing_maintenance1.rs index 50dde829d..e988f5715 100644 --- a/ash/src/extensions/khr/ray_tracing_maintenance1.rs +++ b/ash/src/extensions/khr/ray_tracing_maintenance1.rs @@ -1,23 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::khr::ray_tracing_maintenance1::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::ray_tracing_maintenance1::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::ray_tracing_maintenance1::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::ray_tracing_maintenance1::Device { /// /// /// `indirect_device_address` is a buffer device address which is a pointer to a [`vk::TraceRaysIndirectCommand2KHR`] structure containing the trace ray parameters. @@ -29,9 +14,4 @@ impl Device { ) { (self.fp.cmd_trace_rays_indirect2_khr)(command_buffer, indirect_device_address); } - - #[inline] - pub fn fp(&self) -> &vk::khr::ray_tracing_maintenance1::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/ray_tracing_pipeline.rs b/ash/src/extensions/khr/ray_tracing_pipeline.rs index 39c466664..3cef7d81d 100644 --- a/ash/src/extensions/khr/ray_tracing_pipeline.rs +++ b/ash/src/extensions/khr/ray_tracing_pipeline.rs @@ -4,24 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use alloc::vec::Vec; -use core::mem; -pub use vk::khr::ray_tracing_pipeline::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::ray_tracing_pipeline::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::ray_tracing_pipeline::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::ray_tracing_pipeline::Device { /// #[inline] pub unsafe fn cmd_trace_rays( @@ -161,14 +145,4 @@ impl Device { ) { (self.fp.cmd_set_ray_tracing_pipeline_stack_size_khr)(command_buffer, pipeline_stack_size); } - - #[inline] - pub fn fp(&self) -> &vk::khr::ray_tracing_pipeline::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/sampler_ycbcr_conversion.rs b/ash/src/extensions/khr/sampler_ycbcr_conversion.rs index 4a7b0e110..979336dcf 100644 --- a/ash/src/extensions/khr/sampler_ycbcr_conversion.rs +++ b/ash/src/extensions/khr/sampler_ycbcr_conversion.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::sampler_ycbcr_conversion::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::sampler_ycbcr_conversion::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::sampler_ycbcr_conversion::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::sampler_ycbcr_conversion::Device { /// #[inline] pub unsafe fn create_sampler_ycbcr_conversion( @@ -51,14 +36,4 @@ impl Device { allocation_callbacks.as_raw_ptr(), ) } - - #[inline] - pub fn fp(&self) -> &vk::khr::sampler_ycbcr_conversion::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/surface.rs b/ash/src/extensions/khr/surface.rs index 00117a2eb..e5d40c4db 100755 --- a/ash/src/extensions/khr/surface.rs +++ b/ash/src/extensions/khr/surface.rs @@ -5,23 +5,8 @@ use crate::vk; use crate::RawPtr; use alloc::vec::Vec; use core::mem; -pub use vk::khr::surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::surface::Instance { /// #[inline] pub unsafe fn get_physical_device_surface_support( @@ -95,14 +80,4 @@ impl Instance { ) { (self.fp.destroy_surface_khr)(self.handle, surface, allocation_callbacks.as_raw_ptr()); } - - #[inline] - pub fn fp(&self) -> &vk::khr::surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/khr/swapchain.rs b/ash/src/extensions/khr/swapchain.rs index 7b29d95ff..df53ae706 100755 --- a/ash/src/extensions/khr/swapchain.rs +++ b/ash/src/extensions/khr/swapchain.rs @@ -1,30 +1,12 @@ //! -#[cfg(doc)] -use super::device_group; use crate::prelude::*; use crate::vk; use crate::RawPtr; use alloc::vec::Vec; use core::mem; -pub use vk::khr::swapchain::NAME; - -/// High-level device function wrapper -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::swapchain::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::swapchain::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::swapchain::Device { /// #[inline] pub unsafe fn create_swapchain( @@ -109,7 +91,7 @@ impl Device { /// Only available since [Vulkan 1.1]. /// - /// Also available as [`device_group::Device::get_device_group_present_capabilities()`] + /// Also available as [`vk::khr::device_group::Device::get_device_group_present_capabilities()`] /// when [`VK_KHR_surface`] is enabled. /// /// @@ -130,7 +112,7 @@ impl Device { /// Only available since [Vulkan 1.1]. /// - /// Also available as [`device_group::Device::get_device_group_surface_present_modes()`] + /// Also available as [`vk::khr::device_group::Device::get_device_group_surface_present_modes()`] /// when [`VK_KHR_surface`] is enabled. /// /// @@ -155,7 +137,7 @@ impl Device { /// /// Only available since [Vulkan 1.1]. /// - /// Also available as [`device_group::Device::acquire_next_image2()`] + /// Also available as [`vk::khr::device_group::Device::acquire_next_image2()`] /// when [`VK_KHR_swapchain`] is enabled. /// /// @@ -176,35 +158,12 @@ impl Device { _ => Err(err_code), } } - - #[inline] - pub fn fp(&self) -> &vk::khr::swapchain::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } -} - -/// High-level instance function wrapper -#[derive(Clone)] -pub struct Instance { - fp: vk::khr::swapchain::InstanceFn, } -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let fp = vk::khr::swapchain::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - }); - Self { fp } - } - +impl vk::khr::swapchain::Instance { /// Only available since [Vulkan 1.1]. /// - /// Also available as [`device_group::Instance::get_physical_device_present_rectangles()`] + /// Also available as [`vk::khr::device_group::Instance::get_physical_device_present_rectangles()`] /// when [`VK_KHR_surface`] is enabled. /// /// @@ -226,9 +185,4 @@ impl Instance { ) }) } - - #[inline] - pub fn fp(&self) -> &vk::khr::swapchain::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/synchronization2.rs b/ash/src/extensions/khr/synchronization2.rs index 3f530db55..069f47ed2 100644 --- a/ash/src/extensions/khr/synchronization2.rs +++ b/ash/src/extensions/khr/synchronization2.rs @@ -2,22 +2,8 @@ use crate::prelude::*; use crate::vk; -use core::mem; -pub use vk::khr::synchronization2::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::khr::synchronization2::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::khr::synchronization2::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::khr::synchronization2::Device { /// #[inline] pub unsafe fn cmd_pipeline_barrier2( @@ -89,9 +75,4 @@ impl Device { ) -> VkResult<()> { (self.fp.queue_submit2_khr)(queue, submits.len() as u32, submits.as_ptr(), fence).result() } - - #[inline] - pub fn fp(&self) -> &vk::khr::synchronization2::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/khr/timeline_semaphore.rs b/ash/src/extensions/khr/timeline_semaphore.rs index 803208b23..6c5262494 100644 --- a/ash/src/extensions/khr/timeline_semaphore.rs +++ b/ash/src/extensions/khr/timeline_semaphore.rs @@ -3,23 +3,8 @@ use crate::prelude::*; use crate::vk; use core::mem; -pub use vk::khr::timeline_semaphore::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::khr::timeline_semaphore::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::khr::timeline_semaphore::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::timeline_semaphore::Device { /// #[inline] pub unsafe fn get_semaphore_counter_value(&self, semaphore: vk::Semaphore) -> VkResult { @@ -46,14 +31,4 @@ impl Device { ) -> VkResult<()> { (self.fp.signal_semaphore_khr)(self.handle, signal_info).result() } - - #[inline] - pub fn fp(&self) -> &vk::khr::timeline_semaphore::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/khr/wayland_surface.rs b/ash/src/extensions/khr/wayland_surface.rs index 3335a4f28..650bdc4c0 100755 --- a/ash/src/extensions/khr/wayland_surface.rs +++ b/ash/src/extensions/khr/wayland_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::wayland_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::wayland_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::wayland_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::wayland_surface::Instance { /// #[inline] pub unsafe fn create_wayland_surface( @@ -54,14 +39,4 @@ impl Instance { b > 0 } - - #[inline] - pub fn fp(&self) -> &vk::khr::wayland_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/khr/win32_surface.rs b/ash/src/extensions/khr/win32_surface.rs index 6b7573778..56ed4480e 100755 --- a/ash/src/extensions/khr/win32_surface.rs +++ b/ash/src/extensions/khr/win32_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::win32_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::win32_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::win32_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::win32_surface::Instance { /// #[inline] pub unsafe fn create_win32_surface( @@ -52,14 +37,4 @@ impl Instance { b > 0 } - - #[inline] - pub fn fp(&self) -> &vk::khr::win32_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/khr/xcb_surface.rs b/ash/src/extensions/khr/xcb_surface.rs index e0cdaaafe..72d93d510 100755 --- a/ash/src/extensions/khr/xcb_surface.rs +++ b/ash/src/extensions/khr/xcb_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::xcb_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::xcb_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::xcb_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::xcb_surface::Instance { /// #[inline] pub unsafe fn create_xcb_surface( @@ -56,14 +41,4 @@ impl Instance { b > 0 } - - #[inline] - pub fn fp(&self) -> &vk::khr::xcb_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/khr/xlib_surface.rs b/ash/src/extensions/khr/xlib_surface.rs index 7d60d3c31..eb7dd1fe4 100755 --- a/ash/src/extensions/khr/xlib_surface.rs +++ b/ash/src/extensions/khr/xlib_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::khr::xlib_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::khr::xlib_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::khr::xlib_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::khr::xlib_surface::Instance { /// #[inline] pub unsafe fn create_xlib_surface( @@ -56,14 +41,4 @@ impl Instance { b > 0 } - - #[inline] - pub fn fp(&self) -> &vk::khr::xlib_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/mvk/ios_surface.rs b/ash/src/extensions/mvk/ios_surface.rs index ebc24521a..89661eb9c 100755 --- a/ash/src/extensions/mvk/ios_surface.rs +++ b/ash/src/extensions/mvk/ios_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::mvk::ios_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::mvk::ios_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::mvk::ios_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::mvk::ios_surface::Instance { /// #[inline] pub unsafe fn create_ios_surface( @@ -37,14 +22,4 @@ impl Instance { ) .assume_init_on_success(surface) } - - #[inline] - pub fn fp(&self) -> &vk::mvk::ios_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/mvk/macos_surface.rs b/ash/src/extensions/mvk/macos_surface.rs index 57067f4a4..958c3d99b 100755 --- a/ash/src/extensions/mvk/macos_surface.rs +++ b/ash/src/extensions/mvk/macos_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::mvk::macos_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::mvk::macos_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::mvk::macos_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::mvk::macos_surface::Instance { /// #[inline] pub unsafe fn create_mac_os_surface( @@ -37,14 +22,4 @@ impl Instance { ) .assume_init_on_success(surface) } - - #[inline] - pub fn fp(&self) -> &vk::mvk::macos_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/nn/vi_surface.rs b/ash/src/extensions/nn/vi_surface.rs index 35ab8fb15..d0d50adf7 100644 --- a/ash/src/extensions/nn/vi_surface.rs +++ b/ash/src/extensions/nn/vi_surface.rs @@ -4,23 +4,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; use core::mem; -pub use vk::nn::vi_surface::NAME; - -#[derive(Clone)] -pub struct Instance { - handle: vk::Instance, - fp: vk::nn::vi_surface::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let handle = instance.handle(); - let fp = vk::nn::vi_surface::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::nn::vi_surface::Instance { /// #[inline] pub unsafe fn create_vi_surface( @@ -37,14 +22,4 @@ impl Instance { ) .assume_init_on_success(surface) } - - #[inline] - pub fn fp(&self) -> &vk::nn::vi_surface::InstanceFn { - &self.fp - } - - #[inline] - pub fn instance(&self) -> vk::Instance { - self.handle - } } diff --git a/ash/src/extensions/nv/copy_memory_indirect.rs b/ash/src/extensions/nv/copy_memory_indirect.rs index 3e44aec19..7c6a17fcc 100644 --- a/ash/src/extensions/nv/copy_memory_indirect.rs +++ b/ash/src/extensions/nv/copy_memory_indirect.rs @@ -1,23 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::nv::copy_memory_indirect::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::nv::copy_memory_indirect::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::nv::copy_memory_indirect::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { fp } - } +impl vk::nv::copy_memory_indirect::Device { /// /// /// `copy_buffer_address` is a buffer device address which is a pointer to an array of @@ -64,9 +49,4 @@ impl Device { image_subresources.as_ptr(), ) } - - #[inline] - pub fn fp(&self) -> &vk::nv::copy_memory_indirect::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/nv/coverage_reduction_mode.rs b/ash/src/extensions/nv/coverage_reduction_mode.rs index 9b3f6de69..18d518549 100644 --- a/ash/src/extensions/nv/coverage_reduction_mode.rs +++ b/ash/src/extensions/nv/coverage_reduction_mode.rs @@ -4,21 +4,8 @@ use crate::prelude::*; use crate::vk; use core::mem; use core::ptr; -pub use vk::nv::coverage_reduction_mode::NAME; - -#[derive(Clone)] -pub struct Instance { - fp: vk::nv::coverage_reduction_mode::InstanceFn, -} - -impl Instance { - pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { - let fp = vk::nv::coverage_reduction_mode::InstanceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::nv::coverage_reduction_mode::Instance { /// Retrieve the number of elements to pass to [`get_physical_device_supported_framebuffer_mixed_samples_combinations()`][Self::get_physical_device_supported_framebuffer_mixed_samples_combinations()] #[inline] pub unsafe fn get_physical_device_supported_framebuffer_mixed_samples_combinations_len( @@ -59,9 +46,4 @@ impl Instance { assert_eq!(count as usize, out.len()); Ok(()) } - - #[inline] - pub fn fp(&self) -> &vk::nv::coverage_reduction_mode::InstanceFn { - &self.fp - } } diff --git a/ash/src/extensions/nv/cuda_kernel_launch.rs b/ash/src/extensions/nv/cuda_kernel_launch.rs index 255790266..d1615e00c 100644 --- a/ash/src/extensions/nv/cuda_kernel_launch.rs +++ b/ash/src/extensions/nv/cuda_kernel_launch.rs @@ -5,23 +5,8 @@ use crate::vk; use crate::RawPtr; use alloc::vec::Vec; use core::mem; -pub use vk::nv::cuda_kernel_launch::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::nv::cuda_kernel_launch::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::nv::cuda_kernel_launch::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::nv::cuda_kernel_launch::Device { /// #[inline] pub unsafe fn create_cuda_module( @@ -93,14 +78,4 @@ impl Device { ) { (self.fp.cmd_cuda_launch_kernel_nv)(command_buffer, launch_info) } - - #[inline] - pub fn fp(&self) -> &vk::nv::cuda_kernel_launch::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/nv/device_diagnostic_checkpoints.rs b/ash/src/extensions/nv/device_diagnostic_checkpoints.rs index f437b1630..ef88d873b 100644 --- a/ash/src/extensions/nv/device_diagnostic_checkpoints.rs +++ b/ash/src/extensions/nv/device_diagnostic_checkpoints.rs @@ -4,21 +4,8 @@ use crate::vk; use core::ffi; use core::mem; use core::ptr; -pub use vk::nv::device_diagnostic_checkpoints::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::nv::device_diagnostic_checkpoints::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::nv::device_diagnostic_checkpoints::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::nv::device_diagnostic_checkpoints::Device { /// #[inline] pub unsafe fn cmd_set_checkpoint( @@ -51,9 +38,4 @@ impl Device { (self.fp.get_queue_checkpoint_data_nv)(queue, &mut count, out.as_mut_ptr()); assert_eq!(count as usize, out.len()); } - - #[inline] - pub fn fp(&self) -> &vk::nv::device_diagnostic_checkpoints::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/nv/device_generated_commands_compute.rs b/ash/src/extensions/nv/device_generated_commands_compute.rs index d76752e53..a1f09ba3e 100644 --- a/ash/src/extensions/nv/device_generated_commands_compute.rs +++ b/ash/src/extensions/nv/device_generated_commands_compute.rs @@ -1,24 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::nv::device_generated_commands_compute::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::nv::device_generated_commands_compute::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::nv::device_generated_commands_compute::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::nv::device_generated_commands_compute::Device { /// #[inline] pub unsafe fn get_pipeline_indirect_memory_requirements( @@ -56,14 +40,4 @@ impl Device { ) -> vk::DeviceAddress { (self.fp.get_pipeline_indirect_device_address_nv)(self.handle, info) } - - #[inline] - pub fn fp(&self) -> &vk::nv::device_generated_commands_compute::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/nv/low_latency2.rs b/ash/src/extensions/nv/low_latency2.rs index d8dc0add4..2effc8e53 100644 --- a/ash/src/extensions/nv/low_latency2.rs +++ b/ash/src/extensions/nv/low_latency2.rs @@ -3,24 +3,8 @@ use crate::prelude::*; use crate::vk; use crate::RawPtr; -use core::mem; -pub use vk::nv::low_latency2::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::nv::low_latency2::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::nv::low_latency2::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::nv::low_latency2::Device { /// #[inline] pub unsafe fn set_latency_sleep_mode( @@ -71,14 +55,4 @@ impl Device { ) { (self.fp.queue_notify_out_of_band_nv)(queue, queue_type_info) } - - #[inline] - pub fn fp(&self) -> &vk::nv::low_latency2::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/extensions/nv/memory_decompression.rs b/ash/src/extensions/nv/memory_decompression.rs index e18f674a4..37ffdba43 100644 --- a/ash/src/extensions/nv/memory_decompression.rs +++ b/ash/src/extensions/nv/memory_decompression.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::nv::memory_decompression::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::nv::memory_decompression::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::nv::memory_decompression::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::nv::memory_decompression::Device { /// pub unsafe fn cmd_decompress_memory( &self, @@ -45,9 +31,4 @@ impl Device { stride, ) } - - #[inline] - pub fn fp(&self) -> &vk::nv::memory_decompression::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/nv/mesh_shader.rs b/ash/src/extensions/nv/mesh_shader.rs index 957058817..a7e00d6eb 100755 --- a/ash/src/extensions/nv/mesh_shader.rs +++ b/ash/src/extensions/nv/mesh_shader.rs @@ -1,22 +1,8 @@ //! use crate::vk; -use core::mem; -pub use vk::nv::mesh_shader::NAME; - -#[derive(Clone)] -pub struct Device { - fp: vk::nv::mesh_shader::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let fp = vk::nv::mesh_shader::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) - }); - Self { fp } - } +impl vk::nv::mesh_shader::Device { /// #[inline] pub unsafe fn cmd_draw_mesh_tasks( @@ -69,9 +55,4 @@ impl Device { stride, ); } - - #[inline] - pub fn fp(&self) -> &vk::nv::mesh_shader::DeviceFn { - &self.fp - } } diff --git a/ash/src/extensions/nv/ray_tracing.rs b/ash/src/extensions/nv/ray_tracing.rs index 9a9182b67..c441b8475 100755 --- a/ash/src/extensions/nv/ray_tracing.rs +++ b/ash/src/extensions/nv/ray_tracing.rs @@ -5,23 +5,8 @@ use crate::vk; use crate::RawPtr; use alloc::vec::Vec; use core::mem; -pub use vk::nv::ray_tracing::NAME; - -#[derive(Clone)] -pub struct Device { - handle: vk::Device, - fp: vk::nv::ray_tracing::DeviceFn, -} - -impl Device { - pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { - let handle = device.handle(); - let fp = vk::nv::ray_tracing::DeviceFn::load(|name| unsafe { - mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) - }); - Self { handle, fp } - } +impl vk::nv::ray_tracing::Device { /// #[inline] pub unsafe fn create_acceleration_structure( @@ -241,14 +226,4 @@ impl Device { pub unsafe fn compile_deferred(&self, pipeline: vk::Pipeline, shader: u32) -> VkResult<()> { (self.fp.compile_deferred_nv)(self.handle, pipeline, shader).result() } - - #[inline] - pub fn fp(&self) -> &vk::nv::ray_tracing::DeviceFn { - &self.fp - } - - #[inline] - pub fn device(&self) -> vk::Device { - self.handle - } } diff --git a/ash/src/lib.rs b/ash/src/lib.rs index bc3a80dc3..4a4940229 100644 --- a/ash/src/lib.rs +++ b/ash/src/lib.rs @@ -70,8 +70,7 @@ pub mod util; pub mod vk; // macros of vk need to be defined beforehand -/// Wrappers for Vulkan extensions -pub mod extensions; +mod extensions; pub trait RawPtr { fn as_raw_ptr(&self) -> *const T; diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 1736add56..312741709 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -1,7 +1,8 @@ #![allow( clippy::too_many_arguments, clippy::cognitive_complexity, - clippy::wrong_self_convention + clippy::wrong_self_convention, + unused_qualifications )] #[macro_use] mod macros; diff --git a/ash/src/vk/extensions.rs b/ash/src/vk/extensions.rs index d1309792c..874ee1dfc 100644 --- a/ash/src/vk/extensions.rs +++ b/ash/src/vk/extensions.rs @@ -4008,6 +4008,7 @@ pub mod amd { stride: u32, ); #[derive(Clone)] + #[doc = "Raw VK_AMD_draw_indirect_count device-level function pointers"] pub struct DeviceFn { pub cmd_draw_indirect_count_amd: PFN_vkCmdDrawIndirectCount, pub cmd_draw_indexed_indirect_count_amd: PFN_vkCmdDrawIndexedIndirectCount, @@ -4072,6 +4073,28 @@ pub mod amd { } } } + #[doc = "VK_AMD_draw_indirect_count device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod negative_viewport_height { use super::super::*; @@ -4104,7 +4127,7 @@ pub mod amd { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetShaderInfoAMD = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline: Pipeline, shader_stage: ShaderStageFlags, info_type: ShaderInfoTypeAMD, @@ -4112,6 +4135,7 @@ pub mod amd { p_info: *mut c_void, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_AMD_shader_info device-level function pointers"] pub struct DeviceFn { pub get_shader_info_amd: PFN_vkGetShaderInfoAMD, } @@ -4125,7 +4149,7 @@ pub mod amd { Self { get_shader_info_amd: unsafe { unsafe extern "system" fn get_shader_info_amd( - _device: Device, + _device: crate::vk::Device, _pipeline: Pipeline, _shader_stage: ShaderStageFlags, _info_type: ShaderInfoTypeAMD, @@ -4145,6 +4169,28 @@ pub mod amd { } } } + #[doc = "VK_AMD_shader_info device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_image_load_store_lod { use super::super::*; @@ -4184,6 +4230,7 @@ pub mod amd { marker: u32, ); #[derive(Clone)] + #[doc = "Raw VK_AMD_buffer_marker device-level function pointers"] pub struct DeviceFn { pub cmd_write_buffer_marker_amd: PFN_vkCmdWriteBufferMarkerAMD, } @@ -4220,6 +4267,28 @@ pub mod amd { } } } + #[doc = "VK_AMD_buffer_marker device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod pipeline_compiler_control { use super::super::*; @@ -4247,11 +4316,12 @@ pub mod amd { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkSetLocalDimmingAMD = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swap_chain: SwapchainKHR, local_dimming_enable: Bool32, ); #[derive(Clone)] + #[doc = "Raw VK_AMD_display_native_hdr device-level function pointers"] pub struct DeviceFn { pub set_local_dimming_amd: PFN_vkSetLocalDimmingAMD, } @@ -4265,7 +4335,7 @@ pub mod amd { Self { set_local_dimming_amd: unsafe { unsafe extern "system" fn set_local_dimming_amd( - _device: Device, + _device: crate::vk::Device, _swap_chain: SwapchainKHR, _local_dimming_enable: Bool32, ) { @@ -4285,6 +4355,28 @@ pub mod amd { } } } + #[doc = "VK_AMD_display_native_hdr device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_core_properties2 { use super::super::*; @@ -4314,7 +4406,7 @@ pub mod amdx { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateExecutionGraphPipelinesAMDX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline_cache: PipelineCache, create_info_count: u32, p_create_infos: *const ExecutionGraphPipelineCreateInfoAMDX<'_>, @@ -4325,13 +4417,13 @@ pub mod amdx { #[allow(non_camel_case_types)] pub type PFN_vkGetExecutionGraphPipelineScratchSizeAMDX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, execution_graph: Pipeline, p_size_info: *mut ExecutionGraphPipelineScratchSizeAMDX<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetExecutionGraphPipelineNodeIndexAMDX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, execution_graph: Pipeline, p_node_info: *const PipelineShaderStageNodeCreateInfoAMDX<'_>, p_node_index: *mut u32, @@ -4359,6 +4451,7 @@ pub mod amdx { count_info: DeviceAddress, ); #[derive(Clone)] + #[doc = "Raw VK_AMDX_shader_enqueue device-level function pointers"] pub struct DeviceFn { pub create_execution_graph_pipelines_amdx: PFN_vkCreateExecutionGraphPipelinesAMDX, pub get_execution_graph_pipeline_scratch_size_amdx: @@ -4380,7 +4473,7 @@ pub mod amdx { Self { create_execution_graph_pipelines_amdx: unsafe { unsafe extern "system" fn create_execution_graph_pipelines_amdx( - _device: Device, + _device: crate::vk::Device, _pipeline_cache: PipelineCache, _create_info_count: u32, _p_create_infos: *const ExecutionGraphPipelineCreateInfoAMDX<'_>, @@ -4404,7 +4497,7 @@ pub mod amdx { }, get_execution_graph_pipeline_scratch_size_amdx: unsafe { unsafe extern "system" fn get_execution_graph_pipeline_scratch_size_amdx( - _device: Device, + _device: crate::vk::Device, _execution_graph: Pipeline, _p_size_info: *mut ExecutionGraphPipelineScratchSizeAMDX<'_>, ) -> Result { @@ -4425,7 +4518,7 @@ pub mod amdx { }, get_execution_graph_pipeline_node_index_amdx: unsafe { unsafe extern "system" fn get_execution_graph_pipeline_node_index_amdx( - _device: Device, + _device: crate::vk::Device, _execution_graph: Pipeline, _p_node_info: *const PipelineShaderStageNodeCreateInfoAMDX<'_>, _p_node_index: *mut u32, @@ -4530,6 +4623,28 @@ pub mod amdx { } } } + #[doc = "VK_AMDX_shader_enqueue device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } pub mod android { @@ -4540,7 +4655,7 @@ pub mod android { pub const SPEC_VERSION: u32 = 8u32; #[allow(non_camel_case_types)] pub type PFN_vkGetSwapchainGrallocUsageANDROID = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, format: Format, image_usage: ImageUsageFlags, gralloc_usage: *mut c_int, @@ -4548,7 +4663,7 @@ pub mod android { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkAcquireImageANDROID = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, native_fence_fd: c_int, semaphore: Semaphore, @@ -4565,7 +4680,7 @@ pub mod android { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSwapchainGrallocUsage2ANDROID = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, format: Format, image_usage: ImageUsageFlags, swapchain_image_usage: SwapchainImageUsageFlagsANDROID, @@ -4574,6 +4689,7 @@ pub mod android { ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_ANDROID_native_buffer device-level function pointers"] pub struct DeviceFn { pub get_swapchain_gralloc_usage_android: PFN_vkGetSwapchainGrallocUsageANDROID, pub acquire_image_android: PFN_vkAcquireImageANDROID, @@ -4590,7 +4706,7 @@ pub mod android { Self { get_swapchain_gralloc_usage_android: unsafe { unsafe extern "system" fn get_swapchain_gralloc_usage_android( - _device: Device, + _device: crate::vk::Device, _format: Format, _image_usage: ImageUsageFlags, _gralloc_usage: *mut c_int, @@ -4612,7 +4728,7 @@ pub mod android { }, acquire_image_android: unsafe { unsafe extern "system" fn acquire_image_android( - _device: Device, + _device: crate::vk::Device, _image: Image, _native_fence_fd: c_int, _semaphore: Semaphore, @@ -4656,7 +4772,7 @@ pub mod android { }, get_swapchain_gralloc_usage2_android: unsafe { unsafe extern "system" fn get_swapchain_gralloc_usage2_android( - _device: Device, + _device: crate::vk::Device, _format: Format, _image_usage: ImageUsageFlags, _swapchain_image_usage: SwapchainImageUsageFlagsANDROID, @@ -4681,6 +4797,28 @@ pub mod android { } } } + #[doc = "VK_ANDROID_native_buffer device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_memory_android_hardware_buffer { use super::super::*; @@ -4693,18 +4831,19 @@ pub mod android { #[allow(non_camel_case_types)] pub type PFN_vkGetAndroidHardwareBufferPropertiesANDROID = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, buffer: *const AHardwareBuffer, p_properties: *mut AndroidHardwareBufferPropertiesANDROID<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryAndroidHardwareBufferANDROID = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const MemoryGetAndroidHardwareBufferInfoANDROID<'_>, p_buffer: *mut *mut AHardwareBuffer, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_ANDROID_external_memory_android_hardware_buffer device-level function pointers"] pub struct DeviceFn { pub get_android_hardware_buffer_properties_android: PFN_vkGetAndroidHardwareBufferPropertiesANDROID, @@ -4721,7 +4860,7 @@ pub mod android { Self { get_android_hardware_buffer_properties_android: unsafe { unsafe extern "system" fn get_android_hardware_buffer_properties_android( - _device: Device, + _device: crate::vk::Device, _buffer: *const AHardwareBuffer, _p_properties: *mut AndroidHardwareBufferPropertiesANDROID<'_>, ) -> Result { @@ -4742,7 +4881,7 @@ pub mod android { }, get_memory_android_hardware_buffer_android: unsafe { unsafe extern "system" fn get_memory_android_hardware_buffer_android( - _device: Device, + _device: crate::vk::Device, _p_info: *const MemoryGetAndroidHardwareBufferInfoANDROID<'_>, _p_buffer: *mut *mut AHardwareBuffer, ) -> Result { @@ -4764,6 +4903,28 @@ pub mod android { } } } + #[doc = "VK_ANDROID_external_memory_android_hardware_buffer device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_format_resolve { use super::super::*; @@ -4813,20 +4974,20 @@ pub mod ext { pub const SPEC_VERSION: u32 = 10u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateDebugReportCallbackEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const DebugReportCallbackCreateInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, p_callback: *mut DebugReportCallbackEXT, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyDebugReportCallbackEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, callback: DebugReportCallbackEXT, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkDebugReportMessageEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, flags: DebugReportFlagsEXT, object_type: DebugReportObjectTypeEXT, object: u64, @@ -4836,6 +4997,7 @@ pub mod ext { p_message: *const c_char, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_debug_report instance-level function pointers"] pub struct InstanceFn { pub create_debug_report_callback_ext: PFN_vkCreateDebugReportCallbackEXT, pub destroy_debug_report_callback_ext: PFN_vkDestroyDebugReportCallbackEXT, @@ -4851,7 +5013,7 @@ pub mod ext { Self { create_debug_report_callback_ext: unsafe { unsafe extern "system" fn create_debug_report_callback_ext( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const DebugReportCallbackCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_callback: *mut DebugReportCallbackEXT, @@ -4873,7 +5035,7 @@ pub mod ext { }, destroy_debug_report_callback_ext: unsafe { unsafe extern "system" fn destroy_debug_report_callback_ext( - _instance: Instance, + _instance: crate::vk::Instance, _callback: DebugReportCallbackEXT, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -4894,7 +5056,7 @@ pub mod ext { }, debug_report_message_ext: unsafe { unsafe extern "system" fn debug_report_message_ext( - _instance: Instance, + _instance: crate::vk::Instance, _flags: DebugReportFlagsEXT, _object_type: DebugReportObjectTypeEXT, _object: u64, @@ -4920,6 +5082,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_debug_report instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod depth_range_unrestricted { use super::super::*; @@ -4934,12 +5118,12 @@ pub mod ext { pub const SPEC_VERSION: u32 = 4u32; #[allow(non_camel_case_types)] pub type PFN_vkDebugMarkerSetObjectTagEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_tag_info: *const DebugMarkerObjectTagInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDebugMarkerSetObjectNameEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_name_info: *const DebugMarkerObjectNameInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] @@ -4956,6 +5140,7 @@ pub mod ext { p_marker_info: *const DebugMarkerMarkerInfoEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_debug_marker device-level function pointers"] pub struct DeviceFn { pub debug_marker_set_object_tag_ext: PFN_vkDebugMarkerSetObjectTagEXT, pub debug_marker_set_object_name_ext: PFN_vkDebugMarkerSetObjectNameEXT, @@ -4973,7 +5158,7 @@ pub mod ext { Self { debug_marker_set_object_tag_ext: unsafe { unsafe extern "system" fn debug_marker_set_object_tag_ext( - _device: Device, + _device: crate::vk::Device, _p_tag_info: *const DebugMarkerObjectTagInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -4992,7 +5177,7 @@ pub mod ext { }, debug_marker_set_object_name_ext: unsafe { unsafe extern "system" fn debug_marker_set_object_name_ext( - _device: Device, + _device: crate::vk::Device, _p_name_info: *const DebugMarkerObjectNameInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -5068,6 +5253,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_debug_marker device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod transform_feedback { use super::super::*; @@ -5125,6 +5332,7 @@ pub mod ext { vertex_stride: u32, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_transform_feedback device-level function pointers"] pub struct DeviceFn { pub cmd_bind_transform_feedback_buffers_ext: PFN_vkCmdBindTransformFeedbackBuffersEXT, pub cmd_begin_transform_feedback_ext: PFN_vkCmdBeginTransformFeedbackEXT, @@ -5280,6 +5488,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_transform_feedback device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod validation_flags { use super::super::*; @@ -5332,6 +5562,7 @@ pub mod ext { pub type PFN_vkCmdEndConditionalRenderingEXT = unsafe extern "system" fn(command_buffer: CommandBuffer); #[derive(Clone)] + #[doc = "Raw VK_EXT_conditional_rendering device-level function pointers"] pub struct DeviceFn { pub cmd_begin_conditional_rendering_ext: PFN_vkCmdBeginConditionalRenderingEXT, pub cmd_end_conditional_rendering_ext: PFN_vkCmdEndConditionalRenderingEXT, @@ -5388,6 +5619,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_conditional_rendering device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod direct_mode_display { use super::super::*; @@ -5400,6 +5653,7 @@ pub mod ext { display: DisplayKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_direct_mode_display instance-level function pointers"] pub struct InstanceFn { pub release_display_ext: PFN_vkReleaseDisplayEXT, } @@ -5429,6 +5683,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_direct_mode_display instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod acquire_xlib_display { use super::super::*; @@ -5449,6 +5725,7 @@ pub mod ext { p_display: *mut DisplayKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_acquire_xlib_display instance-level function pointers"] pub struct InstanceFn { pub acquire_xlib_display_ext: PFN_vkAcquireXlibDisplayEXT, pub get_rand_r_output_display_ext: PFN_vkGetRandROutputDisplayEXT, @@ -5505,6 +5782,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_acquire_xlib_display instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod display_surface_counter { use super::super::*; @@ -5519,6 +5818,7 @@ pub mod ext { p_surface_capabilities: *mut SurfaceCapabilities2EXT<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_display_surface_counter instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_surface_capabilities2_ext: PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT, @@ -5555,6 +5855,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_display_surface_counter instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod display_control { use super::super::*; @@ -5563,20 +5885,20 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkDisplayPowerControlEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, display: DisplayKHR, p_display_power_info: *const DisplayPowerInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkRegisterDeviceEventEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, display: DisplayKHR, p_display_event_info: *const DisplayEventInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, @@ -5584,12 +5906,13 @@ pub mod ext { ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSwapchainCounterEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, counter: SurfaceCounterFlagsEXT, p_counter_value: *mut u64, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_display_control device-level function pointers"] pub struct DeviceFn { pub display_power_control_ext: PFN_vkDisplayPowerControlEXT, pub register_device_event_ext: PFN_vkRegisterDeviceEventEXT, @@ -5606,7 +5929,7 @@ pub mod ext { Self { display_power_control_ext: unsafe { unsafe extern "system" fn display_power_control_ext( - _device: Device, + _device: crate::vk::Device, _display: DisplayKHR, _p_display_power_info: *const DisplayPowerInfoEXT<'_>, ) -> Result { @@ -5626,7 +5949,7 @@ pub mod ext { }, register_device_event_ext: unsafe { unsafe extern "system" fn register_device_event_ext( - _device: Device, + _device: crate::vk::Device, _p_device_event_info: *const DeviceEventInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_fence: *mut Fence, @@ -5647,7 +5970,7 @@ pub mod ext { }, register_display_event_ext: unsafe { unsafe extern "system" fn register_display_event_ext( - _device: Device, + _device: crate::vk::Device, _display: DisplayKHR, _p_display_event_info: *const DisplayEventInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, @@ -5669,7 +5992,7 @@ pub mod ext { }, get_swapchain_counter_ext: unsafe { unsafe extern "system" fn get_swapchain_counter_ext( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _counter: SurfaceCounterFlagsEXT, _p_counter_value: *mut u64, @@ -5691,6 +6014,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_display_control device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod discard_rectangles { use super::super::*; @@ -5715,6 +6060,7 @@ pub mod ext { discard_rectangle_mode: DiscardRectangleModeEXT, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_discard_rectangles device-level function pointers"] pub struct DeviceFn { pub cmd_set_discard_rectangle_ext: PFN_vkCmdSetDiscardRectangleEXT, pub cmd_set_discard_rectangle_enable_ext: PFN_vkCmdSetDiscardRectangleEnableEXT, @@ -5792,6 +6138,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_discard_rectangles device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod conservative_rasterization { use super::super::*; @@ -5818,12 +6186,13 @@ pub mod ext { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkSetHdrMetadataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain_count: u32, p_swapchains: *const SwapchainKHR, p_metadata: *const HdrMetadataEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_hdr_metadata device-level function pointers"] pub struct DeviceFn { pub set_hdr_metadata_ext: PFN_vkSetHdrMetadataEXT, } @@ -5837,7 +6206,7 @@ pub mod ext { Self { set_hdr_metadata_ext: unsafe { unsafe extern "system" fn set_hdr_metadata_ext( - _device: Device, + _device: crate::vk::Device, _swapchain_count: u32, _p_swapchains: *const SwapchainKHR, _p_metadata: *const HdrMetadataEXT<'_>, @@ -5855,6 +6224,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_hdr_metadata device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_memory_dma_buf { use super::super::*; @@ -5875,25 +6266,26 @@ pub mod ext { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateDebugUtilsMessengerEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const DebugUtilsMessengerCreateInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, p_messenger: *mut DebugUtilsMessengerEXT, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyDebugUtilsMessengerEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, messenger: DebugUtilsMessengerEXT, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkSubmitDebugUtilsMessageEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, message_severity: DebugUtilsMessageSeverityFlagsEXT, message_types: DebugUtilsMessageTypeFlagsEXT, p_callback_data: *const DebugUtilsMessengerCallbackDataEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_debug_utils instance-level function pointers"] pub struct InstanceFn { pub create_debug_utils_messenger_ext: PFN_vkCreateDebugUtilsMessengerEXT, pub destroy_debug_utils_messenger_ext: PFN_vkDestroyDebugUtilsMessengerEXT, @@ -5909,7 +6301,7 @@ pub mod ext { Self { create_debug_utils_messenger_ext: unsafe { unsafe extern "system" fn create_debug_utils_messenger_ext( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const DebugUtilsMessengerCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_messenger: *mut DebugUtilsMessengerEXT, @@ -5931,7 +6323,7 @@ pub mod ext { }, destroy_debug_utils_messenger_ext: unsafe { unsafe extern "system" fn destroy_debug_utils_messenger_ext( - _instance: Instance, + _instance: crate::vk::Instance, _messenger: DebugUtilsMessengerEXT, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -5952,7 +6344,7 @@ pub mod ext { }, submit_debug_utils_message_ext: unsafe { unsafe extern "system" fn submit_debug_utils_message_ext( - _instance: Instance, + _instance: crate::vk::Instance, _message_severity: DebugUtilsMessageSeverityFlagsEXT, _message_types: DebugUtilsMessageTypeFlagsEXT, _p_callback_data: *const DebugUtilsMessengerCallbackDataEXT<'_>, @@ -5974,14 +6366,36 @@ pub mod ext { } } } + #[doc = "VK_EXT_debug_utils instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkSetDebugUtilsObjectNameEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_name_info: *const DebugUtilsObjectNameInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkSetDebugUtilsObjectTagEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_tag_info: *const DebugUtilsObjectTagInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] @@ -6006,6 +6420,7 @@ pub mod ext { p_label_info: *const DebugUtilsLabelEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_debug_utils device-level function pointers"] pub struct DeviceFn { pub set_debug_utils_object_name_ext: PFN_vkSetDebugUtilsObjectNameEXT, pub set_debug_utils_object_tag_ext: PFN_vkSetDebugUtilsObjectTagEXT, @@ -6026,7 +6441,7 @@ pub mod ext { Self { set_debug_utils_object_name_ext: unsafe { unsafe extern "system" fn set_debug_utils_object_name_ext( - _device: Device, + _device: crate::vk::Device, _p_name_info: *const DebugUtilsObjectNameInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -6045,7 +6460,7 @@ pub mod ext { }, set_debug_utils_object_tag_ext: unsafe { unsafe extern "system" fn set_debug_utils_object_tag_ext( - _device: Device, + _device: crate::vk::Device, _p_tag_info: *const DebugUtilsObjectTagInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -6177,6 +6592,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_debug_utils device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod sampler_filter_minmax { use super::super::*; @@ -6208,6 +6645,7 @@ pub mod ext { p_multisample_properties: *mut MultisamplePropertiesEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_sample_locations instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_multisample_properties_ext: PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT, @@ -6244,12 +6682,35 @@ pub mod ext { } } } + #[doc = "VK_EXT_sample_locations instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkCmdSetSampleLocationsEXT = unsafe extern "system" fn( command_buffer: CommandBuffer, p_sample_locations_info: *const SampleLocationsInfoEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_sample_locations device-level function pointers"] pub struct DeviceFn { pub cmd_set_sample_locations_ext: PFN_vkCmdSetSampleLocationsEXT, } @@ -6283,6 +6744,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_sample_locations device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod blend_operation_advanced { use super::super::*; @@ -6303,12 +6786,13 @@ pub mod ext { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkGetImageDrmFormatModifierPropertiesEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, p_properties: *mut ImageDrmFormatModifierPropertiesEXT<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_image_drm_format_modifier device-level function pointers"] pub struct DeviceFn { pub get_image_drm_format_modifier_properties_ext: PFN_vkGetImageDrmFormatModifierPropertiesEXT, @@ -6323,7 +6807,7 @@ pub mod ext { Self { get_image_drm_format_modifier_properties_ext: unsafe { unsafe extern "system" fn get_image_drm_format_modifier_properties_ext( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_properties: *mut ImageDrmFormatModifierPropertiesEXT<'_>, ) -> Result { @@ -6345,6 +6829,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_image_drm_format_modifier device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod validation_cache { use super::super::*; @@ -6353,32 +6859,33 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateValidationCacheEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, validation_cache: ValidationCacheEXT, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkMergeValidationCachesEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, dst_cache: ValidationCacheEXT, src_cache_count: u32, p_src_caches: *const ValidationCacheEXT, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetValidationCacheDataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, validation_cache: ValidationCacheEXT, p_data_size: *mut usize, p_data: *mut c_void, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_validation_cache device-level function pointers"] pub struct DeviceFn { pub create_validation_cache_ext: PFN_vkCreateValidationCacheEXT, pub destroy_validation_cache_ext: PFN_vkDestroyValidationCacheEXT, @@ -6395,7 +6902,7 @@ pub mod ext { Self { create_validation_cache_ext: unsafe { unsafe extern "system" fn create_validation_cache_ext( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const ValidationCacheCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_validation_cache: *mut ValidationCacheEXT, @@ -6416,7 +6923,7 @@ pub mod ext { }, destroy_validation_cache_ext: unsafe { unsafe extern "system" fn destroy_validation_cache_ext( - _device: Device, + _device: crate::vk::Device, _validation_cache: ValidationCacheEXT, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -6436,7 +6943,7 @@ pub mod ext { }, merge_validation_caches_ext: unsafe { unsafe extern "system" fn merge_validation_caches_ext( - _device: Device, + _device: crate::vk::Device, _dst_cache: ValidationCacheEXT, _src_cache_count: u32, _p_src_caches: *const ValidationCacheEXT, @@ -6457,7 +6964,7 @@ pub mod ext { }, get_validation_cache_data_ext: unsafe { unsafe extern "system" fn get_validation_cache_data_ext( - _device: Device, + _device: crate::vk::Device, _validation_cache: ValidationCacheEXT, _p_data_size: *mut usize, _p_data: *mut c_void, @@ -6479,6 +6986,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_validation_cache device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod descriptor_indexing { use super::super::*; @@ -6511,13 +7040,14 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryHostPointerPropertiesEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, handle_type: ExternalMemoryHandleTypeFlags, p_host_pointer: *const c_void, p_memory_host_pointer_properties: *mut MemoryHostPointerPropertiesEXT<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_external_memory_host device-level function pointers"] pub struct DeviceFn { pub get_memory_host_pointer_properties_ext: PFN_vkGetMemoryHostPointerPropertiesEXT, } @@ -6531,7 +7061,7 @@ pub mod ext { Self { get_memory_host_pointer_properties_ext: unsafe { unsafe extern "system" fn get_memory_host_pointer_properties_ext( - _device: Device, + _device: crate::vk::Device, _handle_type: ExternalMemoryHandleTypeFlags, _p_host_pointer: *const c_void, _p_memory_host_pointer_properties: *mut MemoryHostPointerPropertiesEXT< @@ -6556,6 +7086,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_external_memory_host device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod calibrated_timestamps { use super::super::*; @@ -6570,6 +7122,7 @@ pub mod ext { p_time_domains: *mut TimeDomainKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_calibrated_timestamps instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_calibrateable_time_domains_ext: PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR, @@ -6606,15 +7159,38 @@ pub mod ext { } } } + #[doc = "VK_EXT_calibrated_timestamps instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkGetCalibratedTimestampsKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, timestamp_count: u32, p_timestamp_infos: *const CalibratedTimestampInfoKHR<'_>, p_timestamps: *mut u64, p_max_deviation: *mut u64, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_calibrated_timestamps device-level function pointers"] pub struct DeviceFn { pub get_calibrated_timestamps_ext: PFN_vkGetCalibratedTimestampsKHR, } @@ -6628,7 +7204,7 @@ pub mod ext { Self { get_calibrated_timestamps_ext: unsafe { unsafe extern "system" fn get_calibrated_timestamps_ext( - _device: Device, + _device: crate::vk::Device, _timestamp_count: u32, _p_timestamp_infos: *const CalibratedTimestampInfoKHR<'_>, _p_timestamps: *mut u64, @@ -6651,6 +7227,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_calibrated_timestamps device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod vertex_attribute_divisor { use super::super::*; @@ -6677,12 +7275,13 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateMetalSurfaceEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const MetalSurfaceCreateInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_metal_surface instance-level function pointers"] pub struct InstanceFn { pub create_metal_surface_ext: PFN_vkCreateMetalSurfaceEXT, } @@ -6696,7 +7295,7 @@ pub mod ext { Self { create_metal_surface_ext: unsafe { unsafe extern "system" fn create_metal_surface_ext( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const MetalSurfaceCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -6718,6 +7317,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_metal_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod fragment_density_map { use super::super::*; @@ -6762,10 +7383,11 @@ pub mod ext { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkGetBufferDeviceAddress = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const BufferDeviceAddressInfo<'_>, ) -> DeviceAddress; #[derive(Clone)] + #[doc = "Raw VK_EXT_buffer_device_address device-level function pointers"] pub struct DeviceFn { pub get_buffer_device_address_ext: PFN_vkGetBufferDeviceAddress, } @@ -6779,7 +7401,7 @@ pub mod ext { Self { get_buffer_device_address_ext: unsafe { unsafe extern "system" fn get_buffer_device_address_ext( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferDeviceAddressInfo<'_>, ) -> DeviceAddress { panic!(concat!( @@ -6799,6 +7421,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_buffer_device_address device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod tooling_info { use super::super::*; @@ -6813,6 +7457,7 @@ pub mod ext { ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_tooling_info instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_tool_properties_ext: PFN_vkGetPhysicalDeviceToolProperties, } @@ -6848,6 +7493,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_tooling_info instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod separate_stencil_usage { use super::super::*; @@ -6893,6 +7560,7 @@ pub mod ext { p_present_modes: *mut PresentModeKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_full_screen_exclusive instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_surface_present_modes2_ext: PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT, @@ -6930,20 +7598,43 @@ pub mod ext { } } } + #[doc = "VK_EXT_full_screen_exclusive instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkAcquireFullScreenExclusiveModeEXT = - unsafe extern "system" fn(device: Device, swapchain: SwapchainKHR) -> Result; + unsafe extern "system" fn(device: crate::vk::Device, swapchain: SwapchainKHR) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkReleaseFullScreenExclusiveModeEXT = - unsafe extern "system" fn(device: Device, swapchain: SwapchainKHR) -> Result; + unsafe extern "system" fn(device: crate::vk::Device, swapchain: SwapchainKHR) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceGroupSurfacePresentModes2EXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR<'_>, p_modes: *mut DeviceGroupPresentModeFlagsKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_full_screen_exclusive device-level function pointers"] pub struct DeviceFn { pub acquire_full_screen_exclusive_mode_ext: PFN_vkAcquireFullScreenExclusiveModeEXT, pub release_full_screen_exclusive_mode_ext: PFN_vkReleaseFullScreenExclusiveModeEXT, @@ -6960,7 +7651,7 @@ pub mod ext { Self { acquire_full_screen_exclusive_mode_ext: unsafe { unsafe extern "system" fn acquire_full_screen_exclusive_mode_ext( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, ) -> Result { panic!(concat!( @@ -6980,7 +7671,7 @@ pub mod ext { }, release_full_screen_exclusive_mode_ext: unsafe { unsafe extern "system" fn release_full_screen_exclusive_mode_ext( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, ) -> Result { panic!(concat!( @@ -7000,7 +7691,7 @@ pub mod ext { }, get_device_group_surface_present_modes2_ext: unsafe { unsafe extern "system" fn get_device_group_surface_present_modes2_ext( - _device: Device, + _device: crate::vk::Device, _p_surface_info: *const PhysicalDeviceSurfaceInfo2KHR<'_>, _p_modes: *mut DeviceGroupPresentModeFlagsKHR, ) -> Result { @@ -7022,6 +7713,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_full_screen_exclusive device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod headless_surface { use super::super::*; @@ -7030,12 +7743,13 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateHeadlessSurfaceEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const HeadlessSurfaceCreateInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_headless_surface instance-level function pointers"] pub struct InstanceFn { pub create_headless_surface_ext: PFN_vkCreateHeadlessSurfaceEXT, } @@ -7049,7 +7763,7 @@ pub mod ext { Self { create_headless_surface_ext: unsafe { unsafe extern "system" fn create_headless_surface_ext( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const HeadlessSurfaceCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -7071,6 +7785,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_headless_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod line_rasterization { use super::super::*; @@ -7084,6 +7820,7 @@ pub mod ext { line_stipple_pattern: u16, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_line_rasterization device-level function pointers"] pub struct DeviceFn { pub cmd_set_line_stipple_ext: PFN_vkCmdSetLineStippleKHR, } @@ -7118,6 +7855,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_line_rasterization device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_atomic_float { use super::super::*; @@ -7132,12 +7891,13 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkResetQueryPool = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, query_pool: QueryPool, first_query: u32, query_count: u32, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_host_query_reset device-level function pointers"] pub struct DeviceFn { pub reset_query_pool_ext: PFN_vkResetQueryPool, } @@ -7151,7 +7911,7 @@ pub mod ext { Self { reset_query_pool_ext: unsafe { unsafe extern "system" fn reset_query_pool_ext( - _device: Device, + _device: crate::vk::Device, _query_pool: QueryPool, _first_query: u32, _query_count: u32, @@ -7169,6 +7929,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_host_query_reset device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod index_type_uint8 { use super::super::*; @@ -7241,6 +8023,7 @@ pub mod ext { compare_op: CompareOp, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_extended_dynamic_state device-level function pointers"] pub struct DeviceFn { pub cmd_set_cull_mode_ext: PFN_vkCmdSetCullMode, pub cmd_set_front_face_ext: PFN_vkCmdSetFrontFace, @@ -7503,6 +8286,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_extended_dynamic_state device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod host_image_copy { use super::super::*; @@ -7511,33 +8316,34 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCopyMemoryToImageEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_copy_memory_to_image_info: *const CopyMemoryToImageInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyImageToMemoryEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_copy_image_to_memory_info: *const CopyImageToMemoryInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyImageToImageEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_copy_image_to_image_info: *const CopyImageToImageInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkTransitionImageLayoutEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, transition_count: u32, p_transitions: *const HostImageLayoutTransitionInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetImageSubresourceLayout2KHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, p_subresource: *const ImageSubresource2KHR<'_>, p_layout: *mut SubresourceLayout2KHR<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_host_image_copy device-level function pointers"] pub struct DeviceFn { pub copy_memory_to_image_ext: PFN_vkCopyMemoryToImageEXT, pub copy_image_to_memory_ext: PFN_vkCopyImageToMemoryEXT, @@ -7555,7 +8361,7 @@ pub mod ext { Self { copy_memory_to_image_ext: unsafe { unsafe extern "system" fn copy_memory_to_image_ext( - _device: Device, + _device: crate::vk::Device, _p_copy_memory_to_image_info: *const CopyMemoryToImageInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -7574,7 +8380,7 @@ pub mod ext { }, copy_image_to_memory_ext: unsafe { unsafe extern "system" fn copy_image_to_memory_ext( - _device: Device, + _device: crate::vk::Device, _p_copy_image_to_memory_info: *const CopyImageToMemoryInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -7593,7 +8399,7 @@ pub mod ext { }, copy_image_to_image_ext: unsafe { unsafe extern "system" fn copy_image_to_image_ext( - _device: Device, + _device: crate::vk::Device, _p_copy_image_to_image_info: *const CopyImageToImageInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -7611,7 +8417,7 @@ pub mod ext { }, transition_image_layout_ext: unsafe { unsafe extern "system" fn transition_image_layout_ext( - _device: Device, + _device: crate::vk::Device, _transition_count: u32, _p_transitions: *const HostImageLayoutTransitionInfoEXT<'_>, ) -> Result { @@ -7631,7 +8437,7 @@ pub mod ext { }, get_image_subresource_layout2_ext: unsafe { unsafe extern "system" fn get_image_subresource_layout2_ext( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_subresource: *const ImageSubresource2KHR<'_>, _p_layout: *mut SubresourceLayout2KHR<'_>, @@ -7654,6 +8460,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_host_image_copy device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod map_memory_placed { use super::super::*; @@ -7680,10 +8508,11 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkReleaseSwapchainImagesEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_release_info: *const ReleaseSwapchainImagesInfoEXT<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_swapchain_maintenance1 device-level function pointers"] pub struct DeviceFn { pub release_swapchain_images_ext: PFN_vkReleaseSwapchainImagesEXT, } @@ -7697,7 +8526,7 @@ pub mod ext { Self { release_swapchain_images_ext: unsafe { unsafe extern "system" fn release_swapchain_images_ext( - _device: Device, + _device: crate::vk::Device, _p_release_info: *const ReleaseSwapchainImagesInfoEXT<'_>, ) -> Result { panic!(concat!( @@ -7717,6 +8546,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_swapchain_maintenance1 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_demote_to_helper_invocation { use super::super::*; @@ -7742,6 +8593,7 @@ pub mod ext { p_depth_bias_info: *const DepthBiasInfoEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_depth_bias_control device-level function pointers"] pub struct DeviceFn { pub cmd_set_depth_bias2_ext: PFN_vkCmdSetDepthBias2EXT, } @@ -7774,6 +8626,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_depth_bias_control device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod device_memory_report { use super::super::*; @@ -7800,6 +8674,7 @@ pub mod ext { display: *mut DisplayKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_acquire_drm_display instance-level function pointers"] pub struct InstanceFn { pub acquire_drm_display_ext: PFN_vkAcquireDrmDisplayEXT, pub get_drm_display_ext: PFN_vkGetDrmDisplayEXT, @@ -7852,6 +8727,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_acquire_drm_display instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod robustness2 { use super::super::*; @@ -7872,20 +8769,20 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreatePrivateDataSlot = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const PrivateDataSlotCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_private_data_slot: *mut PrivateDataSlot, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyPrivateDataSlot = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, private_data_slot: PrivateDataSlot, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkSetPrivateData = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, object_type: ObjectType, object_handle: u64, private_data_slot: PrivateDataSlot, @@ -7893,13 +8790,14 @@ pub mod ext { ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetPrivateData = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, object_type: ObjectType, object_handle: u64, private_data_slot: PrivateDataSlot, p_data: *mut u64, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_private_data device-level function pointers"] pub struct DeviceFn { pub create_private_data_slot_ext: PFN_vkCreatePrivateDataSlot, pub destroy_private_data_slot_ext: PFN_vkDestroyPrivateDataSlot, @@ -7916,7 +8814,7 @@ pub mod ext { Self { create_private_data_slot_ext: unsafe { unsafe extern "system" fn create_private_data_slot_ext( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const PrivateDataSlotCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_private_data_slot: *mut PrivateDataSlot, @@ -7937,7 +8835,7 @@ pub mod ext { }, destroy_private_data_slot_ext: unsafe { unsafe extern "system" fn destroy_private_data_slot_ext( - _device: Device, + _device: crate::vk::Device, _private_data_slot: PrivateDataSlot, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -7957,7 +8855,7 @@ pub mod ext { }, set_private_data_ext: unsafe { unsafe extern "system" fn set_private_data_ext( - _device: Device, + _device: crate::vk::Device, _object_type: ObjectType, _object_handle: u64, _private_data_slot: PrivateDataSlot, @@ -7975,7 +8873,7 @@ pub mod ext { }, get_private_data_ext: unsafe { unsafe extern "system" fn get_private_data_ext( - _device: Device, + _device: crate::vk::Device, _object_type: ObjectType, _object_handle: u64, _private_data_slot: PrivateDataSlot, @@ -7994,6 +8892,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_private_data device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod pipeline_creation_cache_control { use super::super::*; @@ -8009,10 +8929,11 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkExportMetalObjectsEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_metal_objects_info: *mut ExportMetalObjectsInfoEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_metal_objects device-level function pointers"] pub struct DeviceFn { pub export_metal_objects_ext: PFN_vkExportMetalObjectsEXT, } @@ -8026,7 +8947,7 @@ pub mod ext { Self { export_metal_objects_ext: unsafe { unsafe extern "system" fn export_metal_objects_ext( - _device: Device, + _device: crate::vk::Device, _p_metal_objects_info: *mut ExportMetalObjectsInfoEXT<'_>, ) { panic!(concat!( @@ -8046,6 +8967,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_metal_objects device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod descriptor_buffer { use super::super::*; @@ -8054,20 +8997,20 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetDescriptorSetLayoutSizeEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, layout: DescriptorSetLayout, p_layout_size_in_bytes: *mut DeviceSize, ); #[allow(non_camel_case_types)] pub type PFN_vkGetDescriptorSetLayoutBindingOffsetEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, layout: DescriptorSetLayout, binding: u32, p_offset: *mut DeviceSize, ); #[allow(non_camel_case_types)] pub type PFN_vkGetDescriptorEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_descriptor_info: *const DescriptorGetInfoEXT<'_>, data_size: usize, p_descriptor: *mut c_void, @@ -8098,13 +9041,13 @@ pub mod ext { #[allow(non_camel_case_types)] pub type PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const BufferCaptureDescriptorDataInfoEXT<'_>, p_data: *mut c_void, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetImageOpaqueCaptureDescriptorDataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const ImageCaptureDescriptorDataInfoEXT<'_>, p_data: *mut c_void, ) @@ -8112,25 +9055,26 @@ pub mod ext { #[allow(non_camel_case_types)] pub type PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const ImageViewCaptureDescriptorDataInfoEXT<'_>, p_data: *mut c_void, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const SamplerCaptureDescriptorDataInfoEXT<'_>, p_data: *mut c_void, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const AccelerationStructureCaptureDescriptorDataInfoEXT<'_>, p_data: *mut c_void, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_descriptor_buffer device-level function pointers"] pub struct DeviceFn { pub get_descriptor_set_layout_size_ext: PFN_vkGetDescriptorSetLayoutSizeEXT, pub get_descriptor_set_layout_binding_offset_ext: @@ -8161,7 +9105,7 @@ pub mod ext { Self { get_descriptor_set_layout_size_ext: unsafe { unsafe extern "system" fn get_descriptor_set_layout_size_ext( - _device: Device, + _device: crate::vk::Device, _layout: DescriptorSetLayout, _p_layout_size_in_bytes: *mut DeviceSize, ) { @@ -8182,7 +9126,7 @@ pub mod ext { }, get_descriptor_set_layout_binding_offset_ext: unsafe { unsafe extern "system" fn get_descriptor_set_layout_binding_offset_ext( - _device: Device, + _device: crate::vk::Device, _layout: DescriptorSetLayout, _binding: u32, _p_offset: *mut DeviceSize, @@ -8204,7 +9148,7 @@ pub mod ext { }, get_descriptor_ext: unsafe { unsafe extern "system" fn get_descriptor_ext( - _device: Device, + _device: crate::vk::Device, _p_descriptor_info: *const DescriptorGetInfoEXT<'_>, _data_size: usize, _p_descriptor: *mut c_void, @@ -8288,7 +9232,7 @@ pub mod ext { }, get_buffer_opaque_capture_descriptor_data_ext: unsafe { unsafe extern "system" fn get_buffer_opaque_capture_descriptor_data_ext( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferCaptureDescriptorDataInfoEXT<'_>, _p_data: *mut c_void, ) -> Result { @@ -8309,7 +9253,7 @@ pub mod ext { }, get_image_opaque_capture_descriptor_data_ext: unsafe { unsafe extern "system" fn get_image_opaque_capture_descriptor_data_ext( - _device: Device, + _device: crate::vk::Device, _p_info: *const ImageCaptureDescriptorDataInfoEXT<'_>, _p_data: *mut c_void, ) -> Result { @@ -8330,7 +9274,7 @@ pub mod ext { }, get_image_view_opaque_capture_descriptor_data_ext: unsafe { unsafe extern "system" fn get_image_view_opaque_capture_descriptor_data_ext( - _device: Device, + _device: crate::vk::Device, _p_info: *const ImageViewCaptureDescriptorDataInfoEXT<'_>, _p_data: *mut c_void, ) -> Result { @@ -8351,7 +9295,7 @@ pub mod ext { }, get_sampler_opaque_capture_descriptor_data_ext: unsafe { unsafe extern "system" fn get_sampler_opaque_capture_descriptor_data_ext( - _device: Device, + _device: crate::vk::Device, _p_info: *const SamplerCaptureDescriptorDataInfoEXT<'_>, _p_data: *mut c_void, ) -> Result { @@ -8372,7 +9316,7 @@ pub mod ext { }, get_acceleration_structure_opaque_capture_descriptor_data_ext: unsafe { unsafe extern "system" fn get_acceleration_structure_opaque_capture_descriptor_data_ext( - _device: Device, + _device: crate::vk::Device, _p_info: *const AccelerationStructureCaptureDescriptorDataInfoEXT<'_>, _p_data: *mut c_void, ) -> Result { @@ -8396,6 +9340,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_descriptor_buffer device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod graphics_pipeline_library { use super::super::*; @@ -8434,6 +9400,7 @@ pub mod ext { stride: u32, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_mesh_shader device-level function pointers"] pub struct DeviceFn { pub cmd_draw_mesh_tasks_ext: PFN_vkCmdDrawMeshTasksEXT, pub cmd_draw_mesh_tasks_indirect_ext: PFN_vkCmdDrawMeshTasksIndirectEXT, @@ -8517,6 +9484,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_mesh_shader device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod ycbcr_2plane_444_formats { use super::super::*; @@ -8542,6 +9531,7 @@ pub mod ext { unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_EXT_image_compression_control\0") }; pub const SPEC_VERSION: u32 = 1u32; #[derive(Clone)] + #[doc = "Raw VK_EXT_image_compression_control device-level function pointers"] pub struct DeviceFn { pub get_image_subresource_layout2_ext: crate::vk::ext::host_image_copy::PFN_vkGetImageSubresourceLayout2KHR, @@ -8556,7 +9546,7 @@ pub mod ext { Self { get_image_subresource_layout2_ext: unsafe { unsafe extern "system" fn get_image_subresource_layout2_ext( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_subresource: *const ImageSubresource2KHR<'_>, _p_layout: *mut SubresourceLayout2KHR<'_>, @@ -8579,6 +9569,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_image_compression_control device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod attachment_feedback_loop_layout { use super::super::*; @@ -8600,11 +9612,12 @@ pub mod ext { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceFaultInfoEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_fault_counts: *mut DeviceFaultCountsEXT<'_>, p_fault_info: *mut DeviceFaultInfoEXT<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_device_fault device-level function pointers"] pub struct DeviceFn { pub get_device_fault_info_ext: PFN_vkGetDeviceFaultInfoEXT, } @@ -8618,7 +9631,7 @@ pub mod ext { Self { get_device_fault_info_ext: unsafe { unsafe extern "system" fn get_device_fault_info_ext( - _device: Device, + _device: crate::vk::Device, _p_fault_counts: *mut DeviceFaultCountsEXT<'_>, _p_fault_info: *mut DeviceFaultInfoEXT<'_>, ) -> Result { @@ -8639,6 +9652,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_device_fault device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod rgba10x6_formats { use super::super::*; @@ -8653,7 +9688,7 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateDirectFBSurfaceEXT = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const DirectFBSurfaceCreateInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, @@ -8666,6 +9701,7 @@ pub mod ext { dfb: *mut IDirectFB, ) -> Bool32; #[derive(Clone)] + #[doc = "Raw VK_EXT_directfb_surface instance-level function pointers"] pub struct InstanceFn { pub create_direct_fb_surface_ext: PFN_vkCreateDirectFBSurfaceEXT, pub get_physical_device_direct_fb_presentation_support_ext: @@ -8681,7 +9717,7 @@ pub mod ext { Self { create_direct_fb_surface_ext: unsafe { unsafe extern "system" fn create_direct_fb_surface_ext( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const DirectFBSurfaceCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -8724,6 +9760,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_directfb_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod vertex_input_dynamic_state { use super::super::*; @@ -8739,6 +9797,7 @@ pub mod ext { p_vertex_attribute_descriptions: *const VertexInputAttributeDescription2EXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_vertex_input_dynamic_state device-level function pointers"] pub struct DeviceFn { pub cmd_set_vertex_input_ext: PFN_vkCmdSetVertexInputEXT, } @@ -8775,6 +9834,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_vertex_input_dynamic_state device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod physical_device_drm { use super::super::*; @@ -8816,11 +9897,12 @@ pub mod ext { } #[allow(non_camel_case_types)] pub type PFN_vkGetPipelinePropertiesEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_pipeline_info: *const PipelineInfoEXT<'_>, p_pipeline_properties: *mut BaseOutStructure<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_EXT_pipeline_properties device-level function pointers"] pub struct DeviceFn { pub get_pipeline_properties_ext: PFN_vkGetPipelinePropertiesEXT, } @@ -8834,7 +9916,7 @@ pub mod ext { Self { get_pipeline_properties_ext: unsafe { unsafe extern "system" fn get_pipeline_properties_ext( - _device: Device, + _device: crate::vk::Device, _p_pipeline_info: *const PipelineInfoEXT<'_>, _p_pipeline_properties: *mut BaseOutStructure<'_>, ) -> Result { @@ -8855,6 +9937,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_pipeline_properties device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod frame_boundary { use super::super::*; @@ -8894,6 +9998,7 @@ pub mod ext { primitive_restart_enable: Bool32, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_extended_dynamic_state2 device-level function pointers"] pub struct DeviceFn { pub cmd_set_patch_control_points_ext: PFN_vkCmdSetPatchControlPointsEXT, pub cmd_set_rasterizer_discard_enable_ext: PFN_vkCmdSetRasterizerDiscardEnable, @@ -9005,6 +10110,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_extended_dynamic_state2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod color_write_enable { use super::super::*; @@ -9018,6 +10145,7 @@ pub mod ext { p_color_write_enables: *const Bool32, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_color_write_enable device-level function pointers"] pub struct DeviceFn { pub cmd_set_color_write_enable_ext: PFN_vkCmdSetColorWriteEnableEXT, } @@ -9052,6 +10180,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_color_write_enable device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod primitives_generated_query { use super::super::*; @@ -9096,6 +10246,7 @@ pub mod ext { p_vertex_offset: *const i32, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_multi_draw device-level function pointers"] pub struct DeviceFn { pub cmd_draw_multi_ext: PFN_vkCmdDrawMultiEXT, pub cmd_draw_multi_indexed_ext: PFN_vkCmdDrawMultiIndexedEXT, @@ -9154,6 +10305,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_multi_draw device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod image_2d_view_of_3d { use super::super::*; @@ -9174,14 +10347,14 @@ pub mod ext { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateMicromapEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const MicromapCreateInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, p_micromap: *mut MicromapEXT, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyMicromapEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, micromap: MicromapEXT, p_allocator: *const AllocationCallbacks<'_>, ); @@ -9193,32 +10366,32 @@ pub mod ext { ); #[allow(non_camel_case_types)] pub type PFN_vkBuildMicromapsEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, info_count: u32, p_infos: *const MicromapBuildInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyMicromapEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, p_info: *const CopyMicromapInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyMicromapToMemoryEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, p_info: *const CopyMicromapToMemoryInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyMemoryToMicromapEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, p_info: *const CopyMemoryToMicromapInfoEXT<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkWriteMicromapsPropertiesEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, micromap_count: u32, p_micromaps: *const MicromapEXT, query_type: QueryType, @@ -9252,18 +10425,19 @@ pub mod ext { ); #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceMicromapCompatibilityEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_version_info: *const MicromapVersionInfoEXT<'_>, p_compatibility: *mut AccelerationStructureCompatibilityKHR, ); #[allow(non_camel_case_types)] pub type PFN_vkGetMicromapBuildSizesEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, build_type: AccelerationStructureBuildTypeKHR, p_build_info: *const MicromapBuildInfoEXT<'_>, p_size_info: *mut MicromapBuildSizesInfoEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_opacity_micromap device-level function pointers"] pub struct DeviceFn { pub create_micromap_ext: PFN_vkCreateMicromapEXT, pub destroy_micromap_ext: PFN_vkDestroyMicromapEXT, @@ -9290,7 +10464,7 @@ pub mod ext { Self { create_micromap_ext: unsafe { unsafe extern "system" fn create_micromap_ext( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const MicromapCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_micromap: *mut MicromapEXT, @@ -9307,7 +10481,7 @@ pub mod ext { }, destroy_micromap_ext: unsafe { unsafe extern "system" fn destroy_micromap_ext( - _device: Device, + _device: crate::vk::Device, _micromap: MicromapEXT, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -9343,7 +10517,7 @@ pub mod ext { }, build_micromaps_ext: unsafe { unsafe extern "system" fn build_micromaps_ext( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _info_count: u32, _p_infos: *const MicromapBuildInfoEXT<'_>, @@ -9360,7 +10534,7 @@ pub mod ext { }, copy_micromap_ext: unsafe { unsafe extern "system" fn copy_micromap_ext( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _p_info: *const CopyMicromapInfoEXT<'_>, ) -> Result { @@ -9376,7 +10550,7 @@ pub mod ext { }, copy_micromap_to_memory_ext: unsafe { unsafe extern "system" fn copy_micromap_to_memory_ext( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _p_info: *const CopyMicromapToMemoryInfoEXT<'_>, ) -> Result { @@ -9396,7 +10570,7 @@ pub mod ext { }, copy_memory_to_micromap_ext: unsafe { unsafe extern "system" fn copy_memory_to_micromap_ext( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _p_info: *const CopyMemoryToMicromapInfoEXT<'_>, ) -> Result { @@ -9416,7 +10590,7 @@ pub mod ext { }, write_micromaps_properties_ext: unsafe { unsafe extern "system" fn write_micromaps_properties_ext( - _device: Device, + _device: crate::vk::Device, _micromap_count: u32, _p_micromaps: *const MicromapEXT, _query_type: QueryType, @@ -9520,7 +10694,7 @@ pub mod ext { }, get_device_micromap_compatibility_ext: unsafe { unsafe extern "system" fn get_device_micromap_compatibility_ext( - _device: Device, + _device: crate::vk::Device, _p_version_info: *const MicromapVersionInfoEXT<'_>, _p_compatibility: *mut AccelerationStructureCompatibilityKHR, ) { @@ -9541,7 +10715,7 @@ pub mod ext { }, get_micromap_build_sizes_ext: unsafe { unsafe extern "system" fn get_micromap_build_sizes_ext( - _device: Device, + _device: crate::vk::Device, _build_type: AccelerationStructureBuildTypeKHR, _p_build_info: *const MicromapBuildInfoEXT<'_>, _p_size_info: *mut MicromapBuildSizesInfoEXT<'_>, @@ -9563,6 +10737,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_opacity_micromap device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod load_store_op_none { use super::super::*; @@ -9583,9 +10779,13 @@ pub mod ext { }; pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] - pub type PFN_vkSetDeviceMemoryPriorityEXT = - unsafe extern "system" fn(device: Device, memory: DeviceMemory, priority: f32); + pub type PFN_vkSetDeviceMemoryPriorityEXT = unsafe extern "system" fn( + device: crate::vk::Device, + memory: DeviceMemory, + priority: f32, + ); #[derive(Clone)] + #[doc = "Raw VK_EXT_pageable_device_local_memory device-level function pointers"] pub struct DeviceFn { pub set_device_memory_priority_ext: PFN_vkSetDeviceMemoryPriorityEXT, } @@ -9599,7 +10799,7 @@ pub mod ext { Self { set_device_memory_priority_ext: unsafe { unsafe extern "system" fn set_device_memory_priority_ext( - _device: Device, + _device: crate::vk::Device, _memory: DeviceMemory, _priority: f32, ) { @@ -9620,6 +10820,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_pageable_device_local_memory device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod image_sliced_view_of_3d { use super::super::*; @@ -9816,6 +11038,7 @@ pub mod ext { coverage_reduction_mode: CoverageReductionModeNV, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_extended_dynamic_state3 device-level function pointers"] pub struct DeviceFn { pub cmd_set_depth_clamp_enable_ext: PFN_vkCmdSetDepthClampEnableEXT, pub cmd_set_polygon_mode_ext: PFN_vkCmdSetPolygonModeEXT, @@ -10484,6 +11707,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_extended_dynamic_state3 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod subpass_merge_feedback { use super::super::*; @@ -10498,17 +11743,18 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetShaderModuleIdentifierEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, shader_module: ShaderModule, p_identifier: *mut ShaderModuleIdentifierEXT<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetShaderModuleCreateInfoIdentifierEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const ShaderModuleCreateInfo<'_>, p_identifier: *mut ShaderModuleIdentifierEXT<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_shader_module_identifier device-level function pointers"] pub struct DeviceFn { pub get_shader_module_identifier_ext: PFN_vkGetShaderModuleIdentifierEXT, pub get_shader_module_create_info_identifier_ext: @@ -10524,7 +11770,7 @@ pub mod ext { Self { get_shader_module_identifier_ext: unsafe { unsafe extern "system" fn get_shader_module_identifier_ext( - _device: Device, + _device: crate::vk::Device, _shader_module: ShaderModule, _p_identifier: *mut ShaderModuleIdentifierEXT<'_>, ) { @@ -10545,7 +11791,7 @@ pub mod ext { }, get_shader_module_create_info_identifier_ext: unsafe { unsafe extern "system" fn get_shader_module_create_info_identifier_ext( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const ShaderModuleCreateInfo<'_>, _p_identifier: *mut ShaderModuleIdentifierEXT<'_>, ) { @@ -10567,6 +11813,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_shader_module_identifier device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod rasterization_order_attachment_access { use super::super::*; @@ -10594,7 +11862,7 @@ pub mod ext { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateShadersEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, create_info_count: u32, p_create_infos: *const ShaderCreateInfoEXT<'_>, p_allocator: *const AllocationCallbacks<'_>, @@ -10602,13 +11870,13 @@ pub mod ext { ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyShaderEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, shader: ShaderEXT, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetShaderBinaryDataEXT = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, shader: ShaderEXT, p_data_size: *mut usize, p_data: *mut c_void, @@ -10621,6 +11889,7 @@ pub mod ext { p_shaders: *const ShaderEXT, ); #[derive(Clone)] + #[doc = "Raw VK_EXT_shader_object device-level function pointers"] pub struct DeviceFn { pub create_shaders_ext : PFN_vkCreateShadersEXT , pub destroy_shader_ext : PFN_vkDestroyShaderEXT , pub get_shader_binary_data_ext : PFN_vkGetShaderBinaryDataEXT , pub cmd_bind_shaders_ext : PFN_vkCmdBindShadersEXT , pub cmd_set_cull_mode_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetCullMode , pub cmd_set_front_face_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetFrontFace , pub cmd_set_primitive_topology_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetPrimitiveTopology , pub cmd_set_viewport_with_count_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetViewportWithCount , pub cmd_set_scissor_with_count_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetScissorWithCount , pub cmd_bind_vertex_buffers2_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdBindVertexBuffers2 , pub cmd_set_depth_test_enable_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetDepthTestEnable , pub cmd_set_depth_write_enable_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetDepthWriteEnable , pub cmd_set_depth_compare_op_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetDepthCompareOp , pub cmd_set_depth_bounds_test_enable_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetDepthBoundsTestEnable , pub cmd_set_stencil_test_enable_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetStencilTestEnable , pub cmd_set_stencil_op_ext : crate :: vk :: ext :: extended_dynamic_state :: PFN_vkCmdSetStencilOp , pub cmd_set_vertex_input_ext : crate :: vk :: ext :: vertex_input_dynamic_state :: PFN_vkCmdSetVertexInputEXT , pub cmd_set_patch_control_points_ext : crate :: vk :: ext :: extended_dynamic_state2 :: PFN_vkCmdSetPatchControlPointsEXT , pub cmd_set_rasterizer_discard_enable_ext : crate :: vk :: ext :: extended_dynamic_state2 :: PFN_vkCmdSetRasterizerDiscardEnable , pub cmd_set_depth_bias_enable_ext : crate :: vk :: ext :: extended_dynamic_state2 :: PFN_vkCmdSetDepthBiasEnable , pub cmd_set_logic_op_ext : crate :: vk :: ext :: extended_dynamic_state2 :: PFN_vkCmdSetLogicOpEXT , pub cmd_set_primitive_restart_enable_ext : crate :: vk :: ext :: extended_dynamic_state2 :: PFN_vkCmdSetPrimitiveRestartEnable , pub cmd_set_tessellation_domain_origin_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetTessellationDomainOriginEXT , pub cmd_set_depth_clamp_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetDepthClampEnableEXT , pub cmd_set_polygon_mode_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetPolygonModeEXT , pub cmd_set_rasterization_samples_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetRasterizationSamplesEXT , pub cmd_set_sample_mask_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetSampleMaskEXT , pub cmd_set_alpha_to_coverage_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetAlphaToCoverageEnableEXT , pub cmd_set_alpha_to_one_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetAlphaToOneEnableEXT , pub cmd_set_logic_op_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetLogicOpEnableEXT , pub cmd_set_color_blend_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetColorBlendEnableEXT , pub cmd_set_color_blend_equation_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetColorBlendEquationEXT , pub cmd_set_color_write_mask_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetColorWriteMaskEXT , pub cmd_set_rasterization_stream_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetRasterizationStreamEXT , pub cmd_set_conservative_rasterization_mode_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetConservativeRasterizationModeEXT , pub cmd_set_extra_primitive_overestimation_size_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT , pub cmd_set_depth_clip_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetDepthClipEnableEXT , pub cmd_set_sample_locations_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetSampleLocationsEnableEXT , pub cmd_set_color_blend_advanced_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetColorBlendAdvancedEXT , pub cmd_set_provoking_vertex_mode_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetProvokingVertexModeEXT , pub cmd_set_line_rasterization_mode_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetLineRasterizationModeEXT , pub cmd_set_line_stipple_enable_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetLineStippleEnableEXT , pub cmd_set_depth_clip_negative_one_to_one_ext : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetDepthClipNegativeOneToOneEXT , pub cmd_set_viewport_w_scaling_enable_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetViewportWScalingEnableNV , pub cmd_set_viewport_swizzle_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetViewportSwizzleNV , pub cmd_set_coverage_to_color_enable_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetCoverageToColorEnableNV , pub cmd_set_coverage_to_color_location_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetCoverageToColorLocationNV , pub cmd_set_coverage_modulation_mode_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetCoverageModulationModeNV , pub cmd_set_coverage_modulation_table_enable_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetCoverageModulationTableEnableNV , pub cmd_set_coverage_modulation_table_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetCoverageModulationTableNV , pub cmd_set_shading_rate_image_enable_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetShadingRateImageEnableNV , pub cmd_set_representative_fragment_test_enable_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetRepresentativeFragmentTestEnableNV , pub cmd_set_coverage_reduction_mode_nv : crate :: vk :: ext :: extended_dynamic_state3 :: PFN_vkCmdSetCoverageReductionModeNV , } unsafe impl Send for DeviceFn {} unsafe impl Sync for DeviceFn {} @@ -10632,7 +11901,7 @@ pub mod ext { Self { create_shaders_ext: unsafe { unsafe extern "system" fn create_shaders_ext( - _device: Device, + _device: crate::vk::Device, _create_info_count: u32, _p_create_infos: *const ShaderCreateInfoEXT<'_>, _p_allocator: *const AllocationCallbacks<'_>, @@ -10650,7 +11919,7 @@ pub mod ext { }, destroy_shader_ext: unsafe { unsafe extern "system" fn destroy_shader_ext( - _device: Device, + _device: crate::vk::Device, _shader: ShaderEXT, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -10666,7 +11935,7 @@ pub mod ext { }, get_shader_binary_data_ext: unsafe { unsafe extern "system" fn get_shader_binary_data_ext( - _device: Device, + _device: crate::vk::Device, _shader: ShaderEXT, _p_data_size: *mut usize, _p_data: *mut c_void, @@ -11676,6 +12945,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_shader_object device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod mutable_descriptor_type { use super::super::*; @@ -11713,6 +13004,7 @@ pub mod ext { pub type PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT = unsafe extern "system" fn(command_buffer: CommandBuffer, aspect_mask: ImageAspectFlags); #[derive(Clone)] + #[doc = "Raw VK_EXT_attachment_feedback_loop_dynamic_state device-level function pointers"] pub struct DeviceFn { pub cmd_set_attachment_feedback_loop_enable_ext: PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT, @@ -11748,6 +13040,28 @@ pub mod ext { } } } + #[doc = "VK_EXT_attachment_feedback_loop_dynamic_state device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } pub mod fuchsia { @@ -11758,12 +13072,13 @@ pub mod fuchsia { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateImagePipeSurfaceFUCHSIA = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const ImagePipeSurfaceCreateInfoFUCHSIA<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_FUCHSIA_imagepipe_surface instance-level function pointers"] pub struct InstanceFn { pub create_image_pipe_surface_fuchsia: PFN_vkCreateImagePipeSurfaceFUCHSIA, } @@ -11777,7 +13092,7 @@ pub mod fuchsia { Self { create_image_pipe_surface_fuchsia: unsafe { unsafe extern "system" fn create_image_pipe_surface_fuchsia( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const ImagePipeSurfaceCreateInfoFUCHSIA<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -11800,6 +13115,28 @@ pub mod fuchsia { } } } + #[doc = "VK_FUCHSIA_imagepipe_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_memory { use super::super::*; @@ -11808,19 +13145,20 @@ pub mod fuchsia { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryZirconHandleFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_zircon_handle_info: *const MemoryGetZirconHandleInfoFUCHSIA<'_>, p_zircon_handle: *mut zx_handle_t, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, handle_type: ExternalMemoryHandleTypeFlags, zircon_handle: zx_handle_t, p_memory_zircon_handle_properties: *mut MemoryZirconHandlePropertiesFUCHSIA<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_FUCHSIA_external_memory device-level function pointers"] pub struct DeviceFn { pub get_memory_zircon_handle_fuchsia: PFN_vkGetMemoryZirconHandleFUCHSIA, pub get_memory_zircon_handle_properties_fuchsia: @@ -11836,7 +13174,7 @@ pub mod fuchsia { Self { get_memory_zircon_handle_fuchsia: unsafe { unsafe extern "system" fn get_memory_zircon_handle_fuchsia( - _device: Device, + _device: crate::vk::Device, _p_get_zircon_handle_info: *const MemoryGetZirconHandleInfoFUCHSIA<'_>, _p_zircon_handle: *mut zx_handle_t, ) -> Result { @@ -11857,7 +13195,7 @@ pub mod fuchsia { }, get_memory_zircon_handle_properties_fuchsia: unsafe { unsafe extern "system" fn get_memory_zircon_handle_properties_fuchsia( - _device: Device, + _device: crate::vk::Device, _handle_type: ExternalMemoryHandleTypeFlags, _zircon_handle: zx_handle_t, _p_memory_zircon_handle_properties : * mut MemoryZirconHandlePropertiesFUCHSIA < '_ >, @@ -11880,6 +13218,28 @@ pub mod fuchsia { } } } + #[doc = "VK_FUCHSIA_external_memory device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_semaphore { use super::super::*; @@ -11888,18 +13248,19 @@ pub mod fuchsia { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkImportSemaphoreZirconHandleFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_import_semaphore_zircon_handle_info: *const ImportSemaphoreZirconHandleInfoFUCHSIA<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSemaphoreZirconHandleFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_zircon_handle_info: *const SemaphoreGetZirconHandleInfoFUCHSIA<'_>, p_zircon_handle: *mut zx_handle_t, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_FUCHSIA_external_semaphore device-level function pointers"] pub struct DeviceFn { pub import_semaphore_zircon_handle_fuchsia: PFN_vkImportSemaphoreZirconHandleFUCHSIA, pub get_semaphore_zircon_handle_fuchsia: PFN_vkGetSemaphoreZirconHandleFUCHSIA, @@ -11914,7 +13275,7 @@ pub mod fuchsia { Self { import_semaphore_zircon_handle_fuchsia: unsafe { unsafe extern "system" fn import_semaphore_zircon_handle_fuchsia( - _device: Device, + _device: crate::vk::Device, _p_import_semaphore_zircon_handle_info : * const ImportSemaphoreZirconHandleInfoFUCHSIA < '_ >, ) -> Result { panic!(concat!( @@ -11934,7 +13295,7 @@ pub mod fuchsia { }, get_semaphore_zircon_handle_fuchsia: unsafe { unsafe extern "system" fn get_semaphore_zircon_handle_fuchsia( - _device: Device, + _device: crate::vk::Device, _p_get_zircon_handle_info: *const SemaphoreGetZirconHandleInfoFUCHSIA< '_, >, @@ -11958,6 +13319,28 @@ pub mod fuchsia { } } } + #[doc = "VK_FUCHSIA_external_semaphore device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod buffer_collection { use super::super::*; @@ -11966,7 +13349,7 @@ pub mod fuchsia { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateBufferCollectionFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const BufferCollectionCreateInfoFUCHSIA<'_>, p_allocator: *const AllocationCallbacks<'_>, p_collection: *mut BufferCollectionFUCHSIA, @@ -11974,31 +13357,32 @@ pub mod fuchsia { #[allow(non_camel_case_types)] pub type PFN_vkSetBufferCollectionImageConstraintsFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, collection: BufferCollectionFUCHSIA, p_image_constraints_info: *const ImageConstraintsInfoFUCHSIA<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, collection: BufferCollectionFUCHSIA, p_buffer_constraints_info: *const BufferConstraintsInfoFUCHSIA<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyBufferCollectionFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, collection: BufferCollectionFUCHSIA, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetBufferCollectionPropertiesFUCHSIA = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, collection: BufferCollectionFUCHSIA, p_properties: *mut BufferCollectionPropertiesFUCHSIA<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_FUCHSIA_buffer_collection device-level function pointers"] pub struct DeviceFn { pub create_buffer_collection_fuchsia: PFN_vkCreateBufferCollectionFUCHSIA, pub set_buffer_collection_image_constraints_fuchsia: @@ -12019,7 +13403,7 @@ pub mod fuchsia { Self { create_buffer_collection_fuchsia: unsafe { unsafe extern "system" fn create_buffer_collection_fuchsia( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const BufferCollectionCreateInfoFUCHSIA<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_collection: *mut BufferCollectionFUCHSIA, @@ -12041,7 +13425,7 @@ pub mod fuchsia { }, set_buffer_collection_image_constraints_fuchsia: unsafe { unsafe extern "system" fn set_buffer_collection_image_constraints_fuchsia( - _device: Device, + _device: crate::vk::Device, _collection: BufferCollectionFUCHSIA, _p_image_constraints_info: *const ImageConstraintsInfoFUCHSIA<'_>, ) -> Result { @@ -12062,7 +13446,7 @@ pub mod fuchsia { }, set_buffer_collection_buffer_constraints_fuchsia: unsafe { unsafe extern "system" fn set_buffer_collection_buffer_constraints_fuchsia( - _device: Device, + _device: crate::vk::Device, _collection: BufferCollectionFUCHSIA, _p_buffer_constraints_info: *const BufferConstraintsInfoFUCHSIA<'_>, ) -> Result { @@ -12083,7 +13467,7 @@ pub mod fuchsia { }, destroy_buffer_collection_fuchsia: unsafe { unsafe extern "system" fn destroy_buffer_collection_fuchsia( - _device: Device, + _device: crate::vk::Device, _collection: BufferCollectionFUCHSIA, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -12104,7 +13488,7 @@ pub mod fuchsia { }, get_buffer_collection_properties_fuchsia: unsafe { unsafe extern "system" fn get_buffer_collection_properties_fuchsia( - _device: Device, + _device: crate::vk::Device, _collection: BufferCollectionFUCHSIA, _p_properties: *mut BufferCollectionPropertiesFUCHSIA<'_>, ) -> Result { @@ -12126,6 +13510,28 @@ pub mod fuchsia { } } } + #[doc = "VK_FUCHSIA_buffer_collection device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } pub mod ggp { @@ -12136,13 +13542,14 @@ pub mod ggp { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateStreamDescriptorSurfaceGGP = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const StreamDescriptorSurfaceCreateInfoGGP<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_GGP_stream_descriptor_surface instance-level function pointers"] pub struct InstanceFn { pub create_stream_descriptor_surface_ggp: PFN_vkCreateStreamDescriptorSurfaceGGP, } @@ -12156,7 +13563,7 @@ pub mod ggp { Self { create_stream_descriptor_surface_ggp: unsafe { unsafe extern "system" fn create_stream_descriptor_surface_ggp( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const StreamDescriptorSurfaceCreateInfoGGP<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -12179,6 +13586,28 @@ pub mod ggp { } } } + #[doc = "VK_GGP_stream_descriptor_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod frame_token { use super::super::*; @@ -12195,19 +13624,20 @@ pub mod google { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetRefreshCycleDurationGOOGLE = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_display_timing_properties: *mut RefreshCycleDurationGOOGLE, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetPastPresentationTimingGOOGLE = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_presentation_timing_count: *mut u32, p_presentation_timings: *mut PastPresentationTimingGOOGLE, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_GOOGLE_display_timing device-level function pointers"] pub struct DeviceFn { pub get_refresh_cycle_duration_google: PFN_vkGetRefreshCycleDurationGOOGLE, pub get_past_presentation_timing_google: PFN_vkGetPastPresentationTimingGOOGLE, @@ -12222,7 +13652,7 @@ pub mod google { Self { get_refresh_cycle_duration_google: unsafe { unsafe extern "system" fn get_refresh_cycle_duration_google( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_display_timing_properties: *mut RefreshCycleDurationGOOGLE, ) -> Result { @@ -12243,7 +13673,7 @@ pub mod google { }, get_past_presentation_timing_google: unsafe { unsafe extern "system" fn get_past_presentation_timing_google( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_presentation_timing_count: *mut u32, _p_presentation_timings: *mut PastPresentationTimingGOOGLE, @@ -12266,6 +13696,28 @@ pub mod google { } } } + #[doc = "VK_GOOGLE_display_timing device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod hlsl_functionality1 { use super::super::*; @@ -12301,7 +13753,7 @@ pub mod huawei { #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, renderpass: RenderPass, p_max_workgroup_size: *mut Extent2D, ) -> Result; @@ -12309,6 +13761,7 @@ pub mod huawei { pub type PFN_vkCmdSubpassShadingHUAWEI = unsafe extern "system" fn(command_buffer: CommandBuffer); #[derive(Clone)] + #[doc = "Raw VK_HUAWEI_subpass_shading device-level function pointers"] pub struct DeviceFn { pub get_device_subpass_shading_max_workgroup_size_huawei: PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, @@ -12324,7 +13777,7 @@ pub mod huawei { Self { get_device_subpass_shading_max_workgroup_size_huawei: unsafe { unsafe extern "system" fn get_device_subpass_shading_max_workgroup_size_huawei( - _device: Device, + _device: crate::vk::Device, _renderpass: RenderPass, _p_max_workgroup_size: *mut Extent2D, ) -> Result { @@ -12364,8 +13817,30 @@ pub mod huawei { } } } - } - pub mod invocation_mask { + #[doc = "VK_HUAWEI_subpass_shading device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } + } + pub mod invocation_mask { use super::super::*; pub const NAME: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_HUAWEI_invocation_mask\0") }; @@ -12377,6 +13852,7 @@ pub mod huawei { image_layout: ImageLayout, ); #[derive(Clone)] + #[doc = "Raw VK_HUAWEI_invocation_mask device-level function pointers"] pub struct DeviceFn { pub cmd_bind_invocation_mask_huawei: PFN_vkCmdBindInvocationMaskHUAWEI, } @@ -12411,6 +13887,28 @@ pub mod huawei { } } } + #[doc = "VK_HUAWEI_invocation_mask device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod cluster_culling_shader { use super::super::*; @@ -12431,6 +13929,7 @@ pub mod huawei { offset: DeviceSize, ); #[derive(Clone)] + #[doc = "Raw VK_HUAWEI_cluster_culling_shader device-level function pointers"] pub struct DeviceFn { pub cmd_draw_cluster_huawei: PFN_vkCmdDrawClusterHUAWEI, pub cmd_draw_cluster_indirect_huawei: PFN_vkCmdDrawClusterIndirectHUAWEI, @@ -12488,6 +13987,28 @@ pub mod huawei { } } } + #[doc = "VK_HUAWEI_cluster_culling_shader device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } pub mod img { @@ -12524,11 +14045,12 @@ pub mod intel { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkInitializePerformanceApiINTEL = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_initialize_info: *const InitializePerformanceApiInfoINTEL<'_>, ) -> Result; #[allow(non_camel_case_types)] - pub type PFN_vkUninitializePerformanceApiINTEL = unsafe extern "system" fn(device: Device); + pub type PFN_vkUninitializePerformanceApiINTEL = + unsafe extern "system" fn(device: crate::vk::Device); #[allow(non_camel_case_types)] pub type PFN_vkCmdSetPerformanceMarkerINTEL = unsafe extern "system" fn( command_buffer: CommandBuffer, @@ -12548,14 +14070,14 @@ pub mod intel { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkAcquirePerformanceConfigurationINTEL = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_acquire_info: *const PerformanceConfigurationAcquireInfoINTEL<'_>, p_configuration: *mut PerformanceConfigurationINTEL, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkReleasePerformanceConfigurationINTEL = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, configuration: PerformanceConfigurationINTEL, ) -> Result; @@ -12567,11 +14089,12 @@ pub mod intel { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetPerformanceParameterINTEL = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, parameter: PerformanceParameterTypeINTEL, p_value: *mut PerformanceValueINTEL, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_INTEL_performance_query device-level function pointers"] pub struct DeviceFn { pub initialize_performance_api_intel: PFN_vkInitializePerformanceApiINTEL, pub uninitialize_performance_api_intel: PFN_vkUninitializePerformanceApiINTEL, @@ -12594,7 +14117,7 @@ pub mod intel { Self { initialize_performance_api_intel: unsafe { unsafe extern "system" fn initialize_performance_api_intel( - _device: Device, + _device: crate::vk::Device, _p_initialize_info: *const InitializePerformanceApiInfoINTEL<'_>, ) -> Result { panic!(concat!( @@ -12614,7 +14137,7 @@ pub mod intel { }, uninitialize_performance_api_intel: unsafe { unsafe extern "system" fn uninitialize_performance_api_intel( - _device: Device, + _device: crate::vk::Device, ) { panic!(concat!( "Unable to load ", @@ -12693,7 +14216,7 @@ pub mod intel { }, acquire_performance_configuration_intel: unsafe { unsafe extern "system" fn acquire_performance_configuration_intel( - _device: Device, + _device: crate::vk::Device, _p_acquire_info: *const PerformanceConfigurationAcquireInfoINTEL<'_>, _p_configuration: *mut PerformanceConfigurationINTEL, ) -> Result { @@ -12714,7 +14237,7 @@ pub mod intel { }, release_performance_configuration_intel: unsafe { unsafe extern "system" fn release_performance_configuration_intel( - _device: Device, + _device: crate::vk::Device, _configuration: PerformanceConfigurationINTEL, ) -> Result { panic!(concat!( @@ -12754,7 +14277,7 @@ pub mod intel { }, get_performance_parameter_intel: unsafe { unsafe extern "system" fn get_performance_parameter_intel( - _device: Device, + _device: crate::vk::Device, _parameter: PerformanceParameterTypeINTEL, _p_value: *mut PerformanceValueINTEL, ) -> Result { @@ -12776,6 +14299,28 @@ pub mod intel { } } } + #[doc = "VK_INTEL_performance_query device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } pub mod khr { @@ -12785,7 +14330,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 25u32; #[allow(non_camel_case_types)] pub type PFN_vkDestroySurfaceKHR = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, surface: SurfaceKHR, p_allocator: *const AllocationCallbacks<'_>, ); @@ -12821,6 +14366,7 @@ pub mod khr { p_present_modes: *mut PresentModeKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_surface instance-level function pointers"] pub struct InstanceFn { pub destroy_surface_khr: PFN_vkDestroySurfaceKHR, pub get_physical_device_surface_support_khr: PFN_vkGetPhysicalDeviceSurfaceSupportKHR, @@ -12840,7 +14386,7 @@ pub mod khr { Self { destroy_surface_khr: unsafe { unsafe extern "system" fn destroy_surface_khr( - _instance: Instance, + _instance: crate::vk::Instance, _surface: SurfaceKHR, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -12944,6 +14490,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod swapchain { use super::super::*; @@ -12959,6 +14527,7 @@ pub mod khr { ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_swapchain instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_present_rectangles_khr: PFN_vkGetPhysicalDevicePresentRectanglesKHR, @@ -12996,29 +14565,51 @@ pub mod khr { } } } + #[doc = "VK_KHR_swapchain instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkCreateSwapchainKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const SwapchainCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_swapchain: *mut SwapchainKHR, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroySwapchainKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetSwapchainImagesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_swapchain_image_count: *mut u32, p_swapchain_images: *mut Image, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkAcquireNextImageKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, timeout: u64, semaphore: Semaphore, @@ -13032,24 +14623,25 @@ pub mod khr { ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceGroupPresentCapabilitiesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_device_group_present_capabilities: *mut DeviceGroupPresentCapabilitiesKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceGroupSurfacePresentModesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, surface: SurfaceKHR, p_modes: *mut DeviceGroupPresentModeFlagsKHR, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkAcquireNextImage2KHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_acquire_info: *const AcquireNextImageInfoKHR<'_>, p_image_index: *mut u32, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_swapchain device-level function pointers"] pub struct DeviceFn { pub create_swapchain_khr: PFN_vkCreateSwapchainKHR, pub destroy_swapchain_khr: PFN_vkDestroySwapchainKHR, @@ -13072,7 +14664,7 @@ pub mod khr { Self { create_swapchain_khr: unsafe { unsafe extern "system" fn create_swapchain_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const SwapchainCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_swapchain: *mut SwapchainKHR, @@ -13089,7 +14681,7 @@ pub mod khr { }, destroy_swapchain_khr: unsafe { unsafe extern "system" fn destroy_swapchain_khr( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -13108,7 +14700,7 @@ pub mod khr { }, get_swapchain_images_khr: unsafe { unsafe extern "system" fn get_swapchain_images_khr( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_swapchain_image_count: *mut u32, _p_swapchain_images: *mut Image, @@ -13129,7 +14721,7 @@ pub mod khr { }, acquire_next_image_khr: unsafe { unsafe extern "system" fn acquire_next_image_khr( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _timeout: u64, _semaphore: Semaphore, @@ -13166,7 +14758,7 @@ pub mod khr { }, get_device_group_present_capabilities_khr: unsafe { unsafe extern "system" fn get_device_group_present_capabilities_khr( - _device: Device, + _device: crate::vk::Device, _p_device_group_present_capabilities : * mut DeviceGroupPresentCapabilitiesKHR < '_ >, ) -> Result { panic!(concat!( @@ -13186,7 +14778,7 @@ pub mod khr { }, get_device_group_surface_present_modes_khr: unsafe { unsafe extern "system" fn get_device_group_surface_present_modes_khr( - _device: Device, + _device: crate::vk::Device, _surface: SurfaceKHR, _p_modes: *mut DeviceGroupPresentModeFlagsKHR, ) -> Result { @@ -13207,7 +14799,7 @@ pub mod khr { }, acquire_next_image2_khr: unsafe { unsafe extern "system" fn acquire_next_image2_khr( - _device: Device, + _device: crate::vk::Device, _p_acquire_info: *const AcquireNextImageInfoKHR<'_>, _p_image_index: *mut u32, ) -> Result { @@ -13228,6 +14820,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_swapchain device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod display { use super::super::*; @@ -13280,12 +14894,13 @@ pub mod khr { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateDisplayPlaneSurfaceKHR = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const DisplaySurfaceCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_display instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_display_properties_khr: PFN_vkGetPhysicalDeviceDisplayPropertiesKHR, @@ -13436,7 +15051,7 @@ pub mod khr { }, create_display_plane_surface_khr: unsafe { unsafe extern "system" fn create_display_plane_surface_khr( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const DisplaySurfaceCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -13459,6 +15074,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_display instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod display_swapchain { use super::super::*; @@ -13467,13 +15104,14 @@ pub mod khr { pub const SPEC_VERSION: u32 = 10u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateSharedSwapchainsKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain_count: u32, p_create_infos: *const SwapchainCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_swapchains: *mut SwapchainKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_display_swapchain device-level function pointers"] pub struct DeviceFn { pub create_shared_swapchains_khr: PFN_vkCreateSharedSwapchainsKHR, } @@ -13487,7 +15125,7 @@ pub mod khr { Self { create_shared_swapchains_khr: unsafe { unsafe extern "system" fn create_shared_swapchains_khr( - _device: Device, + _device: crate::vk::Device, _swapchain_count: u32, _p_create_infos: *const SwapchainCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, @@ -13510,6 +15148,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_display_swapchain device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod xlib_surface { use super::super::*; @@ -13518,7 +15178,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 6u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateXlibSurfaceKHR = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const XlibSurfaceCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, @@ -13532,6 +15192,7 @@ pub mod khr { visual_id: VisualID, ) -> Bool32; #[derive(Clone)] + #[doc = "Raw VK_KHR_xlib_surface instance-level function pointers"] pub struct InstanceFn { pub create_xlib_surface_khr: PFN_vkCreateXlibSurfaceKHR, pub get_physical_device_xlib_presentation_support_khr: @@ -13547,7 +15208,7 @@ pub mod khr { Self { create_xlib_surface_khr: unsafe { unsafe extern "system" fn create_xlib_surface_khr( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const XlibSurfaceCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -13591,6 +15252,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_xlib_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod xcb_surface { use super::super::*; @@ -13599,7 +15282,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 6u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateXcbSurfaceKHR = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const XcbSurfaceCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, @@ -13613,6 +15296,7 @@ pub mod khr { visual_id: xcb_visualid_t, ) -> Bool32; #[derive(Clone)] + #[doc = "Raw VK_KHR_xcb_surface instance-level function pointers"] pub struct InstanceFn { pub create_xcb_surface_khr: PFN_vkCreateXcbSurfaceKHR, pub get_physical_device_xcb_presentation_support_khr: @@ -13628,7 +15312,7 @@ pub mod khr { Self { create_xcb_surface_khr: unsafe { unsafe extern "system" fn create_xcb_surface_khr( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const XcbSurfaceCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -13671,6 +15355,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_xcb_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod wayland_surface { use super::super::*; @@ -13679,7 +15385,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 6u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateWaylandSurfaceKHR = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const WaylandSurfaceCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, @@ -13692,6 +15398,7 @@ pub mod khr { display: *mut wl_display, ) -> Bool32; #[derive(Clone)] + #[doc = "Raw VK_KHR_wayland_surface instance-level function pointers"] pub struct InstanceFn { pub create_wayland_surface_khr: PFN_vkCreateWaylandSurfaceKHR, pub get_physical_device_wayland_presentation_support_khr: @@ -13707,7 +15414,7 @@ pub mod khr { Self { create_wayland_surface_khr: unsafe { unsafe extern "system" fn create_wayland_surface_khr( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const WaylandSurfaceCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -13750,6 +15457,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_wayland_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod android_surface { use super::super::*; @@ -13758,12 +15487,13 @@ pub mod khr { pub const SPEC_VERSION: u32 = 6u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateAndroidSurfaceKHR = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const AndroidSurfaceCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_android_surface instance-level function pointers"] pub struct InstanceFn { pub create_android_surface_khr: PFN_vkCreateAndroidSurfaceKHR, } @@ -13777,7 +15507,7 @@ pub mod khr { Self { create_android_surface_khr: unsafe { unsafe extern "system" fn create_android_surface_khr( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const AndroidSurfaceCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -13799,6 +15529,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_android_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod win32_surface { use super::super::*; @@ -13807,7 +15559,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 6u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateWin32SurfaceKHR = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const Win32SurfaceCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, @@ -13819,6 +15571,7 @@ pub mod khr { queue_family_index: u32, ) -> Bool32; #[derive(Clone)] + #[doc = "Raw VK_KHR_win32_surface instance-level function pointers"] pub struct InstanceFn { pub create_win32_surface_khr: PFN_vkCreateWin32SurfaceKHR, pub get_physical_device_win32_presentation_support_khr: @@ -13834,7 +15587,7 @@ pub mod khr { Self { create_win32_surface_khr: unsafe { unsafe extern "system" fn create_win32_surface_khr( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const Win32SurfaceCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -13876,6 +15629,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_win32_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod sampler_mirror_clamp_to_edge { use super::super::*; @@ -13905,6 +15680,7 @@ pub mod khr { p_video_format_properties: *mut VideoFormatPropertiesKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_video_queue instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_video_capabilities_khr: PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR, @@ -13965,22 +15741,44 @@ pub mod khr { } } } + #[doc = "VK_KHR_video_queue instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkCreateVideoSessionKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const VideoSessionCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_video_session: *mut VideoSessionKHR, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyVideoSessionKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, video_session: VideoSessionKHR, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetVideoSessionMemoryRequirementsKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, video_session: VideoSessionKHR, p_memory_requirements_count: *mut u32, p_memory_requirements: *mut VideoSessionMemoryRequirementsKHR<'_>, @@ -13988,14 +15786,14 @@ pub mod khr { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkBindVideoSessionMemoryKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, video_session: VideoSessionKHR, bind_session_memory_info_count: u32, p_bind_session_memory_infos: *const BindVideoSessionMemoryInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateVideoSessionParametersKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const VideoSessionParametersCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_video_session_parameters: *mut VideoSessionParametersKHR, @@ -14003,14 +15801,14 @@ pub mod khr { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkUpdateVideoSessionParametersKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, video_session_parameters: VideoSessionParametersKHR, p_update_info: *const VideoSessionParametersUpdateInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyVideoSessionParametersKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, video_session_parameters: VideoSessionParametersKHR, p_allocator: *const AllocationCallbacks<'_>, ); @@ -14030,6 +15828,7 @@ pub mod khr { p_coding_control_info: *const VideoCodingControlInfoKHR<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_video_queue device-level function pointers"] pub struct DeviceFn { pub create_video_session_khr: PFN_vkCreateVideoSessionKHR, pub destroy_video_session_khr: PFN_vkDestroyVideoSessionKHR, @@ -14053,7 +15852,7 @@ pub mod khr { Self { create_video_session_khr: unsafe { unsafe extern "system" fn create_video_session_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const VideoSessionCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_video_session: *mut VideoSessionKHR, @@ -14074,7 +15873,7 @@ pub mod khr { }, destroy_video_session_khr: unsafe { unsafe extern "system" fn destroy_video_session_khr( - _device: Device, + _device: crate::vk::Device, _video_session: VideoSessionKHR, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -14094,7 +15893,7 @@ pub mod khr { }, get_video_session_memory_requirements_khr: unsafe { unsafe extern "system" fn get_video_session_memory_requirements_khr( - _device: Device, + _device: crate::vk::Device, _video_session: VideoSessionKHR, _p_memory_requirements_count: *mut u32, _p_memory_requirements: *mut VideoSessionMemoryRequirementsKHR<'_>, @@ -14116,7 +15915,7 @@ pub mod khr { }, bind_video_session_memory_khr: unsafe { unsafe extern "system" fn bind_video_session_memory_khr( - _device: Device, + _device: crate::vk::Device, _video_session: VideoSessionKHR, _bind_session_memory_info_count: u32, _p_bind_session_memory_infos: *const BindVideoSessionMemoryInfoKHR<'_>, @@ -14137,7 +15936,7 @@ pub mod khr { }, create_video_session_parameters_khr: unsafe { unsafe extern "system" fn create_video_session_parameters_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const VideoSessionParametersCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_video_session_parameters: *mut VideoSessionParametersKHR, @@ -14159,7 +15958,7 @@ pub mod khr { }, update_video_session_parameters_khr: unsafe { unsafe extern "system" fn update_video_session_parameters_khr( - _device: Device, + _device: crate::vk::Device, _video_session_parameters: VideoSessionParametersKHR, _p_update_info: *const VideoSessionParametersUpdateInfoKHR<'_>, ) -> Result { @@ -14180,7 +15979,7 @@ pub mod khr { }, destroy_video_session_parameters_khr: unsafe { unsafe extern "system" fn destroy_video_session_parameters_khr( - _device: Device, + _device: crate::vk::Device, _video_session_parameters: VideoSessionParametersKHR, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -14259,6 +16058,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_video_queue device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod video_decode_queue { use super::super::*; @@ -14271,6 +16092,7 @@ pub mod khr { p_decode_info: *const VideoDecodeInfoKHR<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_video_decode_queue device-level function pointers"] pub struct DeviceFn { pub cmd_decode_video_khr: PFN_vkCmdDecodeVideoKHR, } @@ -14300,6 +16122,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_video_decode_queue device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod video_encode_h264 { use super::super::*; @@ -14332,6 +16176,7 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkCmdEndRendering = unsafe extern "system" fn(command_buffer: CommandBuffer); #[derive(Clone)] + #[doc = "Raw VK_KHR_dynamic_rendering device-level function pointers"] pub struct DeviceFn { pub cmd_begin_rendering_khr: PFN_vkCmdBeginRendering, pub cmd_end_rendering_khr: PFN_vkCmdEndRendering, @@ -14383,6 +16228,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_dynamic_rendering device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod multiview { use super::super::*; @@ -14439,6 +16306,7 @@ pub mod khr { p_properties: *mut SparseImageFormatProperties2<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_get_physical_device_properties2 instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_features2_khr: PFN_vkGetPhysicalDeviceFeatures2, pub get_physical_device_properties2_khr: PFN_vkGetPhysicalDeviceProperties2, @@ -14609,6 +16477,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_get_physical_device_properties2 instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod device_group { use super::super::*; @@ -14616,6 +16506,7 @@ pub mod khr { unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_KHR_device_group\0") }; pub const SPEC_VERSION: u32 = 4u32; #[derive(Clone)] + #[doc = "Raw VK_KHR_device_group instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_present_rectangles_khr: crate::vk::khr::swapchain::PFN_vkGetPhysicalDevicePresentRectanglesKHR, @@ -14653,9 +16544,31 @@ pub mod khr { } } } + #[doc = "VK_KHR_device_group instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceGroupPeerMemoryFeatures = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, heap_index: u32, local_device_index: u32, remote_device_index: u32, @@ -14675,6 +16588,7 @@ pub mod khr { group_count_z: u32, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_device_group device-level function pointers"] pub struct DeviceFn { pub get_device_group_peer_memory_features_khr: PFN_vkGetDeviceGroupPeerMemoryFeatures, pub cmd_set_device_mask_khr: PFN_vkCmdSetDeviceMask, @@ -14695,7 +16609,7 @@ pub mod khr { Self { get_device_group_peer_memory_features_khr: unsafe { unsafe extern "system" fn get_device_group_peer_memory_features_khr( - _device: Device, + _device: crate::vk::Device, _heap_index: u32, _local_device_index: u32, _remote_device_index: u32, @@ -14759,7 +16673,7 @@ pub mod khr { }, get_device_group_present_capabilities_khr: unsafe { unsafe extern "system" fn get_device_group_present_capabilities_khr( - _device: Device, + _device: crate::vk::Device, _p_device_group_present_capabilities : * mut DeviceGroupPresentCapabilitiesKHR < '_ >, ) -> Result { panic!(concat!( @@ -14779,7 +16693,7 @@ pub mod khr { }, get_device_group_surface_present_modes_khr: unsafe { unsafe extern "system" fn get_device_group_surface_present_modes_khr( - _device: Device, + _device: crate::vk::Device, _surface: SurfaceKHR, _p_modes: *mut DeviceGroupPresentModeFlagsKHR, ) -> Result { @@ -14800,7 +16714,7 @@ pub mod khr { }, acquire_next_image2_khr: unsafe { unsafe extern "system" fn acquire_next_image2_khr( - _device: Device, + _device: crate::vk::Device, _p_acquire_info: *const AcquireNextImageInfoKHR<'_>, _p_image_index: *mut u32, ) -> Result { @@ -14821,6 +16735,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_device_group device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_draw_parameters { use super::super::*; @@ -14835,11 +16771,12 @@ pub mod khr { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkTrimCommandPool = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, command_pool: CommandPool, flags: CommandPoolTrimFlags, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_maintenance1 device-level function pointers"] pub struct DeviceFn { pub trim_command_pool_khr: PFN_vkTrimCommandPool, } @@ -14853,7 +16790,7 @@ pub mod khr { Self { trim_command_pool_khr: unsafe { unsafe extern "system" fn trim_command_pool_khr( - _device: Device, + _device: crate::vk::Device, _command_pool: CommandPool, _flags: CommandPoolTrimFlags, ) { @@ -14873,6 +16810,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_maintenance1 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod device_group_creation { use super::super::*; @@ -14881,11 +16840,12 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkEnumeratePhysicalDeviceGroups = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_physical_device_group_count: *mut u32, p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_device_group_creation instance-level function pointers"] pub struct InstanceFn { pub enumerate_physical_device_groups_khr: PFN_vkEnumeratePhysicalDeviceGroups, } @@ -14899,7 +16859,7 @@ pub mod khr { Self { enumerate_physical_device_groups_khr: unsafe { unsafe extern "system" fn enumerate_physical_device_groups_khr( - _instance: Instance, + _instance: crate::vk::Instance, _p_physical_device_group_count: *mut u32, _p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties< '_, @@ -14923,6 +16883,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_device_group_creation instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_memory_capabilities { use super::super::*; @@ -14937,6 +16919,7 @@ pub mod khr { p_external_buffer_properties: *mut ExternalBufferProperties<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_external_memory_capabilities instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_external_buffer_properties_khr: PFN_vkGetPhysicalDeviceExternalBufferProperties, @@ -14973,6 +16956,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_memory_capabilities instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_memory { use super::super::*; @@ -14987,19 +16992,20 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryWin32HandleKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_win32_handle_info: *const MemoryGetWin32HandleInfoKHR<'_>, p_handle: *mut HANDLE, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryWin32HandlePropertiesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, handle_type: ExternalMemoryHandleTypeFlags, handle: HANDLE, p_memory_win32_handle_properties: *mut MemoryWin32HandlePropertiesKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_external_memory_win32 device-level function pointers"] pub struct DeviceFn { pub get_memory_win32_handle_khr: PFN_vkGetMemoryWin32HandleKHR, pub get_memory_win32_handle_properties_khr: PFN_vkGetMemoryWin32HandlePropertiesKHR, @@ -15014,7 +17020,7 @@ pub mod khr { Self { get_memory_win32_handle_khr: unsafe { unsafe extern "system" fn get_memory_win32_handle_khr( - _device: Device, + _device: crate::vk::Device, _p_get_win32_handle_info: *const MemoryGetWin32HandleInfoKHR<'_>, _p_handle: *mut HANDLE, ) -> Result { @@ -15034,7 +17040,7 @@ pub mod khr { }, get_memory_win32_handle_properties_khr: unsafe { unsafe extern "system" fn get_memory_win32_handle_properties_khr( - _device: Device, + _device: crate::vk::Device, _handle_type: ExternalMemoryHandleTypeFlags, _handle: HANDLE, _p_memory_win32_handle_properties: *mut MemoryWin32HandlePropertiesKHR< @@ -15059,6 +17065,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_memory_win32 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_memory_fd { use super::super::*; @@ -15067,18 +17095,19 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryFdKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_fd_info: *const MemoryGetFdInfoKHR<'_>, p_fd: *mut c_int, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryFdPropertiesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, handle_type: ExternalMemoryHandleTypeFlags, fd: c_int, p_memory_fd_properties: *mut MemoryFdPropertiesKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_external_memory_fd device-level function pointers"] pub struct DeviceFn { pub get_memory_fd_khr: PFN_vkGetMemoryFdKHR, pub get_memory_fd_properties_khr: PFN_vkGetMemoryFdPropertiesKHR, @@ -15093,7 +17122,7 @@ pub mod khr { Self { get_memory_fd_khr: unsafe { unsafe extern "system" fn get_memory_fd_khr( - _device: Device, + _device: crate::vk::Device, _p_get_fd_info: *const MemoryGetFdInfoKHR<'_>, _p_fd: *mut c_int, ) -> Result { @@ -15109,7 +17138,7 @@ pub mod khr { }, get_memory_fd_properties_khr: unsafe { unsafe extern "system" fn get_memory_fd_properties_khr( - _device: Device, + _device: crate::vk::Device, _handle_type: ExternalMemoryHandleTypeFlags, _fd: c_int, _p_memory_fd_properties: *mut MemoryFdPropertiesKHR<'_>, @@ -15131,6 +17160,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_memory_fd device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod win32_keyed_mutex { use super::super::*; @@ -15151,6 +17202,7 @@ pub mod khr { p_external_semaphore_properties: *mut ExternalSemaphoreProperties<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_external_semaphore_capabilities instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_external_semaphore_properties_khr: PFN_vkGetPhysicalDeviceExternalSemaphoreProperties, @@ -15189,6 +17241,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_semaphore_capabilities instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_semaphore { use super::super::*; @@ -15203,16 +17277,17 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkImportSemaphoreWin32HandleKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_import_semaphore_win32_handle_info: *const ImportSemaphoreWin32HandleInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSemaphoreWin32HandleKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_win32_handle_info: *const SemaphoreGetWin32HandleInfoKHR<'_>, p_handle: *mut HANDLE, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_external_semaphore_win32 device-level function pointers"] pub struct DeviceFn { pub import_semaphore_win32_handle_khr: PFN_vkImportSemaphoreWin32HandleKHR, pub get_semaphore_win32_handle_khr: PFN_vkGetSemaphoreWin32HandleKHR, @@ -15227,7 +17302,7 @@ pub mod khr { Self { import_semaphore_win32_handle_khr: unsafe { unsafe extern "system" fn import_semaphore_win32_handle_khr( - _device: Device, + _device: crate::vk::Device, _p_import_semaphore_win32_handle_info : * const ImportSemaphoreWin32HandleInfoKHR < '_ >, ) -> Result { panic!(concat!( @@ -15247,7 +17322,7 @@ pub mod khr { }, get_semaphore_win32_handle_khr: unsafe { unsafe extern "system" fn get_semaphore_win32_handle_khr( - _device: Device, + _device: crate::vk::Device, _p_get_win32_handle_info: *const SemaphoreGetWin32HandleInfoKHR<'_>, _p_handle: *mut HANDLE, ) -> Result { @@ -15268,6 +17343,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_semaphore_win32 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_semaphore_fd { use super::super::*; @@ -15276,16 +17373,17 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkImportSemaphoreFdKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_import_semaphore_fd_info: *const ImportSemaphoreFdInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetSemaphoreFdKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_fd_info: *const SemaphoreGetFdInfoKHR<'_>, p_fd: *mut c_int, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_external_semaphore_fd device-level function pointers"] pub struct DeviceFn { pub import_semaphore_fd_khr: PFN_vkImportSemaphoreFdKHR, pub get_semaphore_fd_khr: PFN_vkGetSemaphoreFdKHR, @@ -15300,7 +17398,7 @@ pub mod khr { Self { import_semaphore_fd_khr: unsafe { unsafe extern "system" fn import_semaphore_fd_khr( - _device: Device, + _device: crate::vk::Device, _p_import_semaphore_fd_info: *const ImportSemaphoreFdInfoKHR<'_>, ) -> Result { panic!(concat!( @@ -15319,7 +17417,7 @@ pub mod khr { }, get_semaphore_fd_khr: unsafe { unsafe extern "system" fn get_semaphore_fd_khr( - _device: Device, + _device: crate::vk::Device, _p_get_fd_info: *const SemaphoreGetFdInfoKHR<'_>, _p_fd: *mut c_int, ) -> Result { @@ -15336,6 +17434,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_semaphore_fd device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod push_descriptor { use super::super::*; @@ -15360,6 +17480,7 @@ pub mod khr { p_data: *const c_void, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_push_descriptor device-level function pointers"] pub struct DeviceFn { pub cmd_push_descriptor_set_khr: PFN_vkCmdPushDescriptorSetKHR, pub cmd_push_descriptor_set_with_template_khr: @@ -15422,6 +17543,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_push_descriptor device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_float16_int8 { use super::super::*; @@ -15448,7 +17591,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateDescriptorUpdateTemplate = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const DescriptorUpdateTemplateCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_descriptor_update_template: *mut DescriptorUpdateTemplate, @@ -15456,18 +17599,19 @@ pub mod khr { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyDescriptorUpdateTemplate = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_update_template: DescriptorUpdateTemplate, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkUpdateDescriptorSetWithTemplate = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_set: DescriptorSet, descriptor_update_template: DescriptorUpdateTemplate, p_data: *const c_void, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_descriptor_update_template device-level function pointers"] pub struct DeviceFn { pub create_descriptor_update_template_khr: PFN_vkCreateDescriptorUpdateTemplate, pub destroy_descriptor_update_template_khr: PFN_vkDestroyDescriptorUpdateTemplate, @@ -15485,7 +17629,7 @@ pub mod khr { Self { create_descriptor_update_template_khr: unsafe { unsafe extern "system" fn create_descriptor_update_template_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const DescriptorUpdateTemplateCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_descriptor_update_template: *mut DescriptorUpdateTemplate, @@ -15507,7 +17651,7 @@ pub mod khr { }, destroy_descriptor_update_template_khr: unsafe { unsafe extern "system" fn destroy_descriptor_update_template_khr( - _device: Device, + _device: crate::vk::Device, _descriptor_update_template: DescriptorUpdateTemplate, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -15528,7 +17672,7 @@ pub mod khr { }, update_descriptor_set_with_template_khr: unsafe { unsafe extern "system" fn update_descriptor_set_with_template_khr( - _device: Device, + _device: crate::vk::Device, _descriptor_set: DescriptorSet, _descriptor_update_template: DescriptorUpdateTemplate, _p_data: *const c_void, @@ -15574,6 +17718,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_descriptor_update_template device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod imageless_framebuffer { use super::super::*; @@ -15588,7 +17754,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateRenderPass2 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const RenderPassCreateInfo2<'_>, p_allocator: *const AllocationCallbacks<'_>, p_render_pass: *mut RenderPass, @@ -15611,6 +17777,7 @@ pub mod khr { p_subpass_end_info: *const SubpassEndInfo<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_create_renderpass2 device-level function pointers"] pub struct DeviceFn { pub create_render_pass2_khr: PFN_vkCreateRenderPass2, pub cmd_begin_render_pass2_khr: PFN_vkCmdBeginRenderPass2, @@ -15627,7 +17794,7 @@ pub mod khr { Self { create_render_pass2_khr: unsafe { unsafe extern "system" fn create_render_pass2_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const RenderPassCreateInfo2<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_render_pass: *mut RenderPass, @@ -15707,6 +17874,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_create_renderpass2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shared_presentable_image { use super::super::*; @@ -15715,8 +17904,9 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetSwapchainStatusKHR = - unsafe extern "system" fn(device: Device, swapchain: SwapchainKHR) -> Result; + unsafe extern "system" fn(device: crate::vk::Device, swapchain: SwapchainKHR) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_shared_presentable_image device-level function pointers"] pub struct DeviceFn { pub get_swapchain_status_khr: PFN_vkGetSwapchainStatusKHR, } @@ -15730,7 +17920,7 @@ pub mod khr { Self { get_swapchain_status_khr: unsafe { unsafe extern "system" fn get_swapchain_status_khr( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, ) -> Result { panic!(concat!( @@ -15750,6 +17940,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_shared_presentable_image device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_fence_capabilities { use super::super::*; @@ -15763,6 +17975,7 @@ pub mod khr { p_external_fence_properties: *mut ExternalFenceProperties<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_external_fence_capabilities instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_external_fence_properties_khr: PFN_vkGetPhysicalDeviceExternalFenceProperties, @@ -15799,6 +18012,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_fence_capabilities instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_fence { use super::super::*; @@ -15813,16 +18048,17 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkImportFenceWin32HandleKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_import_fence_win32_handle_info: *const ImportFenceWin32HandleInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetFenceWin32HandleKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_win32_handle_info: *const FenceGetWin32HandleInfoKHR<'_>, p_handle: *mut HANDLE, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_external_fence_win32 device-level function pointers"] pub struct DeviceFn { pub import_fence_win32_handle_khr: PFN_vkImportFenceWin32HandleKHR, pub get_fence_win32_handle_khr: PFN_vkGetFenceWin32HandleKHR, @@ -15837,7 +18073,7 @@ pub mod khr { Self { import_fence_win32_handle_khr: unsafe { unsafe extern "system" fn import_fence_win32_handle_khr( - _device: Device, + _device: crate::vk::Device, _p_import_fence_win32_handle_info: *const ImportFenceWin32HandleInfoKHR< '_, >, @@ -15858,7 +18094,7 @@ pub mod khr { }, get_fence_win32_handle_khr: unsafe { unsafe extern "system" fn get_fence_win32_handle_khr( - _device: Device, + _device: crate::vk::Device, _p_get_win32_handle_info: *const FenceGetWin32HandleInfoKHR<'_>, _p_handle: *mut HANDLE, ) -> Result { @@ -15879,6 +18115,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_fence_win32 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod external_fence_fd { use super::super::*; @@ -15887,16 +18145,17 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkImportFenceFdKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_import_fence_fd_info: *const ImportFenceFdInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetFenceFdKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_get_fd_info: *const FenceGetFdInfoKHR<'_>, p_fd: *mut c_int, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_external_fence_fd device-level function pointers"] pub struct DeviceFn { pub import_fence_fd_khr: PFN_vkImportFenceFdKHR, pub get_fence_fd_khr: PFN_vkGetFenceFdKHR, @@ -15911,7 +18170,7 @@ pub mod khr { Self { import_fence_fd_khr: unsafe { unsafe extern "system" fn import_fence_fd_khr( - _device: Device, + _device: crate::vk::Device, _p_import_fence_fd_info: *const ImportFenceFdInfoKHR<'_>, ) -> Result { panic!(concat!("Unable to load ", stringify!(import_fence_fd_khr))) @@ -15926,7 +18185,7 @@ pub mod khr { }, get_fence_fd_khr: unsafe { unsafe extern "system" fn get_fence_fd_khr( - _device: Device, + _device: crate::vk::Device, _p_get_fd_info: *const FenceGetFdInfoKHR<'_>, _p_fd: *mut c_int, ) -> Result { @@ -15943,6 +18202,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_external_fence_fd device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod performance_query { use super::super::*; @@ -15966,6 +18247,7 @@ pub mod khr { p_num_passes: *mut u32, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_performance_query instance-level function pointers"] pub struct InstanceFn { pub enumerate_physical_device_queue_family_performance_query_counters_khr: PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, @@ -16026,14 +18308,38 @@ pub mod khr { } } } + #[doc = "VK_KHR_performance_query instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkAcquireProfilingLockKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const AcquireProfilingLockInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] - pub type PFN_vkReleaseProfilingLockKHR = unsafe extern "system" fn(device: Device); + pub type PFN_vkReleaseProfilingLockKHR = + unsafe extern "system" fn(device: crate::vk::Device); #[derive(Clone)] + #[doc = "Raw VK_KHR_performance_query device-level function pointers"] pub struct DeviceFn { pub acquire_profiling_lock_khr: PFN_vkAcquireProfilingLockKHR, pub release_profiling_lock_khr: PFN_vkReleaseProfilingLockKHR, @@ -16048,7 +18354,7 @@ pub mod khr { Self { acquire_profiling_lock_khr: unsafe { unsafe extern "system" fn acquire_profiling_lock_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const AcquireProfilingLockInfoKHR<'_>, ) -> Result { panic!(concat!( @@ -16066,7 +18372,9 @@ pub mod khr { } }, release_profiling_lock_khr: unsafe { - unsafe extern "system" fn release_profiling_lock_khr(_device: Device) { + unsafe extern "system" fn release_profiling_lock_khr( + _device: crate::vk::Device, + ) { panic!(concat!( "Unable to load ", stringify!(release_profiling_lock_khr) @@ -16084,6 +18392,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_performance_query device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod maintenance2 { use super::super::*; @@ -16112,6 +18442,7 @@ pub mod khr { ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_get_surface_capabilities2 instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_surface_capabilities2_khr: PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR, @@ -16171,6 +18502,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_get_surface_capabilities2 instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod variable_pointers { use super::super::*; @@ -16212,6 +18565,7 @@ pub mod khr { ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_get_display_properties2 instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_display_properties2_khr: PFN_vkGetPhysicalDeviceDisplayProperties2KHR, @@ -16316,6 +18670,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_get_display_properties2 instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod dedicated_allocation { use super::super::*; @@ -16343,24 +18719,25 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetImageMemoryRequirements2 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const ImageMemoryRequirementsInfo2<'_>, p_memory_requirements: *mut MemoryRequirements2<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetBufferMemoryRequirements2 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const BufferMemoryRequirementsInfo2<'_>, p_memory_requirements: *mut MemoryRequirements2<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetImageSparseMemoryRequirements2 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const ImageSparseMemoryRequirementsInfo2<'_>, p_sparse_memory_requirement_count: *mut u32, p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_get_memory_requirements2 device-level function pointers"] pub struct DeviceFn { pub get_image_memory_requirements2_khr: PFN_vkGetImageMemoryRequirements2, pub get_buffer_memory_requirements2_khr: PFN_vkGetBufferMemoryRequirements2, @@ -16376,7 +18753,7 @@ pub mod khr { Self { get_image_memory_requirements2_khr: unsafe { unsafe extern "system" fn get_image_memory_requirements2_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const ImageMemoryRequirementsInfo2<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -16397,7 +18774,7 @@ pub mod khr { }, get_buffer_memory_requirements2_khr: unsafe { unsafe extern "system" fn get_buffer_memory_requirements2_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferMemoryRequirementsInfo2<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -16418,7 +18795,7 @@ pub mod khr { }, get_image_sparse_memory_requirements2_khr: unsafe { unsafe extern "system" fn get_image_sparse_memory_requirements2_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const ImageSparseMemoryRequirementsInfo2<'_>, _p_sparse_memory_requirement_count: *mut u32, _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, @@ -16441,6 +18818,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_get_memory_requirements2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod image_format_list { use super::super::*; @@ -16455,7 +18854,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 13u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateAccelerationStructureKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const AccelerationStructureCreateInfoKHR<'_>, p_allocator: *const AllocationCallbacks<'_>, p_acceleration_structure: *mut AccelerationStructureKHR, @@ -16463,7 +18862,7 @@ pub mod khr { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyAccelerationStructureKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, acceleration_structure: AccelerationStructureKHR, p_allocator: *const AllocationCallbacks<'_>, ); @@ -16485,7 +18884,7 @@ pub mod khr { ); #[allow(non_camel_case_types)] pub type PFN_vkBuildAccelerationStructuresKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, info_count: u32, p_infos: *const AccelerationStructureBuildGeometryInfoKHR<'_>, @@ -16494,20 +18893,20 @@ pub mod khr { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyAccelerationStructureKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, p_info: *const CopyAccelerationStructureInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyAccelerationStructureToMemoryKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, p_info: *const CopyAccelerationStructureToMemoryInfoKHR<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCopyMemoryToAccelerationStructureKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, p_info: *const CopyMemoryToAccelerationStructureInfoKHR<'_>, ) @@ -16515,7 +18914,7 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkWriteAccelerationStructuresPropertiesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, acceleration_structure_count: u32, p_acceleration_structures: *const AccelerationStructureKHR, query_type: QueryType, @@ -16541,7 +18940,7 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkGetAccelerationStructureDeviceAddressKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const AccelerationStructureDeviceAddressInfoKHR<'_>, ) -> DeviceAddress; #[allow(non_camel_case_types)] @@ -16556,19 +18955,20 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceAccelerationStructureCompatibilityKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_version_info: *const AccelerationStructureVersionInfoKHR<'_>, p_compatibility: *mut AccelerationStructureCompatibilityKHR, ); #[allow(non_camel_case_types)] pub type PFN_vkGetAccelerationStructureBuildSizesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, build_type: AccelerationStructureBuildTypeKHR, p_build_info: *const AccelerationStructureBuildGeometryInfoKHR<'_>, p_max_primitive_counts: *const u32, p_size_info: *mut AccelerationStructureBuildSizesInfoKHR<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_acceleration_structure device-level function pointers"] pub struct DeviceFn { pub create_acceleration_structure_khr: PFN_vkCreateAccelerationStructureKHR, pub destroy_acceleration_structure_khr: PFN_vkDestroyAccelerationStructureKHR, @@ -16607,7 +19007,7 @@ pub mod khr { Self { create_acceleration_structure_khr: unsafe { unsafe extern "system" fn create_acceleration_structure_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const AccelerationStructureCreateInfoKHR<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_acceleration_structure: *mut AccelerationStructureKHR, @@ -16629,7 +19029,7 @@ pub mod khr { }, destroy_acceleration_structure_khr: unsafe { unsafe extern "system" fn destroy_acceleration_structure_khr( - _device: Device, + _device: crate::vk::Device, _acceleration_structure: AccelerationStructureKHR, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -16696,7 +19096,7 @@ pub mod khr { }, build_acceleration_structures_khr: unsafe { unsafe extern "system" fn build_acceleration_structures_khr( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _info_count: u32, _p_infos: *const AccelerationStructureBuildGeometryInfoKHR<'_>, @@ -16719,7 +19119,7 @@ pub mod khr { }, copy_acceleration_structure_khr: unsafe { unsafe extern "system" fn copy_acceleration_structure_khr( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _p_info: *const CopyAccelerationStructureInfoKHR<'_>, ) -> Result { @@ -16740,7 +19140,7 @@ pub mod khr { }, copy_acceleration_structure_to_memory_khr: unsafe { unsafe extern "system" fn copy_acceleration_structure_to_memory_khr( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _p_info: *const CopyAccelerationStructureToMemoryInfoKHR<'_>, ) -> Result { @@ -16761,7 +19161,7 @@ pub mod khr { }, copy_memory_to_acceleration_structure_khr: unsafe { unsafe extern "system" fn copy_memory_to_acceleration_structure_khr( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _p_info: *const CopyMemoryToAccelerationStructureInfoKHR<'_>, ) -> Result { @@ -16782,7 +19182,7 @@ pub mod khr { }, write_acceleration_structures_properties_khr: unsafe { unsafe extern "system" fn write_acceleration_structures_properties_khr( - _device: Device, + _device: crate::vk::Device, _acceleration_structure_count: u32, _p_acceleration_structures: *const AccelerationStructureKHR, _query_type: QueryType, @@ -16867,7 +19267,7 @@ pub mod khr { }, get_acceleration_structure_device_address_khr: unsafe { unsafe extern "system" fn get_acceleration_structure_device_address_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const AccelerationStructureDeviceAddressInfoKHR<'_>, ) -> DeviceAddress { panic!(concat!( @@ -16911,7 +19311,7 @@ pub mod khr { }, get_device_acceleration_structure_compatibility_khr: unsafe { unsafe extern "system" fn get_device_acceleration_structure_compatibility_khr( - _device: Device, + _device: crate::vk::Device, _p_version_info: *const AccelerationStructureVersionInfoKHR<'_>, _p_compatibility: *mut AccelerationStructureCompatibilityKHR, ) { @@ -16932,7 +19332,7 @@ pub mod khr { }, get_acceleration_structure_build_sizes_khr: unsafe { unsafe extern "system" fn get_acceleration_structure_build_sizes_khr( - _device: Device, + _device: crate::vk::Device, _build_type: AccelerationStructureBuildTypeKHR, _p_build_info: *const AccelerationStructureBuildGeometryInfoKHR<'_>, _p_max_primitive_counts: *const u32, @@ -16956,6 +19356,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_acceleration_structure device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod ray_tracing_pipeline { use super::super::*; @@ -16975,7 +19397,7 @@ pub mod khr { ); #[allow(non_camel_case_types)] pub type PFN_vkCreateRayTracingPipelinesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, deferred_operation: DeferredOperationKHR, pipeline_cache: PipelineCache, create_info_count: u32, @@ -16985,7 +19407,7 @@ pub mod khr { ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetRayTracingShaderGroupHandlesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline: Pipeline, first_group: u32, group_count: u32, @@ -16996,7 +19418,7 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline: Pipeline, first_group: u32, group_count: u32, @@ -17015,7 +19437,7 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkGetRayTracingShaderGroupStackSizeKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline: Pipeline, group: u32, group_shader: ShaderGroupShaderKHR, @@ -17024,6 +19446,7 @@ pub mod khr { pub type PFN_vkCmdSetRayTracingPipelineStackSizeKHR = unsafe extern "system" fn(command_buffer: CommandBuffer, pipeline_stack_size: u32); #[derive(Clone)] + #[doc = "Raw VK_KHR_ray_tracing_pipeline device-level function pointers"] pub struct DeviceFn { pub cmd_trace_rays_khr: PFN_vkCmdTraceRaysKHR, pub create_ray_tracing_pipelines_khr: PFN_vkCreateRayTracingPipelinesKHR, @@ -17067,7 +19490,7 @@ pub mod khr { }, create_ray_tracing_pipelines_khr: unsafe { unsafe extern "system" fn create_ray_tracing_pipelines_khr( - _device: Device, + _device: crate::vk::Device, _deferred_operation: DeferredOperationKHR, _pipeline_cache: PipelineCache, _create_info_count: u32, @@ -17092,7 +19515,7 @@ pub mod khr { }, get_ray_tracing_shader_group_handles_khr: unsafe { unsafe extern "system" fn get_ray_tracing_shader_group_handles_khr( - _device: Device, + _device: crate::vk::Device, _pipeline: Pipeline, _first_group: u32, _group_count: u32, @@ -17116,7 +19539,7 @@ pub mod khr { }, get_ray_tracing_capture_replay_shader_group_handles_khr: unsafe { unsafe extern "system" fn get_ray_tracing_capture_replay_shader_group_handles_khr( - _device: Device, + _device: crate::vk::Device, _pipeline: Pipeline, _first_group: u32, _group_count: u32, @@ -17163,7 +19586,7 @@ pub mod khr { }, get_ray_tracing_shader_group_stack_size_khr: unsafe { unsafe extern "system" fn get_ray_tracing_shader_group_stack_size_khr( - _device: Device, + _device: crate::vk::Device, _pipeline: Pipeline, _group: u32, _group_shader: ShaderGroupShaderKHR, @@ -17206,6 +19629,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_ray_tracing_pipeline device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod ray_query { use super::super::*; @@ -17220,18 +19665,19 @@ pub mod khr { pub const SPEC_VERSION: u32 = 14u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateSamplerYcbcrConversion = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, ycbcr_conversion: SamplerYcbcrConversion, p_allocator: *const AllocationCallbacks<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_sampler_ycbcr_conversion device-level function pointers"] pub struct DeviceFn { pub create_sampler_ycbcr_conversion_khr: PFN_vkCreateSamplerYcbcrConversion, pub destroy_sampler_ycbcr_conversion_khr: PFN_vkDestroySamplerYcbcrConversion, @@ -17246,7 +19692,7 @@ pub mod khr { Self { create_sampler_ycbcr_conversion_khr: unsafe { unsafe extern "system" fn create_sampler_ycbcr_conversion_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const SamplerYcbcrConversionCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_ycbcr_conversion: *mut SamplerYcbcrConversion, @@ -17268,7 +19714,7 @@ pub mod khr { }, destroy_sampler_ycbcr_conversion_khr: unsafe { unsafe extern "system" fn destroy_sampler_ycbcr_conversion_khr( - _device: Device, + _device: crate::vk::Device, _ycbcr_conversion: SamplerYcbcrConversion, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -17290,6 +19736,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_sampler_ycbcr_conversion device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod bind_memory2 { use super::super::*; @@ -17298,17 +19766,18 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkBindBufferMemory2 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, bind_info_count: u32, p_bind_infos: *const BindBufferMemoryInfo<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkBindImageMemory2 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, bind_info_count: u32, p_bind_infos: *const BindImageMemoryInfo<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_bind_memory2 device-level function pointers"] pub struct DeviceFn { pub bind_buffer_memory2_khr: PFN_vkBindBufferMemory2, pub bind_image_memory2_khr: PFN_vkBindImageMemory2, @@ -17323,7 +19792,7 @@ pub mod khr { Self { bind_buffer_memory2_khr: unsafe { unsafe extern "system" fn bind_buffer_memory2_khr( - _device: Device, + _device: crate::vk::Device, _bind_info_count: u32, _p_bind_infos: *const BindBufferMemoryInfo<'_>, ) -> Result { @@ -17343,7 +19812,7 @@ pub mod khr { }, bind_image_memory2_khr: unsafe { unsafe extern "system" fn bind_image_memory2_khr( - _device: Device, + _device: crate::vk::Device, _bind_info_count: u32, _p_bind_infos: *const BindImageMemoryInfo<'_>, ) -> Result { @@ -17363,6 +19832,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_bind_memory2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod portability_subset { use super::super::*; @@ -17377,11 +19868,12 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetDescriptorSetLayoutSupport = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const DescriptorSetLayoutCreateInfo<'_>, p_support: *mut DescriptorSetLayoutSupport<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_maintenance3 device-level function pointers"] pub struct DeviceFn { pub get_descriptor_set_layout_support_khr: PFN_vkGetDescriptorSetLayoutSupport, } @@ -17395,7 +19887,7 @@ pub mod khr { Self { get_descriptor_set_layout_support_khr: unsafe { unsafe extern "system" fn get_descriptor_set_layout_support_khr( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const DescriptorSetLayoutCreateInfo<'_>, _p_support: *mut DescriptorSetLayoutSupport<'_>, ) { @@ -17417,6 +19909,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_maintenance3 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod draw_indirect_count { use super::super::*; @@ -17424,6 +19938,7 @@ pub mod khr { unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_KHR_draw_indirect_count\0") }; pub const SPEC_VERSION: u32 = 1u32; #[derive(Clone)] + #[doc = "Raw VK_KHR_draw_indirect_count device-level function pointers"] pub struct DeviceFn { pub cmd_draw_indirect_count_khr: crate::vk::amd::draw_indirect_count::PFN_vkCmdDrawIndirectCount, @@ -17490,6 +20005,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_draw_indirect_count device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_subgroup_extended_types { use super::super::*; @@ -17559,22 +20096,23 @@ pub mod khr { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkGetSemaphoreCounterValue = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, semaphore: Semaphore, p_value: *mut u64, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkWaitSemaphores = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_wait_info: *const SemaphoreWaitInfo<'_>, timeout: u64, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkSignalSemaphore = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_signal_info: *const SemaphoreSignalInfo<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_timeline_semaphore device-level function pointers"] pub struct DeviceFn { pub get_semaphore_counter_value_khr: PFN_vkGetSemaphoreCounterValue, pub wait_semaphores_khr: PFN_vkWaitSemaphores, @@ -17590,7 +20128,7 @@ pub mod khr { Self { get_semaphore_counter_value_khr: unsafe { unsafe extern "system" fn get_semaphore_counter_value_khr( - _device: Device, + _device: crate::vk::Device, _semaphore: Semaphore, _p_value: *mut u64, ) -> Result { @@ -17610,7 +20148,7 @@ pub mod khr { }, wait_semaphores_khr: unsafe { unsafe extern "system" fn wait_semaphores_khr( - _device: Device, + _device: crate::vk::Device, _p_wait_info: *const SemaphoreWaitInfo<'_>, _timeout: u64, ) -> Result { @@ -17626,7 +20164,7 @@ pub mod khr { }, signal_semaphore_khr: unsafe { unsafe extern "system" fn signal_semaphore_khr( - _device: Device, + _device: crate::vk::Device, _p_signal_info: *const SemaphoreSignalInfo<'_>, ) -> Result { panic!(concat!("Unable to load ", stringify!(signal_semaphore_khr))) @@ -17642,6 +20180,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_timeline_semaphore device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod vulkan_memory_model { use super::super::*; @@ -17668,6 +20228,7 @@ pub mod khr { p_fragment_shading_rates: *mut PhysicalDeviceFragmentShadingRateKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_fragment_shading_rate instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_fragment_shading_rates_khr: PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR, @@ -17706,6 +20267,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_fragment_shading_rate instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkCmdSetFragmentShadingRateKHR = unsafe extern "system" fn( command_buffer: CommandBuffer, @@ -17713,6 +20296,7 @@ pub mod khr { combiner_ops: *const [FragmentShadingRateCombinerOpKHR; 2usize], ); #[derive(Clone)] + #[doc = "Raw VK_KHR_fragment_shading_rate device-level function pointers"] pub struct DeviceFn { pub cmd_set_fragment_shading_rate_khr: PFN_vkCmdSetFragmentShadingRateKHR, } @@ -17748,6 +20332,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_fragment_shading_rate device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod dynamic_rendering_local_read { use super::super::*; @@ -17766,6 +20372,7 @@ pub mod khr { p_location_info: *const RenderingInputAttachmentIndexInfoKHR<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_dynamic_rendering_local_read device-level function pointers"] pub struct DeviceFn { pub cmd_set_rendering_attachment_locations_khr: PFN_vkCmdSetRenderingAttachmentLocationsKHR, @@ -17823,6 +20430,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_dynamic_rendering_local_read device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_quad_control { use super::super::*; @@ -17857,12 +20486,13 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkWaitForPresentKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, present_id: u64, timeout: u64, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_present_wait device-level function pointers"] pub struct DeviceFn { pub wait_for_present_khr: PFN_vkWaitForPresentKHR, } @@ -17876,7 +20506,7 @@ pub mod khr { Self { wait_for_present_khr: unsafe { unsafe extern "system" fn wait_for_present_khr( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _present_id: u64, _timeout: u64, @@ -17894,6 +20524,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_present_wait device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod uniform_buffer_standard_layout { use super::super::*; @@ -17909,16 +20561,17 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetBufferOpaqueCaptureAddress = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const BufferDeviceAddressInfo<'_>, ) -> u64; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceMemoryOpaqueCaptureAddress = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const DeviceMemoryOpaqueCaptureAddressInfo<'_>, ) -> u64; #[derive(Clone)] + #[doc = "Raw VK_KHR_buffer_device_address device-level function pointers"] pub struct DeviceFn { pub get_buffer_device_address_khr: crate::vk::ext::buffer_device_address::PFN_vkGetBufferDeviceAddress, @@ -17936,7 +20589,7 @@ pub mod khr { Self { get_buffer_device_address_khr: unsafe { unsafe extern "system" fn get_buffer_device_address_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferDeviceAddressInfo<'_>, ) -> DeviceAddress { panic!(concat!( @@ -17955,7 +20608,7 @@ pub mod khr { }, get_buffer_opaque_capture_address_khr: unsafe { unsafe extern "system" fn get_buffer_opaque_capture_address_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferDeviceAddressInfo<'_>, ) -> u64 { panic!(concat!( @@ -17975,7 +20628,7 @@ pub mod khr { }, get_device_memory_opaque_capture_address_khr: unsafe { unsafe extern "system" fn get_device_memory_opaque_capture_address_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceMemoryOpaqueCaptureAddressInfo<'_>, ) -> u64 { panic!(concat!( @@ -17996,6 +20649,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_buffer_device_address device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod deferred_host_operations { use super::super::*; @@ -18004,26 +20679,34 @@ pub mod khr { pub const SPEC_VERSION: u32 = 4u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateDeferredOperationKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_allocator: *const AllocationCallbacks<'_>, p_deferred_operation: *mut DeferredOperationKHR, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyDeferredOperationKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, operation: DeferredOperationKHR, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] - pub type PFN_vkGetDeferredOperationMaxConcurrencyKHR = - unsafe extern "system" fn(device: Device, operation: DeferredOperationKHR) -> u32; + pub type PFN_vkGetDeferredOperationMaxConcurrencyKHR = unsafe extern "system" fn( + device: crate::vk::Device, + operation: DeferredOperationKHR, + ) + -> u32; #[allow(non_camel_case_types)] - pub type PFN_vkGetDeferredOperationResultKHR = - unsafe extern "system" fn(device: Device, operation: DeferredOperationKHR) -> Result; + pub type PFN_vkGetDeferredOperationResultKHR = unsafe extern "system" fn( + device: crate::vk::Device, + operation: DeferredOperationKHR, + ) -> Result; #[allow(non_camel_case_types)] - pub type PFN_vkDeferredOperationJoinKHR = - unsafe extern "system" fn(device: Device, operation: DeferredOperationKHR) -> Result; + pub type PFN_vkDeferredOperationJoinKHR = unsafe extern "system" fn( + device: crate::vk::Device, + operation: DeferredOperationKHR, + ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_deferred_host_operations device-level function pointers"] pub struct DeviceFn { pub create_deferred_operation_khr: PFN_vkCreateDeferredOperationKHR, pub destroy_deferred_operation_khr: PFN_vkDestroyDeferredOperationKHR, @@ -18042,7 +20725,7 @@ pub mod khr { Self { create_deferred_operation_khr: unsafe { unsafe extern "system" fn create_deferred_operation_khr( - _device: Device, + _device: crate::vk::Device, _p_allocator: *const AllocationCallbacks<'_>, _p_deferred_operation: *mut DeferredOperationKHR, ) -> Result { @@ -18062,7 +20745,7 @@ pub mod khr { }, destroy_deferred_operation_khr: unsafe { unsafe extern "system" fn destroy_deferred_operation_khr( - _device: Device, + _device: crate::vk::Device, _operation: DeferredOperationKHR, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -18082,7 +20765,7 @@ pub mod khr { }, get_deferred_operation_max_concurrency_khr: unsafe { unsafe extern "system" fn get_deferred_operation_max_concurrency_khr( - _device: Device, + _device: crate::vk::Device, _operation: DeferredOperationKHR, ) -> u32 { panic!(concat!( @@ -18102,7 +20785,7 @@ pub mod khr { }, get_deferred_operation_result_khr: unsafe { unsafe extern "system" fn get_deferred_operation_result_khr( - _device: Device, + _device: crate::vk::Device, _operation: DeferredOperationKHR, ) -> Result { panic!(concat!( @@ -18122,7 +20805,7 @@ pub mod khr { }, deferred_operation_join_khr: unsafe { unsafe extern "system" fn deferred_operation_join_khr( - _device: Device, + _device: crate::vk::Device, _operation: DeferredOperationKHR, ) -> Result { panic!(concat!( @@ -18142,6 +20825,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_deferred_host_operations device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod pipeline_executable_properties { use super::super::*; @@ -18151,7 +20856,7 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetPipelineExecutablePropertiesKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_pipeline_info: *const PipelineInfoKHR<'_>, p_executable_count: *mut u32, p_properties: *mut PipelineExecutablePropertiesKHR<'_>, @@ -18159,7 +20864,7 @@ pub mod khr { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetPipelineExecutableStatisticsKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_executable_info: *const PipelineExecutableInfoKHR<'_>, p_statistic_count: *mut u32, p_statistics: *mut PipelineExecutableStatisticKHR<'_>, @@ -18168,12 +20873,13 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkGetPipelineExecutableInternalRepresentationsKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_executable_info: *const PipelineExecutableInfoKHR<'_>, p_internal_representation_count: *mut u32, p_internal_representations: *mut PipelineExecutableInternalRepresentationKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_pipeline_executable_properties device-level function pointers"] pub struct DeviceFn { pub get_pipeline_executable_properties_khr: PFN_vkGetPipelineExecutablePropertiesKHR, pub get_pipeline_executable_statistics_khr: PFN_vkGetPipelineExecutableStatisticsKHR, @@ -18190,7 +20896,7 @@ pub mod khr { Self { get_pipeline_executable_properties_khr: unsafe { unsafe extern "system" fn get_pipeline_executable_properties_khr( - _device: Device, + _device: crate::vk::Device, _p_pipeline_info: *const PipelineInfoKHR<'_>, _p_executable_count: *mut u32, _p_properties: *mut PipelineExecutablePropertiesKHR<'_>, @@ -18212,7 +20918,7 @@ pub mod khr { }, get_pipeline_executable_statistics_khr: unsafe { unsafe extern "system" fn get_pipeline_executable_statistics_khr( - _device: Device, + _device: crate::vk::Device, _p_executable_info: *const PipelineExecutableInfoKHR<'_>, _p_statistic_count: *mut u32, _p_statistics: *mut PipelineExecutableStatisticKHR<'_>, @@ -18234,7 +20940,7 @@ pub mod khr { }, get_pipeline_executable_internal_representations_khr: unsafe { unsafe extern "system" fn get_pipeline_executable_internal_representations_khr( - _device: Device, + _device: crate::vk::Device, _p_executable_info: *const PipelineExecutableInfoKHR<'_>, _p_internal_representation_count: *mut u32, _p_internal_representations : * mut PipelineExecutableInternalRepresentationKHR < '_ >, @@ -18257,6 +20963,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_pipeline_executable_properties device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod map_memory2 { use super::super::*; @@ -18265,16 +20993,17 @@ pub mod khr { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkMapMemory2KHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_memory_map_info: *const MemoryMapInfoKHR<'_>, pp_data: *mut *mut c_void, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkUnmapMemory2KHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_memory_unmap_info: *const MemoryUnmapInfoKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_map_memory2 device-level function pointers"] pub struct DeviceFn { pub map_memory2_khr: PFN_vkMapMemory2KHR, pub unmap_memory2_khr: PFN_vkUnmapMemory2KHR, @@ -18289,7 +21018,7 @@ pub mod khr { Self { map_memory2_khr: unsafe { unsafe extern "system" fn map_memory2_khr( - _device: Device, + _device: crate::vk::Device, _p_memory_map_info: *const MemoryMapInfoKHR<'_>, _pp_data: *mut *mut c_void, ) -> Result { @@ -18305,7 +21034,7 @@ pub mod khr { }, unmap_memory2_khr: unsafe { unsafe extern "system" fn unmap_memory2_khr( - _device: Device, + _device: crate::vk::Device, _p_memory_unmap_info: *const MemoryUnmapInfoKHR<'_>, ) -> Result { panic!(concat!("Unable to load ", stringify!(unmap_memory2_khr))) @@ -18321,6 +21050,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_map_memory2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_integer_dot_product { use super::super::*; @@ -18359,6 +21110,7 @@ pub mod khr { p_quality_level_properties: *mut VideoEncodeQualityLevelPropertiesKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_video_encode_queue instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_video_encode_quality_level_properties_khr: PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR, @@ -18399,9 +21151,31 @@ pub mod khr { } } } + #[doc = "VK_KHR_video_encode_queue instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkGetEncodedVideoSessionParametersKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_video_session_parameters_info: *const VideoEncodeSessionParametersGetInfoKHR<'_>, p_feedback_info: *mut VideoEncodeSessionParametersFeedbackInfoKHR<'_>, p_data_size: *mut usize, @@ -18414,6 +21188,7 @@ pub mod khr { p_encode_info: *const VideoEncodeInfoKHR<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_video_encode_queue device-level function pointers"] pub struct DeviceFn { pub get_encoded_video_session_parameters_khr: PFN_vkGetEncodedVideoSessionParametersKHR, pub cmd_encode_video_khr: PFN_vkCmdEncodeVideoKHR, @@ -18428,7 +21203,7 @@ pub mod khr { Self { get_encoded_video_session_parameters_khr: unsafe { unsafe extern "system" fn get_encoded_video_session_parameters_khr( - _device: Device, + _device: crate::vk::Device, _p_video_session_parameters_info : * const VideoEncodeSessionParametersGetInfoKHR < '_ >, _p_feedback_info: *mut VideoEncodeSessionParametersFeedbackInfoKHR<'_>, _p_data_size: *mut usize, @@ -18467,6 +21242,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_video_encode_queue device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod synchronization2 { use super::super::*; @@ -18526,6 +21323,7 @@ pub mod khr { p_checkpoint_data: *mut CheckpointData2NV<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_synchronization2 device-level function pointers"] pub struct DeviceFn { pub cmd_set_event2_khr: PFN_vkCmdSetEvent2, pub cmd_reset_event2_khr: PFN_vkCmdResetEvent2, @@ -18695,6 +21493,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_synchronization2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod fragment_shader_barycentric { use super::super::*; @@ -18759,6 +21579,7 @@ pub mod khr { p_resolve_image_info: *const ResolveImageInfo2<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_copy_commands2 device-level function pointers"] pub struct DeviceFn { pub cmd_copy_buffer2_khr: PFN_vkCmdCopyBuffer2, pub cmd_copy_image2_khr: PFN_vkCmdCopyImage2, @@ -18879,6 +21700,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_copy_commands2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod format_feature_flags2 { use super::super::*; @@ -18897,6 +21740,7 @@ pub mod khr { indirect_device_address: DeviceAddress, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_ray_tracing_maintenance1 device-level function pointers"] pub struct DeviceFn { pub cmd_trace_rays_indirect2_khr: PFN_vkCmdTraceRaysIndirect2KHR, } @@ -18930,6 +21774,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_ray_tracing_maintenance1 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod portability_enumeration { use super::super::*; @@ -18944,24 +21810,25 @@ pub mod khr { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceBufferMemoryRequirements = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const DeviceBufferMemoryRequirements<'_>, p_memory_requirements: *mut MemoryRequirements2<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceImageMemoryRequirements = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const DeviceImageMemoryRequirements<'_>, p_memory_requirements: *mut MemoryRequirements2<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceImageSparseMemoryRequirements = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const DeviceImageMemoryRequirements<'_>, p_sparse_memory_requirement_count: *mut u32, p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_maintenance4 device-level function pointers"] pub struct DeviceFn { pub get_device_buffer_memory_requirements_khr: PFN_vkGetDeviceBufferMemoryRequirements, pub get_device_image_memory_requirements_khr: PFN_vkGetDeviceImageMemoryRequirements, @@ -18978,7 +21845,7 @@ pub mod khr { Self { get_device_buffer_memory_requirements_khr: unsafe { unsafe extern "system" fn get_device_buffer_memory_requirements_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceBufferMemoryRequirements<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -18999,7 +21866,7 @@ pub mod khr { }, get_device_image_memory_requirements_khr: unsafe { unsafe extern "system" fn get_device_image_memory_requirements_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceImageMemoryRequirements<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -19020,7 +21887,7 @@ pub mod khr { }, get_device_image_sparse_memory_requirements_khr: unsafe { unsafe extern "system" fn get_device_image_sparse_memory_requirements_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceImageMemoryRequirements<'_>, _p_sparse_memory_requirement_count: *mut u32, _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, @@ -19043,6 +21910,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_maintenance4 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_subgroup_rotate { use super::super::*; @@ -19072,17 +21961,18 @@ pub mod khr { ); #[allow(non_camel_case_types)] pub type PFN_vkGetRenderingAreaGranularityKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_rendering_area_info: *const RenderingAreaInfoKHR<'_>, p_granularity: *mut Extent2D, ); #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceImageSubresourceLayoutKHR = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const DeviceImageSubresourceInfoKHR<'_>, p_layout: *mut SubresourceLayout2KHR<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_KHR_maintenance5 device-level function pointers"] pub struct DeviceFn { pub cmd_bind_index_buffer2_khr: PFN_vkCmdBindIndexBuffer2KHR, pub get_rendering_area_granularity_khr: PFN_vkGetRenderingAreaGranularityKHR, @@ -19122,7 +22012,7 @@ pub mod khr { }, get_rendering_area_granularity_khr: unsafe { unsafe extern "system" fn get_rendering_area_granularity_khr( - _device: Device, + _device: crate::vk::Device, _p_rendering_area_info: *const RenderingAreaInfoKHR<'_>, _p_granularity: *mut Extent2D, ) { @@ -19143,7 +22033,7 @@ pub mod khr { }, get_device_image_subresource_layout_khr: unsafe { unsafe extern "system" fn get_device_image_subresource_layout_khr( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceImageSubresourceInfoKHR<'_>, _p_layout: *mut SubresourceLayout2KHR<'_>, ) { @@ -19164,7 +22054,7 @@ pub mod khr { }, get_image_subresource_layout2_khr: unsafe { unsafe extern "system" fn get_image_subresource_layout2_khr( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_subresource: *const ImageSubresource2KHR<'_>, _p_layout: *mut SubresourceLayout2KHR<'_>, @@ -19187,6 +22077,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_maintenance5 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod ray_tracing_position_fetch { use super::super::*; @@ -19207,6 +22119,7 @@ pub mod khr { p_properties: *mut CooperativeMatrixPropertiesKHR<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_KHR_cooperative_matrix instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_cooperative_matrix_properties_khr: PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR, @@ -19243,6 +22156,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_cooperative_matrix instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod video_decode_av1 { use super::super::*; @@ -19286,6 +22221,7 @@ pub mod khr { unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_KHR_line_rasterization\0") }; pub const SPEC_VERSION: u32 = 1u32; #[derive(Clone)] + #[doc = "Raw VK_KHR_line_rasterization device-level function pointers"] pub struct DeviceFn { pub cmd_set_line_stipple_khr: crate::vk::ext::line_rasterization::PFN_vkCmdSetLineStippleKHR, @@ -19321,6 +22257,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_line_rasterization device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod calibrated_timestamps { use super::super::*; @@ -19328,6 +22286,7 @@ pub mod khr { unsafe { CStr::from_bytes_with_nul_unchecked(b"VK_KHR_calibrated_timestamps\0") }; pub const SPEC_VERSION: u32 = 1u32; #[derive(Clone)] + #[doc = "Raw VK_KHR_calibrated_timestamps instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_calibrateable_time_domains_khr : crate :: vk :: ext :: calibrated_timestamps :: PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR , } unsafe impl Send for InstanceFn {} unsafe impl Sync for InstanceFn {} @@ -19361,7 +22320,30 @@ pub mod khr { } } } + #[doc = "VK_KHR_calibrated_timestamps instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[derive(Clone)] + #[doc = "Raw VK_KHR_calibrated_timestamps device-level function pointers"] pub struct DeviceFn { pub get_calibrated_timestamps_khr: crate::vk::ext::calibrated_timestamps::PFN_vkGetCalibratedTimestampsKHR, @@ -19376,7 +22358,7 @@ pub mod khr { Self { get_calibrated_timestamps_khr: unsafe { unsafe extern "system" fn get_calibrated_timestamps_khr( - _device: Device, + _device: crate::vk::Device, _timestamp_count: u32, _p_timestamp_infos: *const CalibratedTimestampInfoKHR<'_>, _p_timestamps: *mut u64, @@ -19399,6 +22381,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_calibrated_timestamps device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod shader_expect_assume { use super::super::*; @@ -19441,6 +22445,7 @@ pub mod khr { #[allow(non_camel_case_types)] pub type PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT = unsafe extern "system" fn (command_buffer : CommandBuffer , p_bind_descriptor_buffer_embedded_samplers_info : * const BindDescriptorBufferEmbeddedSamplersInfoEXT < '_ > ,) ; #[derive(Clone)] + #[doc = "Raw VK_KHR_maintenance6 device-level function pointers"] pub struct DeviceFn { pub cmd_bind_descriptor_sets2_khr: PFN_vkCmdBindDescriptorSets2KHR, pub cmd_push_constants2_khr: PFN_vkCmdPushConstants2KHR, @@ -19579,6 +22584,28 @@ pub mod khr { } } } + #[doc = "VK_KHR_maintenance6 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } pub mod lunarg { @@ -19605,12 +22632,13 @@ pub mod mvk { pub const SPEC_VERSION: u32 = 3u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateIOSSurfaceMVK = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const IOSSurfaceCreateInfoMVK<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_MVK_ios_surface instance-level function pointers"] pub struct InstanceFn { pub create_ios_surface_mvk: PFN_vkCreateIOSSurfaceMVK, } @@ -19624,7 +22652,7 @@ pub mod mvk { Self { create_ios_surface_mvk: unsafe { unsafe extern "system" fn create_ios_surface_mvk( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const IOSSurfaceCreateInfoMVK<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -19645,6 +22673,28 @@ pub mod mvk { } } } + #[doc = "VK_MVK_ios_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod macos_surface { use super::super::*; @@ -19653,12 +22703,13 @@ pub mod mvk { pub const SPEC_VERSION: u32 = 3u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateMacOSSurfaceMVK = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const MacOSSurfaceCreateInfoMVK<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_MVK_macos_surface instance-level function pointers"] pub struct InstanceFn { pub create_mac_os_surface_mvk: PFN_vkCreateMacOSSurfaceMVK, } @@ -19672,7 +22723,7 @@ pub mod mvk { Self { create_mac_os_surface_mvk: unsafe { unsafe extern "system" fn create_mac_os_surface_mvk( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const MacOSSurfaceCreateInfoMVK<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -19694,6 +22745,28 @@ pub mod mvk { } } } + #[doc = "VK_MVK_macos_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } } pub mod nn { @@ -19704,12 +22777,13 @@ pub mod nn { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateViSurfaceNN = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const ViSurfaceCreateInfoNN<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NN_vi_surface instance-level function pointers"] pub struct InstanceFn { pub create_vi_surface_nn: PFN_vkCreateViSurfaceNN, } @@ -19723,7 +22797,7 @@ pub mod nn { Self { create_vi_surface_nn: unsafe { unsafe extern "system" fn create_vi_surface_nn( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const ViSurfaceCreateInfoNN<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -19741,6 +22815,28 @@ pub mod nn { } } } + #[doc = "VK_NN_vi_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } } pub mod nv { @@ -19780,6 +22876,7 @@ pub mod nv { p_external_image_format_properties: *mut ExternalImageFormatPropertiesNV, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_external_memory_capabilities instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_external_image_format_properties_nv: PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, @@ -19821,6 +22918,28 @@ pub mod nv { } } } + #[doc = "VK_NV_external_memory_capabilities instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_memory { use super::super::*; @@ -19835,12 +22954,13 @@ pub mod nv { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryWin32HandleNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, memory: DeviceMemory, handle_type: ExternalMemoryHandleTypeFlagsNV, p_handle: *mut HANDLE, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_external_memory_win32 device-level function pointers"] pub struct DeviceFn { pub get_memory_win32_handle_nv: PFN_vkGetMemoryWin32HandleNV, } @@ -19854,7 +22974,7 @@ pub mod nv { Self { get_memory_win32_handle_nv: unsafe { unsafe extern "system" fn get_memory_win32_handle_nv( - _device: Device, + _device: crate::vk::Device, _memory: DeviceMemory, _handle_type: ExternalMemoryHandleTypeFlagsNV, _p_handle: *mut HANDLE, @@ -19876,6 +22996,28 @@ pub mod nv { } } } + #[doc = "VK_NV_external_memory_win32 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod win32_keyed_mutex { use super::super::*; @@ -19896,6 +23038,7 @@ pub mod nv { p_viewport_w_scalings: *const ViewportWScalingNV, ); #[derive(Clone)] + #[doc = "Raw VK_NV_clip_space_w_scaling device-level function pointers"] pub struct DeviceFn { pub cmd_set_viewport_w_scaling_nv: PFN_vkCmdSetViewportWScalingNV, } @@ -19931,6 +23074,28 @@ pub mod nv { } } } + #[doc = "VK_NV_clip_space_w_scaling device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod sample_mask_override_coverage { use super::super::*; @@ -20007,6 +23172,7 @@ pub mod nv { p_custom_sample_orders: *const CoarseSampleOrderCustomNV<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_NV_shading_rate_image device-level function pointers"] pub struct DeviceFn { pub cmd_bind_shading_rate_image_nv: PFN_vkCmdBindShadingRateImageNV, pub cmd_set_viewport_shading_rate_palette_nv: PFN_vkCmdSetViewportShadingRatePaletteNV, @@ -20086,6 +23252,28 @@ pub mod nv { } } } + #[doc = "VK_NV_shading_rate_image device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod ray_tracing { use super::super::*; @@ -20094,26 +23282,26 @@ pub mod nv { pub const SPEC_VERSION: u32 = 3u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateAccelerationStructureNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, acceleration_structure: AccelerationStructureNV, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetAccelerationStructureMemoryRequirementsNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const AccelerationStructureMemoryRequirementsInfoNV<'_>, p_memory_requirements: *mut MemoryRequirements2KHR<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkBindAccelerationStructureMemoryNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, bind_info_count: u32, p_bind_infos: *const BindAccelerationStructureMemoryInfoNV<'_>, ) @@ -20157,7 +23345,7 @@ pub mod nv { ); #[allow(non_camel_case_types)] pub type PFN_vkCreateRayTracingPipelinesNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline_cache: PipelineCache, create_info_count: u32, p_create_infos: *const RayTracingPipelineCreateInfoNV<'_>, @@ -20166,7 +23354,7 @@ pub mod nv { ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetAccelerationStructureHandleNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, acceleration_structure: AccelerationStructureNV, data_size: usize, p_data: *mut c_void, @@ -20182,9 +23370,13 @@ pub mod nv { first_query: u32, ); #[allow(non_camel_case_types)] - pub type PFN_vkCompileDeferredNV = - unsafe extern "system" fn(device: Device, pipeline: Pipeline, shader: u32) -> Result; + pub type PFN_vkCompileDeferredNV = unsafe extern "system" fn( + device: crate::vk::Device, + pipeline: Pipeline, + shader: u32, + ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_ray_tracing device-level function pointers"] pub struct DeviceFn { pub create_acceleration_structure_nv: PFN_vkCreateAccelerationStructureNV, pub destroy_acceleration_structure_nv: PFN_vkDestroyAccelerationStructureNV, @@ -20212,7 +23404,7 @@ pub mod nv { Self { create_acceleration_structure_nv: unsafe { unsafe extern "system" fn create_acceleration_structure_nv( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const AccelerationStructureCreateInfoNV<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_acceleration_structure: *mut AccelerationStructureNV, @@ -20234,7 +23426,7 @@ pub mod nv { }, destroy_acceleration_structure_nv: unsafe { unsafe extern "system" fn destroy_acceleration_structure_nv( - _device: Device, + _device: crate::vk::Device, _acceleration_structure: AccelerationStructureNV, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -20255,7 +23447,7 @@ pub mod nv { }, get_acceleration_structure_memory_requirements_nv: unsafe { unsafe extern "system" fn get_acceleration_structure_memory_requirements_nv( - _device: Device, + _device: crate::vk::Device, _p_info: *const AccelerationStructureMemoryRequirementsInfoNV<'_>, _p_memory_requirements: *mut MemoryRequirements2KHR<'_>, ) { @@ -20276,7 +23468,7 @@ pub mod nv { }, bind_acceleration_structure_memory_nv: unsafe { unsafe extern "system" fn bind_acceleration_structure_memory_nv( - _device: Device, + _device: crate::vk::Device, _bind_info_count: u32, _p_bind_infos: *const BindAccelerationStructureMemoryInfoNV<'_>, ) -> Result { @@ -20374,7 +23566,7 @@ pub mod nv { }, create_ray_tracing_pipelines_nv: unsafe { unsafe extern "system" fn create_ray_tracing_pipelines_nv( - _device: Device, + _device: crate::vk::Device, _pipeline_cache: PipelineCache, _create_info_count: u32, _p_create_infos: *const RayTracingPipelineCreateInfoNV<'_>, @@ -20397,7 +23589,7 @@ pub mod nv { }, get_ray_tracing_shader_group_handles_nv: unsafe { unsafe extern "system" fn get_ray_tracing_shader_group_handles_nv( - _device: Device, + _device: crate::vk::Device, _pipeline: Pipeline, _first_group: u32, _group_count: u32, @@ -20421,7 +23613,7 @@ pub mod nv { }, get_acceleration_structure_handle_nv: unsafe { unsafe extern "system" fn get_acceleration_structure_handle_nv( - _device: Device, + _device: crate::vk::Device, _acceleration_structure: AccelerationStructureNV, _data_size: usize, _p_data: *mut c_void, @@ -20467,7 +23659,7 @@ pub mod nv { }, compile_deferred_nv: unsafe { unsafe extern "system" fn compile_deferred_nv( - _device: Device, + _device: crate::vk::Device, _pipeline: Pipeline, _shader: u32, ) -> Result { @@ -20484,6 +23676,28 @@ pub mod nv { } } } + #[doc = "VK_NV_ray_tracing device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod representative_fragment_test { use super::super::*; @@ -20533,6 +23747,7 @@ pub mod nv { stride: u32, ); #[derive(Clone)] + #[doc = "Raw VK_NV_mesh_shader device-level function pointers"] pub struct DeviceFn { pub cmd_draw_mesh_tasks_nv: PFN_vkCmdDrawMeshTasksNV, pub cmd_draw_mesh_tasks_indirect_nv: PFN_vkCmdDrawMeshTasksIndirectNV, @@ -20615,6 +23830,28 @@ pub mod nv { } } } + #[doc = "VK_NV_mesh_shader device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod fragment_shader_barycentric { use super::super::*; @@ -20648,6 +23885,7 @@ pub mod nv { p_exclusive_scissors: *const Rect2D, ); #[derive(Clone)] + #[doc = "Raw VK_NV_scissor_exclusive device-level function pointers"] pub struct DeviceFn { pub cmd_set_exclusive_scissor_enable_nv: PFN_vkCmdSetExclusiveScissorEnableNV, pub cmd_set_exclusive_scissor_nv: PFN_vkCmdSetExclusiveScissorNV, @@ -20706,6 +23944,28 @@ pub mod nv { } } } + #[doc = "VK_NV_scissor_exclusive device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod device_diagnostic_checkpoints { use super::super::*; @@ -20725,6 +23985,7 @@ pub mod nv { p_checkpoint_data: *mut CheckpointDataNV<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_NV_device_diagnostic_checkpoints device-level function pointers"] pub struct DeviceFn { pub cmd_set_checkpoint_nv: PFN_vkCmdSetCheckpointNV, pub get_queue_checkpoint_data_nv: PFN_vkGetQueueCheckpointDataNV, @@ -20778,6 +24039,28 @@ pub mod nv { } } } + #[doc = "VK_NV_device_diagnostic_checkpoints device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod dedicated_allocation_image_aliasing { use super::super::*; @@ -20799,6 +24082,7 @@ pub mod nv { p_properties: *mut CooperativeMatrixPropertiesNV<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_cooperative_matrix instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_cooperative_matrix_properties_nv: PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV, @@ -20835,6 +24119,28 @@ pub mod nv { } } } + #[doc = "VK_NV_cooperative_matrix instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod coverage_reduction_mode { use super::super::*; @@ -20849,6 +24155,7 @@ pub mod nv { p_combinations: *mut FramebufferMixedSamplesCombinationNV<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_coverage_reduction_mode instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_supported_framebuffer_mixed_samples_combinations_nv: PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, @@ -20882,6 +24189,28 @@ pub mod nv { } } } + #[doc = "VK_NV_coverage_reduction_mode instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod device_generated_commands { use super::super::*; @@ -20890,7 +24219,7 @@ pub mod nv { pub const SPEC_VERSION: u32 = 3u32; #[allow(non_camel_case_types)] pub type PFN_vkGetGeneratedCommandsMemoryRequirementsNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const GeneratedCommandsMemoryRequirementsInfoNV<'_>, p_memory_requirements: *mut MemoryRequirements2<'_>, ); @@ -20914,7 +24243,7 @@ pub mod nv { ); #[allow(non_camel_case_types)] pub type PFN_vkCreateIndirectCommandsLayoutNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const IndirectCommandsLayoutCreateInfoNV<'_>, p_allocator: *const AllocationCallbacks<'_>, p_indirect_commands_layout: *mut IndirectCommandsLayoutNV, @@ -20922,11 +24251,12 @@ pub mod nv { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyIndirectCommandsLayoutNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, indirect_commands_layout: IndirectCommandsLayoutNV, p_allocator: *const AllocationCallbacks<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_NV_device_generated_commands device-level function pointers"] pub struct DeviceFn { pub get_generated_commands_memory_requirements_nv: PFN_vkGetGeneratedCommandsMemoryRequirementsNV, @@ -20946,7 +24276,7 @@ pub mod nv { Self { get_generated_commands_memory_requirements_nv: unsafe { unsafe extern "system" fn get_generated_commands_memory_requirements_nv( - _device: Device, + _device: crate::vk::Device, _p_info: *const GeneratedCommandsMemoryRequirementsInfoNV<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -21030,7 +24360,7 @@ pub mod nv { }, create_indirect_commands_layout_nv: unsafe { unsafe extern "system" fn create_indirect_commands_layout_nv( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const IndirectCommandsLayoutCreateInfoNV<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_indirect_commands_layout: *mut IndirectCommandsLayoutNV, @@ -21052,7 +24382,7 @@ pub mod nv { }, destroy_indirect_commands_layout_nv: unsafe { unsafe extern "system" fn destroy_indirect_commands_layout_nv( - _device: Device, + _device: crate::vk::Device, _indirect_commands_layout: IndirectCommandsLayoutNV, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -21074,6 +24404,28 @@ pub mod nv { } } } + #[doc = "VK_NV_device_generated_commands device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod inherited_viewport_scissor { use super::super::*; @@ -21100,34 +24452,34 @@ pub mod nv { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateCudaModuleNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const CudaModuleCreateInfoNV<'_>, p_allocator: *const AllocationCallbacks<'_>, p_module: *mut CudaModuleNV, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetCudaModuleCacheNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, module: CudaModuleNV, p_cache_size: *mut usize, p_cache_data: *mut c_void, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateCudaFunctionNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const CudaFunctionCreateInfoNV<'_>, p_allocator: *const AllocationCallbacks<'_>, p_function: *mut CudaFunctionNV, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyCudaModuleNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, module: CudaModuleNV, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkDestroyCudaFunctionNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, function: CudaFunctionNV, p_allocator: *const AllocationCallbacks<'_>, ); @@ -21137,6 +24489,7 @@ pub mod nv { p_launch_info: *const CudaLaunchInfoNV<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_NV_cuda_kernel_launch device-level function pointers"] pub struct DeviceFn { pub create_cuda_module_nv: PFN_vkCreateCudaModuleNV, pub get_cuda_module_cache_nv: PFN_vkGetCudaModuleCacheNV, @@ -21155,7 +24508,7 @@ pub mod nv { Self { create_cuda_module_nv: unsafe { unsafe extern "system" fn create_cuda_module_nv( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const CudaModuleCreateInfoNV<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_module: *mut CudaModuleNV, @@ -21175,7 +24528,7 @@ pub mod nv { }, get_cuda_module_cache_nv: unsafe { unsafe extern "system" fn get_cuda_module_cache_nv( - _device: Device, + _device: crate::vk::Device, _module: CudaModuleNV, _p_cache_size: *mut usize, _p_cache_data: *mut c_void, @@ -21196,7 +24549,7 @@ pub mod nv { }, create_cuda_function_nv: unsafe { unsafe extern "system" fn create_cuda_function_nv( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const CudaFunctionCreateInfoNV<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_function: *mut CudaFunctionNV, @@ -21217,7 +24570,7 @@ pub mod nv { }, destroy_cuda_module_nv: unsafe { unsafe extern "system" fn destroy_cuda_module_nv( - _device: Device, + _device: crate::vk::Device, _module: CudaModuleNV, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -21236,7 +24589,7 @@ pub mod nv { }, destroy_cuda_function_nv: unsafe { unsafe extern "system" fn destroy_cuda_function_nv( - _device: Device, + _device: crate::vk::Device, _function: CudaFunctionNV, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -21276,6 +24629,28 @@ pub mod nv { } } } + #[doc = "VK_NV_cuda_kernel_launch device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod low_latency { use super::super::*; @@ -21295,6 +24670,7 @@ pub mod nv { combiner_ops: *const [FragmentShadingRateCombinerOpKHR; 2usize], ); #[derive(Clone)] + #[doc = "Raw VK_NV_fragment_shading_rate_enums device-level function pointers"] pub struct DeviceFn { pub cmd_set_fragment_shading_rate_enum_nv: PFN_vkCmdSetFragmentShadingRateEnumNV, } @@ -21330,6 +24706,28 @@ pub mod nv { } } } + #[doc = "VK_NV_fragment_shading_rate_enums device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod ray_tracing_motion_blur { use super::super::*; @@ -21354,6 +24752,7 @@ pub mod nv { p_display: *mut DisplayKHR, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_acquire_winrt_display instance-level function pointers"] pub struct InstanceFn { pub acquire_winrt_display_nv: PFN_vkAcquireWinrtDisplayNV, pub get_winrt_display_nv: PFN_vkGetWinrtDisplayNV, @@ -21404,6 +24803,28 @@ pub mod nv { } } } + #[doc = "VK_NV_acquire_winrt_display instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_memory_rdma { use super::super::*; @@ -21412,11 +24833,12 @@ pub mod nv { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetMemoryRemoteAddressNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_memory_get_remote_address_info: *const MemoryGetRemoteAddressInfoNV<'_>, p_address: *mut RemoteAddressNV, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_external_memory_rdma device-level function pointers"] pub struct DeviceFn { pub get_memory_remote_address_nv: PFN_vkGetMemoryRemoteAddressNV, } @@ -21430,7 +24852,7 @@ pub mod nv { Self { get_memory_remote_address_nv: unsafe { unsafe extern "system" fn get_memory_remote_address_nv( - _device: Device, + _device: crate::vk::Device, _p_memory_get_remote_address_info: *const MemoryGetRemoteAddressInfoNV< '_, >, @@ -21453,6 +24875,28 @@ pub mod nv { } } } + #[doc = "VK_NV_external_memory_rdma device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod displacement_micromap { use super::super::*; @@ -21483,6 +24927,7 @@ pub mod nv { p_image_subresources: *const ImageSubresourceLayers, ); #[derive(Clone)] + #[doc = "Raw VK_NV_copy_memory_indirect device-level function pointers"] pub struct DeviceFn { pub cmd_copy_memory_indirect_nv: PFN_vkCmdCopyMemoryIndirectNV, pub cmd_copy_memory_to_image_indirect_nv: PFN_vkCmdCopyMemoryToImageIndirectNV, @@ -21544,6 +24989,28 @@ pub mod nv { } } } + #[doc = "VK_NV_copy_memory_indirect device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod memory_decompression { use super::super::*; @@ -21564,6 +25031,7 @@ pub mod nv { stride: u32, ); #[derive(Clone)] + #[doc = "Raw VK_NV_memory_decompression device-level function pointers"] pub struct DeviceFn { pub cmd_decompress_memory_nv: PFN_vkCmdDecompressMemoryNV, pub cmd_decompress_memory_indirect_count_nv: PFN_vkCmdDecompressMemoryIndirectCountNV, @@ -21621,6 +25089,28 @@ pub mod nv { } } } + #[doc = "VK_NV_memory_decompression device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod device_generated_commands_compute { use super::super::*; @@ -21630,7 +25120,7 @@ pub mod nv { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkGetPipelineIndirectMemoryRequirementsNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const ComputePipelineCreateInfo<'_>, p_memory_requirements: *mut MemoryRequirements2<'_>, ); @@ -21643,10 +25133,11 @@ pub mod nv { #[allow(non_camel_case_types)] pub type PFN_vkGetPipelineIndirectDeviceAddressNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const PipelineIndirectDeviceAddressInfoNV<'_>, ) -> DeviceAddress; #[derive(Clone)] + #[doc = "Raw VK_NV_device_generated_commands_compute device-level function pointers"] pub struct DeviceFn { pub get_pipeline_indirect_memory_requirements_nv: PFN_vkGetPipelineIndirectMemoryRequirementsNV, @@ -21663,7 +25154,7 @@ pub mod nv { Self { get_pipeline_indirect_memory_requirements_nv: unsafe { unsafe extern "system" fn get_pipeline_indirect_memory_requirements_nv( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const ComputePipelineCreateInfo<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -21705,7 +25196,7 @@ pub mod nv { }, get_pipeline_indirect_device_address_nv: unsafe { unsafe extern "system" fn get_pipeline_indirect_device_address_nv( - _device: Device, + _device: crate::vk::Device, _p_info: *const PipelineIndirectDeviceAddressInfoNV<'_>, ) -> DeviceAddress { panic!(concat!( @@ -21726,6 +25217,28 @@ pub mod nv { } } } + #[doc = "VK_NV_device_generated_commands_compute device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod linear_color_attachment { use super::super::*; @@ -21747,6 +25260,7 @@ pub mod nv { p_image_format_properties: *mut OpticalFlowImageFormatPropertiesNV<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NV_optical_flow instance-level function pointers"] pub struct InstanceFn { pub get_physical_device_optical_flow_image_formats_nv: PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV, @@ -21786,22 +25300,44 @@ pub mod nv { } } } + #[doc = "VK_NV_optical_flow instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } #[allow(non_camel_case_types)] pub type PFN_vkCreateOpticalFlowSessionNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const OpticalFlowSessionCreateInfoNV<'_>, p_allocator: *const AllocationCallbacks<'_>, p_session: *mut OpticalFlowSessionNV, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyOpticalFlowSessionNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, session: OpticalFlowSessionNV, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkBindOpticalFlowSessionImageNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, session: OpticalFlowSessionNV, binding_point: OpticalFlowSessionBindingPointNV, view: ImageView, @@ -21814,6 +25350,7 @@ pub mod nv { p_execute_info: *const OpticalFlowExecuteInfoNV<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_NV_optical_flow device-level function pointers"] pub struct DeviceFn { pub create_optical_flow_session_nv: PFN_vkCreateOpticalFlowSessionNV, pub destroy_optical_flow_session_nv: PFN_vkDestroyOpticalFlowSessionNV, @@ -21830,7 +25367,7 @@ pub mod nv { Self { create_optical_flow_session_nv: unsafe { unsafe extern "system" fn create_optical_flow_session_nv( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const OpticalFlowSessionCreateInfoNV<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_session: *mut OpticalFlowSessionNV, @@ -21851,7 +25388,7 @@ pub mod nv { }, destroy_optical_flow_session_nv: unsafe { unsafe extern "system" fn destroy_optical_flow_session_nv( - _device: Device, + _device: crate::vk::Device, _session: OpticalFlowSessionNV, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -21871,7 +25408,7 @@ pub mod nv { }, bind_optical_flow_session_image_nv: unsafe { unsafe extern "system" fn bind_optical_flow_session_image_nv( - _device: Device, + _device: crate::vk::Device, _session: OpticalFlowSessionNV, _binding_point: OpticalFlowSessionBindingPointNV, _view: ImageView, @@ -21915,6 +25452,28 @@ pub mod nv { } } } + #[doc = "VK_NV_optical_flow device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod ray_tracing_invocation_reorder { use super::super::*; @@ -21937,25 +25496,25 @@ pub mod nv { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkSetLatencySleepModeNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_sleep_mode_info: *const LatencySleepModeInfoNV<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkLatencySleepNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_sleep_info: *const LatencySleepInfoNV<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkSetLatencyMarkerNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_latency_marker_info: *const SetLatencyMarkerInfoNV<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetLatencyTimingsNV = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, swapchain: SwapchainKHR, p_latency_marker_info: *mut GetLatencyMarkerInfoNV<'_>, ); @@ -21965,6 +25524,7 @@ pub mod nv { p_queue_type_info: *const OutOfBandQueueTypeInfoNV<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_NV_low_latency2 device-level function pointers"] pub struct DeviceFn { pub set_latency_sleep_mode_nv: PFN_vkSetLatencySleepModeNV, pub latency_sleep_nv: PFN_vkLatencySleepNV, @@ -21982,7 +25542,7 @@ pub mod nv { Self { set_latency_sleep_mode_nv: unsafe { unsafe extern "system" fn set_latency_sleep_mode_nv( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_sleep_mode_info: *const LatencySleepModeInfoNV<'_>, ) -> Result { @@ -22002,7 +25562,7 @@ pub mod nv { }, latency_sleep_nv: unsafe { unsafe extern "system" fn latency_sleep_nv( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_sleep_info: *const LatencySleepInfoNV<'_>, ) -> Result { @@ -22018,7 +25578,7 @@ pub mod nv { }, set_latency_marker_nv: unsafe { unsafe extern "system" fn set_latency_marker_nv( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_latency_marker_info: *const SetLatencyMarkerInfoNV<'_>, ) { @@ -22037,7 +25597,7 @@ pub mod nv { }, get_latency_timings_nv: unsafe { unsafe extern "system" fn get_latency_timings_nv( - _device: Device, + _device: crate::vk::Device, _swapchain: SwapchainKHR, _p_latency_marker_info: *mut GetLatencyMarkerInfoNV<'_>, ) { @@ -22076,6 +25636,28 @@ pub mod nv { } } } + #[doc = "VK_NV_low_latency2 device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod per_stage_descriptor_set { use super::super::*; @@ -22117,27 +25699,27 @@ pub mod nvx { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateCuModuleNVX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const CuModuleCreateInfoNVX<'_>, p_allocator: *const AllocationCallbacks<'_>, p_module: *mut CuModuleNVX, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateCuFunctionNVX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const CuFunctionCreateInfoNVX<'_>, p_allocator: *const AllocationCallbacks<'_>, p_function: *mut CuFunctionNVX, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyCuModuleNVX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, module: CuModuleNVX, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkDestroyCuFunctionNVX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, function: CuFunctionNVX, p_allocator: *const AllocationCallbacks<'_>, ); @@ -22147,6 +25729,7 @@ pub mod nvx { p_launch_info: *const CuLaunchInfoNVX<'_>, ); #[derive(Clone)] + #[doc = "Raw VK_NVX_binary_import device-level function pointers"] pub struct DeviceFn { pub create_cu_module_nvx: PFN_vkCreateCuModuleNVX, pub create_cu_function_nvx: PFN_vkCreateCuFunctionNVX, @@ -22164,7 +25747,7 @@ pub mod nvx { Self { create_cu_module_nvx: unsafe { unsafe extern "system" fn create_cu_module_nvx( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const CuModuleCreateInfoNVX<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_module: *mut CuModuleNVX, @@ -22181,7 +25764,7 @@ pub mod nvx { }, create_cu_function_nvx: unsafe { unsafe extern "system" fn create_cu_function_nvx( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const CuFunctionCreateInfoNVX<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_function: *mut CuFunctionNVX, @@ -22201,7 +25784,7 @@ pub mod nvx { }, destroy_cu_module_nvx: unsafe { unsafe extern "system" fn destroy_cu_module_nvx( - _device: Device, + _device: crate::vk::Device, _module: CuModuleNVX, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -22220,7 +25803,7 @@ pub mod nvx { }, destroy_cu_function_nvx: unsafe { unsafe extern "system" fn destroy_cu_function_nvx( - _device: Device, + _device: crate::vk::Device, _function: CuFunctionNVX, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -22260,6 +25843,28 @@ pub mod nvx { } } } + #[doc = "VK_NVX_binary_import device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod image_view_handle { use super::super::*; @@ -22268,16 +25873,17 @@ pub mod nvx { pub const SPEC_VERSION: u32 = 2u32; #[allow(non_camel_case_types)] pub type PFN_vkGetImageViewHandleNVX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_info: *const ImageViewHandleInfoNVX<'_>, ) -> u32; #[allow(non_camel_case_types)] pub type PFN_vkGetImageViewAddressNVX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image_view: ImageView, p_properties: *mut ImageViewAddressPropertiesNVX<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_NVX_image_view_handle device-level function pointers"] pub struct DeviceFn { pub get_image_view_handle_nvx: PFN_vkGetImageViewHandleNVX, pub get_image_view_address_nvx: PFN_vkGetImageViewAddressNVX, @@ -22292,7 +25898,7 @@ pub mod nvx { Self { get_image_view_handle_nvx: unsafe { unsafe extern "system" fn get_image_view_handle_nvx( - _device: Device, + _device: crate::vk::Device, _p_info: *const ImageViewHandleInfoNVX<'_>, ) -> u32 { panic!(concat!( @@ -22311,7 +25917,7 @@ pub mod nvx { }, get_image_view_address_nvx: unsafe { unsafe extern "system" fn get_image_view_address_nvx( - _device: Device, + _device: crate::vk::Device, _image_view: ImageView, _p_properties: *mut ImageViewAddressPropertiesNVX<'_>, ) -> Result { @@ -22332,6 +25938,28 @@ pub mod nvx { } } } + #[doc = "VK_NVX_image_view_handle device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod multiview_per_view_attributes { use super::super::*; @@ -22386,7 +26014,7 @@ pub mod qcom { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetFramebufferTilePropertiesQCOM = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, framebuffer: Framebuffer, p_properties_count: *mut u32, p_properties: *mut TilePropertiesQCOM<'_>, @@ -22394,12 +26022,13 @@ pub mod qcom { -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetDynamicRenderingTilePropertiesQCOM = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_rendering_info: *const RenderingInfo<'_>, p_properties: *mut TilePropertiesQCOM<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_QCOM_tile_properties device-level function pointers"] pub struct DeviceFn { pub get_framebuffer_tile_properties_qcom: PFN_vkGetFramebufferTilePropertiesQCOM, pub get_dynamic_rendering_tile_properties_qcom: @@ -22415,7 +26044,7 @@ pub mod qcom { Self { get_framebuffer_tile_properties_qcom: unsafe { unsafe extern "system" fn get_framebuffer_tile_properties_qcom( - _device: Device, + _device: crate::vk::Device, _framebuffer: Framebuffer, _p_properties_count: *mut u32, _p_properties: *mut TilePropertiesQCOM<'_>, @@ -22437,7 +26066,7 @@ pub mod qcom { }, get_dynamic_rendering_tile_properties_qcom: unsafe { unsafe extern "system" fn get_dynamic_rendering_tile_properties_qcom( - _device: Device, + _device: crate::vk::Device, _p_rendering_info: *const RenderingInfo<'_>, _p_properties: *mut TilePropertiesQCOM<'_>, ) -> Result { @@ -22459,6 +26088,28 @@ pub mod qcom { } } } + #[doc = "VK_QCOM_tile_properties device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } pub mod multiview_per_view_viewports { use super::super::*; @@ -22507,7 +26158,7 @@ pub mod qnx { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkCreateScreenSurfaceQNX = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_create_info: *const ScreenSurfaceCreateInfoQNX<'_>, p_allocator: *const AllocationCallbacks<'_>, p_surface: *mut SurfaceKHR, @@ -22520,6 +26171,7 @@ pub mod qnx { window: *mut _screen_window, ) -> Bool32; #[derive(Clone)] + #[doc = "Raw VK_QNX_screen_surface instance-level function pointers"] pub struct InstanceFn { pub create_screen_surface_qnx: PFN_vkCreateScreenSurfaceQNX, pub get_physical_device_screen_presentation_support_qnx: @@ -22535,7 +26187,7 @@ pub mod qnx { Self { create_screen_surface_qnx: unsafe { unsafe extern "system" fn create_screen_surface_qnx( - _instance: Instance, + _instance: crate::vk::Instance, _p_create_info: *const ScreenSurfaceCreateInfoQNX<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_surface: *mut SurfaceKHR, @@ -22578,6 +26230,28 @@ pub mod qnx { } } } + #[doc = "VK_QNX_screen_surface instance-level functions"] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } } pub mod external_memory_screen_buffer { use super::super::*; @@ -22587,11 +26261,12 @@ pub mod qnx { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetScreenBufferPropertiesQNX = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, buffer: *const _screen_buffer, p_properties: *mut ScreenBufferPropertiesQNX<'_>, ) -> Result; #[derive(Clone)] + #[doc = "Raw VK_QNX_external_memory_screen_buffer device-level function pointers"] pub struct DeviceFn { pub get_screen_buffer_properties_qnx: PFN_vkGetScreenBufferPropertiesQNX, } @@ -22605,7 +26280,7 @@ pub mod qnx { Self { get_screen_buffer_properties_qnx: unsafe { unsafe extern "system" fn get_screen_buffer_properties_qnx( - _device: Device, + _device: crate::vk::Device, _buffer: *const _screen_buffer, _p_properties: *mut ScreenBufferPropertiesQNX<'_>, ) -> Result { @@ -22627,6 +26302,28 @@ pub mod qnx { } } } + #[doc = "VK_QNX_external_memory_screen_buffer device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } pub mod sec { @@ -22652,17 +26349,18 @@ pub mod valve { pub const SPEC_VERSION: u32 = 1u32; #[allow(non_camel_case_types)] pub type PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_binding_reference: *const DescriptorSetBindingReferenceVALVE<'_>, p_host_mapping: *mut DescriptorSetLayoutHostMappingInfoVALVE<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetDescriptorSetHostMappingVALVE = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_set: DescriptorSet, pp_data: *mut *mut c_void, ); #[derive(Clone)] + #[doc = "Raw VK_VALVE_descriptor_set_host_mapping device-level function pointers"] pub struct DeviceFn { pub get_descriptor_set_layout_host_mapping_info_valve: PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE, @@ -22678,7 +26376,7 @@ pub mod valve { Self { get_descriptor_set_layout_host_mapping_info_valve: unsafe { unsafe extern "system" fn get_descriptor_set_layout_host_mapping_info_valve( - _device: Device, + _device: crate::vk::Device, _p_binding_reference: *const DescriptorSetBindingReferenceVALVE<'_>, _p_host_mapping: *mut DescriptorSetLayoutHostMappingInfoVALVE<'_>, ) { @@ -22699,7 +26397,7 @@ pub mod valve { }, get_descriptor_set_host_mapping_valve: unsafe { unsafe extern "system" fn get_descriptor_set_host_mapping_valve( - _device: Device, + _device: crate::vk::Device, _descriptor_set: DescriptorSet, _pp_data: *mut *mut c_void, ) { @@ -22721,5 +26419,27 @@ pub mod valve { } } } + #[doc = "VK_VALVE_descriptor_set_host_mapping device-level functions"] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } } } diff --git a/ash/src/vk/features.rs b/ash/src/vk/features.rs index 1a598d6da..1c10f1be5 100644 --- a/ash/src/vk/features.rs +++ b/ash/src/vk/features.rs @@ -3,9 +3,12 @@ use crate::vk::definitions::*; use crate::vk::enums::*; use core::ffi::*; #[allow(non_camel_case_types)] -pub type PFN_vkGetInstanceProcAddr = - unsafe extern "system" fn(instance: Instance, p_name: *const c_char) -> PFN_vkVoidFunction; +pub type PFN_vkGetInstanceProcAddr = unsafe extern "system" fn( + instance: crate::vk::Instance, + p_name: *const c_char, +) -> PFN_vkVoidFunction; #[derive(Clone)] +#[doc = "Raw Vulkan 1 static function pointers"] pub struct StaticFn { pub get_instance_proc_addr: PFN_vkGetInstanceProcAddr, } @@ -19,7 +22,7 @@ impl StaticFn { Self { get_instance_proc_addr: unsafe { unsafe extern "system" fn get_instance_proc_addr( - _instance: Instance, + _instance: crate::vk::Instance, _p_name: *const c_char, ) -> PFN_vkVoidFunction { panic!(concat!( @@ -42,7 +45,7 @@ impl StaticFn { pub type PFN_vkCreateInstance = unsafe extern "system" fn( p_create_info: *const InstanceCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, - p_instance: *mut Instance, + p_instance: *mut crate::vk::Instance, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkEnumerateInstanceExtensionProperties = unsafe extern "system" fn( @@ -56,6 +59,7 @@ pub type PFN_vkEnumerateInstanceLayerProperties = unsafe extern "system" fn( p_properties: *mut LayerProperties, ) -> Result; #[derive(Clone)] +#[doc = "Raw Vulkan 1 entry point function pointers"] pub struct EntryFnV1_0 { pub create_instance: PFN_vkCreateInstance, pub enumerate_instance_extension_properties: PFN_vkEnumerateInstanceExtensionProperties, @@ -73,7 +77,7 @@ impl EntryFnV1_0 { unsafe extern "system" fn create_instance( _p_create_info: *const InstanceCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, - _p_instance: *mut Instance, + _p_instance: *mut crate::vk::Instance, ) -> Result { panic!(concat!("Unable to load ", stringify!(create_instance))) } @@ -129,11 +133,13 @@ impl EntryFnV1_0 { } } #[allow(non_camel_case_types)] -pub type PFN_vkDestroyInstance = - unsafe extern "system" fn(instance: Instance, p_allocator: *const AllocationCallbacks<'_>); +pub type PFN_vkDestroyInstance = unsafe extern "system" fn( + instance: crate::vk::Instance, + p_allocator: *const AllocationCallbacks<'_>, +); #[allow(non_camel_case_types)] pub type PFN_vkEnumeratePhysicalDevices = unsafe extern "system" fn( - instance: Instance, + instance: crate::vk::Instance, p_physical_device_count: *mut u32, p_physical_devices: *mut PhysicalDevice, ) -> Result; @@ -175,14 +181,16 @@ pub type PFN_vkGetPhysicalDeviceMemoryProperties = unsafe extern "system" fn( p_memory_properties: *mut PhysicalDeviceMemoryProperties, ); #[allow(non_camel_case_types)] -pub type PFN_vkGetDeviceProcAddr = - unsafe extern "system" fn(device: Device, p_name: *const c_char) -> PFN_vkVoidFunction; +pub type PFN_vkGetDeviceProcAddr = unsafe extern "system" fn( + device: crate::vk::Device, + p_name: *const c_char, +) -> PFN_vkVoidFunction; #[allow(non_camel_case_types)] pub type PFN_vkCreateDevice = unsafe extern "system" fn( physical_device: PhysicalDevice, p_create_info: *const DeviceCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, - p_device: *mut Device, + p_device: *mut crate::vk::Device, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkEnumerateDeviceExtensionProperties = unsafe extern "system" fn( @@ -209,6 +217,7 @@ pub type PFN_vkGetPhysicalDeviceSparseImageFormatProperties = unsafe extern "sys p_properties: *mut SparseImageFormatProperties, ); #[derive(Clone)] +#[doc = "Raw Vulkan 1 instance-level function pointers"] pub struct InstanceFnV1_0 { pub destroy_instance: PFN_vkDestroyInstance, pub enumerate_physical_devices: PFN_vkEnumeratePhysicalDevices, @@ -235,7 +244,7 @@ impl InstanceFnV1_0 { Self { destroy_instance: unsafe { unsafe extern "system" fn destroy_instance( - _instance: Instance, + _instance: crate::vk::Instance, _p_allocator: *const AllocationCallbacks<'_>, ) { panic!(concat!("Unable to load ", stringify!(destroy_instance))) @@ -250,7 +259,7 @@ impl InstanceFnV1_0 { }, enumerate_physical_devices: unsafe { unsafe extern "system" fn enumerate_physical_devices( - _instance: Instance, + _instance: crate::vk::Instance, _p_physical_device_count: *mut u32, _p_physical_devices: *mut PhysicalDevice, ) -> Result { @@ -390,7 +399,7 @@ impl InstanceFnV1_0 { }, get_device_proc_addr: unsafe { unsafe extern "system" fn get_device_proc_addr( - _device: Device, + _device: crate::vk::Device, _p_name: *const c_char, ) -> PFN_vkVoidFunction { panic!(concat!("Unable to load ", stringify!(get_device_proc_addr))) @@ -408,7 +417,7 @@ impl InstanceFnV1_0 { _physical_device: PhysicalDevice, _p_create_info: *const DeviceCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, - _p_device: *mut Device, + _p_device: *mut crate::vk::Device, ) -> Result { panic!(concat!("Unable to load ", stringify!(create_device))) } @@ -491,11 +500,13 @@ impl InstanceFnV1_0 { } } #[allow(non_camel_case_types)] -pub type PFN_vkDestroyDevice = - unsafe extern "system" fn(device: Device, p_allocator: *const AllocationCallbacks<'_>); +pub type PFN_vkDestroyDevice = unsafe extern "system" fn( + device: crate::vk::Device, + p_allocator: *const AllocationCallbacks<'_>, +); #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceQueue = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, queue_family_index: u32, queue_index: u32, p_queue: *mut Queue, @@ -510,23 +521,23 @@ pub type PFN_vkQueueSubmit = unsafe extern "system" fn( #[allow(non_camel_case_types)] pub type PFN_vkQueueWaitIdle = unsafe extern "system" fn(queue: Queue) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkDeviceWaitIdle = unsafe extern "system" fn(device: Device) -> Result; +pub type PFN_vkDeviceWaitIdle = unsafe extern "system" fn(device: crate::vk::Device) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkAllocateMemory = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_allocate_info: *const MemoryAllocateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_memory: *mut DeviceMemory, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkFreeMemory = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, memory: DeviceMemory, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkMapMemory = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, memory: DeviceMemory, offset: DeviceSize, size: DeviceSize, @@ -534,54 +545,55 @@ pub type PFN_vkMapMemory = unsafe extern "system" fn( pp_data: *mut *mut c_void, ) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkUnmapMemory = unsafe extern "system" fn(device: Device, memory: DeviceMemory); +pub type PFN_vkUnmapMemory = + unsafe extern "system" fn(device: crate::vk::Device, memory: DeviceMemory); #[allow(non_camel_case_types)] pub type PFN_vkFlushMappedMemoryRanges = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, memory_range_count: u32, p_memory_ranges: *const MappedMemoryRange<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkInvalidateMappedMemoryRanges = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, memory_range_count: u32, p_memory_ranges: *const MappedMemoryRange<'_>, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceMemoryCommitment = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, memory: DeviceMemory, p_committed_memory_in_bytes: *mut DeviceSize, ); #[allow(non_camel_case_types)] pub type PFN_vkBindBufferMemory = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, buffer: Buffer, memory: DeviceMemory, memory_offset: DeviceSize, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkBindImageMemory = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, memory: DeviceMemory, memory_offset: DeviceSize, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkGetBufferMemoryRequirements = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, buffer: Buffer, p_memory_requirements: *mut MemoryRequirements, ); #[allow(non_camel_case_types)] pub type PFN_vkGetImageMemoryRequirements = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, p_memory_requirements: *mut MemoryRequirements, ); #[allow(non_camel_case_types)] pub type PFN_vkGetImageSparseMemoryRequirements = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, p_sparse_memory_requirement_count: *mut u32, p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, @@ -595,25 +607,29 @@ pub type PFN_vkQueueBindSparse = unsafe extern "system" fn( ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateFence = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const FenceCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_fence: *mut Fence, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyFence = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, fence: Fence, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] -pub type PFN_vkResetFences = - unsafe extern "system" fn(device: Device, fence_count: u32, p_fences: *const Fence) -> Result; +pub type PFN_vkResetFences = unsafe extern "system" fn( + device: crate::vk::Device, + fence_count: u32, + p_fences: *const Fence, +) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkGetFenceStatus = unsafe extern "system" fn(device: Device, fence: Fence) -> Result; +pub type PFN_vkGetFenceStatus = + unsafe extern "system" fn(device: crate::vk::Device, fence: Fence) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkWaitForFences = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, fence_count: u32, p_fences: *const Fence, wait_all: Bool32, @@ -621,52 +637,55 @@ pub type PFN_vkWaitForFences = unsafe extern "system" fn( ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateSemaphore = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const SemaphoreCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_semaphore: *mut Semaphore, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroySemaphore = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, semaphore: Semaphore, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateEvent = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const EventCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_event: *mut Event, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyEvent = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, event: Event, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] -pub type PFN_vkGetEventStatus = unsafe extern "system" fn(device: Device, event: Event) -> Result; +pub type PFN_vkGetEventStatus = + unsafe extern "system" fn(device: crate::vk::Device, event: Event) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkSetEvent = unsafe extern "system" fn(device: Device, event: Event) -> Result; +pub type PFN_vkSetEvent = + unsafe extern "system" fn(device: crate::vk::Device, event: Event) -> Result; #[allow(non_camel_case_types)] -pub type PFN_vkResetEvent = unsafe extern "system" fn(device: Device, event: Event) -> Result; +pub type PFN_vkResetEvent = + unsafe extern "system" fn(device: crate::vk::Device, event: Event) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateQueryPool = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, query_pool: QueryPool, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetQueryPoolResults = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, query_pool: QueryPool, first_query: u32, query_count: u32, @@ -677,106 +696,106 @@ pub type PFN_vkGetQueryPoolResults = unsafe extern "system" fn( ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateBuffer = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const BufferCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_buffer: *mut Buffer, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyBuffer = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, buffer: Buffer, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateBufferView = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const BufferViewCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_view: *mut BufferView, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyBufferView = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, buffer_view: BufferView, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateImage = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const ImageCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_image: *mut Image, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyImage = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetImageSubresourceLayout = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image: Image, p_subresource: *const ImageSubresource, p_layout: *mut SubresourceLayout, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateImageView = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const ImageViewCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_view: *mut ImageView, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyImageView = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, image_view: ImageView, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateShaderModule = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, shader_module: ShaderModule, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreatePipelineCache = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline_cache: PipelineCache, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetPipelineCacheData = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline_cache: PipelineCache, p_data_size: *mut usize, p_data: *mut c_void, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkMergePipelineCaches = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, dst_cache: PipelineCache, src_cache_count: u32, p_src_caches: *const PipelineCache, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateGraphicsPipelines = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline_cache: PipelineCache, create_info_count: u32, p_create_infos: *const GraphicsPipelineCreateInfo<'_>, @@ -785,7 +804,7 @@ pub type PFN_vkCreateGraphicsPipelines = unsafe extern "system" fn( ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkCreateComputePipelines = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline_cache: PipelineCache, create_info_count: u32, p_create_infos: *const ComputePipelineCreateInfo<'_>, @@ -794,84 +813,84 @@ pub type PFN_vkCreateComputePipelines = unsafe extern "system" fn( ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyPipeline = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline: Pipeline, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreatePipelineLayout = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, pipeline_layout: PipelineLayout, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateSampler = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const SamplerCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_sampler: *mut Sampler, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroySampler = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, sampler: Sampler, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateDescriptorSetLayout = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_set_layout: DescriptorSetLayout, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateDescriptorPool = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_pool: DescriptorPool, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkResetDescriptorPool = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_pool: DescriptorPool, flags: DescriptorPoolResetFlags, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkAllocateDescriptorSets = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_allocate_info: *const DescriptorSetAllocateInfo<'_>, p_descriptor_sets: *mut DescriptorSet, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkFreeDescriptorSets = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_pool: DescriptorPool, descriptor_set_count: u32, p_descriptor_sets: *const DescriptorSet, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkUpdateDescriptorSets = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, descriptor_write_count: u32, p_descriptor_writes: *const WriteDescriptorSet<'_>, descriptor_copy_count: u32, @@ -879,64 +898,64 @@ pub type PFN_vkUpdateDescriptorSets = unsafe extern "system" fn( ); #[allow(non_camel_case_types)] pub type PFN_vkCreateFramebuffer = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_create_info: *const FramebufferCreateInfo<'_>, p_allocator: *const AllocationCallbacks<'_>, p_framebuffer: *mut Framebuffer, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkDestroyFramebuffer = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, framebuffer: Framebuffer, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateRenderPass = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, render_pass: RenderPass, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkGetRenderAreaGranularity = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, render_pass: RenderPass, p_granularity: *mut Extent2D, ); #[allow(non_camel_case_types)] pub type PFN_vkCreateCommandPool = unsafe extern "system" fn( - device: Device, + device: crate::vk::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 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, command_pool: CommandPool, p_allocator: *const AllocationCallbacks<'_>, ); #[allow(non_camel_case_types)] pub type PFN_vkResetCommandPool = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, command_pool: CommandPool, flags: CommandPoolResetFlags, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkAllocateCommandBuffers = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_allocate_info: *const CommandBufferAllocateInfo<'_>, p_command_buffers: *mut CommandBuffer, ) -> Result; #[allow(non_camel_case_types)] pub type PFN_vkFreeCommandBuffers = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, command_pool: CommandPool, command_buffer_count: u32, p_command_buffers: *const CommandBuffer, @@ -1280,6 +1299,7 @@ pub type PFN_vkCmdExecuteCommands = unsafe extern "system" fn( p_command_buffers: *const CommandBuffer, ); #[derive(Clone)] +#[doc = "Raw Vulkan 1 device-level function pointers"] pub struct DeviceFnV1_0 { pub destroy_device: PFN_vkDestroyDevice, pub get_device_queue: PFN_vkGetDeviceQueue, @@ -1412,7 +1432,7 @@ impl DeviceFnV1_0 { Self { destroy_device: unsafe { unsafe extern "system" fn destroy_device( - _device: Device, + _device: crate::vk::Device, _p_allocator: *const AllocationCallbacks<'_>, ) { panic!(concat!("Unable to load ", stringify!(destroy_device))) @@ -1427,7 +1447,7 @@ impl DeviceFnV1_0 { }, get_device_queue: unsafe { unsafe extern "system" fn get_device_queue( - _device: Device, + _device: crate::vk::Device, _queue_family_index: u32, _queue_index: u32, _p_queue: *mut Queue, @@ -1472,7 +1492,7 @@ impl DeviceFnV1_0 { } }, device_wait_idle: unsafe { - unsafe extern "system" fn device_wait_idle(_device: Device) -> Result { + unsafe extern "system" fn device_wait_idle(_device: crate::vk::Device) -> Result { panic!(concat!("Unable to load ", stringify!(device_wait_idle))) } let cname = CStr::from_bytes_with_nul_unchecked(b"vkDeviceWaitIdle\0"); @@ -1485,7 +1505,7 @@ impl DeviceFnV1_0 { }, allocate_memory: unsafe { unsafe extern "system" fn allocate_memory( - _device: Device, + _device: crate::vk::Device, _p_allocate_info: *const MemoryAllocateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_memory: *mut DeviceMemory, @@ -1502,7 +1522,7 @@ impl DeviceFnV1_0 { }, free_memory: unsafe { unsafe extern "system" fn free_memory( - _device: Device, + _device: crate::vk::Device, _memory: DeviceMemory, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -1518,7 +1538,7 @@ impl DeviceFnV1_0 { }, map_memory: unsafe { unsafe extern "system" fn map_memory( - _device: Device, + _device: crate::vk::Device, _memory: DeviceMemory, _offset: DeviceSize, _size: DeviceSize, @@ -1536,7 +1556,10 @@ impl DeviceFnV1_0 { } }, unmap_memory: unsafe { - unsafe extern "system" fn unmap_memory(_device: Device, _memory: DeviceMemory) { + unsafe extern "system" fn unmap_memory( + _device: crate::vk::Device, + _memory: DeviceMemory, + ) { panic!(concat!("Unable to load ", stringify!(unmap_memory))) } let cname = CStr::from_bytes_with_nul_unchecked(b"vkUnmapMemory\0"); @@ -1549,7 +1572,7 @@ impl DeviceFnV1_0 { }, flush_mapped_memory_ranges: unsafe { unsafe extern "system" fn flush_mapped_memory_ranges( - _device: Device, + _device: crate::vk::Device, _memory_range_count: u32, _p_memory_ranges: *const MappedMemoryRange<'_>, ) -> Result { @@ -1568,7 +1591,7 @@ impl DeviceFnV1_0 { }, invalidate_mapped_memory_ranges: unsafe { unsafe extern "system" fn invalidate_mapped_memory_ranges( - _device: Device, + _device: crate::vk::Device, _memory_range_count: u32, _p_memory_ranges: *const MappedMemoryRange<'_>, ) -> Result { @@ -1588,7 +1611,7 @@ impl DeviceFnV1_0 { }, get_device_memory_commitment: unsafe { unsafe extern "system" fn get_device_memory_commitment( - _device: Device, + _device: crate::vk::Device, _memory: DeviceMemory, _p_committed_memory_in_bytes: *mut DeviceSize, ) { @@ -1607,7 +1630,7 @@ impl DeviceFnV1_0 { }, bind_buffer_memory: unsafe { unsafe extern "system" fn bind_buffer_memory( - _device: Device, + _device: crate::vk::Device, _buffer: Buffer, _memory: DeviceMemory, _memory_offset: DeviceSize, @@ -1624,7 +1647,7 @@ impl DeviceFnV1_0 { }, bind_image_memory: unsafe { unsafe extern "system" fn bind_image_memory( - _device: Device, + _device: crate::vk::Device, _image: Image, _memory: DeviceMemory, _memory_offset: DeviceSize, @@ -1641,7 +1664,7 @@ impl DeviceFnV1_0 { }, get_buffer_memory_requirements: unsafe { unsafe extern "system" fn get_buffer_memory_requirements( - _device: Device, + _device: crate::vk::Device, _buffer: Buffer, _p_memory_requirements: *mut MemoryRequirements, ) { @@ -1660,7 +1683,7 @@ impl DeviceFnV1_0 { }, get_image_memory_requirements: unsafe { unsafe extern "system" fn get_image_memory_requirements( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_memory_requirements: *mut MemoryRequirements, ) { @@ -1679,7 +1702,7 @@ impl DeviceFnV1_0 { }, get_image_sparse_memory_requirements: unsafe { unsafe extern "system" fn get_image_sparse_memory_requirements( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_sparse_memory_requirement_count: *mut u32, _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements, @@ -1717,7 +1740,7 @@ impl DeviceFnV1_0 { }, create_fence: unsafe { unsafe extern "system" fn create_fence( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const FenceCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_fence: *mut Fence, @@ -1734,7 +1757,7 @@ impl DeviceFnV1_0 { }, destroy_fence: unsafe { unsafe extern "system" fn destroy_fence( - _device: Device, + _device: crate::vk::Device, _fence: Fence, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -1750,7 +1773,7 @@ impl DeviceFnV1_0 { }, reset_fences: unsafe { unsafe extern "system" fn reset_fences( - _device: Device, + _device: crate::vk::Device, _fence_count: u32, _p_fences: *const Fence, ) -> Result { @@ -1766,7 +1789,7 @@ impl DeviceFnV1_0 { }, get_fence_status: unsafe { unsafe extern "system" fn get_fence_status( - _device: Device, + _device: crate::vk::Device, _fence: Fence, ) -> Result { panic!(concat!("Unable to load ", stringify!(get_fence_status))) @@ -1781,7 +1804,7 @@ impl DeviceFnV1_0 { }, wait_for_fences: unsafe { unsafe extern "system" fn wait_for_fences( - _device: Device, + _device: crate::vk::Device, _fence_count: u32, _p_fences: *const Fence, _wait_all: Bool32, @@ -1799,7 +1822,7 @@ impl DeviceFnV1_0 { }, create_semaphore: unsafe { unsafe extern "system" fn create_semaphore( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const SemaphoreCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_semaphore: *mut Semaphore, @@ -1816,7 +1839,7 @@ impl DeviceFnV1_0 { }, destroy_semaphore: unsafe { unsafe extern "system" fn destroy_semaphore( - _device: Device, + _device: crate::vk::Device, _semaphore: Semaphore, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -1832,7 +1855,7 @@ impl DeviceFnV1_0 { }, create_event: unsafe { unsafe extern "system" fn create_event( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const EventCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_event: *mut Event, @@ -1849,7 +1872,7 @@ impl DeviceFnV1_0 { }, destroy_event: unsafe { unsafe extern "system" fn destroy_event( - _device: Device, + _device: crate::vk::Device, _event: Event, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -1865,7 +1888,7 @@ impl DeviceFnV1_0 { }, get_event_status: unsafe { unsafe extern "system" fn get_event_status( - _device: Device, + _device: crate::vk::Device, _event: Event, ) -> Result { panic!(concat!("Unable to load ", stringify!(get_event_status))) @@ -1879,7 +1902,10 @@ impl DeviceFnV1_0 { } }, set_event: unsafe { - unsafe extern "system" fn set_event(_device: Device, _event: Event) -> Result { + unsafe extern "system" fn set_event( + _device: crate::vk::Device, + _event: Event, + ) -> Result { panic!(concat!("Unable to load ", stringify!(set_event))) } let cname = CStr::from_bytes_with_nul_unchecked(b"vkSetEvent\0"); @@ -1891,7 +1917,10 @@ impl DeviceFnV1_0 { } }, reset_event: unsafe { - unsafe extern "system" fn reset_event(_device: Device, _event: Event) -> Result { + unsafe extern "system" fn reset_event( + _device: crate::vk::Device, + _event: Event, + ) -> Result { panic!(concat!("Unable to load ", stringify!(reset_event))) } let cname = CStr::from_bytes_with_nul_unchecked(b"vkResetEvent\0"); @@ -1904,7 +1933,7 @@ impl DeviceFnV1_0 { }, create_query_pool: unsafe { unsafe extern "system" fn create_query_pool( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const QueryPoolCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_query_pool: *mut QueryPool, @@ -1921,7 +1950,7 @@ impl DeviceFnV1_0 { }, destroy_query_pool: unsafe { unsafe extern "system" fn destroy_query_pool( - _device: Device, + _device: crate::vk::Device, _query_pool: QueryPool, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -1937,7 +1966,7 @@ impl DeviceFnV1_0 { }, get_query_pool_results: unsafe { unsafe extern "system" fn get_query_pool_results( - _device: Device, + _device: crate::vk::Device, _query_pool: QueryPool, _first_query: u32, _query_count: u32, @@ -1961,7 +1990,7 @@ impl DeviceFnV1_0 { }, create_buffer: unsafe { unsafe extern "system" fn create_buffer( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const BufferCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_buffer: *mut Buffer, @@ -1978,7 +2007,7 @@ impl DeviceFnV1_0 { }, destroy_buffer: unsafe { unsafe extern "system" fn destroy_buffer( - _device: Device, + _device: crate::vk::Device, _buffer: Buffer, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -1994,7 +2023,7 @@ impl DeviceFnV1_0 { }, create_buffer_view: unsafe { unsafe extern "system" fn create_buffer_view( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const BufferViewCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_view: *mut BufferView, @@ -2011,7 +2040,7 @@ impl DeviceFnV1_0 { }, destroy_buffer_view: unsafe { unsafe extern "system" fn destroy_buffer_view( - _device: Device, + _device: crate::vk::Device, _buffer_view: BufferView, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2027,7 +2056,7 @@ impl DeviceFnV1_0 { }, create_image: unsafe { unsafe extern "system" fn create_image( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const ImageCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_image: *mut Image, @@ -2044,7 +2073,7 @@ impl DeviceFnV1_0 { }, destroy_image: unsafe { unsafe extern "system" fn destroy_image( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2060,7 +2089,7 @@ impl DeviceFnV1_0 { }, get_image_subresource_layout: unsafe { unsafe extern "system" fn get_image_subresource_layout( - _device: Device, + _device: crate::vk::Device, _image: Image, _p_subresource: *const ImageSubresource, _p_layout: *mut SubresourceLayout, @@ -2080,7 +2109,7 @@ impl DeviceFnV1_0 { }, create_image_view: unsafe { unsafe extern "system" fn create_image_view( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const ImageViewCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_view: *mut ImageView, @@ -2097,7 +2126,7 @@ impl DeviceFnV1_0 { }, destroy_image_view: unsafe { unsafe extern "system" fn destroy_image_view( - _device: Device, + _device: crate::vk::Device, _image_view: ImageView, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2113,7 +2142,7 @@ impl DeviceFnV1_0 { }, create_shader_module: unsafe { unsafe extern "system" fn create_shader_module( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const ShaderModuleCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_shader_module: *mut ShaderModule, @@ -2130,7 +2159,7 @@ impl DeviceFnV1_0 { }, destroy_shader_module: unsafe { unsafe extern "system" fn destroy_shader_module( - _device: Device, + _device: crate::vk::Device, _shader_module: ShaderModule, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2149,7 +2178,7 @@ impl DeviceFnV1_0 { }, create_pipeline_cache: unsafe { unsafe extern "system" fn create_pipeline_cache( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const PipelineCacheCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_pipeline_cache: *mut PipelineCache, @@ -2169,7 +2198,7 @@ impl DeviceFnV1_0 { }, destroy_pipeline_cache: unsafe { unsafe extern "system" fn destroy_pipeline_cache( - _device: Device, + _device: crate::vk::Device, _pipeline_cache: PipelineCache, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2188,7 +2217,7 @@ impl DeviceFnV1_0 { }, get_pipeline_cache_data: unsafe { unsafe extern "system" fn get_pipeline_cache_data( - _device: Device, + _device: crate::vk::Device, _pipeline_cache: PipelineCache, _p_data_size: *mut usize, _p_data: *mut c_void, @@ -2208,7 +2237,7 @@ impl DeviceFnV1_0 { }, merge_pipeline_caches: unsafe { unsafe extern "system" fn merge_pipeline_caches( - _device: Device, + _device: crate::vk::Device, _dst_cache: PipelineCache, _src_cache_count: u32, _p_src_caches: *const PipelineCache, @@ -2228,7 +2257,7 @@ impl DeviceFnV1_0 { }, create_graphics_pipelines: unsafe { unsafe extern "system" fn create_graphics_pipelines( - _device: Device, + _device: crate::vk::Device, _pipeline_cache: PipelineCache, _create_info_count: u32, _p_create_infos: *const GraphicsPipelineCreateInfo<'_>, @@ -2250,7 +2279,7 @@ impl DeviceFnV1_0 { }, create_compute_pipelines: unsafe { unsafe extern "system" fn create_compute_pipelines( - _device: Device, + _device: crate::vk::Device, _pipeline_cache: PipelineCache, _create_info_count: u32, _p_create_infos: *const ComputePipelineCreateInfo<'_>, @@ -2272,7 +2301,7 @@ impl DeviceFnV1_0 { }, destroy_pipeline: unsafe { unsafe extern "system" fn destroy_pipeline( - _device: Device, + _device: crate::vk::Device, _pipeline: Pipeline, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2288,7 +2317,7 @@ impl DeviceFnV1_0 { }, create_pipeline_layout: unsafe { unsafe extern "system" fn create_pipeline_layout( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const PipelineLayoutCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_pipeline_layout: *mut PipelineLayout, @@ -2308,7 +2337,7 @@ impl DeviceFnV1_0 { }, destroy_pipeline_layout: unsafe { unsafe extern "system" fn destroy_pipeline_layout( - _device: Device, + _device: crate::vk::Device, _pipeline_layout: PipelineLayout, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2327,7 +2356,7 @@ impl DeviceFnV1_0 { }, create_sampler: unsafe { unsafe extern "system" fn create_sampler( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const SamplerCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_sampler: *mut Sampler, @@ -2344,7 +2373,7 @@ impl DeviceFnV1_0 { }, destroy_sampler: unsafe { unsafe extern "system" fn destroy_sampler( - _device: Device, + _device: crate::vk::Device, _sampler: Sampler, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2360,7 +2389,7 @@ impl DeviceFnV1_0 { }, create_descriptor_set_layout: unsafe { unsafe extern "system" fn create_descriptor_set_layout( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const DescriptorSetLayoutCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_set_layout: *mut DescriptorSetLayout, @@ -2380,7 +2409,7 @@ impl DeviceFnV1_0 { }, destroy_descriptor_set_layout: unsafe { unsafe extern "system" fn destroy_descriptor_set_layout( - _device: Device, + _device: crate::vk::Device, _descriptor_set_layout: DescriptorSetLayout, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2399,7 +2428,7 @@ impl DeviceFnV1_0 { }, create_descriptor_pool: unsafe { unsafe extern "system" fn create_descriptor_pool( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const DescriptorPoolCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_descriptor_pool: *mut DescriptorPool, @@ -2419,7 +2448,7 @@ impl DeviceFnV1_0 { }, destroy_descriptor_pool: unsafe { unsafe extern "system" fn destroy_descriptor_pool( - _device: Device, + _device: crate::vk::Device, _descriptor_pool: DescriptorPool, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2438,7 +2467,7 @@ impl DeviceFnV1_0 { }, reset_descriptor_pool: unsafe { unsafe extern "system" fn reset_descriptor_pool( - _device: Device, + _device: crate::vk::Device, _descriptor_pool: DescriptorPool, _flags: DescriptorPoolResetFlags, ) -> Result { @@ -2457,7 +2486,7 @@ impl DeviceFnV1_0 { }, allocate_descriptor_sets: unsafe { unsafe extern "system" fn allocate_descriptor_sets( - _device: Device, + _device: crate::vk::Device, _p_allocate_info: *const DescriptorSetAllocateInfo<'_>, _p_descriptor_sets: *mut DescriptorSet, ) -> Result { @@ -2476,7 +2505,7 @@ impl DeviceFnV1_0 { }, free_descriptor_sets: unsafe { unsafe extern "system" fn free_descriptor_sets( - _device: Device, + _device: crate::vk::Device, _descriptor_pool: DescriptorPool, _descriptor_set_count: u32, _p_descriptor_sets: *const DescriptorSet, @@ -2493,7 +2522,7 @@ impl DeviceFnV1_0 { }, update_descriptor_sets: unsafe { unsafe extern "system" fn update_descriptor_sets( - _device: Device, + _device: crate::vk::Device, _descriptor_write_count: u32, _p_descriptor_writes: *const WriteDescriptorSet<'_>, _descriptor_copy_count: u32, @@ -2514,7 +2543,7 @@ impl DeviceFnV1_0 { }, create_framebuffer: unsafe { unsafe extern "system" fn create_framebuffer( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const FramebufferCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_framebuffer: *mut Framebuffer, @@ -2531,7 +2560,7 @@ impl DeviceFnV1_0 { }, destroy_framebuffer: unsafe { unsafe extern "system" fn destroy_framebuffer( - _device: Device, + _device: crate::vk::Device, _framebuffer: Framebuffer, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2547,7 +2576,7 @@ impl DeviceFnV1_0 { }, create_render_pass: unsafe { unsafe extern "system" fn create_render_pass( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const RenderPassCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_render_pass: *mut RenderPass, @@ -2564,7 +2593,7 @@ impl DeviceFnV1_0 { }, destroy_render_pass: unsafe { unsafe extern "system" fn destroy_render_pass( - _device: Device, + _device: crate::vk::Device, _render_pass: RenderPass, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2580,7 +2609,7 @@ impl DeviceFnV1_0 { }, get_render_area_granularity: unsafe { unsafe extern "system" fn get_render_area_granularity( - _device: Device, + _device: crate::vk::Device, _render_pass: RenderPass, _p_granularity: *mut Extent2D, ) { @@ -2599,7 +2628,7 @@ impl DeviceFnV1_0 { }, create_command_pool: unsafe { unsafe extern "system" fn create_command_pool( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const CommandPoolCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_command_pool: *mut CommandPool, @@ -2616,7 +2645,7 @@ impl DeviceFnV1_0 { }, destroy_command_pool: unsafe { unsafe extern "system" fn destroy_command_pool( - _device: Device, + _device: crate::vk::Device, _command_pool: CommandPool, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -2632,7 +2661,7 @@ impl DeviceFnV1_0 { }, reset_command_pool: unsafe { unsafe extern "system" fn reset_command_pool( - _device: Device, + _device: crate::vk::Device, _command_pool: CommandPool, _flags: CommandPoolResetFlags, ) -> Result { @@ -2648,7 +2677,7 @@ impl DeviceFnV1_0 { }, allocate_command_buffers: unsafe { unsafe extern "system" fn allocate_command_buffers( - _device: Device, + _device: crate::vk::Device, _p_allocate_info: *const CommandBufferAllocateInfo<'_>, _p_command_buffers: *mut CommandBuffer, ) -> Result { @@ -2667,7 +2696,7 @@ impl DeviceFnV1_0 { }, free_command_buffers: unsafe { unsafe extern "system" fn free_command_buffers( - _device: Device, + _device: crate::vk::Device, _command_pool: CommandPool, _command_buffer_count: u32, _p_command_buffers: *const CommandBuffer, @@ -3558,6 +3587,7 @@ impl DeviceFnV1_0 { pub type PFN_vkEnumerateInstanceVersion = unsafe extern "system" fn(p_api_version: *mut u32) -> Result; #[derive(Clone)] +#[doc = "Raw Vulkan 1.1 entry point function pointers"] pub struct EntryFnV1_1 { pub enumerate_instance_version: PFN_vkEnumerateInstanceVersion, } @@ -3590,6 +3620,7 @@ impl EntryFnV1_1 { } } #[derive(Clone)] +#[doc = "Raw Vulkan 1.1 instance-level function pointers"] pub struct InstanceFnV1_1 { pub enumerate_physical_device_groups : crate :: vk :: khr :: device_group_creation :: PFN_vkEnumeratePhysicalDeviceGroups , pub get_physical_device_features2 : crate :: vk :: khr :: get_physical_device_properties2 :: PFN_vkGetPhysicalDeviceFeatures2 , pub get_physical_device_properties2 : crate :: vk :: khr :: get_physical_device_properties2 :: PFN_vkGetPhysicalDeviceProperties2 , pub get_physical_device_format_properties2 : crate :: vk :: khr :: get_physical_device_properties2 :: PFN_vkGetPhysicalDeviceFormatProperties2 , pub get_physical_device_image_format_properties2 : crate :: vk :: khr :: get_physical_device_properties2 :: PFN_vkGetPhysicalDeviceImageFormatProperties2 , pub get_physical_device_queue_family_properties2 : crate :: vk :: khr :: get_physical_device_properties2 :: PFN_vkGetPhysicalDeviceQueueFamilyProperties2 , pub get_physical_device_memory_properties2 : crate :: vk :: khr :: get_physical_device_properties2 :: PFN_vkGetPhysicalDeviceMemoryProperties2 , pub get_physical_device_sparse_image_format_properties2 : crate :: vk :: khr :: get_physical_device_properties2 :: PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 , pub get_physical_device_external_buffer_properties : crate :: vk :: khr :: external_memory_capabilities :: PFN_vkGetPhysicalDeviceExternalBufferProperties , pub get_physical_device_external_fence_properties : crate :: vk :: khr :: external_fence_capabilities :: PFN_vkGetPhysicalDeviceExternalFenceProperties , pub get_physical_device_external_semaphore_properties : crate :: vk :: khr :: external_semaphore_capabilities :: PFN_vkGetPhysicalDeviceExternalSemaphoreProperties , } unsafe impl Send for InstanceFnV1_1 {} unsafe impl Sync for InstanceFnV1_1 {} @@ -3601,7 +3632,7 @@ impl InstanceFnV1_1 { Self { enumerate_physical_device_groups: unsafe { unsafe extern "system" fn enumerate_physical_device_groups( - _instance: Instance, + _instance: crate::vk::Instance, _p_physical_device_group_count: *mut u32, _p_physical_device_group_properties: *mut PhysicalDeviceGroupProperties<'_>, ) -> Result { @@ -3827,11 +3858,12 @@ impl InstanceFnV1_1 { } #[allow(non_camel_case_types)] pub type PFN_vkGetDeviceQueue2 = unsafe extern "system" fn( - device: Device, + device: crate::vk::Device, p_queue_info: *const DeviceQueueInfo2<'_>, p_queue: *mut Queue, ); #[derive(Clone)] +#[doc = "Raw Vulkan 1.1 device-level function pointers"] pub struct DeviceFnV1_1 { pub bind_buffer_memory2: crate::vk::khr::bind_memory2::PFN_vkBindBufferMemory2, pub bind_image_memory2: crate::vk::khr::bind_memory2::PFN_vkBindImageMemory2, @@ -3870,7 +3902,7 @@ impl DeviceFnV1_1 { Self { bind_buffer_memory2: unsafe { unsafe extern "system" fn bind_buffer_memory2( - _device: Device, + _device: crate::vk::Device, _bind_info_count: u32, _p_bind_infos: *const BindBufferMemoryInfo<'_>, ) -> Result { @@ -3886,7 +3918,7 @@ impl DeviceFnV1_1 { }, bind_image_memory2: unsafe { unsafe extern "system" fn bind_image_memory2( - _device: Device, + _device: crate::vk::Device, _bind_info_count: u32, _p_bind_infos: *const BindImageMemoryInfo<'_>, ) -> Result { @@ -3902,7 +3934,7 @@ impl DeviceFnV1_1 { }, get_device_group_peer_memory_features: unsafe { unsafe extern "system" fn get_device_group_peer_memory_features( - _device: Device, + _device: crate::vk::Device, _heap_index: u32, _local_device_index: u32, _remote_device_index: u32, @@ -3959,7 +3991,7 @@ impl DeviceFnV1_1 { }, get_image_memory_requirements2: unsafe { unsafe extern "system" fn get_image_memory_requirements2( - _device: Device, + _device: crate::vk::Device, _p_info: *const ImageMemoryRequirementsInfo2<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -3978,7 +4010,7 @@ impl DeviceFnV1_1 { }, get_buffer_memory_requirements2: unsafe { unsafe extern "system" fn get_buffer_memory_requirements2( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferMemoryRequirementsInfo2<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -3998,7 +4030,7 @@ impl DeviceFnV1_1 { }, get_image_sparse_memory_requirements2: unsafe { unsafe extern "system" fn get_image_sparse_memory_requirements2( - _device: Device, + _device: crate::vk::Device, _p_info: *const ImageSparseMemoryRequirementsInfo2<'_>, _p_sparse_memory_requirement_count: *mut u32, _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, @@ -4019,7 +4051,7 @@ impl DeviceFnV1_1 { }, trim_command_pool: unsafe { unsafe extern "system" fn trim_command_pool( - _device: Device, + _device: crate::vk::Device, _command_pool: CommandPool, _flags: CommandPoolTrimFlags, ) { @@ -4035,7 +4067,7 @@ impl DeviceFnV1_1 { }, get_device_queue2: unsafe { unsafe extern "system" fn get_device_queue2( - _device: Device, + _device: crate::vk::Device, _p_queue_info: *const DeviceQueueInfo2<'_>, _p_queue: *mut Queue, ) { @@ -4051,7 +4083,7 @@ impl DeviceFnV1_1 { }, create_sampler_ycbcr_conversion: unsafe { unsafe extern "system" fn create_sampler_ycbcr_conversion( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const SamplerYcbcrConversionCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_ycbcr_conversion: *mut SamplerYcbcrConversion, @@ -4072,7 +4104,7 @@ impl DeviceFnV1_1 { }, destroy_sampler_ycbcr_conversion: unsafe { unsafe extern "system" fn destroy_sampler_ycbcr_conversion( - _device: Device, + _device: crate::vk::Device, _ycbcr_conversion: SamplerYcbcrConversion, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -4092,7 +4124,7 @@ impl DeviceFnV1_1 { }, create_descriptor_update_template: unsafe { unsafe extern "system" fn create_descriptor_update_template( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const DescriptorUpdateTemplateCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_descriptor_update_template: *mut DescriptorUpdateTemplate, @@ -4113,7 +4145,7 @@ impl DeviceFnV1_1 { }, destroy_descriptor_update_template: unsafe { unsafe extern "system" fn destroy_descriptor_update_template( - _device: Device, + _device: crate::vk::Device, _descriptor_update_template: DescriptorUpdateTemplate, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -4133,7 +4165,7 @@ impl DeviceFnV1_1 { }, update_descriptor_set_with_template: unsafe { unsafe extern "system" fn update_descriptor_set_with_template( - _device: Device, + _device: crate::vk::Device, _descriptor_set: DescriptorSet, _descriptor_update_template: DescriptorUpdateTemplate, _p_data: *const c_void, @@ -4154,7 +4186,7 @@ impl DeviceFnV1_1 { }, get_descriptor_set_layout_support: unsafe { unsafe extern "system" fn get_descriptor_set_layout_support( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const DescriptorSetLayoutCreateInfo<'_>, _p_support: *mut DescriptorSetLayoutSupport<'_>, ) { @@ -4176,10 +4208,13 @@ impl DeviceFnV1_1 { } } #[derive(Clone)] +#[doc = "Raw Vulkan 1.2 entry point function pointers"] pub struct EntryFnV1_2; #[derive(Clone)] +#[doc = "Raw Vulkan 1.2 instance-level function pointers"] pub struct InstanceFnV1_2; #[derive(Clone)] +#[doc = "Raw Vulkan 1.2 device-level function pointers"] pub struct DeviceFnV1_2 { pub cmd_draw_indirect_count: crate::vk::amd::draw_indirect_count::PFN_vkCmdDrawIndirectCount, pub cmd_draw_indexed_indirect_count: @@ -4256,7 +4291,7 @@ impl DeviceFnV1_2 { }, create_render_pass2: unsafe { unsafe extern "system" fn create_render_pass2( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const RenderPassCreateInfo2<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_render_pass: *mut RenderPass, @@ -4323,7 +4358,7 @@ impl DeviceFnV1_2 { }, reset_query_pool: unsafe { unsafe extern "system" fn reset_query_pool( - _device: Device, + _device: crate::vk::Device, _query_pool: QueryPool, _first_query: u32, _query_count: u32, @@ -4340,7 +4375,7 @@ impl DeviceFnV1_2 { }, get_semaphore_counter_value: unsafe { unsafe extern "system" fn get_semaphore_counter_value( - _device: Device, + _device: crate::vk::Device, _semaphore: Semaphore, _p_value: *mut u64, ) -> Result { @@ -4359,7 +4394,7 @@ impl DeviceFnV1_2 { }, wait_semaphores: unsafe { unsafe extern "system" fn wait_semaphores( - _device: Device, + _device: crate::vk::Device, _p_wait_info: *const SemaphoreWaitInfo<'_>, _timeout: u64, ) -> Result { @@ -4375,7 +4410,7 @@ impl DeviceFnV1_2 { }, signal_semaphore: unsafe { unsafe extern "system" fn signal_semaphore( - _device: Device, + _device: crate::vk::Device, _p_signal_info: *const SemaphoreSignalInfo<'_>, ) -> Result { panic!(concat!("Unable to load ", stringify!(signal_semaphore))) @@ -4390,7 +4425,7 @@ impl DeviceFnV1_2 { }, get_buffer_device_address: unsafe { unsafe extern "system" fn get_buffer_device_address( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferDeviceAddressInfo<'_>, ) -> DeviceAddress { panic!(concat!( @@ -4408,7 +4443,7 @@ impl DeviceFnV1_2 { }, get_buffer_opaque_capture_address: unsafe { unsafe extern "system" fn get_buffer_opaque_capture_address( - _device: Device, + _device: crate::vk::Device, _p_info: *const BufferDeviceAddressInfo<'_>, ) -> u64 { panic!(concat!( @@ -4427,7 +4462,7 @@ impl DeviceFnV1_2 { }, get_device_memory_opaque_capture_address: unsafe { unsafe extern "system" fn get_device_memory_opaque_capture_address( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceMemoryOpaqueCaptureAddressInfo<'_>, ) -> u64 { panic!(concat!( @@ -4448,8 +4483,10 @@ impl DeviceFnV1_2 { } } #[derive(Clone)] +#[doc = "Raw Vulkan 1.3 entry point function pointers"] pub struct EntryFnV1_3; #[derive(Clone)] +#[doc = "Raw Vulkan 1.3 instance-level function pointers"] pub struct InstanceFnV1_3 { pub get_physical_device_tool_properties: crate::vk::ext::tooling_info::PFN_vkGetPhysicalDeviceToolProperties, @@ -4486,6 +4523,7 @@ impl InstanceFnV1_3 { } } #[derive(Clone)] +#[doc = "Raw Vulkan 1.3 device-level function pointers"] pub struct DeviceFnV1_3 { pub create_private_data_slot: crate::vk::ext::private_data::PFN_vkCreatePrivateDataSlot, pub destroy_private_data_slot: crate::vk::ext::private_data::PFN_vkDestroyPrivateDataSlot, @@ -4549,7 +4587,7 @@ impl DeviceFnV1_3 { Self { create_private_data_slot: unsafe { unsafe extern "system" fn create_private_data_slot( - _device: Device, + _device: crate::vk::Device, _p_create_info: *const PrivateDataSlotCreateInfo<'_>, _p_allocator: *const AllocationCallbacks<'_>, _p_private_data_slot: *mut PrivateDataSlot, @@ -4569,7 +4607,7 @@ impl DeviceFnV1_3 { }, destroy_private_data_slot: unsafe { unsafe extern "system" fn destroy_private_data_slot( - _device: Device, + _device: crate::vk::Device, _private_data_slot: PrivateDataSlot, _p_allocator: *const AllocationCallbacks<'_>, ) { @@ -4588,7 +4626,7 @@ impl DeviceFnV1_3 { }, set_private_data: unsafe { unsafe extern "system" fn set_private_data( - _device: Device, + _device: crate::vk::Device, _object_type: ObjectType, _object_handle: u64, _private_data_slot: PrivateDataSlot, @@ -4606,7 +4644,7 @@ impl DeviceFnV1_3 { }, get_private_data: unsafe { unsafe extern "system" fn get_private_data( - _device: Device, + _device: crate::vk::Device, _object_type: ObjectType, _object_handle: u64, _private_data_slot: PrivateDataSlot, @@ -5122,7 +5160,7 @@ impl DeviceFnV1_3 { }, get_device_buffer_memory_requirements: unsafe { unsafe extern "system" fn get_device_buffer_memory_requirements( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceBufferMemoryRequirements<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -5142,7 +5180,7 @@ impl DeviceFnV1_3 { }, get_device_image_memory_requirements: unsafe { unsafe extern "system" fn get_device_image_memory_requirements( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceImageMemoryRequirements<'_>, _p_memory_requirements: *mut MemoryRequirements2<'_>, ) { @@ -5162,7 +5200,7 @@ impl DeviceFnV1_3 { }, get_device_image_sparse_memory_requirements: unsafe { unsafe extern "system" fn get_device_image_sparse_memory_requirements( - _device: Device, + _device: crate::vk::Device, _p_info: *const DeviceImageMemoryRequirements<'_>, _p_sparse_memory_requirement_count: *mut u32, _p_sparse_memory_requirements: *mut SparseImageMemoryRequirements2<'_>, diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 8d96ed8ce..810435f03 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -875,8 +875,13 @@ impl FieldExt for vk_parse::CommandParam { assert!(!self.is_void(), "{:?}", self); let (rem, ty) = parse_c_parameter(&self.definition.code).unwrap(); assert!(rem.is_empty()); + // Disambiguate overloaded names + let qualifier = match ty.type_.name == "VkDevice" || ty.type_.name == "VkInstance" { + true => quote!(crate::vk::), + false => quote!(), + }; let type_name = name_to_tokens(ty.type_.name); - let type_name = quote!(#type_name #type_lifetime); + let type_name = quote!(#qualifier #type_name #type_lifetime); let inner_ty = match ty.type_.reference_type { CReferenceType::Value => quote!(#type_name), CReferenceType::Pointer => { @@ -916,6 +921,7 @@ fn generate_function_pointers<'a>( rename_commands: &HashMap<&'a str, &'a str>, fn_cache: &mut HashMap<&'a str, (Ident, Ident)>, has_lifetimes: &HashSet, + doc: &str, ) -> TokenStream { // Commands can have duplicates inside them because they are declared per features. But we only // really want to generate one function pointer. @@ -1155,6 +1161,7 @@ fn generate_function_pointers<'a>( #(#pfn_typedefs)* #[derive(Clone)] + #[doc = #doc] #struct_contents #loader @@ -1259,7 +1266,7 @@ pub fn generate_extension_constants<'a>( quote!(#(#enum_tokens)*) } pub fn generate_extension_commands<'a>( - extension_name: &'a str, + full_extension_name: &'a str, items: &'a [vk_parse::ExtensionChild], cmd_map: &CommandMap<'a>, cmd_aliases: &HashMap<&'a str, &'a str>, @@ -1281,9 +1288,9 @@ pub fn generate_extension_commands<'a>( } }); - let byte_name_ident = Literal::byte_string(format!("{extension_name}\0").as_bytes()); + let byte_name_ident = Literal::byte_string(format!("{full_extension_name}\0").as_bytes()); - let extension_name = extension_name.strip_prefix("VK_").unwrap(); + let extension_name = full_extension_name.strip_prefix("VK_").unwrap(); let (vendor, extension_ident) = extension_name.split_once('_').unwrap(); let extension_ident = match extension_ident.chars().next().unwrap().is_ascii_digit() { false => format_ident!("{}", extension_ident.to_lowercase()), @@ -1326,27 +1333,94 @@ pub fn generate_extension_commands<'a>( let instance_fp = (!instance_commands.is_empty()).then(|| { let instance_ident = format_ident!("InstanceFn"); - generate_function_pointers( + let fp = generate_function_pointers( instance_ident, Some((&vendor, &extension_ident)), &instance_commands, &rename_commands, fn_cache, has_lifetimes, - ) + &format!( + "Raw {} instance-level function pointers", + full_extension_name + ), + ); + let doc = format!("{} instance-level functions", full_extension_name); + + quote! { + #fp + + #[doc = #doc] + pub struct Instance { + pub(crate) fp: InstanceFn, + pub(crate) handle: crate::vk::Instance, + } + + impl Instance { + pub fn new(entry: &crate::Entry, instance: &crate::Instance) -> Self { + let handle = instance.handle(); + let fp = InstanceFn::load(|name| unsafe { + core::mem::transmute(entry.get_instance_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + + #[inline] + pub fn fp(&self) -> &InstanceFn { + &self.fp + } + + #[inline] + pub fn instance(&self) -> crate::vk::Instance { + self.handle + } + } + } }); let device_fp = (!device_commands.is_empty()).then(|| { let device_ident = format_ident!("DeviceFn"); - generate_function_pointers( + let fp = generate_function_pointers( device_ident, Some((&vendor, &extension_ident)), &device_commands, &rename_commands, fn_cache, has_lifetimes, - ) + &format!("Raw {} device-level function pointers", full_extension_name), + ); + let doc = format!("{} device-level functions", full_extension_name); + + quote! { + #fp + + #[doc = #doc] + pub struct Device { + pub(crate) fp: DeviceFn, + pub(crate) handle: crate::vk::Device, + } + + impl Device { + pub fn new(instance: &crate::Instance, device: &crate::Device) -> Self { + let handle = device.handle(); + let fp = DeviceFn::load(|name| unsafe { + core::mem::transmute(instance.get_device_proc_addr(handle, name.as_ptr())) + }); + Self { handle, fp } + } + + #[inline] + pub fn fp(&self) -> &DeviceFn { + &self.fp + } + + #[inline] + pub fn device(&self) -> crate::vk::Device { + self.handle + } + } + } }); ( @@ -2709,6 +2783,7 @@ pub fn generate_feature<'a>( &HashMap::new(), fn_cache, has_lifetimes, + "Raw Vulkan 1 static function pointers", ) } else { quote! {} @@ -2720,6 +2795,10 @@ pub fn generate_feature<'a>( &HashMap::new(), fn_cache, has_lifetimes, + &format!( + "Raw Vulkan {} entry point function pointers", + feature.version + ), ); let instance = generate_function_pointers( format_ident!("InstanceFnV{}", version), @@ -2728,6 +2807,10 @@ pub fn generate_feature<'a>( &HashMap::new(), fn_cache, has_lifetimes, + &format!( + "Raw Vulkan {} instance-level function pointers", + feature.version + ), ); let device = generate_function_pointers( format_ident!("DeviceFnV{}", version), @@ -2736,6 +2819,10 @@ pub fn generate_feature<'a>( &HashMap::new(), fn_cache, has_lifetimes, + &format!( + "Raw Vulkan {} device-level function pointers", + feature.version + ), ); quote! { #static_fn