Make enumerate_instance_version safe
This commit is contained in:
parent
ce6820f923
commit
c4d92d410b
|
@ -191,8 +191,9 @@ impl<V: FunctionPointers> Entry<V> {
|
||||||
pub trait EntryV1_1: EntryV1_0 {
|
pub trait EntryV1_1: EntryV1_0 {
|
||||||
fn fp_v1_1(&self) -> &vk::EntryFnV1_1;
|
fn fp_v1_1(&self) -> &vk::EntryFnV1_1;
|
||||||
|
|
||||||
unsafe fn enumerate_instance_version(&self) -> VkResult<vk::uint32_t> {
|
fn enumerate_instance_version(&self) -> VkResult<vk::uint32_t> {
|
||||||
let mut api_version = mem::uninitialized();
|
unsafe {
|
||||||
|
let mut api_version = 0;
|
||||||
let err_code = self.fp_v1_1().enumerate_instance_version(&mut api_version);
|
let err_code = self.fp_v1_1().enumerate_instance_version(&mut api_version);
|
||||||
match err_code {
|
match err_code {
|
||||||
vk::Result::SUCCESS => Ok(api_version),
|
vk::Result::SUCCESS => Ok(api_version),
|
||||||
|
@ -200,3 +201,4 @@ pub trait EntryV1_1: EntryV1_0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue