Vulkan Memory Allocator
|
Describes parameter of created VmaPool. More...
#include <vk_mem_alloc.h>
Public Attributes | |
uint32_t | memoryTypeIndex |
Vulkan memory type index to allocate this pool from. More... | |
VmaPoolCreateFlags | flags |
Use combination of VmaPoolCreateFlagBits. More... | |
VkDeviceSize | blockSize |
Size of a single VkDeviceMemory block to be allocated as part of this pool, in bytes. More... | |
size_t | minBlockCount |
Minimum number of blocks to be always allocated in this pool, even if they stay empty. More... | |
size_t | maxBlockCount |
Maximum number of blocks that can be allocated in this pool. Optional. More... | |
uint32_t | frameInUseCount |
Maximum number of additional frames that are in use at the same time as current frame. More... | |
Describes parameter of created VmaPool.
VkDeviceSize VmaPoolCreateInfo::blockSize |
Size of a single VkDeviceMemory
block to be allocated as part of this pool, in bytes.
Optional. Leave 0 to use default.
VmaPoolCreateFlags VmaPoolCreateInfo::flags |
Use combination of VmaPoolCreateFlagBits.
uint32_t VmaPoolCreateInfo::frameInUseCount |
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 VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT flag. Such allocation 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.
size_t VmaPoolCreateInfo::maxBlockCount |
Maximum number of blocks that can be allocated in this pool. Optional.
Optional. Set to 0 to use SIZE_MAX
, which means no limit.
Set to same value as minBlockCount to have fixed amount of memory allocated throuout whole lifetime of this pool.
uint32_t VmaPoolCreateInfo::memoryTypeIndex |
Vulkan memory type index to allocate this pool from.
size_t VmaPoolCreateInfo::minBlockCount |
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 let the pool be completely empty.