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§
Sourcefn supported_image_handle_types(&self) -> Vec<String>
fn supported_image_handle_types(&self) -> Vec<String>
The kinds of image handles the device can import.
Sourcefn supported_semaphore_types(&self) -> Vec<String>
fn supported_semaphore_types(&self) -> Vec<String>
The kinds of semaphore handles the device can import.
Sourcefn device_uuid(&self) -> Option<Vec<u8>>
fn device_uuid(&self) -> Option<Vec<u8>>
The universally unique identifier of the device, when it has one.
Sourcefn device_luid(&self) -> Option<Vec<u8>>
fn device_luid(&self) -> Option<Vec<u8>>
The locally unique identifier of the device, when it has one.
Sourcefn get_synchronization_capabilities(
&self,
image_handle_type: &str,
) -> CompositionGpuImportedImageSynchronizationCapabilities
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.
Sourcefn import_image(
&self,
handle: Rc<dyn IPlatformHandle>,
properties: PlatformGraphicsExternalImageProperties,
) -> Rc<dyn IVulkanExternalImage>
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.
Sourcefn import_semaphore(
&self,
handle: Rc<dyn IPlatformHandle>,
) -> Rc<dyn IVulkanExternalSemaphore>
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".