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
Source§fn clone(&self) -> QueueFamilyOwnershipTransfer
fn clone(&self) -> QueueFamilyOwnershipTransfer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueueFamilyOwnershipTransfer
impl Debug for QueueFamilyOwnershipTransfer
Source§impl PartialEq for QueueFamilyOwnershipTransfer
impl PartialEq for QueueFamilyOwnershipTransfer
Source§fn eq(&self, other: &QueueFamilyOwnershipTransfer) -> bool
fn eq(&self, other: &QueueFamilyOwnershipTransfer) -> bool
self and other values to be equal, and is used by ==.impl Copy for QueueFamilyOwnershipTransfer
impl Eq for QueueFamilyOwnershipTransfer
impl StructuralPartialEq for QueueFamilyOwnershipTransfer
Auto Trait Implementations§
impl Freeze for QueueFamilyOwnershipTransfer
impl RefUnwindSafe for QueueFamilyOwnershipTransfer
impl Send for QueueFamilyOwnershipTransfer
impl Sync for QueueFamilyOwnershipTransfer
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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>
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>
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