[−][src]Struct vk_sync::ImageBarrier
Image barriers should only be used when a queue family ownership transfer or an image layout transition is required - prefer global barriers at all other times.
In general it is better to use image barriers with ImageLayout::Optimal
than it is to use global barriers with images using either of the
ImageLayout::General*
layouts.
Access types are defined in the same way as for a global memory barrier, but
they only affect the image subresource range identified by image
and
range
, rather than all resources.
src_queue_family_index
, dst_queue_family_index
, image
, and range
will
be passed unmodified into an image memory barrier.
An image barrier defining a queue ownership transfer needs to be executed twice - once by a queue in the source queue family, and then once again by a queue in the destination queue family, with a semaphore guaranteeing execution order between them.
If discard_contents
is set to true, the contents of the image become
undefined after the barrier is executed, which can result in a performance
boost over attempting to preserve the contents. This is particularly useful
for transient images where the contents are going to be immediately overwritten.
A good example of when to use this is when an application re-uses a presented
image after acquiring the next swap chain image.
Fields
previous_accesses: &'a [AccessType]
next_accesses: &'a [AccessType]
previous_layout: ImageLayout
next_layout: ImageLayout
discard_contents: bool
src_queue_family_index: u32
dst_queue_family_index: u32
image: ImageType
range: ImageSubresourceRangeType
Trait Implementations
impl<'a> Clone for ImageBarrier<'a>
[src]
fn clone(&self) -> ImageBarrier<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Default for ImageBarrier<'a>
[src]
fn default() -> ImageBarrier<'a>
[src]
impl<'a> Debug for ImageBarrier<'a>
[src]
Auto Trait Implementations
impl<'a> Unpin for ImageBarrier<'a>
impl<'a> Sync for ImageBarrier<'a>
impl<'a> Send for ImageBarrier<'a>
impl<'a> RefUnwindSafe for ImageBarrier<'a>
impl<'a> UnwindSafe for ImageBarrier<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,