#![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_maintenance1";
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 CommandPoolTrimFlagsKHR = CommandPoolTrimFlags;
pub type PFN_vkTrimCommandPoolKHR = PFN_vkTrimCommandPool;
}
#[cfg(feature = "ffi")]
pub(super) mod ffi {
#![allow(non_camel_case_types)]
use super::defs::*;
pub type VkCommandPoolTrimFlagsKHR = CommandPoolTrimFlagsKHR;
}
pub struct DeviceFn {
trim_command_pool: PFN_vkTrimCommandPool,
}
impl LoadDeviceFn for DeviceFn {
unsafe fn load_with(
load: impl Fn(&CStr) -> Option<PFN_vkVoidFunction>,
) -> core::result::Result<Self, MissingEntryPointError> {
unsafe {
Ok(Self {
trim_command_pool: transmute(
load(c"vkTrimCommandPoolKHR").ok_or(MissingEntryPointError)?,
),
})
}
}
}
impl DeviceFn {
#[inline]
pub unsafe fn trim_command_pool(
&self,
device: Device,
command_pool: CommandPool,
flags: CommandPoolTrimFlags,
) {
unsafe { (self.trim_command_pool)(device, command_pool, flags) }
}
}