#![allow(unused_imports)]
use crate::{vk::Result as VkResult, vk::*, *};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::mem::transmute;
use core::ptr;
pub const EXTENSION_NAME: &CStr = c"VK_KHR_external_fence_capabilities";
pub(super) mod defs {
#![allow(non_camel_case_types, unused_imports)]
use crate::{vk::*, *};
use core::ffi::{CStr, c_char, c_int, c_void};
use core::fmt;
use core::marker::PhantomData;
use core::ptr;
pub type PhysicalDeviceExternalFenceInfoKHR<'a> = PhysicalDeviceExternalFenceInfo<'a>;
pub type ExternalFencePropertiesKHR<'a> = ExternalFenceProperties<'a>;
pub type ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags;
pub type ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags;
pub type PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR =
PFN_vkGetPhysicalDeviceExternalFenceProperties;
}
#[cfg(feature = "ffi")]
pub(super) mod ffi {
#![allow(non_camel_case_types)]
use super::defs::*;
pub type VkPhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfoKHR<'static>;
pub type VkExternalFencePropertiesKHR = ExternalFencePropertiesKHR<'static>;
pub type VkExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlagsKHR;
pub type VkExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlagsKHR;
}
pub struct InstanceFn {
get_physical_device_external_fence_properties: PFN_vkGetPhysicalDeviceExternalFenceProperties,
}
impl LoadInstanceFn for InstanceFn {
unsafe fn load_with(
load: impl Fn(&CStr) -> Option<PFN_vkVoidFunction>,
) -> core::result::Result<Self, MissingEntryPointError> {
unsafe {
Ok(Self {
get_physical_device_external_fence_properties: transmute(
load(c"vkGetPhysicalDeviceExternalFencePropertiesKHR")
.ok_or(MissingEntryPointError)?,
),
})
}
}
}
impl InstanceFn {
#[inline]
pub unsafe fn get_physical_device_external_fence_properties(
&self,
physical_device: PhysicalDevice,
external_fence_info: &PhysicalDeviceExternalFenceInfo<'_>,
external_fence_properties: &mut ExternalFenceProperties<'_>,
) {
unsafe {
(self.get_physical_device_external_fence_properties)(
physical_device,
external_fence_info,
external_fence_properties,
)
}
}
}