#![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_semaphore_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 PhysicalDeviceExternalSemaphoreInfoKHR<'a> = PhysicalDeviceExternalSemaphoreInfo<'a>;
pub type ExternalSemaphorePropertiesKHR<'a> = ExternalSemaphoreProperties<'a>;
pub type ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags;
pub type ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags;
pub type PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR =
PFN_vkGetPhysicalDeviceExternalSemaphoreProperties;
}
#[cfg(feature = "ffi")]
pub(super) mod ffi {
#![allow(non_camel_case_types)]
use super::defs::*;
pub type VkPhysicalDeviceExternalSemaphoreInfoKHR =
PhysicalDeviceExternalSemaphoreInfoKHR<'static>;
pub type VkExternalSemaphorePropertiesKHR = ExternalSemaphorePropertiesKHR<'static>;
pub type VkExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlagsKHR;
pub type VkExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlagsKHR;
}
pub struct InstanceFn {
get_physical_device_external_semaphore_properties:
PFN_vkGetPhysicalDeviceExternalSemaphoreProperties,
}
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_semaphore_properties: transmute(
load(c"vkGetPhysicalDeviceExternalSemaphorePropertiesKHR")
.ok_or(MissingEntryPointError)?,
),
})
}
}
}
impl InstanceFn {
#[inline]
pub unsafe fn get_physical_device_external_semaphore_properties(
&self,
physical_device: PhysicalDevice,
external_semaphore_info: &PhysicalDeviceExternalSemaphoreInfo<'_>,
external_semaphore_properties: &mut ExternalSemaphoreProperties<'_>,
) {
unsafe {
(self.get_physical_device_external_semaphore_properties)(
physical_device,
external_semaphore_info,
external_semaphore_properties,
)
}
}
}