pub enum MemoryUsage {
Private,
Dynamic {
sparse_updates: bool,
},
Staging {
read_back: bool,
},
}
Expand description
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
Staging
CPU to GPU data flow with mapping.
Used for staging data before copying to the Data
memory.
Host access is guaranteed.
Implementations§
Source§impl MemoryUsage
impl MemoryUsage
Sourcepub fn properties_required(self) -> Properties
pub fn properties_required(self) -> Properties
Set of required memory properties for this usage.
Trait Implementations§
Source§impl Clone for MemoryUsage
impl Clone for MemoryUsage
Source§fn clone(&self) -> MemoryUsage
fn clone(&self) -> MemoryUsage
Returns a duplicate 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 Debug for MemoryUsage
impl Debug for MemoryUsage
Source§impl PartialEq for MemoryUsage
impl PartialEq for MemoryUsage
impl Copy for MemoryUsage
impl StructuralPartialEq for MemoryUsage
Auto Trait Implementations§
impl Freeze for MemoryUsage
impl RefUnwindSafe for MemoryUsage
impl Send for MemoryUsage
impl Sync for MemoryUsage
impl Unpin for MemoryUsage
impl UnwindSafe for MemoryUsage
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