pub struct QueueFamilyOwnershipTransfer {
pub src: QueueFamily,
pub dst: QueueFamily,
}Expand description
A queue family ownership transfer to perform as part of a TextureBarrier.
This is only honored by the Vulkan backend; every other backend ignores it.
It exists so that textures imported from external memory (for example via
VK_KHR_external_memory) can have their backing image transferred between
wgpu’s queue family and a queue family outside of wgpu’s control when the
image is acquired for use and released afterwards.
src becomes VkImageMemoryBarrier::srcQueueFamilyIndex and dst becomes
VkImageMemoryBarrier::dstQueueFamilyIndex. To acquire an externally owned
image, set src to QueueFamily::External or QueueFamily::Foreign
and dst to QueueFamily::Explicit with wgpu’s own family, obtained from
vulkan::Device::queue_family_index. To release it again, swap the two.
A queue family ownership transfer requires a matching barrier to be recorded on both queues; wgpu-hal only records the barrier on its own queue, so the owner of the other queue is responsible for recording the complementary one.
Fields§
§src: QueueFamilyThe queue family that currently owns the image (srcQueueFamilyIndex).
dst: QueueFamilyThe queue family that should own the image afterwards (dstQueueFamilyIndex).
Trait Implementations§
Source§impl Clone for QueueFamilyOwnershipTransfer
impl Clone for QueueFamilyOwnershipTransfer
impl Copy for QueueFamilyOwnershipTransfer
Source§impl Debug for QueueFamilyOwnershipTransfer
impl Debug for QueueFamilyOwnershipTransfer
impl Eq for QueueFamilyOwnershipTransfer
impl StructuralPartialEq for QueueFamilyOwnershipTransfer
Auto Trait Implementations§
impl Forget for QueueFamilyOwnershipTransfer
impl Freeze for QueueFamilyOwnershipTransfer
impl Move for QueueFamilyOwnershipTransfer
impl RefUnwindSafe for QueueFamilyOwnershipTransfer
impl Send for QueueFamilyOwnershipTransfer
impl Sync for QueueFamilyOwnershipTransfer
impl Unpin for QueueFamilyOwnershipTransfer
impl UnsafeUnpin for QueueFamilyOwnershipTransfer
impl UnwindSafe for QueueFamilyOwnershipTransfer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.