Allow applications to access the loaded function pointers (#952)

Without this, an application has to create their own loader for the
Vulkan function pointers if they need to drop down to raw Vulkan
calls. It's not a lot of effort to load them, but it's nicer to just
have them available on the Instance or Device rather than having to
pass an extra parameter around for function pointer access.

Co-authored-by: Austin Johnson <me@austinj.work>
This commit is contained in:
Branan Riley 2020-05-08 17:02:07 -07:00 committed by GitHub
parent 48109761a8
commit c74ac31f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# Unreleased
- Allow applications to access the instance and device pointers
# Version 0.18.0 (2020-03-11)
- **Breaking** Update dependency `winit` 0.21 -> 0.22

View File

@ -343,7 +343,7 @@ impl Device {
/// Grants access to the pointers to the Vulkan functions of the device.
#[inline]
pub(crate) fn pointers(&self) -> &vk::DevicePointers {
pub fn pointers(&self) -> &vk::DevicePointers {
&self.vk
}

View File

@ -435,7 +435,7 @@ impl Instance {
/// Grants access to the Vulkan functions of the instance.
#[inline]
pub(crate) fn pointers(&self) -> &vk::InstancePointers {
pub fn pointers(&self) -> &vk::InstancePointers {
&self.vk
}