diff --git a/ash/src/extensions/ext/debug_marker.rs b/ash/src/extensions/ext/debug_marker.rs index fe954e9..529c412 100644 --- a/ash/src/extensions/ext/debug_marker.rs +++ b/ash/src/extensions/ext/debug_marker.rs @@ -21,7 +21,7 @@ impl DebugMarker { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_EXT_debug_marker\0").expect("Wrong extension string") + vk::ExtDebugMarkerFn::name() } pub unsafe fn debug_marker_set_object_name( diff --git a/ash/src/extensions/ext/debug_report.rs b/ash/src/extensions/ext/debug_report.rs index ec8e147..5b44d1a 100644 --- a/ash/src/extensions/ext/debug_report.rs +++ b/ash/src/extensions/ext/debug_report.rs @@ -24,7 +24,7 @@ impl DebugReport { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_EXT_debug_report\0").expect("Wrong extension string") + vk::ExtDebugReportFn::name() } pub unsafe fn destroy_debug_report_callback( diff --git a/ash/src/extensions/ext/debug_utils.rs b/ash/src/extensions/ext/debug_utils.rs index 443e688..bbe5bc2 100644 --- a/ash/src/extensions/ext/debug_utils.rs +++ b/ash/src/extensions/ext/debug_utils.rs @@ -23,7 +23,7 @@ impl DebugUtils { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_EXT_debug_utils\0").expect("Wrong extension string") + vk::ExtDebugUtilsFn::name() } pub unsafe fn debug_utils_set_object_name( diff --git a/ash/src/extensions/ext/descriptor_indexing.rs b/ash/src/extensions/ext/descriptor_indexing.rs deleted file mode 100644 index daa448b..0000000 --- a/ash/src/extensions/ext/descriptor_indexing.rs +++ /dev/null @@ -1,10 +0,0 @@ -use std::ffi::CStr; - -#[derive(Clone)] -pub struct DescriptorIndexing {} - -impl DescriptorIndexing { - pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_EXT_descriptor_indexing\0").expect("Wrong extension string") - } -} diff --git a/ash/src/extensions/ext/mod.rs b/ash/src/extensions/ext/mod.rs index 33a4f43..eba690f 100644 --- a/ash/src/extensions/ext/mod.rs +++ b/ash/src/extensions/ext/mod.rs @@ -1,9 +1,7 @@ pub use self::debug_marker::DebugMarker; pub use self::debug_report::DebugReport; pub use self::debug_utils::DebugUtils; -pub use self::descriptor_indexing::DescriptorIndexing; mod debug_marker; mod debug_report; mod debug_utils; -mod descriptor_indexing; diff --git a/ash/src/extensions/khr/android_surface.rs b/ash/src/extensions/khr/android_surface.rs index 0ceade6..4fa6438 100644 --- a/ash/src/extensions/khr/android_surface.rs +++ b/ash/src/extensions/khr/android_surface.rs @@ -24,7 +24,7 @@ impl AndroidSurface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_android_surface\0").expect("Wrong extension string") + vk::KhrAndroidSurfaceFn::name() } pub unsafe fn create_android_surface( diff --git a/ash/src/extensions/khr/display_swapchain.rs b/ash/src/extensions/khr/display_swapchain.rs index dfe1820..ca056d1 100644 --- a/ash/src/extensions/khr/display_swapchain.rs +++ b/ash/src/extensions/khr/display_swapchain.rs @@ -24,7 +24,7 @@ impl DisplaySwapchain { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_display_swapchain\0").expect("Wrong extension string") + vk::KhrDisplaySwapchainFn::name() } pub unsafe fn create_shared_swapchains( diff --git a/ash/src/extensions/khr/mod.rs b/ash/src/extensions/khr/mod.rs index 75bdb38..8812674 100644 --- a/ash/src/extensions/khr/mod.rs +++ b/ash/src/extensions/khr/mod.rs @@ -15,25 +15,3 @@ mod wayland_surface; mod win32_surface; mod xcb_surface; mod xlib_surface; - -pub fn memory_requirements2_name() -> &'static std::ffi::CStr { - std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_get_memory_requirements2\0") - .expect("Wrong extension string") -} - -pub fn physical_device_properties2_name() -> &'static std::ffi::CStr { - std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_get_physical_device_properties2\0") - .expect("Wrong extension string") -} - -pub fn maintenance1_name() -> &'static std::ffi::CStr { - std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_maintenance1\0").expect("Wrong extension string") -} - -pub fn maintenance2_name() -> &'static std::ffi::CStr { - std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_maintenance2\0").expect("Wrong extension string") -} - -pub fn maintenance3_name() -> &'static std::ffi::CStr { - std::ffi::CStr::from_bytes_with_nul(b"VK_KHR_maintenance3\0").expect("Wrong extension string") -} diff --git a/ash/src/extensions/khr/surface.rs b/ash/src/extensions/khr/surface.rs index bfcaca4..3e0648e 100644 --- a/ash/src/extensions/khr/surface.rs +++ b/ash/src/extensions/khr/surface.rs @@ -25,7 +25,7 @@ impl Surface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_surface\0").expect("Wrong extension string") + vk::KhrSurfaceFn::name() } pub unsafe fn get_physical_device_surface_support( diff --git a/ash/src/extensions/khr/swapchain.rs b/ash/src/extensions/khr/swapchain.rs index fb24d59..aedcb8c 100644 --- a/ash/src/extensions/khr/swapchain.rs +++ b/ash/src/extensions/khr/swapchain.rs @@ -25,7 +25,7 @@ impl Swapchain { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_swapchain\0").expect("Wrong extension string") + vk::KhrSwapchainFn::name() } pub unsafe fn destroy_swapchain( diff --git a/ash/src/extensions/khr/wayland_surface.rs b/ash/src/extensions/khr/wayland_surface.rs index 7a1608c..5308706 100644 --- a/ash/src/extensions/khr/wayland_surface.rs +++ b/ash/src/extensions/khr/wayland_surface.rs @@ -24,7 +24,7 @@ impl WaylandSurface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_wayland_surface\0").expect("Wrong extension string") + vk::KhrWaylandSurfaceFn::name() } pub unsafe fn create_wayland_surface( diff --git a/ash/src/extensions/khr/win32_surface.rs b/ash/src/extensions/khr/win32_surface.rs index 86daec6..e32f046 100644 --- a/ash/src/extensions/khr/win32_surface.rs +++ b/ash/src/extensions/khr/win32_surface.rs @@ -24,7 +24,7 @@ impl Win32Surface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_win32_surface\0").expect("Wrong extension string") + vk::KhrWin32SurfaceFn::name() } pub unsafe fn create_win32_surface( diff --git a/ash/src/extensions/khr/xcb_surface.rs b/ash/src/extensions/khr/xcb_surface.rs index e3a662d..ede5859 100644 --- a/ash/src/extensions/khr/xcb_surface.rs +++ b/ash/src/extensions/khr/xcb_surface.rs @@ -24,7 +24,7 @@ impl XcbSurface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_xcb_surface\0").expect("Wrong extension string") + vk::KhrXcbSurfaceFn::name() } pub unsafe fn create_xcb_surface( diff --git a/ash/src/extensions/khr/xlib_surface.rs b/ash/src/extensions/khr/xlib_surface.rs index ffd9ab1..32ab541 100644 --- a/ash/src/extensions/khr/xlib_surface.rs +++ b/ash/src/extensions/khr/xlib_surface.rs @@ -24,7 +24,7 @@ impl XlibSurface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_xlib_surface\0").expect("Wrong extension string") + vk::KhrXlibSurfaceFn::name() } pub unsafe fn create_xlib_surface( diff --git a/ash/src/extensions/mvk/ios_surface.rs b/ash/src/extensions/mvk/ios_surface.rs index 1d7a234..a1ffd93 100644 --- a/ash/src/extensions/mvk/ios_surface.rs +++ b/ash/src/extensions/mvk/ios_surface.rs @@ -24,7 +24,7 @@ impl IOSSurface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_MVK_IOS_surface\0").expect("Wrong extension string") + vk::MvkIosSurfaceFn::name() } pub unsafe fn create_ios_surface_mvk( diff --git a/ash/src/extensions/mvk/macos_surface.rs b/ash/src/extensions/mvk/macos_surface.rs index 8264c95..9fc1910 100644 --- a/ash/src/extensions/mvk/macos_surface.rs +++ b/ash/src/extensions/mvk/macos_surface.rs @@ -24,7 +24,7 @@ impl MacOSSurface { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_MVK_macos_surface\0").expect("Wrong extension string") + vk::MvkMacosSurfaceFn::name() } pub unsafe fn create_mac_os_surface_mvk( diff --git a/ash/src/extensions/nv/mesh_shader.rs b/ash/src/extensions/nv/mesh_shader.rs index db08f83..9e00e6b 100644 --- a/ash/src/extensions/nv/mesh_shader.rs +++ b/ash/src/extensions/nv/mesh_shader.rs @@ -62,6 +62,6 @@ impl MeshShader { ); } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_NV_mesh_shader\0").expect("Wrong extension string") + vk::NvMeshShaderFn::name() } } diff --git a/ash/src/extensions/nv/ray_tracing.rs b/ash/src/extensions/nv/ray_tracing.rs index 48952cd..f6fb8d1 100644 --- a/ash/src/extensions/nv/ray_tracing.rs +++ b/ash/src/extensions/nv/ray_tracing.rs @@ -258,6 +258,6 @@ impl RayTracing { } pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_NV_ray_tracing\0").expect("Wrong extension string") + vk::NvRayTracingFn::name() } }