Struct ccthw_ash_allocator::MemoryProperties
source · pub struct MemoryProperties { /* private fields */ }
Implementations§
source§impl MemoryProperties
impl MemoryProperties
sourcepub fn new(instance: &Instance, physical_device: PhysicalDevice) -> Self
pub fn new(instance: &Instance, physical_device: PhysicalDevice) -> Self
Get the memory properties for the given physical device.
sourcepub unsafe fn from_raw(types: &[MemoryType], heaps: &[MemoryHeap]) -> Self
pub unsafe fn from_raw(types: &[MemoryType], heaps: &[MemoryHeap]) -> Self
Create memory properties directly from a slice of memory types and heaps.
This is primarily used for testing.
Safety
Unsafe because:
- Types and heaps are expected to reference one another. Using a memory type or heap which wasn’t returned by the device itself can result in undefined behavior.
sourcepub fn heaps(&self) -> &[MemoryHeap]
pub fn heaps(&self) -> &[MemoryHeap]
All of the currently usable memory heaps on this system.
sourcepub fn types(&self) -> &[MemoryType]
pub fn types(&self) -> &[MemoryType]
All of the currently usable memory types on this system.
Trait Implementations§
source§impl Clone for MemoryProperties
impl Clone for MemoryProperties
source§fn clone(&self) -> MemoryProperties
fn clone(&self) -> MemoryProperties
Returns a copy 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 more