pub trait GpuBufferManager {
// Required methods
fn allocate_buffer(&mut self, size: usize) -> Result<GpuBuffer>;
fn deallocate_buffer(&mut self, buffer: GpuBuffer) -> Result<()>;
fn pool_stats(&self) -> BufferPoolStats;
}
Expand description
GPU buffer management trait
Required Methods§
Sourcefn allocate_buffer(&mut self, size: usize) -> Result<GpuBuffer>
fn allocate_buffer(&mut self, size: usize) -> Result<GpuBuffer>
Allocate buffer with specified size
Sourcefn deallocate_buffer(&mut self, buffer: GpuBuffer) -> Result<()>
fn deallocate_buffer(&mut self, buffer: GpuBuffer) -> Result<()>
Deallocate buffer
Sourcefn pool_stats(&self) -> BufferPoolStats
fn pool_stats(&self) -> BufferPoolStats
Get buffer pool statistics