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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Construct AllocatorPoolCreateInfo with default values

Returns the “default value” for a type. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.