pub struct BufferBarrier<'a> {
pub previous_accesses: &'a [AccessType],
pub next_accesses: &'a [AccessType],
pub src_queue_family_index: u32,
pub dst_queue_family_index: u32,
pub buffer: Buffer,
pub offset: usize,
pub size: usize,
}
Expand description
Buffer barriers should only be used when a queue family ownership transfer is required - prefer global barriers at all other times.
Access types are defined in the same way as for a global memory barrier, but
they only affect the buffer range identified by buffer
, offset
and size
,
rather than all resources.
src_queue_family_index
and dst_queue_family_index
will be passed unmodified
into a buffer memory barrier.
A buffer 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.
Fields§
§previous_accesses: &'a [AccessType]
§next_accesses: &'a [AccessType]
§src_queue_family_index: u32
§dst_queue_family_index: u32
§buffer: Buffer
§offset: usize
§size: usize
Trait Implementations§
Source§impl<'a> Clone for BufferBarrier<'a>
impl<'a> Clone for BufferBarrier<'a>
Source§fn clone(&self) -> BufferBarrier<'a>
fn clone(&self) -> BufferBarrier<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for BufferBarrier<'a>
impl<'a> Debug for BufferBarrier<'a>
Source§impl<'a> Default for BufferBarrier<'a>
impl<'a> Default for BufferBarrier<'a>
Source§fn default() -> BufferBarrier<'a>
fn default() -> BufferBarrier<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for BufferBarrier<'a>
impl<'a> RefUnwindSafe for BufferBarrier<'a>
impl<'a> Send for BufferBarrier<'a>
impl<'a> Sync for BufferBarrier<'a>
impl<'a> Unpin for BufferBarrier<'a>
impl<'a> UnwindSafe for BufferBarrier<'a>
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