pub struct VulkanQueueLock { /* private fields */ }Expand description
Serializes one shared Vulkan queue family across FFmpeg and the renderer.
Takes the same recursive lock FFmpeg takes around its submissions. Only contexts made by
create_vulkan_device_context have it.
Implementations§
Source§impl VulkanQueueLock
impl VulkanQueueLock
Sourcepub fn new(
device: AVHWDeviceContext,
queue_family: u32,
) -> Result<Self, BridgeError>
pub fn new( device: AVHWDeviceContext, queue_family: u32, ) -> Result<Self, BridgeError>
Locks submissions to queue_family on device.
§Errors
Returns an input error unless device came from create_vulkan_device_context and has a
lock for queue_family.
Sourcepub fn lock(&self) -> VulkanQueueGuard<'_>
pub fn lock(&self) -> VulkanQueueGuard<'_>
Holds the queue lock until the guard drops; the guard stays on this thread.
Sourcepub unsafe fn raw_lock(&self)
pub unsafe fn raw_lock(&self)
Acquires the queue lock without a guard, for adapters with their own lock/unlock protocol.
§Safety
The calling thread must release it with exactly one Self::raw_unlock, in reverse order
of its other holds on this lock.
Sourcepub unsafe fn raw_unlock(&self)
pub unsafe fn raw_unlock(&self)
Releases a hold taken by Self::raw_lock.
§Safety
The calling thread must hold the lock from an unreleased Self::raw_lock, and this must
be its most recent hold. An unbalanced release lets two submissions reach the queue at once.
Trait Implementations§
Source§impl Debug for VulkanQueueLock
Available on Linux and crate feature hwdevice only.
impl Debug for VulkanQueueLock
hwdevice only.impl Sync for VulkanQueueLock
hwdevice only.