pub struct Barriers<B: Backend> { /* private fields */ }
Expand description
Handles combining multiple image and buffer barriers that must be made before and after some target operations.
Implementations§
Source§impl<B: Backend> Barriers<B>
impl<B: Backend> Barriers<B>
Sourcepub fn new(
target_stages: PipelineStage,
target_buffer_access: Access,
target_image_access: Access,
) -> Self
pub fn new( target_stages: PipelineStage, target_buffer_access: Access, target_image_access: Access, ) -> Self
Create a new Barriers instance with target stages and accesses
Sourcepub fn add_image(
&mut self,
image: Handle<Image<B>>,
image_range: SubresourceRange,
last_stage: PipelineStage,
last_access: Access,
last_layout: Layout,
target_layout: Layout,
next_stage: PipelineStage,
next_access: Access,
next_layout: Layout,
)
pub fn add_image( &mut self, image: Handle<Image<B>>, image_range: SubresourceRange, last_stage: PipelineStage, last_access: Access, last_layout: Layout, target_layout: Layout, next_stage: PipelineStage, next_access: Access, next_layout: Layout, )
Add an image to the barriers
Sourcepub fn add_buffer(
&mut self,
last_stage: PipelineStage,
last_access: Access,
next_stage: PipelineStage,
next_access: Access,
)
pub fn add_buffer( &mut self, last_stage: PipelineStage, last_access: Access, next_stage: PipelineStage, next_access: Access, )
Add a buffer to the barriers
Sourcepub fn encode_before<C, L>(&mut self, encoder: &mut Encoder<'_, B, C, L>)
pub fn encode_before<C, L>(&mut self, encoder: &mut Encoder<'_, B, C, L>)
Encode the barriers that should come before the target operations
Sourcepub fn encode_after<C, L>(&mut self, encoder: &mut Encoder<'_, B, C, L>)
pub fn encode_after<C, L>(&mut self, encoder: &mut Encoder<'_, B, C, L>)
Encode the barriers that should come after the target operations
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Barriers<B>
impl<B> RefUnwindSafe for Barriers<B>
impl<B> Send for Barriers<B>
impl<B> Sync for Barriers<B>
impl<B> Unpin for Barriers<B>
impl<B> UnwindSafe for Barriers<B>
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