Trait vulkano::memory::pool::MemoryPool
[−]
[src]
pub unsafe trait MemoryPool: 'static + Send + Sync { type Alloc: MemoryPoolAlloc; fn alloc(&Arc<Self>, ty: MemoryType, size: usize, alignment: usize, layout: AllocLayout) -> Result<Self::Alloc, OomError>; }
Pool of GPU-visible memory that can be allocated from.
Associated Types
type Alloc: MemoryPoolAlloc
Object that represents a single allocation. Its destructor should free the chunk.
Required Methods
fn alloc(&Arc<Self>, ty: MemoryType, size: usize, alignment: usize, layout: AllocLayout) -> Result<Self::Alloc, OomError>
Allocates memory from the pool.
Panic
- Panicks if
device
andmemory_type
don't belong to the same physical device. - Panicks if
size
is 0. - Panicks if
alignment
is 0.
Implementors
impl MemoryPool for StdMemoryPool