pub struct Allocator(/* private fields */);Implementations§
Source§impl Allocator
impl Allocator
pub unsafe fn new(options: &AllocatorOptions<'_>) -> VkResult<Self>
pub fn get_physical_device_properties(&self) -> PhysicalDeviceProperties
pub fn get_memory_properties(&self) -> &PhysicalDeviceMemoryProperties
pub fn calculate_statistics(&self) -> VkResult<VmaTotalStatistics>
pub fn get_heap_budgets(&self) -> VkResult<Vec<VmaBudget>>
pub fn check_corruption(&self, flags: MemoryPropertyFlags) -> VkResult<()>
pub fn get_allocation_info(&self, allocation: Allocation) -> VmaAllocationInfo
pub unsafe fn set_current_frame_index(&self, frame_index: u32)
pub unsafe fn map_memory(&self, allocation: Allocation) -> VkResult<*mut u8>
pub unsafe fn unmap_memory(&self, allocation: Allocation)
pub unsafe fn bind_buffer_memory( &self, allocation: Allocation, buffer: Buffer, ) -> VkResult<()>
pub unsafe fn bind_buffer_memory2( &self, allocation: Allocation, allocation_local_offset: DeviceSize, buffer: Buffer, next: *const c_void, ) -> VkResult<()>
pub unsafe fn bind_image_memory( &self, allocation: Allocation, image: Image, ) -> VkResult<()>
pub unsafe fn bind_image_memory2( &self, allocation: Allocation, allocation_local_offset: DeviceSize, image: Image, next: *const c_void, ) -> VkResult<()>
pub unsafe fn free_memory(&self, allocation: Allocation)
pub unsafe fn free_memory_pages(&self, allocations: &[Allocation])
pub unsafe fn destroy_buffer(&self, buffer: Buffer, allocation: Allocation)
pub unsafe fn destroy_image(&self, image: Image, allocation: Allocation)
pub unsafe fn flush_allocation( &self, allocation: Allocation, offset: DeviceSize, size: DeviceSize, ) -> VkResult<()>
pub unsafe fn invalidate_allocation( &self, allocation: Allocation, offset: DeviceSize, size: DeviceSize, ) -> VkResult<()>
Source§impl Allocator
impl Allocator
pub fn create_pool( self: &Arc<Self>, options: &PoolOptions<'_>, ) -> VkResult<Pool>
pub fn get_default_pool(self: &Arc<Self>) -> Pool
Trait Implementations§
Source§impl Alloc for Allocator
impl Alloc for Allocator
fn allocator(&self) -> &Allocator
fn pool(&self) -> PoolHandle
unsafe fn find_memory_type_index( &self, memory_type_bits: u32, options: &AllocationOptions, ) -> VkResult<u32>
unsafe fn find_memory_type_index_for_buffer_info( &self, buffer_info: impl Cast<Target = BufferCreateInfo>, options: &AllocationOptions, ) -> VkResult<u32>
unsafe fn find_memory_type_index_for_image_info( &self, image_info: impl Cast<Target = ImageCreateInfo>, options: &AllocationOptions, ) -> VkResult<u32>
unsafe fn allocate_memory( &self, requirements: impl Cast<Target = MemoryRequirements>, options: &AllocationOptions, ) -> VkResult<Allocation>
unsafe fn allocate_memory_pages( &self, requirements: impl Cast<Target = MemoryRequirements>, options: &AllocationOptions, num_pages: usize, ) -> VkResult<Vec<Allocation>>
unsafe fn allocate_memory_for_buffer( &self, buffer: Buffer, options: &AllocationOptions, ) -> VkResult<Allocation>
unsafe fn allocate_memory_for_image( &self, image: Image, options: &AllocationOptions, ) -> VkResult<Allocation>
unsafe fn create_buffer( &self, buffer_info: impl Cast<Target = BufferCreateInfo>, options: &AllocationOptions, ) -> VkResult<(Buffer, Allocation)>
unsafe fn create_buffer_with_alignment( &self, buffer_info: impl Cast<Target = BufferCreateInfo>, options: &AllocationOptions, min_alignment: DeviceSize, ) -> VkResult<(Buffer, Allocation)>
unsafe fn create_image( &self, image_info: impl Cast<Target = ImageCreateInfo>, options: &AllocationOptions, ) -> VkResult<(Image, Allocation)>
impl Send for Allocator
impl Sync for Allocator
Auto Trait Implementations§
impl Freeze for Allocator
impl RefUnwindSafe 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