pub enum Barrier<'a, B: Backend> {
    AllBuffers(Range<Access>),
    AllImages(Range<Access>),
    Buffer {
        states: Range<State>,
        target: &'a B::Buffer,
        range: SubRange,
        families: Option<Range<QueueFamilyId>>,
    },
    Image {
        states: Range<State>,
        target: &'a B::Image,
        range: SubresourceRange,
        families: Option<Range<QueueFamilyId>>,
    },
}
Expand description

A memory barrier type for either buffers or images.

Variants

AllBuffers(Range<Access>)

Applies the given access flags to all buffers in the range.

AllImages(Range<Access>)

Applies the given access flags to all images in the range.

Buffer

Fields

states: Range<State>

The access flags controlling the buffer.

target: &'a B::Buffer

The buffer the barrier controls.

range: SubRange

Subrange of the buffer the barrier applies to.

families: Option<Range<QueueFamilyId>>

The source and destination Queue family IDs, for a queue family ownership transfer Can be None to indicate no ownership transfer.

A memory barrier that defines access to a buffer.

Image

Fields

states: Range<State>

The access flags controlling the image.

target: &'a B::Image

The image the barrier controls.

range: SubresourceRange

A SubresourceRange that defines which section of an image the barrier applies to.

families: Option<Range<QueueFamilyId>>

The source and destination Queue family IDs, for a queue family ownership transfer Can be None to indicate no ownership transfer.

A memory barrier that defines access to (a subset of) an image.

Implementations

Create a barrier for the whole buffer between the given states.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.