Struct gpu_allocator::d3d12::Allocator
source · pub struct Allocator { /* private fields */ }
Implementations§
source§impl Allocator
impl Allocator
pub fn device(&self) -> &ID3D12DeviceVersion
pub fn new(desc: &AllocatorCreateDesc) -> Result<Self>
pub fn allocate( &mut self, desc: &AllocationCreateDesc<'_>, ) -> Result<Allocation>
pub fn free(&mut self, allocation: Allocation) -> Result<()>
pub fn rename_allocation( &mut self, allocation: &mut Allocation, name: &str, ) -> Result<()>
pub fn report_memory_leaks(&self, log_level: Level)
sourcepub fn create_resource(
&mut self,
desc: &ResourceCreateDesc<'_>,
) -> Result<Resource>
pub fn create_resource( &mut self, desc: &ResourceCreateDesc<'_>, ) -> Result<Resource>
Create a resource according to the provided parameters.
Created resources should be freed at the end of their lifetime by calling Self::free_resource()
.
sourcepub fn free_resource(&mut self, resource: Resource) -> Result<()>
pub fn free_resource(&mut self, resource: Resource) -> Result<()>
Free a resource and its memory.
pub fn generate_report(&self) -> AllocatorReport
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Allocator
impl !RefUnwindSafe for Allocator
impl Send for Allocator
impl Sync for Allocator
impl Unpin for Allocator
impl !UnwindSafe for Allocator
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