From 855143b93b3ee71c6c50a2eac76ebfff042424df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Sk=C3=A5lerud?= Date: Tue, 27 Aug 2019 00:49:53 +0200 Subject: [PATCH] =?UTF-8?q?Started=20on=20proposal=20on=20interface=20to?= =?UTF-8?q?=20expose=20raw=20function=20pointers=20for=20extensions.=20Add?= =?UTF-8?q?ed=20raw=5Ffp()=20to=20Surface=20and=20Swapchain=20=C3=80dded?= =?UTF-8?q?=20instance=5Fhandle()=20to=20Surface=20Added=20device=5Fhandle?= =?UTF-8?q?()=20to=20Device?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nils Petter Skålerud --- ash/src/extensions/khr/surface.rs | 8 ++++++++ ash/src/extensions/khr/swapchain.rs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ash/src/extensions/khr/surface.rs b/ash/src/extensions/khr/surface.rs index 024dab9..c0e6441 100644 --- a/ash/src/extensions/khr/surface.rs +++ b/ash/src/extensions/khr/surface.rs @@ -138,4 +138,12 @@ impl Surface { allocation_callbacks.as_raw_ptr(), ); } + + pub fn raw_fp(&self) -> &vk::KhrSurfaceFn { + &self.surface_fn + } + + pub fn instance_handle(&self) -> vk::Instance { + self.handle + } } diff --git a/ash/src/extensions/khr/swapchain.rs b/ash/src/extensions/khr/swapchain.rs index f9a6a8b..f87ab95 100644 --- a/ash/src/extensions/khr/swapchain.rs +++ b/ash/src/extensions/khr/swapchain.rs @@ -126,4 +126,12 @@ impl Swapchain { _ => Err(err_code), } } + + pub fn raw_fp(&self) -> &vk::KhrSwapchainFn { + &self.swapchain_fn + } + + pub fn device_handle(&self) -> vk::Device { + self.handle + } }