[][src]Struct vk_mem::AllocatorPoolCreateInfo

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,
}

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 ash::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

impl Clone for AllocatorPoolCreateInfo[src]

impl Debug for AllocatorPoolCreateInfo[src]

impl Default for AllocatorPoolCreateInfo[src]

Construct AllocatorPoolCreateInfo with default values

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.