Skip to main content

Entry

Struct Entry 

Source
pub struct Entry { /* private fields */ }
Expand description

Global dispatch. Instances created here retain the native library independently.

Implementations§

Source§

impl Entry

Source

pub unsafe fn new() -> Result<Self, LoadError>

Load the platform’s default Vulkan library.

§Safety

The library and its initialization routines must be safe to load, and it must implement the Vulkan ABI. Raw copied PFNs must not outlive all owners.

Source

pub unsafe fn new_from_path(path: impl AsRef<OsStr>) -> Result<Self, LoadError>

Load a Vulkan implementation at the supplied native path.

§Safety

The library’s initialization/finalization must be safe, and its exports must implement Vulkan. Raw copied PFNs must not outlive all library owners.

Source

pub unsafe fn new_from_resolver( gipa: unsafe extern "system" fn(InstanceHandle, *const c_char) -> PFN_vkVoidFunction, ) -> Result<Self, LoadError>

Construct dispatch using an externally owned resolver.

§Safety

The resolver must implement Vulkan and remain callable for this entry and all instances and raw PFNs derived from it, including any entry clones.

Source

pub fn fp(&self) -> &FnEntry

Borrow the immutable global dispatch table. Copied functions remain unsafe.

Source

pub unsafe fn get_instance_proc_addr( &self, instance: InstanceHandle, name: &CStr, ) -> PFN_vkVoidFunction

Resolve a command for a live instance, or a global command with NULL.

§Safety

instance must be NULL or a live instance from this implementation. The caller must retain the library while using the returned function.

Source

pub unsafe fn create_instance( &self, create_info: &InstanceCreateInfo, allocator: Option<&AllocationCallbacks>, ) -> Result<Instance, CallError>

Create a headless or extension-configured Vulkan instance.

§Safety

The create info, its reachable pointers and allocator callbacks must meet Vulkan valid usage. Allocator state must remain alive until destruction.

Source§

impl Entry

Source

pub fn enumerate_instance_extension_properties( &self, layer_name: Option<&CStr>, ) -> Result<Vec<ExtensionProperties>, CallError>

Enumerate instance extensions available without any layer.

Pass layer_name = None for the implicit layer (ICD + loader). Pass a layer name to query extensions exposed by that specific layer.

§Errors

Returns CallError::MissingCommand if the driver predates Vulkan 1.0 (practically impossible) or CallError::Vulkan on a driver failure.

Source§

impl Entry

Source

pub fn enumerate_instance_layer_properties( &self, ) -> Result<Vec<LayerProperties>, CallError>

Enumerate all implicit and explicit Vulkan layers installed on this system.

§Errors

Returns CallError::MissingCommand if the command is absent or CallError::Vulkan on a driver failure.

Source§

impl Entry

Source

pub fn enumerate_instance_version(&self) -> Result<u32, Result>

Query the loader API version. A Vulkan 1.0 loader has no version command.

Trait Implementations§

Source§

impl Clone for Entry

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnsafeUnpin for Entry

§

impl UnwindSafe for Entry

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.