[−][src]Struct gfx_memory::Heaps
Heaps available on particular physical device.
Methods
impl<B: Backend> Heaps<B>
[src]
pub unsafe fn new(
hal_memory_properties: &MemoryProperties,
config_general: GeneralConfig,
config_linear: LinearConfig,
non_coherent_atom_size: Size
) -> Self
[src]
hal_memory_properties: &MemoryProperties,
config_general: GeneralConfig,
config_linear: LinearConfig,
non_coherent_atom_size: Size
) -> Self
Initialize the new Heaps
object.
pub fn allocate(
&mut self,
device: &B::Device,
requirements: &Requirements,
usage: MemoryUsage,
kind: Kind
) -> Result<MemoryBlock<B>, HeapsError>
[src]
&mut self,
device: &B::Device,
requirements: &Requirements,
usage: MemoryUsage,
kind: Kind
) -> Result<MemoryBlock<B>, HeapsError>
Allocate memory block give the requirements
from gfx-hal.
for intended usage
, using the kind
of allocator.
pub fn free(&mut self, device: &B::Device, block: MemoryBlock<B>)
[src]
Free memory block.
Memory block must be allocated from this heap.
pub fn clear(&mut self, device: &B::Device)
[src]
Clear allocators before dropping. Will panic if memory instances are left allocated.
pub fn utilization(&self) -> TotalMemoryUtilization
[src]
Get memory utilization.
Trait Implementations
Auto Trait Implementations
impl<B> RefUnwindSafe for Heaps<B> where
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
impl<B> Send for Heaps<B>
impl<B> Sync for Heaps<B>
impl<B> Unpin for Heaps<B>
impl<B> UnwindSafe for Heaps<B> where
<B as Backend>::Memory: RefUnwindSafe,
<B as Backend>::Memory: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,