Remove extension names from mod.rs and make all extensions use auto-generated names

This commit is contained in:
Graham Wihlidal 2019-02-14 12:03:41 +01:00
parent b253d39abe
commit ff44b2cb16
18 changed files with 15 additions and 49 deletions

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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")
}
}

View file

@ -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;

View file

@ -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(

View file

@ -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(

View file

@ -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")
}

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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(

View file

@ -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()
}
}

View file

@ -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()
}
}