From a3d4905b1f73126aec49b53552a2bc2a407609ec Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Wed, 28 Jul 2021 14:57:39 +0200 Subject: [PATCH] Moved main documentation text from the beginning to the end of file Disabled VERBATIM_HEADERS in Doxyfile. Regenerated the docs. --- Doxyfile | 2 +- docs/html/allocation_annotation.html | 16 +- docs/html/choosing_memory_type.html | 16 +- docs/html/custom_memory_pools.html | 16 +- docs/html/defragmentation.html | 20 +- .../dir_d44c64559bbebec7f509842c48db8b23.html | 2 +- docs/html/doxygen.png | Bin 3779 -> 0 bytes docs/html/files.html | 2 +- docs/html/lost_allocations.html | 12 +- docs/html/memory_mapping.html | 20 +- docs/html/quick_start.html | 16 +- docs/html/resource_aliasing.html | 6 +- docs/html/search/all_12.html | 36 - docs/html/search/all_12.js | 157 - docs/html/search/classes_1.html | 30 - docs/html/search/classes_1.js | 22 - docs/html/search/close.png | Bin 273 -> 0 bytes docs/html/search/defines_1.html | 36 - docs/html/search/defines_1.js | 10 - docs/html/search/mag_sel.png | Bin 465 -> 0 bytes docs/html/struct__-members.html | 86 - docs/html/struct__.html | 232 - docs/html/struct_vma_allocation.html | 4 +- .../struct_vma_allocation_create_info.html | 4 +- docs/html/struct_vma_allocation_info.html | 4 +- docs/html/struct_vma_allocator.html | 4 +- .../struct_vma_allocator_create_info.html | 4 +- docs/html/struct_vma_allocator_info.html | 4 +- docs/html/struct_vma_budget.html | 4 +- .../struct_vma_defragmentation_context.html | 4 +- .../html/struct_vma_defragmentation_info.html | 4 +- .../struct_vma_defragmentation_info2.html | 4 +- .../struct_vma_defragmentation_pass_info.html | 4 +- ...ct_vma_defragmentation_pass_move_info.html | 4 +- .../struct_vma_defragmentation_stats.html | 4 +- .../struct_vma_device_memory_callbacks.html | 4 +- docs/html/struct_vma_pool.html | 4 +- docs/html/struct_vma_pool_create_info.html | 4 +- docs/html/struct_vma_pool_stats.html | 4 +- docs/html/struct_vma_record_settings.html | 4 +- docs/html/struct_vma_stat_info.html | 4 +- docs/html/struct_vma_stats.html | 4 +- docs/html/struct_vma_vulkan_functions.html | 4 +- docs/html/vk__mem__alloc_8h.html | 4 +- docs/html/vk__mem__alloc_8h_source.html | 16795 ---------------- docs/html/vk_khr_dedicated_allocation.html | 2 +- include/vk_mem_alloc.h | 3820 ++-- 47 files changed, 2017 insertions(+), 19425 deletions(-) delete mode 100644 docs/html/doxygen.png delete mode 100644 docs/html/search/all_12.html delete mode 100644 docs/html/search/all_12.js delete mode 100644 docs/html/search/classes_1.html delete mode 100644 docs/html/search/classes_1.js delete mode 100644 docs/html/search/close.png delete mode 100644 docs/html/search/defines_1.html delete mode 100644 docs/html/search/defines_1.js delete mode 100644 docs/html/search/mag_sel.png delete mode 100644 docs/html/struct__-members.html delete mode 100644 docs/html/struct__.html delete mode 100644 docs/html/vk__mem__alloc_8h_source.html diff --git a/Doxyfile b/Doxyfile index 1cf0a07..5750c8d 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1146,7 +1146,7 @@ USE_HTAGS = NO # See also: Section \class. # The default value is: YES. -VERBATIM_HEADERS = YES +VERBATIM_HEADERS = NO # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: diff --git a/docs/html/allocation_annotation.html b/docs/html/allocation_annotation.html index cd4bf38..d0debc7 100644 --- a/docs/html/allocation_annotation.html +++ b/docs/html/allocation_annotation.html @@ -84,18 +84,18 @@ Allocation user data
VkBuffer buffer;
VmaAllocation allocation;
vmaCreateBuffer(allocator, &bufferInfo, &allocCreateInfo, &buffer, &allocation, nullptr);
-
Definition: vk_mem_alloc.h:2897
-
void * pUserData
Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...
Definition: vk_mem_alloc.h:2936
-
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2905
+
Definition: vk_mem_alloc.h:986
+
void * pUserData
Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...
Definition: vk_mem_alloc.h:1025
+
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:994
Represents single memory allocation.
-
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2739
+
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:828
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:

