Struct MultiDispatcher

Source
pub struct MultiDispatcher(/* private fields */);
Expand description

MultiDispatcher Dispatcher implementation which stores vulkan commands on the heap using smart pointers This adds a small overhead:

  • Smart Vulkan handles must store an additional pointer
  • Creating/dropping smart Vulkan Handles has the additional cost of cloning/dropping a std::sync::Arc If you only use at most one vulkan instance and one device at any given time, you should use DynamicDispatcher instead When the loaded feature is enabled and the dispatcher is loaded with MultiDispatcher::new_loaded, The vulkan library will be unloaded as soon as all dispatchers are dropped

Trait Implementations§

Source§

impl Clone for MultiDispatcher

Source§

fn clone(&self) -> MultiDispatcher

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Dispatcher for MultiDispatcher

Source§

fn get_command_dispatcher(&self) -> &CommandsDispatcher

Return the associated vk::CommandsDispatcher with this Dispatcher You can then use the command table to call any command that has been loaded or load new commands
Source§

unsafe fn new(get_instance_proc_addr: GetInstanceProcAddrSignature) -> Self

Create a new dispatcher given the get_instance_proc_addr entry point this will load basic (non-instance and non-device dependent) commands Read more
Source§

fn clone_with_instance(&self, instance: &Instance) -> Self

Source§

fn clone_with_device(&self, device: &Device) -> Self

Source§

unsafe fn new_loaded() -> Result<Self, LoadingError>

Create a loads the Vulkan library, retrieve the entry point from it and initialize the dispatcher using it* This will return an error if the vulkan library or its entry point cannot be found Library unloading depends on the implementation, for MultiDispatcher it happends as soon as all dispatcher are dropped. While for DynamicDispatcher one should call DynamicDispatcher::unload() SAFETY: Read more
Source§

unsafe fn new_loaded_and_lib() -> Result<(Self, Library), LoadingError>

Internal function used to load a library and return the dispatcher along with a library object which ensures the llibrary is kept loaded while the object is alive Read more

Auto Trait Implementations§

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> Alias<T> for T