From 9f4863ea15c0d4eb102c99cecd58985b2dbc318e Mon Sep 17 00:00:00 2001 From: Mac O'Brien Date: Mon, 20 May 2019 12:50:38 -0500 Subject: [PATCH] Expose get_physical_device_*_presentation_support_khr Fixes #197 --- ash/src/extensions/khr/wayland_surface.rs | 26 +++++++++++++++++---- ash/src/extensions/khr/win32_surface.rs | 24 +++++++++++++++---- ash/src/extensions/khr/xcb_surface.rs | 28 +++++++++++++++++++---- ash/src/extensions/khr/xlib_surface.rs | 28 +++++++++++++++++++---- 4 files changed, 90 insertions(+), 16 deletions(-) diff --git a/ash/src/extensions/khr/wayland_surface.rs b/ash/src/extensions/khr/wayland_surface.rs index ec5480d..ebbfda3 100644 --- a/ash/src/extensions/khr/wayland_surface.rs +++ b/ash/src/extensions/khr/wayland_surface.rs @@ -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 = " bool { + let b = self + .wayland_surface_fn + .get_physical_device_wayland_presentation_support_khr( + physical_device, + queue_family_index, + wl_display, + ); + + b > 0 + } } diff --git a/ash/src/extensions/khr/win32_surface.rs b/ash/src/extensions/khr/win32_surface.rs index 72ae7ef..5b05e6f 100644 --- a/ash/src/extensions/khr/win32_surface.rs +++ b/ash/src/extensions/khr/win32_surface.rs @@ -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 = " bool { + let b = self + .win32_surface_fn + .get_physical_device_win32_presentation_support_khr( + physical_device, + queue_family_index, + ); + + b > 0 + } } diff --git a/ash/src/extensions/khr/xcb_surface.rs b/ash/src/extensions/khr/xcb_surface.rs index dbd05e8..4359917 100644 --- a/ash/src/extensions/khr/xcb_surface.rs +++ b/ash/src/extensions/khr/xcb_surface.rs @@ -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 = " bool { + let b = self + .xcb_surface_fn + .get_physical_device_xcb_presentation_support_khr( + physical_device, + queue_family_index, + connection, + visual_id, + ); + + b > 0 + } } diff --git a/ash/src/extensions/khr/xlib_surface.rs b/ash/src/extensions/khr/xlib_surface.rs index aed6ca4..efa5713 100644 --- a/ash/src/extensions/khr/xlib_surface.rs +++ b/ash/src/extensions/khr/xlib_surface.rs @@ -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 = " bool { + let b = self + .xlib_surface_fn + .get_physical_device_xlib_presentation_support_khr( + physical_device, + queue_family_index, + display, + visual_id, + ); + + b > 0 + } }