Skip to main content

IVulkanDevice

Trait IVulkanDevice 

Source
pub trait IVulkanDevice:
    IOptionalFeatureProvider
    + Send
    + Sync {
    // Required methods
    fn handle(&self) -> isize;
    fn physical_device_handle(&self) -> isize;
    fn main_queue_handle(&self) -> isize;
    fn graphics_queue_family_index(&self) -> u32;
    fn instance(&self) -> Arc<dyn IVulkanInstance> ⓘ;
    fn is_lost(&self) -> bool;
    fn lock(&self) -> Rc<dyn IDisposable>;
    fn enabled_extensions(&self) -> Vec<String>;
    fn dispose(&self);
}
Expand description

A Vulkan device with the queue the framework renders with.

A device is shared by threads (an application may hand one device to the platform graphics, which every render thread then uses), so it is held in an Arc; its queue is only used while the device is locked.

Required Methods§

Source

fn handle(&self) -> isize

The VkDevice.

Source

fn physical_device_handle(&self) -> isize

The VkPhysicalDevice the device was created for.

Source

fn main_queue_handle(&self) -> isize

The VkQueue commands are submitted to. Only valid while the device is locked by the calling thread.

Source

fn graphics_queue_family_index(&self) -> u32

The index of the queue family of the main queue.

Source

fn instance(&self) -> Arc<dyn IVulkanInstance> ⓘ

The instance the device belongs to.

Source

fn is_lost(&self) -> bool

Whether the device was lost.

Source

fn lock(&self) -> Rc<dyn IDisposable>

Takes the device for the calling thread until the result is disposed. A thread may lock a device it has locked already.

Source

fn enabled_extensions(&self) -> Vec<String>

The names of the device extensions that were enabled.

Source

fn dispose(&self)

Destroys the device.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§