vmaGetAllocationInfo(allocator, allocation, &allocInfo);
MyBufferMetadata* pMetadata = (MyBufferMetadata*)allocInfo.pUserData;
-
Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3264
-
void * pUserData
Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...
Definition: vk_mem_alloc.h:3313
+
Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:1353
+
void * pUserData
Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...
Definition: vk_mem_alloc.h:1402
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;
VmaAllocation allocation;
vmaCreateImage(allocator, &imageInfo, &allocCreateInfo, &image, &allocation, nullptr);
-
VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:2899
+
VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:988
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:2842
+
@ VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT
Definition: vk_mem_alloc.h:931

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.

vmaGetAllocationInfo(allocator, allocation, &allocInfo);
diff --git a/docs/html/choosing_memory_type.html b/docs/html/choosing_memory_type.html index 6823a35..e3d532c 100644 --- a/docs/html/choosing_memory_type.html +++ b/docs/html/choosing_memory_type.html @@ -93,10 +93,10 @@ Usage
VkBuffer buffer;
VmaAllocation allocation;
vmaCreateBuffer(allocator, &bufferInfo, &allocInfo, &buffer, &allocation, nullptr);
-
Definition: vk_mem_alloc.h:2897
-
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2905
+
Definition: vk_mem_alloc.h:986
+
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:994
Represents single memory allocation.
-
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2739
+
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:828
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;
VmaAllocation allocation;
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:2915
-
VkMemoryPropertyFlags requiredFlags
Flags that must be set in a Memory Type chosen for an allocation.
Definition: vk_mem_alloc.h:2910
-
VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:2899
-
@ 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:2816
+
VkMemoryPropertyFlags preferredFlags
Flags that preferably should be set in a memory type chosen for an allocation.
Definition: vk_mem_alloc.h:1004
+
VkMemoryPropertyFlags requiredFlags
Flags that must be set in a Memory Type chosen for an allocation.
Definition: vk_mem_alloc.h:999
+
VmaAllocationCreateFlags flags
Use VmaAllocationCreateFlagBits enum.
Definition: vk_mem_alloc.h:988
+
@ 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:905

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;
VmaAllocation allocation;
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:2923
+
uint32_t memoryTypeBits
Bitmask containing one bit set for every memory type acceptable for this allocation.
Definition: vk_mem_alloc.h:1012

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 fd7a5a4..a141164 100644 --- a/docs/html/custom_memory_pools.html +++ b/docs/html/custom_memory_pools.html @@ -105,13 +105,13 @@ $(function() {
VmaAllocation alloc;
VmaAllocationInfo allocInfo;
vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo);
-
Definition: vk_mem_alloc.h:2897
-
VmaPool pool
Pool that this allocation should be created in.
Definition: vk_mem_alloc.h:2929
+
Definition: vk_mem_alloc.h:986
+
VmaPool pool
Pool that this allocation should be created in.
Definition: vk_mem_alloc.h:1018
Represents single memory allocation.
-
Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:3264
-
Describes parameter of created VmaPool.
Definition: vk_mem_alloc.h:3065
-
uint32_t memoryTypeIndex
Vulkan memory type index to allocate this pool from.
Definition: vk_mem_alloc.h:3068
-
size_t maxBlockCount
Maximum number of blocks that can be allocated in this pool. Optional.
Definition: vk_mem_alloc.h:3093
+
Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().
Definition: vk_mem_alloc.h:1353
+
Describes parameter of created VmaPool.
Definition: vk_mem_alloc.h:1154
+
uint32_t memoryTypeIndex
Vulkan memory type index to allocate this pool from.
Definition: vk_mem_alloc.h:1157
+
size_t maxBlockCount
Maximum number of blocks that can be allocated in this pool. Optional.
Definition: vk_mem_alloc.h:1182
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
VmaPoolCreateInfo poolCreateInfo = {};
poolCreateInfo.memoryTypeIndex = memTypeIndex;
// ...
-
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:2905
-
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:2739
+
VmaMemoryUsage usage
Intended usage of memory.
Definition: vk_mem_alloc.h:994
+
@ VMA_MEMORY_USAGE_GPU_ONLY
Definition: vk_mem_alloc.h:828
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: