Enum gfx_hal::memory::Barrier

source ·
pub enum Barrier<'a, B: Backend> {
    AllBuffers(Range<Access>),
    AllImages(Range<Access>),
    Buffer {
        states: Range<State>,
        target: &'a B::Buffer,
        families: Option<Range<QueueFamilyId>>,
        range: Range<Option<u64>>,
    },
    Image {
        states: Range<State>,
        target: &'a B::Image,
        families: Option<Range<QueueFamilyId>>,
        range: SubresourceRange,
    },
}
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.

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.

range: Range<Option<u64>>

Range of the buffer the barrier applies to.

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.

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.

range: SubresourceRange

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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.