Struct gpu_allocator::d3d12::Allocation
source · [−]pub struct Allocation { /* private fields */ }Implementations
sourceimpl Allocation
impl Allocation
pub fn chunk_id(&self) -> Option<NonZeroU64>
sourcepub unsafe fn heap(&self) -> Dx12HeapPtr
pub unsafe fn heap(&self) -> Dx12HeapPtr
Returns the d3d12::ID3D12Heap object that is backing this allocation.
This heap object can be shared with multiple other allocations and shouldn’t be freed (or allocated from)
without this library, because that will lead to undefined behavior.
Safety
The result of this function can safely be used to pass into d3d12::ID3D12Device::CreatePlacedResource().
It’s exposed for this reason. Keep in mind to also pass Self::offset() along to it.
sourcepub fn offset(&self) -> u64
pub fn offset(&self) -> u64
Returns the offset of the allocation on the d3d12::ID3D12Heap.
When creating a placed resources, this offset needs to be supplied as well.
pub fn is_null(&self) -> bool
Trait Implementations
sourceimpl Debug for Allocation
impl Debug for Allocation
sourceimpl Default for Allocation
impl Default for Allocation
impl Send for Allocation
impl Sync for Allocation
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more