mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
Removed mir support (#1060)
This commit is contained in:
parent
080779c2e9
commit
b6c4d84e61
@ -1,5 +1,6 @@
|
||||
# Unreleased (Breaking)
|
||||
|
||||
- Removed mir support, as it is being removed from the vulkan spec.
|
||||
- Remove vulkano_shaders::build_glsl_shaders
|
||||
- Split `PersistentDescriptorSetError::MissingUsage` into `MissingImageUsage` and `MissingBufferUsage`
|
||||
each with a matching enum indicating the usage that was missing.
|
||||
|
@ -161,7 +161,6 @@ pub const STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: u32 = 1000003000;
|
||||
pub const STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR: u32 = 1000004000;
|
||||
pub const STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR: u32 = 1000005000;
|
||||
pub const STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR: u32 = 1000006000;
|
||||
pub const STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR: u32 = 1000007000;
|
||||
pub const STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR: u32 = 1000008000;
|
||||
pub const STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR: u32 = 1000009000;
|
||||
#[deprecated(note = "Use STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT instead")]
|
||||
@ -2394,18 +2393,6 @@ pub struct WaylandSurfaceCreateInfoKHR {
|
||||
pub surface: *mut c_void,
|
||||
}
|
||||
|
||||
|
||||
pub type MirSurfaceCreateFlagsKHR = Flags;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct MirSurfaceCreateInfoKHR {
|
||||
pub sType: StructureType,
|
||||
pub pNext: *const c_void,
|
||||
pub flags: MirSurfaceCreateFlagsKHR,
|
||||
pub connection: *mut c_void,
|
||||
pub mirSurface: *mut c_void,
|
||||
}
|
||||
|
||||
pub type AndroidSurfaceCreateFlagsKHR = Flags;
|
||||
|
||||
#[repr(C)]
|
||||
@ -2757,8 +2744,6 @@ ptrs!(InstancePointers, {
|
||||
GetPhysicalDeviceXcbPresentationSupportKHR => (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, connection: *mut c_void, visual_id: u32 /* FIXME: xcb_visualid */) -> Bool32,
|
||||
CreateWaylandSurfaceKHR => (instance: Instance, pCreateInfo: *const WaylandSurfaceCreateInfoKHR, pAllocator: *const AllocationCallbacks, pSurface: *mut SurfaceKHR) -> Result,
|
||||
GetPhysicalDeviceWaylandPresentationSupportKHR => (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, display: *mut c_void) -> Bool32,
|
||||
CreateMirSurfaceKHR => (instance: Instance, pCreateInfo: *const MirSurfaceCreateInfoKHR, pAllocator: *const AllocationCallbacks, pSurface: *mut SurfaceKHR) -> Result,
|
||||
GetPhysicalDeviceMirPresentationSupportKHR => (physicalDevice: PhysicalDevice, queueFamilyIndex: u32, connection: *mut c_void) -> Bool32,
|
||||
CreateAndroidSurfaceKHR => (instance: Instance, pCreateInfo: *const AndroidSurfaceCreateInfoKHR, pAllocator: *const AllocationCallbacks, pSurface: *mut SurfaceKHR) -> Result,
|
||||
CreateWin32SurfaceKHR => (instance: Instance, pCreateInfo: *const Win32SurfaceCreateInfoKHR, pAllocator: *const AllocationCallbacks, pSurface: *mut SurfaceKHR) -> Result,
|
||||
GetPhysicalDeviceWin32PresentationSupportKHR => (physicalDevice: PhysicalDevice, queueFamilyIndex: u32) -> Bool32,
|
||||
|
@ -41,7 +41,6 @@ pub fn required_extensions() -> InstanceExtensions {
|
||||
khr_xlib_surface: true,
|
||||
khr_xcb_surface: true,
|
||||
khr_wayland_surface: true,
|
||||
khr_mir_surface: true,
|
||||
khr_android_surface: true,
|
||||
khr_win32_surface: true,
|
||||
mvk_ios_surface: true,
|
||||
|
@ -377,7 +377,6 @@ instance_extensions! {
|
||||
khr_xlib_surface => b"VK_KHR_xlib_surface",
|
||||
khr_xcb_surface => b"VK_KHR_xcb_surface",
|
||||
khr_wayland_surface => b"VK_KHR_wayland_surface",
|
||||
khr_mir_surface => b"VK_KHR_mir_surface",
|
||||
khr_android_surface => b"VK_KHR_android_surface",
|
||||
khr_win32_surface => b"VK_KHR_win32_surface",
|
||||
ext_debug_report => b"VK_EXT_debug_report",
|
||||
|
@ -31,12 +31,11 @@
|
||||
//!
|
||||
//! ## Creating a surface from a window
|
||||
//!
|
||||
//! There are 6 extensions that each allow you to create a surface from a type of window:
|
||||
//! There are 5 extensions that each allow you to create a surface from a type of window:
|
||||
//!
|
||||
//! - `VK_KHR_xlib_surface`
|
||||
//! - `VK_KHR_xcb_surface`
|
||||
//! - `VK_KHR_wayland_surface`
|
||||
//! - `VK_KHR_mir_surface`
|
||||
//! - `VK_KHR_android_surface`
|
||||
//! - `VK_KHR_win32_surface`
|
||||
//!
|
||||
|
@ -291,50 +291,6 @@ impl<W> Surface<W> {
|
||||
}))
|
||||
}
|
||||
|
||||
/// Creates a `Surface` from a MIR window.
|
||||
///
|
||||
/// If the swapchain's dimensions does not match the window's dimensions, the image will
|
||||
/// automatically be scaled during presentation.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// The caller must ensure that the `connection` and the `surface` are both correct and stay
|
||||
/// alive for the entire lifetime of the surface. The `win` parameter can be used to ensure this.
|
||||
pub unsafe fn from_mir<C, S>(instance: Arc<Instance>, connection: *const C,
|
||||
surface: *const S,
|
||||
win: W)
|
||||
-> Result<Arc<Surface<W>>, SurfaceCreationError> {
|
||||
let vk = instance.pointers();
|
||||
|
||||
if !instance.loaded_extensions().khr_mir_surface {
|
||||
return Err(SurfaceCreationError::MissingExtension { name: "VK_KHR_mir_surface" });
|
||||
}
|
||||
|
||||
let surface = {
|
||||
let infos = vk::MirSurfaceCreateInfoKHR {
|
||||
sType: vk::STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR,
|
||||
pNext: ptr::null(),
|
||||
flags: 0, // reserved
|
||||
connection: connection as *mut _,
|
||||
mirSurface: surface as *mut _,
|
||||
};
|
||||
|
||||
let mut output = mem::uninitialized();
|
||||
check_errors(vk.CreateMirSurfaceKHR(instance.internal_object(),
|
||||
&infos,
|
||||
ptr::null(),
|
||||
&mut output))?;
|
||||
output
|
||||
};
|
||||
|
||||
Ok(Arc::new(Surface {
|
||||
window: win,
|
||||
instance: instance.clone(),
|
||||
surface: surface,
|
||||
has_swapchain: AtomicBool::new(false),
|
||||
}))
|
||||
}
|
||||
|
||||
/// Creates a `Surface` from an Android window.
|
||||
///
|
||||
/// # Safety
|
||||
@ -803,15 +759,6 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn khr_mir_surface_ext_missing() {
|
||||
let instance = instance!();
|
||||
match unsafe { Surface::from_mir(instance, ptr::null::<u8>(), ptr::null::<u8>(), ()) } {
|
||||
Err(SurfaceCreationError::MissingExtension { .. }) => (),
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn khr_android_surface_ext_missing() {
|
||||
let instance = instance!();
|
||||
|
Loading…
Reference in New Issue
Block a user