diff --git a/docs/html/allocation_annotation.html b/docs/html/allocation_annotation.html
index 4329ae0..312e409 100644
--- a/docs/html/allocation_annotation.html
+++ b/docs/html/allocation_annotation.html
@@ -84,18 +84,18 @@ Allocation user data
VkBuffer buffer;
vmaCreateBuffer (allocator, &bufferInfo, &allocCreateInfo, &buffer, &allocation,
nullptr );
-Definition: vk_mem_alloc.h:2881
-void * pUserData
Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...
Definition: vk_mem_alloc.h:2920
-VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2889
+Definition: vk_mem_alloc.h:2879
+void * pUserData
Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...
Definition: vk_mem_alloc.h:2918
+VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2887
Represents single memory allocation.
-@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2723
+@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2721
VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)
The pointer may be later retrieved as VmaAllocationInfo::pUserData :
MyBufferMetadata* pMetadata = (MyBufferMetadata*)allocInfo.
pUserData ;
-
Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3231
-
void * pUserData
Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...
Definition: vk_mem_alloc.h:3280
+
Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3229
+
void * pUserData
Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...
Definition: vk_mem_alloc.h:3278
void vmaGetAllocationInfo(VmaAllocator allocator, VmaAllocation allocation, VmaAllocationInfo *pAllocationInfo)
Returns current information about specified allocation and atomically marks it as used in current fra...
It can also be changed using function vmaSetAllocationUserData() .
Values of (non-zero) allocations' pUserData
are printed in JSON report created by vmaBuildStatsString() , in hexadecimal form.
@@ -116,9 +116,9 @@ Allocation names
VkImage image;
vmaCreateImage (allocator, &imageInfo, &allocCreateInfo, &image, &allocation,
nullptr );
-VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:2883
+VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:2881
VkResult vmaCreateImage(VmaAllocator allocator, const VkImageCreateInfo *pImageCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkImage *pImage, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)
Function similar to vmaCreateBuffer().
-@ VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT
Definition: vk_mem_alloc.h:2826
+@ VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT
Definition: vk_mem_alloc.h:2824
The value of pUserData
pointer of the allocation will be different than the one you passed when setting allocation's name - pointing to a buffer managed internally that holds copy of the string.
diff --git a/docs/html/choosing_memory_type.html b/docs/html/choosing_memory_type.html
index f48a897..db95c57 100644
--- a/docs/html/choosing_memory_type.html
+++ b/docs/html/choosing_memory_type.html
@@ -93,10 +93,10 @@ Usage
VkBuffer buffer;
vmaCreateBuffer (allocator, &bufferInfo, &allocInfo, &buffer, &allocation,
nullptr );
-
Definition: vk_mem_alloc.h:2881
-
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2889
+
Definition: vk_mem_alloc.h:2879
+
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2887
Represents single memory allocation.
-
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2723
+
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2721
VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)
Required and preferred flags
@@ -109,10 +109,10 @@ Required and preferred flags
VkBuffer buffer;
vmaCreateBuffer (allocator, &bufferInfo, &allocInfo, &buffer, &allocation,
nullptr );
-VkMemoryPropertyFlags preferredFlags
Flags that preferably should be set in a memory type chosen for an allocation.
Definition: vk_mem_alloc.h:2899
-VkMemoryPropertyFlags requiredFlags
Flags that must be set in a Memory Type chosen for an allocation.
Definition: vk_mem_alloc.h:2894
-VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:2883
-@ VMA_ALLOCATION_CREATE_MAPPED_BIT
Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.
Definition: vk_mem_alloc.h:2800
+VkMemoryPropertyFlags preferredFlags
Flags that preferably should be set in a memory type chosen for an allocation.
Definition: vk_mem_alloc.h:2897
+VkMemoryPropertyFlags requiredFlags
Flags that must be set in a Memory Type chosen for an allocation.
Definition: vk_mem_alloc.h:2892
+VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:2881
+@ VMA_ALLOCATION_CREATE_MAPPED_BIT
Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.
Definition: vk_mem_alloc.h:2798
A memory type is chosen that has all the required flags and as many preferred flags set as possible.
If you use VmaAllocationCreateInfo::usage , it is just internally converted to a set of required and preferred flags.
@@ -127,7 +127,7 @@ Explicit memory types
VkBuffer buffer;
vmaCreateBuffer (allocator, &bufferInfo, &allocInfo, &buffer, &allocation,
nullptr );
-uint32_t memoryTypeBits
Bitmask containing one bit set for every memory type acceptable for this allocation.
Definition: vk_mem_alloc.h:2907
+uint32_t memoryTypeBits
Bitmask containing one bit set for every memory type acceptable for this allocation.
Definition: vk_mem_alloc.h:2905
Custom memory pools
If you allocate from custom memory pool, all the ways of specifying memory requirements described above are not applicable and the aforementioned members of VmaAllocationCreateInfo structure are ignored. Memory type is selected explicitly when creating the pool and then used to make all the allocations from that pool. For further details, see Custom memory pools .
diff --git a/docs/html/custom_memory_pools.html b/docs/html/custom_memory_pools.html
index 8e8fb8d..2d9ec9a 100644
--- a/docs/html/custom_memory_pools.html
+++ b/docs/html/custom_memory_pools.html
@@ -105,13 +105,13 @@ $(function() {
vmaCreateBuffer (allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo);
-Definition: vk_mem_alloc.h:2881
-VmaPool pool
Pool that this allocation should be created in.
Definition: vk_mem_alloc.h:2913
+Definition: vk_mem_alloc.h:2879
+VmaPool pool
Pool that this allocation should be created in.
Definition: vk_mem_alloc.h:2911
Represents single memory allocation.
-Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3231
-Describes parameter of created VmaPool.
Definition: vk_mem_alloc.h:3049
-uint32_t memoryTypeIndex
Vulkan memory type index to allocate this pool from.
Definition: vk_mem_alloc.h:3052
-size_t maxBlockCount
Maximum number of blocks that can be allocated in this pool. Optional.
Definition: vk_mem_alloc.h:3077
+Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3229
+Describes parameter of created VmaPool.
Definition: vk_mem_alloc.h:3047
+uint32_t memoryTypeIndex
Vulkan memory type index to allocate this pool from.
Definition: vk_mem_alloc.h:3050
+size_t maxBlockCount
Maximum number of blocks that can be allocated in this pool. Optional.
Definition: vk_mem_alloc.h:3075
Represents custom memory pool.
VkResult vmaCreatePool(VmaAllocator allocator, const VmaPoolCreateInfo *pCreateInfo, VmaPool *pPool)
Allocates Vulkan device memory and creates VmaPool object.
VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)
@@ -136,8 +136,8 @@ Choosing memory type index
-VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2889
-@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2723
+VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2887
+@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2721
VkResult vmaFindMemoryTypeIndexForBufferInfo(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)
Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.
When creating buffers/images allocated in that pool, provide following parameters:
diff --git a/docs/html/defragmentation.html b/docs/html/defragmentation.html
index b0ae912..3174fd0 100644
--- a/docs/html/defragmentation.html
+++ b/docs/html/defragmentation.html
@@ -129,15 +129,15 @@ Defragmenting CPU memory
}
}
-Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3231
+Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3229
Represents main object of this library initialized.
Represents Opaque object that represents started defragmentation process.
-Parameters for defragmentation.
Definition: vk_mem_alloc.h:3630
-uint32_t allocationCount
Number of allocations in pAllocations array.
Definition: vk_mem_alloc.h:3636
-VkBool32 * pAllocationsChanged
Optional, output. Pointer to array that will be filled with information whether the allocation at cer...
Definition: vk_mem_alloc.h:3651
-uint32_t maxCpuAllocationsToMove
Maximum number of allocations that can be moved to a different place using transfers on CPU side,...
Definition: vk_mem_alloc.h:3680
-const VmaAllocation * pAllocations
Pointer to array of allocations that can be defragmented.
Definition: vk_mem_alloc.h:3645
-VkDeviceSize maxCpuBytesToMove
Maximum total numbers of bytes that can be copied while moving allocations to different places using ...
Definition: vk_mem_alloc.h:3675
+Parameters for defragmentation.
Definition: vk_mem_alloc.h:3628
+uint32_t allocationCount
Number of allocations in pAllocations array.
Definition: vk_mem_alloc.h:3634
+VkBool32 * pAllocationsChanged
Optional, output. Pointer to array that will be filled with information whether the allocation at cer...
Definition: vk_mem_alloc.h:3649
+uint32_t maxCpuAllocationsToMove
Maximum number of allocations that can be moved to a different place using transfers on CPU side,...
Definition: vk_mem_alloc.h:3678
+const VmaAllocation * pAllocations
Pointer to array of allocations that can be defragmented.
Definition: vk_mem_alloc.h:3643
+VkDeviceSize maxCpuBytesToMove
Maximum total numbers of bytes that can be copied while moving allocations to different places using ...
Definition: vk_mem_alloc.h:3673
VkResult vmaDefragmentationBegin(VmaAllocator allocator, const VmaDefragmentationInfo2 *pInfo, VmaDefragmentationStats *pStats, VmaDefragmentationContext *pContext)
Begins defragmentation process.
VkResult vmaBindBufferMemory(VmaAllocator allocator, VmaAllocation allocation, VkBuffer buffer)
Binds buffer to allocation.
void vmaGetAllocationInfo(VmaAllocator allocator, VmaAllocation allocation, VmaAllocationInfo *pAllocationInfo)
Returns current information about specified allocation and atomically marks it as used in current fra...
@@ -203,9 +203,9 @@ Defragmenting GPU memory
}
}
-uint32_t maxGpuAllocationsToMove
Maximum number of allocations that can be moved to a different place using transfers on GPU side,...
Definition: vk_mem_alloc.h:3690
-VkDeviceSize maxGpuBytesToMove
Maximum total numbers of bytes that can be copied while moving allocations to different places using ...
Definition: vk_mem_alloc.h:3685
-VkCommandBuffer commandBuffer
Optional. Command buffer where GPU copy commands will be posted.
Definition: vk_mem_alloc.h:3699
+uint32_t maxGpuAllocationsToMove
Maximum number of allocations that can be moved to a different place using transfers on GPU side,...
Definition: vk_mem_alloc.h:3688
+VkDeviceSize maxGpuBytesToMove
Maximum total numbers of bytes that can be copied while moving allocations to different places using ...
Definition: vk_mem_alloc.h:3683
+VkCommandBuffer commandBuffer
Optional. Command buffer where GPU copy commands will be posted.
Definition: vk_mem_alloc.h:3697
You can combine these two methods by specifying non-zero maxGpu*
as well as maxCpu*
parameters. The library automatically chooses best method to defragment each memory pool.
You may try not to block your entire program to wait until defragmentation finishes, but do it in the background, as long as you carefully fullfill requirements described in function vmaDefragmentationBegin() .
@@ -218,7 +218,7 @@ Additional notes
Defragmentation of images created with VK_IMAGE_TILING_OPTIMAL
or in any other layout may give undefined results.
If you defragment allocations bound to images, new images to be bound to new memory region after defragmentation should be created with VK_IMAGE_LAYOUT_PREINITIALIZED
and then transitioned to their original layout from before defragmentation if needed using an image memory barrier.
While using defragmentation, you may experience validation layer warnings, which you just need to ignore. See Validation layer warnings .
-Please don't expect memory to be fully compacted after defragmentation. Algorithms inside are based on some heuristics that try to maximize number of Vulkan memory blocks to make totally empty to release them, as well as to maximimze continuous empty space inside remaining blocks, while minimizing the number and size of allocations that need to be moved. Some fragmentation may still remain - this is normal.
+Please don't expect memory to be fully compacted after defragmentation. Algorithms inside are based on some heuristics that try to maximize number of Vulkan memory blocks to make totally empty to release them, as well as to maximize continuous empty space inside remaining blocks, while minimizing the number and size of allocations that need to be moved. Some fragmentation may still remain - this is normal.
Writing custom defragmentation algorithm
If you want to implement your own, custom defragmentation algorithm, there is infrastructure prepared for that, but it is not exposed through the library API - you need to hack its source code. Here are steps needed to do this:
diff --git a/docs/html/struct__-members.html b/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
similarity index 55%
rename from docs/html/struct__-members.html
rename to docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
index afd2f73..32f53c1 100644
--- a/docs/html/struct__-members.html
+++ b/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
@@ -3,9 +3,9 @@
-
+
-Vulkan Memory Allocator: Member List
+Vulkan Memory Allocator: include Directory Reference
@@ -29,10 +29,10 @@
-
+
@@ -59,28 +59,26 @@ $(function() {
+
-
-
This is the complete list of members for _ , including all inherited members.
-
+
+