[][src]Enum gfx_memory::MemoryUsage

pub enum MemoryUsage {
    Private,
    Dynamic {
        sparse_updates: bool,
    },
    Staging {
        read_back: bool,
    },
}

Scenarios of how resources use memory.

Variants

Private

Full speed GPU access. Optimal for render targets and persistent resources. Avoid memory with host access.

Dynamic

CPU to GPU data flow with update commands. Used for dynamic buffer data, typically constant buffers. Host access is guaranteed. Prefers memory with fast GPU access.

Fields of Dynamic

sparse_updates: bool

Optimize for multiple disjoint small portions to be updated, as opposed to big linear chunks of memory.

Staging

CPU to GPU data flow with mapping. Used for staging data before copying to the Data memory. Host access is guaranteed.

Fields of Staging

read_back: bool

Optimize for reading back from Gpu.

Methods

impl MemoryUsage[src]

pub fn properties_required(&self) -> Properties[src]

Set of required memory properties for this usage.

Trait Implementations

impl Clone for MemoryUsage[src]

impl Copy for MemoryUsage[src]

impl Debug for MemoryUsage[src]

impl PartialEq<MemoryUsage> for MemoryUsage[src]

impl StructuralPartialEq for MemoryUsage[src]

Auto Trait Implementations

impl RefUnwindSafe for MemoryUsage

impl Send for MemoryUsage

impl Sync for MemoryUsage

impl Unpin for MemoryUsage

impl UnwindSafe for MemoryUsage

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.