#[repr(C)]
pub struct VmaBudget { pub statistics: VmaStatistics, pub usage: DeviceSize, pub budget: DeviceSize, }
Expand description

\brief Statistics of current memory usage and available budget for a specific memory heap.

These are fast to calculate. See function vmaGetHeapBudgets().

Fields

statistics: VmaStatistics

\brief Statistics fetched from the library.

usage: DeviceSize

\brief Estimated current memory usage of the program, in bytes.

Fetched from system using VK_EXT_memory_budget extension if enabled.

It might be different than statistics.blockBytes (usually higher) due to additional implicit objects also occupying the memory, like swapchain, pipelines, descriptor heaps, command buffers, or VkDeviceMemory blocks allocated outside of this library, if any.

budget: DeviceSize

\brief Estimated amount of memory available to the program, in bytes.

Fetched from system using VK_EXT_memory_budget extension if enabled.

It might be different (most probably smaller) than VkMemoryHeap::size[heapIndex] due to factors external to the program, decided by the operating system. Difference budget - usage is the amount of additional memory that can probably be allocated without problems. Exceeding the budget may result in various problems.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.