From 33dc8bff8f74c7362647a98f51a3911dba55e9b6 Mon Sep 17 00:00:00 2001 From: Maik Klein Date: Tue, 2 Oct 2018 15:23:38 +0200 Subject: [PATCH] Remove the mir sufrace extension because it has been deprecated --- ash/src/extensions/mir_surface.rs | 50 ------------------------------- ash/src/extensions/mod.rs | 2 -- 2 files changed, 52 deletions(-) delete mode 100644 ash/src/extensions/mir_surface.rs diff --git a/ash/src/extensions/mir_surface.rs b/ash/src/extensions/mir_surface.rs deleted file mode 100644 index 3f36a1e..0000000 --- a/ash/src/extensions/mir_surface.rs +++ /dev/null @@ -1,50 +0,0 @@ -#![allow(dead_code)] -use prelude::*; -use std::ffi::CStr; -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::KhrMirSurfaceFn, -} - -impl MirSurface { - pub fn new( - entry: &E, - instance: &I, - ) -> Result> { - let surface_fn = vk::KhrMirSurfaceFn::load(|name| unsafe { - mem::transmute(entry.get_instance_proc_addr(instance.handle(), name.as_ptr())) - })?; - Ok(MirSurface { - handle: instance.handle(), - mir_surface_fn: surface_fn, - }) - } - - pub fn name() -> &'static CStr { - CStr::from_bytes_with_nul(b"VK_KHR_mir_surface\0").expect("Wrong extension string") - } - - pub unsafe fn create_mir_surface_khr( - &self, - create_info: &vk::MirSurfaceCreateInfoKHR, - allocation_callbacks: Option<&vk::AllocationCallbacks>, - ) -> VkResult { - let mut surface = mem::uninitialized(); - let err_code = self.mir_surface_fn.create_mir_surface_khr( - self.handle, - create_info, - allocation_callbacks.as_raw_ptr(), - &mut surface, - ); - match err_code { - vk::Result::SUCCESS => Ok(surface), - _ => Err(err_code), - } - } -} diff --git a/ash/src/extensions/mod.rs b/ash/src/extensions/mod.rs index db61e32..dc41390 100644 --- a/ash/src/extensions/mod.rs +++ b/ash/src/extensions/mod.rs @@ -5,7 +5,6 @@ pub use self::debug_utils::DebugUtils; 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; @@ -20,7 +19,6 @@ mod debug_utils; mod display_swapchain; mod ios_surface; mod macos_surface; -mod mir_surface; mod surface; mod swapchain; mod wayland_surface;