Struct vk_mem_erupt::AllocatorPoolCreateInfo [−][src]
pub struct AllocatorPoolCreateInfo {
pub memory_type_index: u32,
pub flags: AllocatorPoolCreateFlags,
pub block_size: usize,
pub min_block_count: usize,
pub max_block_count: usize,
pub frame_in_use_count: u32,
}
Expand description
Description of an AllocationPool
to be created.
Fields
memory_type_index: u32
Vulkan memory type index to allocate this pool from.
flags: AllocatorPoolCreateFlags
Use combination of AllocatorPoolCreateFlags
block_size: usize
Size of a single erupt::vk::DeviceMemory
block to be allocated as part of this
pool, in bytes.
Specify non-zero to set explicit, constant size of memory blocks used by this pool.
Leave 0 to use default and let the library manage block sizes automatically. Sizes of particular blocks may vary.
min_block_count: usize
Minimum number of blocks to be always allocated in this pool, even if they stay empty.
Set to 0 to have no preallocated blocks and allow the pool be completely empty.
max_block_count: usize
Maximum number of blocks that can be allocated in this pool.
Set to 0 to use default, which is no limit.
Set to same value as AllocatorPoolCreateInfo::min_block_count
to have fixed amount
of memory allocated throughout whole lifetime of this pool.
frame_in_use_count: u32
Maximum number of additional frames that are in use at the same time as current frame.
This value is used only when you make allocations with AllocationCreateFlags::CAN_BECOME_LOST
flag.
Such allocations cannot become lost if:
allocation.lastUseFrameIndex >= allocator.currentFrameIndex - frameInUseCount
.
For example, if you double-buffer your command buffers, so resources used for rendering in previous frame may still be in use by the GPU at the moment you allocate resources needed for the current frame, set this value to 1.
If you want to allow any allocations other than used in the current frame to become lost, set this value to 0.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AllocatorPoolCreateInfo
impl Send for AllocatorPoolCreateInfo
impl Sync for AllocatorPoolCreateInfo
impl Unpin for AllocatorPoolCreateInfo
impl UnwindSafe for AllocatorPoolCreateInfo
Blanket Implementations
Mutably borrows from an owned value. Read more