diff --git a/ash/src/extensions/android_surface.rs b/ash/src/extensions/android_surface.rs index ec6869c..a56cf08 100644 --- a/ash/src/extensions/android_surface.rs +++ b/ash/src/extensions/android_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct AndroidSurface { handle: vk::Instance, - android_surface_fn: vk::AndroidSurfaceFn, + android_surface_fn: vk::KhrAndroidSurfaceFn, } impl AndroidSurface { @@ -17,7 +17,7 @@ impl AndroidSurface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::AndroidSurfaceFn::load(|name| unsafe { + let surface_fn = vk::KhrAndroidSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(AndroidSurface { diff --git a/ash/src/extensions/debug_marker.rs b/ash/src/extensions/debug_marker.rs index 874a238..13a9d33 100644 --- a/ash/src/extensions/debug_marker.rs +++ b/ash/src/extensions/debug_marker.rs @@ -1,13 +1,13 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; +use std::mem; use version::{DeviceV1_0, InstanceV1_0}; +use vk; #[derive(Clone)] pub struct DebugMarker { - debug_marker_fn: vk::DebugMarkerFn, + debug_marker_fn: vk::ExtDebugMarkerFn, } impl DebugMarker { @@ -15,7 +15,7 @@ impl DebugMarker { instance: &I, device: &D, ) -> Result> { - let debug_marker_fn = vk::DebugMarkerFn::load(|name| unsafe { + let debug_marker_fn = vk::ExtDebugMarkerFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) })?; Ok(DebugMarker { @@ -32,7 +32,8 @@ impl DebugMarker { device: vk::Device, name_info: &vk::DebugMarkerObjectNameInfoEXT, ) -> VkResult<()> { - let err_code = self.debug_marker_fn + let err_code = self + .debug_marker_fn .debug_marker_set_object_name_ext(device, name_info); match err_code { vk::Result::Success => Ok(()), diff --git a/ash/src/extensions/debug_report.rs b/ash/src/extensions/debug_report.rs index 1fd3f8c..335e248 100644 --- a/ash/src/extensions/debug_report.rs +++ b/ash/src/extensions/debug_report.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct DebugReport { handle: vk::Instance, - debug_report_fn: vk::DebugReportFn, + debug_report_fn: vk::ExtDebugReportFn, } impl DebugReport { @@ -17,7 +17,7 @@ impl DebugReport { entry: &E, instance: &I, ) -> Result> { - let debug_report_fn = vk::DebugReportFn::load(|name| unsafe { + let debug_report_fn = vk::ExtDebugReportFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(DebugReport { diff --git a/ash/src/extensions/display_swapchain.rs b/ash/src/extensions/display_swapchain.rs index 3fb0a22..1798f8d 100644 --- a/ash/src/extensions/display_swapchain.rs +++ b/ash/src/extensions/display_swapchain.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{DeviceV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct DisplaySwapchain { handle: vk::Device, - swapchain_fn: vk::DisplaySwapchainFn, + swapchain_fn: vk::KhrDisplaySwapchainFn, } impl DisplaySwapchain { @@ -17,7 +17,7 @@ impl DisplaySwapchain { instance: &I, device: &D, ) -> Result> { - let swapchain_fn = vk::DisplaySwapchainFn::load(|name| unsafe { + let swapchain_fn = vk::KhrDisplaySwapchainFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) })?; Ok(DisplaySwapchain { diff --git a/ash/src/extensions/ios_surface.rs b/ash/src/extensions/ios_surface.rs index 1c477b0..4a89c68 100644 --- a/ash/src/extensions/ios_surface.rs +++ b/ash/src/extensions/ios_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct IOSSurface { handle: vk::Instance, - ios_surface_fn: vk::IOSSurfaceFn, + ios_surface_fn: vk::MvkIosSurfaceFn, } impl IOSSurface { @@ -17,7 +17,7 @@ impl IOSSurface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::IOSSurfaceFn::load(|name| unsafe { + let surface_fn = vk::MvkIosSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(IOSSurface { diff --git a/ash/src/extensions/macos_surface.rs b/ash/src/extensions/macos_surface.rs index ed8abba..e9cb705 100644 --- a/ash/src/extensions/macos_surface.rs +++ b/ash/src/extensions/macos_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct MacOSSurface { handle: vk::Instance, - macos_surface_fn: vk::MacOSSurfaceFn, + macos_surface_fn: vk::MvkMacosSurfaceFn, } impl MacOSSurface { @@ -17,7 +17,7 @@ impl MacOSSurface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::MacOSSurfaceFn::load(|name| unsafe { + let surface_fn = vk::MvkMacosSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(MacOSSurface { @@ -30,13 +30,13 @@ impl MacOSSurface { CStr::from_bytes_with_nul(b"VK_MVK_macos_surface\0").expect("Wrong extension string") } - pub unsafe fn create_macos_surface_mvk( + pub unsafe fn create_mac_os_surface_mvk( &self, create_info: &vk::MacOSSurfaceCreateInfoMVK, allocation_callbacks: Option<&vk::AllocationCallbacks>, ) -> VkResult { let mut surface = mem::uninitialized(); - let err_code = self.macos_surface_fn.create_macos_surface_mvk( + let err_code = self.macos_surface_fn.create_mac_os_surface_mvk( self.handle, create_info, allocation_callbacks.as_raw_ptr(), diff --git a/ash/src/extensions/mir_surface.rs b/ash/src/extensions/mir_surface.rs index 679dd43..0281a5f 100644 --- a/ash/src/extensions/mir_surface.rs +++ b/ash/src/extensions/mir_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct MirSurface { handle: vk::Instance, - mir_surface_fn: vk::MirSurfaceFn, + mir_surface_fn: vk::KhrMirSurfaceFn, } impl MirSurface { @@ -17,7 +17,7 @@ impl MirSurface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::MirSurfaceFn::load(|name| unsafe { + let surface_fn = vk::KhrMirSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(MirSurface { diff --git a/ash/src/extensions/mod.rs b/ash/src/extensions/mod.rs index b5f2a14..cab1e06 100644 --- a/ash/src/extensions/mod.rs +++ b/ash/src/extensions/mod.rs @@ -1,27 +1,27 @@ -pub use self::swapchain::Swapchain; -pub use self::display_swapchain::DisplaySwapchain; -pub use self::surface::Surface; -pub use self::xlib_surface::XlibSurface; +pub use self::android_surface::AndroidSurface; pub use self::debug_marker::DebugMarker; pub use self::debug_report::DebugReport; -pub use self::win32_surface::Win32Surface; -pub use self::mir_surface::MirSurface; -pub use self::xcb_surface::XcbSurface; -pub use self::wayland_surface::WaylandSurface; -pub use self::android_surface::AndroidSurface; -pub use self::macos_surface::MacOSSurface; +pub use self::display_swapchain::DisplaySwapchain; pub use self::ios_surface::IOSSurface; +pub use self::macos_surface::MacOSSurface; +pub use self::mir_surface::MirSurface; +pub use self::surface::Surface; +pub use self::swapchain::Swapchain; +pub use self::wayland_surface::WaylandSurface; +pub use self::win32_surface::Win32Surface; +pub use self::xcb_surface::XcbSurface; +pub use self::xlib_surface::XlibSurface; -mod swapchain; -mod display_swapchain; -mod surface; -mod xlib_surface; -mod win32_surface; +mod android_surface; mod debug_marker; mod debug_report; -mod mir_surface; -mod android_surface; -mod wayland_surface; -mod xcb_surface; -mod macos_surface; +mod display_swapchain; mod ios_surface; +mod macos_surface; +mod mir_surface; +mod surface; +mod swapchain; +mod wayland_surface; +mod win32_surface; +mod xcb_surface; +mod xlib_surface; diff --git a/ash/src/extensions/surface.rs b/ash/src/extensions/surface.rs index 1c8f5c6..c8db6b6 100644 --- a/ash/src/extensions/surface.rs +++ b/ash/src/extensions/surface.rs @@ -1,16 +1,16 @@ #![allow(dead_code)] use prelude::*; -use std::ptr; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; +use std::ptr; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct Surface { handle: vk::Instance, - surface_fn: vk::SurfaceFn, + surface_fn: vk::KhrSurfaceFn, } impl Surface { @@ -18,7 +18,7 @@ impl Surface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::SurfaceFn::load(|name| unsafe { + let surface_fn = vk::KhrSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(Surface { @@ -63,7 +63,8 @@ impl Surface { ptr::null_mut(), ); let mut v = Vec::with_capacity(count as usize); - let err_code = self.surface_fn + let err_code = self + .surface_fn .get_physical_device_surface_present_modes_khr( physical_device, surface, @@ -85,7 +86,8 @@ impl Surface { ) -> VkResult { unsafe { let mut surface_capabilities = mem::uninitialized(); - let err_code = self.surface_fn + let err_code = self + .surface_fn .get_physical_device_surface_capabilities_khr( physical_device, surface, diff --git a/ash/src/extensions/swapchain.rs b/ash/src/extensions/swapchain.rs index 988c324..7d120bd 100644 --- a/ash/src/extensions/swapchain.rs +++ b/ash/src/extensions/swapchain.rs @@ -1,16 +1,16 @@ #![allow(dead_code)] use prelude::*; -use std::ptr; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; +use std::ptr; use version::{DeviceV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct Swapchain { handle: vk::Device, - swapchain_fn: vk::SwapchainFn, + swapchain_fn: vk::KhrSwapchainFn, } impl Swapchain { @@ -18,7 +18,7 @@ impl Swapchain { instance: &I, device: &D, ) -> Result> { - let swapchain_fn = vk::SwapchainFn::load(|name| unsafe { + let swapchain_fn = vk::KhrSwapchainFn::load(|name| unsafe { mem::transmute(instance.get_device_proc_addr(device.handle(), name.as_ptr())) })?; Ok(Swapchain { diff --git a/ash/src/extensions/wayland_surface.rs b/ash/src/extensions/wayland_surface.rs index 855b7df..6c96fcc 100644 --- a/ash/src/extensions/wayland_surface.rs +++ b/ash/src/extensions/wayland_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct WaylandSurface { handle: vk::Instance, - wayland_surface_fn: vk::WaylandSurfaceFn, + wayland_surface_fn: vk::KhrWaylandSurfaceFn, } impl WaylandSurface { @@ -17,7 +17,7 @@ impl WaylandSurface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::WaylandSurfaceFn::load(|name| unsafe { + let surface_fn = vk::KhrWaylandSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(WaylandSurface { diff --git a/ash/src/extensions/win32_surface.rs b/ash/src/extensions/win32_surface.rs index c2439f9..e24404f 100644 --- a/ash/src/extensions/win32_surface.rs +++ b/ash/src/extensions/win32_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct Win32Surface { handle: vk::Instance, - win32_surface_fn: vk::Win32SurfaceFn, + win32_surface_fn: vk::KhrWin32SurfaceFn, } impl Win32Surface { @@ -17,7 +17,7 @@ impl Win32Surface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::Win32SurfaceFn::load(|name| unsafe { + let surface_fn = vk::KhrWin32SurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(Win32Surface { diff --git a/ash/src/extensions/xcb_surface.rs b/ash/src/extensions/xcb_surface.rs index 04fb2a6..e3906e3 100644 --- a/ash/src/extensions/xcb_surface.rs +++ b/ash/src/extensions/xcb_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct XcbSurface { handle: vk::Instance, - xcb_surface_fn: vk::XcbSurfaceFn, + xcb_surface_fn: vk::KhrXcbSurfaceFn, } impl XcbSurface { @@ -17,7 +17,7 @@ impl XcbSurface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::XcbSurfaceFn::load(|name| unsafe { + let surface_fn = vk::KhrXcbSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(XcbSurface { diff --git a/ash/src/extensions/xlib_surface.rs b/ash/src/extensions/xlib_surface.rs index 76bcb9c..cc4c1da 100644 --- a/ash/src/extensions/xlib_surface.rs +++ b/ash/src/extensions/xlib_surface.rs @@ -1,15 +1,15 @@ #![allow(dead_code)] use prelude::*; -use std::mem; -use vk; use std::ffi::CStr; -use RawPtr; +use std::mem; use version::{EntryV1_0, InstanceV1_0}; +use vk; +use RawPtr; #[derive(Clone)] pub struct XlibSurface { handle: vk::Instance, - xlib_surface_fn: vk::XlibSurfaceFn, + xlib_surface_fn: vk::KhrXlibSurfaceFn, } impl XlibSurface { @@ -17,7 +17,7 @@ impl XlibSurface { entry: &E, instance: &I, ) -> Result> { - let surface_fn = vk::XlibSurfaceFn::load(|name| unsafe { + let surface_fn = vk::KhrXlibSurfaceFn::load(|name| unsafe { mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) })?; Ok(XlibSurface {