Vulkan Memory Allocator
Loading...
Searching...
No Matches
Public Attributes | List of all members
VmaBufferAllocatorCreateInfo Struct Reference

Parameters of created VmaBufferAllocator object to be passed to vmaCreateBufferAllocator(). More...

Public Attributes

VmaBufferAllocatorCreateFlags flags
 Flags - use VmaBufferAllocatorCreateFlagBits. More...
 
VkBufferCreateInfo bufferCreateInfo
 Parameters of Vulkan buffers to be created internally by the created VmaBufferAllocator. More...
 
VmaAllocationCreateInfo allocationCreateInfo
 Parameters of allocations to be created internally for buffers. More...
 
size_t minBufferCount
 Minimum number of buffers to be created and always exist during lifetime of the created allocator. Default: 0. More...
 
size_t maxBufferCount
 Maximum number of buffers that can be created by the allocator. 0 means no limit. More...
 
VkDeviceSize preferredBufferSize
 Preferred size of a single VkBuffer to be created by the allocator. 0 means default, which is currently 64 MB. More...
 
VkDeviceSize minSuballocationAlignment
 Minimum alignment to be used for all suballocations created from this allocator. 0 or 1 means no minimum alignment is specified. More...
 

Detailed Description

Parameters of created VmaBufferAllocator object to be passed to vmaCreateBufferAllocator().

Member Data Documentation

◆ allocationCreateInfo

VmaAllocationCreateInfo VmaBufferAllocatorCreateInfo::allocationCreateInfo

Parameters of allocations to be created internally for buffers.

The structure is copied, so you can free the memory of if together with the entire VmaBufferAllocatorCreateInfo after the creation call, but it has non-null VmaAllocationCreateInfo::pool, this pool must remain alive for the whole lifetime of the created allocator.

◆ bufferCreateInfo

VkBufferCreateInfo VmaBufferAllocatorCreateInfo::bufferCreateInfo

Parameters of Vulkan buffers to be created internally by the created VmaBufferAllocator.

size parameter has special meaning. Set it to 0 to allow the allocator to managed buffer sizes automatically. This also allows buffer sizes to vary and allows to use VMA_BUFFER_SUBALLOCATION_CREATE_DEDICATED_BUFFER_BIT. Set it to some other value to enforce that all buffers created by the allocator must have this specific size. This will also disallow to use VMA_BUFFER_SUBALLOCATION_CREATE_DEDICATED_BUFFER_BIT. Note this is different than VmaBufferAllocatorCreateInfo::preferredBufferSize.

The structure is copied, so you can free the memory of if together with the entire VmaBufferAllocatorCreateInfo after the creation call, but if points to additional memory, e.g. using pNext chain or pQueueFamilyIndices, this memory must remain alive and unchanged for the whole lifetime of the created allocator.

◆ flags

VmaBufferAllocatorCreateFlags VmaBufferAllocatorCreateInfo::flags

◆ maxBufferCount

size_t VmaBufferAllocatorCreateInfo::maxBufferCount

Maximum number of buffers that can be created by the allocator. 0 means no limit.

◆ minBufferCount

size_t VmaBufferAllocatorCreateInfo::minBufferCount

Minimum number of buffers to be created and always exist during lifetime of the created allocator. Default: 0.

Set it to 0 if you don't want to reserve a minimum number of buffers, so that no buffers are created before first suballocation is made.

◆ minSuballocationAlignment

VkDeviceSize VmaBufferAllocatorCreateInfo::minSuballocationAlignment

Minimum alignment to be used for all suballocations created from this allocator. 0 or 1 means no minimum alignment is specified.

As aligment for a new suballocation, maximum of this parameter and VmaBufferSuballocationCreateInfo::alignment will be taken.

◆ preferredBufferSize

VkDeviceSize VmaBufferAllocatorCreateInfo::preferredBufferSize

Preferred size of a single VkBuffer to be created by the allocator. 0 means default, which is currently 64 MB.

Note this is different than VmaBufferAllocatorCreateInfo::bufferCreateInfo size parameter. By setting non-zero preferredBufferSize, you still allow the allocator to create buffers of different sizes, smaller and larger than this number. This also doesn't disallow to use VMA_BUFFER_SUBALLOCATION_CREATE_DEDICATED_BUFFER_BIT.


The documentation for this struct was generated from the following file: