pub struct VulkanSemaphoreSynchronizer { /* private fields */ }Expand description
Synchronizer that uses an external VkSemaphore fd per frame to gate
consumer submits on producer rendering completion.
Implementations§
Source§impl VulkanSemaphoreSynchronizer
impl VulkanSemaphoreSynchronizer
Sourcepub fn new(host: &HostWgpuContext) -> Result<Self, InteropError>
pub fn new(host: &HostWgpuContext) -> Result<Self, InteropError>
Create a synchronizer bound to the host’s wgpu Vulkan device + queue.
Returns InteropError::BackendMismatch if host.backend is not
InteropBackend::Vulkan.
Trait Implementations§
Source§impl Drop for VulkanSemaphoreSynchronizer
impl Drop for VulkanSemaphoreSynchronizer
Source§impl InteropSynchronizer for VulkanSemaphoreSynchronizer
impl InteropSynchronizer for VulkanSemaphoreSynchronizer
Source§fn producer_complete(
&self,
frame: &NativeFrame,
mechanism: SyncMechanism,
) -> Result<(), InteropError>
fn producer_complete( &self, frame: &NativeFrame, mechanism: SyncMechanism, ) -> Result<(), InteropError>
Called after the frame is acquired from the producer, before import.
Use this to wait on any producer-side signal.
Source§fn consumer_ready(
&self,
_texture: &ImportedTexture,
mechanism: SyncMechanism,
) -> Result<(), InteropError>
fn consumer_ready( &self, _texture: &ImportedTexture, mechanism: SyncMechanism, ) -> Result<(), InteropError>
Called after the texture has been imported and is ready for the
consumer. Use this to signal any consumer-side fence or semaphore.
impl Send for VulkanSemaphoreSynchronizer
impl Sync for VulkanSemaphoreSynchronizer
Auto Trait Implementations§
impl !Freeze for VulkanSemaphoreSynchronizer
impl RefUnwindSafe for VulkanSemaphoreSynchronizer
impl Unpin for VulkanSemaphoreSynchronizer
impl UnsafeUnpin for VulkanSemaphoreSynchronizer
impl UnwindSafe for VulkanSemaphoreSynchronizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more