VulkanDeviceExt

Trait VulkanDeviceExt 

Source
pub trait VulkanDeviceExt: IsA<VulkanDevice> + 'static {
    // Provided methods
    fn create_fence(&self) -> Result<Option<VulkanFence>, Error> { ... }
    fn disable_extension(&self, name: &str) -> bool { ... }
    fn enable_extension(&self, name: &str) -> bool { ... }
    fn enable_layer(&self, name: &str) -> bool { ... }
    fn foreach_queue<P: FnMut(&VulkanDevice, &VulkanQueue) -> bool>(
        &self,
        func: P,
    ) { ... }
    fn instance(&self) -> Option<VulkanInstance> { ... }
    fn queue(&self, queue_family: u32, queue_i: u32) -> VulkanQueue { ... }
    fn is_extension_enabled(&self, name: &str) -> bool { ... }
    fn is_layer_enabled(&self, name: &str) -> bool { ... }
    fn open(&self) -> Result<(), Error> { ... }
    fn connect_instance_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all VulkanDevice methods.

§Implementors

VulkanDevice

Provided Methods§

Source

fn create_fence(&self) -> Result<Option<VulkanFence>, Error>

§Returns

a new VulkanFence or None

Source

fn disable_extension(&self, name: &str) -> bool

Disable an Vulkan extension by name. Disabling an extension will only have an effect before the call to open().

§name

extension name to enable

§Returns

whether the Vulkan extension could be disabled.

Source

fn enable_extension(&self, name: &str) -> bool

Enable an Vulkan extension by name. Enabling an extension will only have an effect before the call to open().

§name

extension name to enable

§Returns

whether the Vulkan extension could be enabled.

Source

fn enable_layer(&self, name: &str) -> bool

Enable an Vulkan layer by name. Enabling a layer will only have an effect before the call to open().

§name

layer name to enable

§Returns

whether the Vulkan layer could be enabled.

Source

fn foreach_queue<P: FnMut(&VulkanDevice, &VulkanQueue) -> bool>(&self, func: P)

Iterate over each queue family available on VulkanDevice

§func

a GstVulkanDeviceForEachQueueFunc to run for each VulkanQueue

Source

fn instance(&self) -> Option<VulkanInstance>

§Returns

the VulkanInstance used to create this self

Source

fn queue(&self, queue_family: u32, queue_i: u32) -> VulkanQueue

§queue_family

a queue family to retrieve

§queue_i

index of the family to retrieve

§Returns

a new VulkanQueue

Source

fn is_extension_enabled(&self, name: &str) -> bool

§name

extension name

§Returns

whether extension name is enabled

Source

fn is_layer_enabled(&self, name: &str) -> bool

§name

layer name

§Returns

whether layer name is enabled

Source

fn open(&self) -> Result<(), Error>

Attempts to create the internal VkDevice object.

§Returns

whether a vulkan device could be created

Source

fn connect_instance_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§