Skip to main content

IVulkanContextExternalObjectsFeature

Trait IVulkanContextExternalObjectsFeature 

Source
pub trait IVulkanContextExternalObjectsFeature {
    // Required methods
    fn supported_image_handle_types(&self) -> Vec<String>;
    fn supported_semaphore_types(&self) -> Vec<String>;
    fn device_uuid(&self) -> Option<Vec<u8>>;
    fn device_luid(&self) -> Option<Vec<u8>>;
    fn get_synchronization_capabilities(
        &self,
        image_handle_type: &str,
    ) -> CompositionGpuImportedImageSynchronizationCapabilities;
    fn import_image(
        &self,
        handle: Rc<dyn IPlatformHandle>,
        properties: PlatformGraphicsExternalImageProperties,
    ) -> Rc<dyn IVulkanExternalImage>;
    fn import_semaphore(
        &self,
        handle: Rc<dyn IPlatformHandle>,
    ) -> Rc<dyn IVulkanExternalSemaphore>;
}
Expand description

Lets a Vulkan context import images and semaphores that were created outside of it (by another device or another process).

A graphics context that is a Vulkan context announces the feature through its optional features: try_get_feature(TypeId::of::<dyn IVulkanContextExternalObjectsFeature>()) returns an Rc<dyn IVulkanContextExternalObjectsFeature>.

This API is unstable.

Required Methods§

Source

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

The kinds of image handles the device can import.

Source

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

The kinds of semaphore handles the device can import.

Source

fn device_uuid(&self) -> Option<Vec<u8>>

The universally unique identifier of the device, when it has one.

Source

fn device_luid(&self) -> Option<Vec<u8>>

The locally unique identifier of the device, when it has one.

Source

fn get_synchronization_capabilities( &self, image_handle_type: &str, ) -> CompositionGpuImportedImageSynchronizationCapabilities

How access to an imported image of the given handle type can be synchronized.

§Panics

Panics when the handle type is not one of supported_image_handle_types.

Source

fn import_image( &self, handle: Rc<dyn IPlatformHandle>, properties: PlatformGraphicsExternalImageProperties, ) -> Rc<dyn IVulkanExternalImage>

Imports an image.

§Panics

Panics when the kind of the handle is not supported, and when the device refuses the image.

Source

fn import_semaphore( &self, handle: Rc<dyn IPlatformHandle>, ) -> Rc<dyn IVulkanExternalSemaphore>

Imports a semaphore.

§Panics

Panics when the kind of the handle is not supported, and when the device refuses the semaphore.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§