Struct pilka_incremental::ash::EntryCustom [−]
Function loader
Implementations
impl<L> EntryCustom<L>
pub fn new_custom<Load>(lib: L, load: Load) -> EntryCustom<L> where
Load: FnMut(&mut L, &CStr) -> *const c_void,
Load: FnMut(&mut L, &CStr) -> *const c_void,
pub fn try_enumerate_instance_version(&self) -> Result<Option<u32>, Result>
let entry = Entry::new()?; match entry.try_enumerate_instance_version()? { // Vulkan 1.1+ Some(version) => { let major = vk::version_major(version); let minor = vk::version_minor(version); let patch = vk::version_patch(version); }, // Vulkan 1.0 None => {}, }
impl EntryCustom<Arc<Library>>
pub unsafe fn new() -> Result<EntryCustom<Arc<Library>>, LoadingError>
Load default Vulkan library for the current platform
Safety
dlopen
ing native libraries is inherently unsafe. The safety guidelines
for [Library::new
] and [Library::get
] apply here.
use ash::{vk, Entry, version::EntryV1_0}; let entry = Entry::new()?; let app_info = vk::ApplicationInfo { api_version: vk::make_version(1, 0, 0), ..Default::default() }; let create_info = vk::InstanceCreateInfo { p_application_info: &app_info, ..Default::default() }; let instance = unsafe { entry.create_instance(&create_info, None)? };
pub unsafe fn with_library(
path: &impl AsRef<OsStr>
) -> Result<EntryCustom<Arc<Library>>, LoadingError>
path: &impl AsRef<OsStr>
) -> Result<EntryCustom<Arc<Library>>, LoadingError>
Load Vulkan library at path
Safety
dlopen
ing native libraries is inherently unsafe. The safety guidelines
for [Library::new
] and [Library::get
] apply here.
Trait Implementations
impl<L> Clone for EntryCustom<L> where
L: Clone,
L: Clone,
pub fn clone(&self) -> EntryCustom<L>
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<L> EntryV1_0 for EntryCustom<L>
type Instance = Instance
pub unsafe fn create_instance(
&self,
create_info: &InstanceCreateInfo,
allocation_callbacks: Option<&AllocationCallbacks>
) -> Result<<EntryCustom<L> as EntryV1_0>::Instance, InstanceError>
&self,
create_info: &InstanceCreateInfo,
allocation_callbacks: Option<&AllocationCallbacks>
) -> Result<<EntryCustom<L> as EntryV1_0>::Instance, InstanceError>
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkCreateInstance.html
Safety
In order for the created Instance
to be valid for the duration of its
usage, the Entry
this was called on must be dropped later than the
resulting Instance
.
pub fn fp_v1_0(&self) -> &EntryFnV1_0
pub fn static_fn(&self) -> &StaticFn
pub fn enumerate_instance_layer_properties(
&self
) -> Result<Vec<LayerProperties, Global>, Result>
&self
) -> Result<Vec<LayerProperties, Global>, Result>
pub fn enumerate_instance_extension_properties(
&self
) -> Result<Vec<ExtensionProperties, Global>, Result>
&self
) -> Result<Vec<ExtensionProperties, Global>, Result>
pub unsafe fn get_instance_proc_addr(
&self,
instance: Instance,
p_name: *const i8
) -> Option<unsafe extern "system" fn()>
&self,
instance: Instance,
p_name: *const i8
) -> Option<unsafe extern "system" fn()>
impl<L> EntryV1_1 for EntryCustom<L>
pub fn fp_v1_1(&self) -> &EntryFnV1_1
pub fn enumerate_instance_version(&self) -> Result<u32, Result>
impl<L> EntryV1_2 for EntryCustom<L>
pub fn fp_v1_2(&self) -> &EntryFnV1_2
Auto Trait Implementations
impl<L> RefUnwindSafe for EntryCustom<L> where
L: RefUnwindSafe,
L: RefUnwindSafe,
impl<L> Send for EntryCustom<L> where
L: Send,
L: Send,
impl<L> Sync for EntryCustom<L> where
L: Sync,
L: Sync,
impl<L> Unpin for EntryCustom<L> where
L: Unpin,
L: Unpin,
impl<L> UnwindSafe for EntryCustom<L> where
L: UnwindSafe,
L: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,