213: Expose get_physical_device_*_presentation_support_khr r=MaikKlein a=cormac-obrien

Fixes #197

Co-authored-by: Mac O'Brien <cormac@c-obrien.org>
This commit is contained in:
bors[bot] 2019-05-26 21:15:47 +00:00
commit d3bc0821c5
4 changed files with 90 additions and 16 deletions

View file

@ -1,10 +1,10 @@
#![allow(dead_code)]
use prelude::*;
use crate::prelude::*;
use crate::version::{EntryV1_0, InstanceV1_0};
use crate::vk;
use crate::RawPtr;
use std::ffi::CStr;
use std::mem;
use version::{EntryV1_0, InstanceV1_0};
use vk;
use RawPtr;
#[derive(Clone)]
pub struct WaylandSurface {
@ -45,4 +45,22 @@ impl WaylandSurface {
_ => Err(err_code),
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceWaylandPresentationSupportKHR.html"]
pub unsafe fn get_physical_device_wayland_presentation_support(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
wl_display: &mut vk::wl_display,
) -> bool {
let b = self
.wayland_surface_fn
.get_physical_device_wayland_presentation_support_khr(
physical_device,
queue_family_index,
wl_display,
);
b > 0
}
}

View file

@ -1,10 +1,10 @@
#![allow(dead_code)]
use prelude::*;
use crate::prelude::*;
use crate::version::{EntryV1_0, InstanceV1_0};
use crate::vk;
use crate::RawPtr;
use std::ffi::CStr;
use std::mem;
use version::{EntryV1_0, InstanceV1_0};
use vk;
use RawPtr;
#[derive(Clone)]
pub struct Win32Surface {
@ -45,4 +45,20 @@ impl Win32Surface {
_ => Err(err_code),
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceWin32PresentationSupportKHR.html"]
pub unsafe fn get_physical_device_win32_presentation_support(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
) -> bool {
let b = self
.win32_surface_fn
.get_physical_device_win32_presentation_support_khr(
physical_device,
queue_family_index,
);
b > 0
}
}

View file

@ -1,10 +1,10 @@
#![allow(dead_code)]
use prelude::*;
use crate::prelude::*;
use crate::version::{EntryV1_0, InstanceV1_0};
use crate::vk;
use crate::RawPtr;
use std::ffi::CStr;
use std::mem;
use version::{EntryV1_0, InstanceV1_0};
use vk;
use RawPtr;
#[derive(Clone)]
pub struct XcbSurface {
@ -45,4 +45,24 @@ impl XcbSurface {
_ => Err(err_code),
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceXcbPresentationSupportKHR.html"]
pub unsafe fn get_physical_device_xcb_presentation_support(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
connection: &mut vk::xcb_connection_t,
visual_id: vk::xcb_visualid_t,
) -> bool {
let b = self
.xcb_surface_fn
.get_physical_device_xcb_presentation_support_khr(
physical_device,
queue_family_index,
connection,
visual_id,
);
b > 0
}
}

View file

@ -1,10 +1,10 @@
#![allow(dead_code)]
use prelude::*;
use crate::prelude::*;
use crate::version::{EntryV1_0, InstanceV1_0};
use crate::vk;
use crate::RawPtr;
use std::ffi::CStr;
use std::mem;
use version::{EntryV1_0, InstanceV1_0};
use vk;
use RawPtr;
#[derive(Clone)]
pub struct XlibSurface {
@ -45,4 +45,24 @@ impl XlibSurface {
_ => Err(err_code),
}
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetPhysicalDeviceXlibPresentationSupportKHR.html"]
pub unsafe fn get_physical_device_xlib_presentation_support(
&self,
physical_device: vk::PhysicalDevice,
queue_family_index: u32,
display: &mut vk::Display,
visual_id: vk::VisualID,
) -> bool {
let b = self
.xlib_surface_fn
.get_physical_device_xlib_presentation_support_khr(
physical_device,
queue_family_index,
display,
visual_id,
);
b > 0
}
}