diff --git a/ash/src/allocator.rs b/ash/src/allocator.rs deleted file mode 100644 index 1e0f4b0..0000000 --- a/ash/src/allocator.rs +++ /dev/null @@ -1,120 +0,0 @@ -#![allow(dead_code)] -use vk; -use std::os::raw::c_void; -use std::ptr; -pub trait VkAllocation { - unsafe extern "system" fn allocation( - *mut (), - usize, - usize, - vk::SystemAllocationScope, - ) -> *mut (); - unsafe extern "system" fn reallocation( - *mut c_void, - *mut c_void, - usize, - usize, - vk::SystemAllocationScope, - ) -> *mut c_void; - unsafe extern "system" fn free(*mut c_void, *mut c_void); - unsafe extern "system" fn internal_allocation( - *mut c_void, - usize, - vk::InternalAllocationType, - vk::SystemAllocationScope, - ); - unsafe extern "system" fn internal_free( - *mut c_void, - usize, - vk::InternalAllocationType, - vk::SystemAllocationScope, - ); - fn create_allocation_callback() -> Option { - let alloc = vk::AllocationCallbacks { - p_user_data: ptr::null_mut(), - pfn_allocation: Self::allocation, - pfn_reallocation: Self::reallocation, - pfn_free: Self::free, - pfn_internal_allocation: Self::internal_allocation, - pfn_internal_free: Self::internal_free, - }; - Some(alloc) - } -} - -pub struct DefaultAllocatorCallback; -pub struct TestAlloc; - -impl VkAllocation for TestAlloc { - unsafe extern "system" fn allocation( - _: *mut (), - _: usize, - _: usize, - _: vk::SystemAllocationScope, - ) -> *mut () { - ptr::null_mut() - } - - unsafe extern "system" fn reallocation( - _: *mut c_void, - _: *mut c_void, - _: usize, - _: usize, - _: vk::SystemAllocationScope, - ) -> *mut c_void { - ptr::null_mut() - } - unsafe extern "system" fn free(_: *mut c_void, _: *mut c_void) {} - unsafe extern "system" fn internal_allocation( - _: *mut c_void, - _: usize, - _: vk::InternalAllocationType, - _: vk::SystemAllocationScope, - ) { - } - unsafe extern "system" fn internal_free( - _: *mut c_void, - _: usize, - _: vk::InternalAllocationType, - _: vk::SystemAllocationScope, - ) { - } -} -impl VkAllocation for DefaultAllocatorCallback { - unsafe extern "system" fn allocation( - _: *mut (), - _: usize, - _: usize, - _: vk::SystemAllocationScope, - ) -> *mut () { - ptr::null_mut() - } - - unsafe extern "system" fn reallocation( - _: *mut c_void, - _: *mut c_void, - _: usize, - _: usize, - _: vk::SystemAllocationScope, - ) -> *mut c_void { - ptr::null_mut() - } - unsafe extern "system" fn free(_: *mut c_void, _: *mut c_void) {} - unsafe extern "system" fn internal_allocation( - _: *mut c_void, - _: usize, - _: vk::InternalAllocationType, - _: vk::SystemAllocationScope, - ) { - } - unsafe extern "system" fn internal_free( - _: *mut c_void, - _: usize, - _: vk::InternalAllocationType, - _: vk::SystemAllocationScope, - ) { - } - fn create_allocation_callback() -> Option { - None - } -} \ No newline at end of file diff --git a/ash/src/extensions/ext/buffer_device_address.rs b/ash/src/extensions/ext/buffer_device_address.rs index 3b1a36f..ecb03af 100644 --- a/ash/src/extensions/ext/buffer_device_address.rs +++ b/ash/src/extensions/ext/buffer_device_address.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; @@ -22,7 +21,7 @@ impl BufferDeviceAddress { } #[doc = ""] - unsafe fn get_buffer_device_address( + pub unsafe fn get_buffer_device_address( &self, info: &vk::BufferDeviceAddressInfoEXT, ) -> vk::DeviceAddress { diff --git a/ash/src/extensions/ext/debug_marker.rs b/ash/src/extensions/ext/debug_marker.rs index 2823dbb..5e86083 100755 --- a/ash/src/extensions/ext/debug_marker.rs +++ b/ash/src/extensions/ext/debug_marker.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::{Device, Instance}; diff --git a/ash/src/extensions/ext/debug_report.rs b/ash/src/extensions/ext/debug_report.rs index 6e3b967..3400566 100755 --- a/ash/src/extensions/ext/debug_report.rs +++ b/ash/src/extensions/ext/debug_report.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/ext/debug_utils.rs b/ash/src/extensions/ext/debug_utils.rs index 3e05f7e..69ce2e9 100755 --- a/ash/src/extensions/ext/debug_utils.rs +++ b/ash/src/extensions/ext/debug_utils.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::{vk, RawPtr}; use crate::{EntryCustom, Instance}; diff --git a/ash/src/extensions/ext/extended_dynamic_state.rs b/ash/src/extensions/ext/extended_dynamic_state.rs index a8910ce..acd5408 100644 --- a/ash/src/extensions/ext/extended_dynamic_state.rs +++ b/ash/src/extensions/ext/extended_dynamic_state.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; diff --git a/ash/src/extensions/ext/full_screen_exclusive.rs b/ash/src/extensions/ext/full_screen_exclusive.rs index ff53ab2..8957117 100644 --- a/ash/src/extensions/ext/full_screen_exclusive.rs +++ b/ash/src/extensions/ext/full_screen_exclusive.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::{Device, Instance}; diff --git a/ash/src/extensions/ext/metal_surface.rs b/ash/src/extensions/ext/metal_surface.rs index 7168df1..c76d436 100644 --- a/ash/src/extensions/ext/metal_surface.rs +++ b/ash/src/extensions/ext/metal_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/ext/tooling_info.rs b/ash/src/extensions/ext/tooling_info.rs index a225f6f..5142296 100644 --- a/ash/src/extensions/ext/tooling_info.rs +++ b/ash/src/extensions/ext/tooling_info.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::{EntryCustom, Instance}; diff --git a/ash/src/extensions/khr/acceleration_structure.rs b/ash/src/extensions/khr/acceleration_structure.rs index 3834e4f..0e5c46e 100644 --- a/ash/src/extensions/khr/acceleration_structure.rs +++ b/ash/src/extensions/khr/acceleration_structure.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/android_surface.rs b/ash/src/extensions/khr/android_surface.rs index ce3628f..fef6b7d 100755 --- a/ash/src/extensions/khr/android_surface.rs +++ b/ash/src/extensions/khr/android_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/buffer_device_address.rs b/ash/src/extensions/khr/buffer_device_address.rs index 6a5c9f3..382df45 100644 --- a/ash/src/extensions/khr/buffer_device_address.rs +++ b/ash/src/extensions/khr/buffer_device_address.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; @@ -22,7 +21,7 @@ impl BufferDeviceAddress { } #[doc = ""] - unsafe fn get_buffer_device_address( + pub unsafe fn get_buffer_device_address( &self, info: &vk::BufferDeviceAddressInfoKHR, ) -> vk::DeviceAddress { @@ -30,7 +29,7 @@ impl BufferDeviceAddress { } #[doc = ""] - unsafe fn get_buffer_opaque_capture_address( + pub unsafe fn get_buffer_opaque_capture_address( &self, info: &vk::BufferDeviceAddressInfoKHR, ) -> u64 { @@ -39,7 +38,7 @@ impl BufferDeviceAddress { } #[doc = ""] - unsafe fn get_device_memory_opaque_capture_address( + pub unsafe fn get_device_memory_opaque_capture_address( &self, info: &vk::DeviceMemoryOpaqueCaptureAddressInfoKHR, ) -> u64 { diff --git a/ash/src/extensions/khr/create_render_pass2.rs b/ash/src/extensions/khr/create_render_pass2.rs index 0dbd0b0..09e1a4c 100644 --- a/ash/src/extensions/khr/create_render_pass2.rs +++ b/ash/src/extensions/khr/create_render_pass2.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/deferred_host_operations.rs b/ash/src/extensions/khr/deferred_host_operations.rs index 970042f..d4b2c3d 100644 --- a/ash/src/extensions/khr/deferred_host_operations.rs +++ b/ash/src/extensions/khr/deferred_host_operations.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/display_swapchain.rs b/ash/src/extensions/khr/display_swapchain.rs index 2bc7f2a..ef8b975 100755 --- a/ash/src/extensions/khr/display_swapchain.rs +++ b/ash/src/extensions/khr/display_swapchain.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/draw_indirect_count.rs b/ash/src/extensions/khr/draw_indirect_count.rs index d6f8ae2..2aa325a 100644 --- a/ash/src/extensions/khr/draw_indirect_count.rs +++ b/ash/src/extensions/khr/draw_indirect_count.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; diff --git a/ash/src/extensions/khr/get_memory_requirements2.rs b/ash/src/extensions/khr/get_memory_requirements2.rs index 8112f92..bdc7bfa 100644 --- a/ash/src/extensions/khr/get_memory_requirements2.rs +++ b/ash/src/extensions/khr/get_memory_requirements2.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; @@ -27,7 +26,7 @@ impl GetMemoryRequirements2 { } #[doc = ""] - unsafe fn get_buffer_memory_requirements2( + pub unsafe fn get_buffer_memory_requirements2( &self, info: &vk::BufferMemoryRequirementsInfo2KHR, memory_requirements: &mut vk::MemoryRequirements2KHR, @@ -37,7 +36,7 @@ impl GetMemoryRequirements2 { } #[doc = ""] - unsafe fn get_image_memory_requirements2( + pub unsafe fn get_image_memory_requirements2( &self, info: &vk::ImageMemoryRequirementsInfo2KHR, memory_requirements: &mut vk::MemoryRequirements2KHR, @@ -46,7 +45,7 @@ impl GetMemoryRequirements2 { .get_image_memory_requirements2_khr(self.handle, info, memory_requirements); } - unsafe fn get_image_sparse_memory_requirements2_len( + pub unsafe fn get_image_sparse_memory_requirements2_len( &self, info: &vk::ImageSparseMemoryRequirementsInfo2KHR, ) -> usize { @@ -62,7 +61,7 @@ impl GetMemoryRequirements2 { } #[doc = ""] - unsafe fn get_image_sparse_memory_requirements2( + pub unsafe fn get_image_sparse_memory_requirements2( &self, info: &vk::ImageSparseMemoryRequirementsInfo2KHR, sparse_memory_requirements: &mut [vk::SparseImageMemoryRequirements2KHR], diff --git a/ash/src/extensions/khr/get_physical_device_properties2.rs b/ash/src/extensions/khr/get_physical_device_properties2.rs index 82c7499..57609fa 100644 --- a/ash/src/extensions/khr/get_physical_device_properties2.rs +++ b/ash/src/extensions/khr/get_physical_device_properties2.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::{EntryCustom, Instance}; @@ -29,7 +28,7 @@ impl GetPhysicalDeviceProperties2 { } #[doc = ""] - unsafe fn get_physical_device_features2( + pub unsafe fn get_physical_device_features2( &self, physical_device: vk::PhysicalDevice, features: &mut vk::PhysicalDeviceFeatures2KHR, @@ -39,7 +38,7 @@ impl GetPhysicalDeviceProperties2 { } #[doc = ""] - unsafe fn get_physical_device_format_properties2( + pub unsafe fn get_physical_device_format_properties2( &self, physical_device: vk::PhysicalDevice, format: vk::Format, @@ -50,7 +49,7 @@ impl GetPhysicalDeviceProperties2 { } #[doc = ""] - unsafe fn get_physical_device_image_format_properties2( + pub unsafe fn get_physical_device_image_format_properties2( &self, physical_device: vk::PhysicalDevice, image_format_info: &vk::PhysicalDeviceImageFormatInfo2KHR, @@ -66,7 +65,7 @@ impl GetPhysicalDeviceProperties2 { } #[doc = ""] - unsafe fn get_physical_device_memory_properties2( + pub unsafe fn get_physical_device_memory_properties2( &self, physical_device: vk::PhysicalDevice, memory_properties: &mut vk::PhysicalDeviceMemoryProperties2KHR, @@ -76,7 +75,7 @@ impl GetPhysicalDeviceProperties2 { } #[doc = ""] - unsafe fn get_physical_device_properties2( + pub unsafe fn get_physical_device_properties2( &self, physical_device: vk::PhysicalDevice, properties: &mut vk::PhysicalDeviceProperties2KHR, @@ -85,7 +84,7 @@ impl GetPhysicalDeviceProperties2 { .get_physical_device_properties2_khr(physical_device, properties); } - unsafe fn get_physical_device_queue_family_properties2_len( + pub unsafe fn get_physical_device_queue_family_properties2_len( &self, physical_device: vk::PhysicalDevice, ) -> usize { @@ -100,7 +99,7 @@ impl GetPhysicalDeviceProperties2 { } #[doc = ""] - unsafe fn get_physical_device_queue_family_properties2( + pub unsafe fn get_physical_device_queue_family_properties2( &self, physical_device: vk::PhysicalDevice, queue_family_properties: &mut [vk::QueueFamilyProperties2KHR], @@ -114,7 +113,7 @@ impl GetPhysicalDeviceProperties2 { ); } - unsafe fn get_physical_device_sparse_image_format_properties2_len( + pub unsafe fn get_physical_device_sparse_image_format_properties2_len( &self, physical_device: vk::PhysicalDevice, format_info: &vk::PhysicalDeviceSparseImageFormatInfo2KHR, @@ -131,7 +130,7 @@ impl GetPhysicalDeviceProperties2 { } #[doc = ""] - unsafe fn get_physical_device_sparse_image_format_properties2( + pub unsafe fn get_physical_device_sparse_image_format_properties2( &self, physical_device: vk::PhysicalDevice, format_info: &vk::PhysicalDeviceSparseImageFormatInfo2KHR, diff --git a/ash/src/extensions/khr/maintenance1.rs b/ash/src/extensions/khr/maintenance1.rs index 2480143..cea9709 100644 --- a/ash/src/extensions/khr/maintenance1.rs +++ b/ash/src/extensions/khr/maintenance1.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; @@ -26,7 +25,7 @@ impl Maintenance1 { } #[doc = ""] - unsafe fn trim_command_pool( + pub unsafe fn trim_command_pool( &self, command_pool: vk::CommandPool, flags: vk::CommandPoolTrimFlagsKHR, diff --git a/ash/src/extensions/khr/maintenance3.rs b/ash/src/extensions/khr/maintenance3.rs index ad6c3c6..4d8d72d 100644 --- a/ash/src/extensions/khr/maintenance3.rs +++ b/ash/src/extensions/khr/maintenance3.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; @@ -26,7 +25,7 @@ impl Maintenance3 { } #[doc = ""] - unsafe fn get_descriptor_set_layout_support( + pub unsafe fn get_descriptor_set_layout_support( &self, create_info: &vk::DescriptorSetLayoutCreateInfo, out: &mut vk::DescriptorSetLayoutSupportKHR, diff --git a/ash/src/extensions/khr/pipeline_executable_properties.rs b/ash/src/extensions/khr/pipeline_executable_properties.rs index 88a9e67..51dd53c 100644 --- a/ash/src/extensions/khr/pipeline_executable_properties.rs +++ b/ash/src/extensions/khr/pipeline_executable_properties.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::{EntryCustom, Instance}; diff --git a/ash/src/extensions/khr/push_descriptor.rs b/ash/src/extensions/khr/push_descriptor.rs index 9fc221d..eb90c97 100644 --- a/ash/src/extensions/khr/push_descriptor.rs +++ b/ash/src/extensions/khr/push_descriptor.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::c_void; diff --git a/ash/src/extensions/khr/ray_tracing_pipeline.rs b/ash/src/extensions/khr/ray_tracing_pipeline.rs index 6d2786b..97edad7 100644 --- a/ash/src/extensions/khr/ray_tracing_pipeline.rs +++ b/ash/src/extensions/khr/ray_tracing_pipeline.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/surface.rs b/ash/src/extensions/khr/surface.rs index 791ccb0..b0fd698 100755 --- a/ash/src/extensions/khr/surface.rs +++ b/ash/src/extensions/khr/surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/swapchain.rs b/ash/src/extensions/khr/swapchain.rs index 2767f28..5e59dc2 100755 --- a/ash/src/extensions/khr/swapchain.rs +++ b/ash/src/extensions/khr/swapchain.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/timeline_semaphore.rs b/ash/src/extensions/khr/timeline_semaphore.rs index 1b1806e..fca074e 100644 --- a/ash/src/extensions/khr/timeline_semaphore.rs +++ b/ash/src/extensions/khr/timeline_semaphore.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::{EntryCustom, Instance}; diff --git a/ash/src/extensions/khr/wayland_surface.rs b/ash/src/extensions/khr/wayland_surface.rs index e49d8b9..48ed12f 100755 --- a/ash/src/extensions/khr/wayland_surface.rs +++ b/ash/src/extensions/khr/wayland_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/win32_surface.rs b/ash/src/extensions/khr/win32_surface.rs index 155d957..c394cea 100755 --- a/ash/src/extensions/khr/win32_surface.rs +++ b/ash/src/extensions/khr/win32_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/xcb_surface.rs b/ash/src/extensions/khr/xcb_surface.rs index 78d7ca3..2c01293 100755 --- a/ash/src/extensions/khr/xcb_surface.rs +++ b/ash/src/extensions/khr/xcb_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/khr/xlib_surface.rs b/ash/src/extensions/khr/xlib_surface.rs index 1ba318d..033a28d 100755 --- a/ash/src/extensions/khr/xlib_surface.rs +++ b/ash/src/extensions/khr/xlib_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/mvk/ios_surface.rs b/ash/src/extensions/mvk/ios_surface.rs index 08544b6..a8491f2 100755 --- a/ash/src/extensions/mvk/ios_surface.rs +++ b/ash/src/extensions/mvk/ios_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/mvk/macos_surface.rs b/ash/src/extensions/mvk/macos_surface.rs index dc003d0..31ca0de 100755 --- a/ash/src/extensions/mvk/macos_surface.rs +++ b/ash/src/extensions/mvk/macos_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/nn/vi_surface.rs b/ash/src/extensions/nn/vi_surface.rs index 19040aa..e3ade6f 100644 --- a/ash/src/extensions/nn/vi_surface.rs +++ b/ash/src/extensions/nn/vi_surface.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/extensions/nv/device_diagnostic_checkpoints.rs b/ash/src/extensions/nv/device_diagnostic_checkpoints.rs index 137a443..8465aba 100644 --- a/ash/src/extensions/nv/device_diagnostic_checkpoints.rs +++ b/ash/src/extensions/nv/device_diagnostic_checkpoints.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; diff --git a/ash/src/extensions/nv/mesh_shader.rs b/ash/src/extensions/nv/mesh_shader.rs index 388f473..95e2375 100755 --- a/ash/src/extensions/nv/mesh_shader.rs +++ b/ash/src/extensions/nv/mesh_shader.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::vk; use crate::{Device, Instance}; use std::ffi::CStr; diff --git a/ash/src/extensions/nv/ray_tracing.rs b/ash/src/extensions/nv/ray_tracing.rs index 6f5fc62..6b430a2 100755 --- a/ash/src/extensions/nv/ray_tracing.rs +++ b/ash/src/extensions/nv/ray_tracing.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::prelude::*; use crate::vk; use crate::RawPtr; diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 78b174f..04d3018 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use crate::device::Device; use crate::prelude::*; use crate::vk;