pub trait AllocationTrait {
    unsafe fn memory(&self) -> DeviceMemory;
    fn offset(&self) -> u64;
    fn size(&self) -> u64;
    fn mapped_ptr(&self) -> Option<NonNull<c_void>>;
}

Required Methods§

Returns the vk::DeviceMemory object that is backing this allocation.

Returns the offset of the allocation on the vk::DeviceMemory. When binding the memory to a buffer or image, this offset needs to be supplied as well.

Returns the size of the allocation

Returns a valid mapped pointer if the memory is host visible, otherwise it will return None. The pointer already points to the exact memory region of the suballocation, so no offset needs to be applied.

Implementations on Foreign Types§

Implementors§