Merge branch 'v2_release'
diff --git a/bin/VulkanSample_Release_2015.exe b/bin/VulkanSample_Release_2015.exe
deleted file mode 100644
index 381625f..0000000
--- a/bin/VulkanSample_Release_2015.exe
+++ /dev/null
Binary files differ
diff --git a/bin/VulkanSample_Release_vs2015.exe b/bin/VulkanSample_Release_vs2015.exe
new file mode 100644
index 0000000..8f46ee8
--- /dev/null
+++ b/bin/VulkanSample_Release_vs2015.exe
Binary files differ
diff --git a/docs/html/allocation_annotation.html b/docs/html/allocation_annotation.html
index 5032b64..e9cd214 100644
--- a/docs/html/allocation_annotation.html
+++ b/docs/html/allocation_annotation.html
@@ -69,13 +69,13 @@
 <div class="textblock"><h1><a class="anchor" id="allocation_user_data"></a>
 Allocation user data</h1>
 <p>You can annotate allocations with your own information, e.g. for debugging purposes. To do that, fill <a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> field when creating an allocation. It's an opaque <code>void*</code> pointer. You can use it e.g. as a pointer, some handle, index, key, ordinal number or any other value that would associate the allocation with your custom metadata.</p>
-<div class="fragment"><div class="line">VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line"><span class="comment">// Fill bufferInfo...</span></div><div class="line"></div><div class="line">MyBufferMetadata* pMetadata = CreateBufferMetadata();</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">pUserData</a> = pMetadata;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line">VmaAllocation allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocCreateInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>The pointer may be later retrieved as <a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13" title="Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...">VmaAllocationInfo::pUserData</a>:</p>
+<div class="fragment"><div class="line">VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line"><span class="comment">// Fill bufferInfo...</span></div><div class="line"></div><div class="line">MyBufferMetadata* pMetadata = CreateBufferMetadata();</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">pUserData</a> = pMetadata;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocCreateInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>The pointer may be later retrieved as <a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13" title="Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...">VmaAllocationInfo::pUserData</a>:</p>
 <div class="fragment"><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, allocation, &amp;allocInfo);</div><div class="line">MyBufferMetadata* pMetadata = (MyBufferMetadata*)allocInfo.<a class="code" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a>;</div></div><!-- fragment --><p>It can also be changed using function <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value. ">vmaSetAllocationUserData()</a>.</p>
 <p>Values of (non-zero) allocations' <code>pUserData</code> are printed in JSON report created by <a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as string in JSON format. ">vmaBuildStatsString()</a>, in hexadecimal form.</p>
 <h1><a class="anchor" id="allocation_names"></a>
 Allocation names</h1>
-<p>There is alternative mode available where <code>pUserData</code> pointer is used to point to a null-terminated string, giving a name to the allocation. To use this mode, set <code>VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</code> flag in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum. ">VmaAllocationCreateInfo::flags</a>. Then <code>pUserData</code> passed as <a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> or argument to <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value. ">vmaSetAllocationUserData()</a> must be either null or pointer to a null-terminated string. The library creates internal copy of the string, so the pointer you pass doesn't need to be valid for whole lifetime of the allocation. You can free it after the call.</p>
-<div class="fragment"><div class="line">VkImageCreateInfo imageInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };</div><div class="line"><span class="comment">// Fill imageInfo...</span></div><div class="line"></div><div class="line">std::string imageName = <span class="stringliteral">&quot;Texture: &quot;</span>;</div><div class="line">imageName += fileName;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">pUserData</a> = imageName.c_str();</div><div class="line"></div><div class="line">VkImage image;</div><div class="line">VmaAllocation allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a>(allocator, &amp;imageInfo, &amp;allocCreateInfo, &amp;image, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>The value of <code>pUserData</code> 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.</p>
+<p>There is alternative mode available where <code>pUserData</code> pointer is used to point to a null-terminated string, giving a name to the allocation. To use this mode, set <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a> flag in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum. ">VmaAllocationCreateInfo::flags</a>. Then <code>pUserData</code> passed as <a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> or argument to <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value. ">vmaSetAllocationUserData()</a> must be either null or pointer to a null-terminated string. The library creates internal copy of the string, so the pointer you pass doesn't need to be valid for whole lifetime of the allocation. You can free it after the call.</p>
+<div class="fragment"><div class="line">VkImageCreateInfo imageInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };</div><div class="line"><span class="comment">// Fill imageInfo...</span></div><div class="line"></div><div class="line">std::string imageName = <span class="stringliteral">&quot;Texture: &quot;</span>;</div><div class="line">imageName += fileName;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">pUserData</a> = imageName.c_str();</div><div class="line"></div><div class="line">VkImage image;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a>(allocator, &amp;imageInfo, &amp;allocCreateInfo, &amp;image, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>The value of <code>pUserData</code> 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.</p>
 <div class="fragment"><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, allocation, &amp;allocInfo);</div><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* imageName = (<span class="keyword">const</span> <span class="keywordtype">char</span>*)allocInfo.<a class="code" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a>;</div><div class="line">printf(<span class="stringliteral">&quot;Image name: %s\n&quot;</span>, imageName);</div></div><!-- fragment --><p>That string is also printed in JSON report created by <a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as string in JSON format. ">vmaBuildStatsString()</a>. </p>
 </div></div><!-- contents -->
 <!-- start footer part -->
diff --git a/docs/html/annotated.html b/docs/html/annotated.html
index ed46442..18ddbd5 100644
--- a/docs/html/annotated.html
+++ b/docs/html/annotated.html
@@ -64,17 +64,20 @@
 <div class="contents">
 <div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
 <table class="directory">
-<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocation_create_info.html" target="_self">VmaAllocationCreateInfo</a></td><td class="desc"></td></tr>
-<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocation_info.html" target="_self">VmaAllocationInfo</a></td><td class="desc">Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> </td></tr>
-<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocator_create_info.html" target="_self">VmaAllocatorCreateInfo</a></td><td class="desc">Description of a Allocator to be created </td></tr>
-<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_defragmentation_info.html" target="_self">VmaDefragmentationInfo</a></td><td class="desc">Optional configuration parameters to be passed to function <a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a> </td></tr>
-<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_defragmentation_stats.html" target="_self">VmaDefragmentationStats</a></td><td class="desc">Statistics returned by function <a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a> </td></tr>
-<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_device_memory_callbacks.html" target="_self">VmaDeviceMemoryCallbacks</a></td><td class="desc">Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code> </td></tr>
-<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_pool_create_info.html" target="_self">VmaPoolCreateInfo</a></td><td class="desc">Describes parameter of created <code>VmaPool</code> </td></tr>
-<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_pool_stats.html" target="_self">VmaPoolStats</a></td><td class="desc">Describes parameter of existing <code>VmaPool</code> </td></tr>
-<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_stat_info.html" target="_self">VmaStatInfo</a></td><td class="desc">Calculated statistics of memory usage in entire allocator </td></tr>
-<tr id="row_9_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_stats.html" target="_self">VmaStats</a></td><td class="desc">General statistics from current state of Allocator </td></tr>
-<tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_vulkan_functions.html" target="_self">VmaVulkanFunctions</a></td><td class="desc">Pointers to some Vulkan functions - a subset used by the library </td></tr>
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocation.html" target="_self">VmaAllocation</a></td><td class="desc">Represents single memory allocation </td></tr>
+<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocation_create_info.html" target="_self">VmaAllocationCreateInfo</a></td><td class="desc"></td></tr>
+<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocation_info.html" target="_self">VmaAllocationInfo</a></td><td class="desc">Parameters of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> </td></tr>
+<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocator.html" target="_self">VmaAllocator</a></td><td class="desc">Represents main object of this library initialized </td></tr>
+<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_allocator_create_info.html" target="_self">VmaAllocatorCreateInfo</a></td><td class="desc">Description of a Allocator to be created </td></tr>
+<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_defragmentation_info.html" target="_self">VmaDefragmentationInfo</a></td><td class="desc">Optional configuration parameters to be passed to function <a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a> </td></tr>
+<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_defragmentation_stats.html" target="_self">VmaDefragmentationStats</a></td><td class="desc">Statistics returned by function <a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a> </td></tr>
+<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_device_memory_callbacks.html" target="_self">VmaDeviceMemoryCallbacks</a></td><td class="desc">Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code> </td></tr>
+<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_pool.html" target="_self">VmaPool</a></td><td class="desc">Represents custom memory pool </td></tr>
+<tr id="row_9_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_pool_create_info.html" target="_self">VmaPoolCreateInfo</a></td><td class="desc">Describes parameter of created <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> </td></tr>
+<tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_pool_stats.html" target="_self">VmaPoolStats</a></td><td class="desc">Describes parameter of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> </td></tr>
+<tr id="row_11_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_stat_info.html" target="_self">VmaStatInfo</a></td><td class="desc">Calculated statistics of memory usage in entire allocator </td></tr>
+<tr id="row_12_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_stats.html" target="_self">VmaStats</a></td><td class="desc">General statistics from current state of Allocator </td></tr>
+<tr id="row_13_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_vma_vulkan_functions.html" target="_self">VmaVulkanFunctions</a></td><td class="desc">Pointers to some Vulkan functions - a subset used by the library </td></tr>
 </table>
 </div><!-- directory -->
 </div><!-- contents -->
diff --git a/docs/html/choosing_memory_type.html b/docs/html/choosing_memory_type.html
index dbee1f9..b713e77 100644
--- a/docs/html/choosing_memory_type.html
+++ b/docs/html/choosing_memory_type.html
@@ -70,7 +70,7 @@
 <ol type="1">
 <li>If you just want to find memory type index that meets your requirements, you can use function <a class="el" href="vk__mem__alloc_8h.html#aef15a94b58fbcb0fe706d5720e84a74a" title="Helps to find memoryTypeIndex, given memoryTypeBits and VmaAllocationCreateInfo. ">vmaFindMemoryTypeIndex()</a>.</li>
 <li>If you want to allocate a region of device memory without association with any specific image or buffer, you can use function <a class="el" href="vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation. ">vmaAllocateMemory()</a>. Usage of this function is not recommended and usually not needed.</li>
-<li>If you already have a buffer or an image created, you want to allocate memory for it and then you will bind it yourself, you can use function <a class="el" href="vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, <a class="el" href="vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer(). ">vmaAllocateMemoryForImage()</a>.</li>
+<li>If you already have a buffer or an image created, you want to allocate memory for it and then you will bind it yourself, you can use function <a class="el" href="vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, <a class="el" href="vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer(). ">vmaAllocateMemoryForImage()</a>. For binding you should use functions: <a class="el" href="vk__mem__alloc_8h.html#a6b0929b914b60cf2d45cac4bf3547470" title="Binds buffer to allocation. ">vmaBindBufferMemory()</a>, <a class="el" href="vk__mem__alloc_8h.html#a3d3ca45799923aa5d138e9e5f9eb2da5" title="Binds image to allocation. ">vmaBindImageMemory()</a>.</li>
 <li>If you want to create a buffer or an image, allocate memory for it and bind them together, all in one call, you can use function <a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a>. This is the recommended way to use this library.</li>
 </ol>
 <p>When using 3. or 4., the library internally queries Vulkan for memory types supported for that buffer or image (function <code>vkGetBufferMemoryRequirements()</code>) and uses only one of these types.</p>
@@ -80,16 +80,16 @@
 Usage</h1>
 <p>The easiest way to specify memory requirements is to fill member <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory. ">VmaAllocationCreateInfo::usage</a> using one of the values of enum <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc">VmaMemoryUsage</a>. It defines high level, common usage types. For more details, see description of this enum.</p>
 <p>For example, if you want to create a uniform buffer that will be filled using transfer only once or infrequently and used for rendering every frame, you can do it using following code:</p>
-<div class="fragment"><div class="line">VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufferInfo.size = 65536;</div><div class="line">bufferInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line">VmaAllocation allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><h1><a class="anchor" id="choosing_memory_type_required_preferred_flags"></a>
+<div class="fragment"><div class="line">VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufferInfo.size = 65536;</div><div class="line">bufferInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><h1><a class="anchor" id="choosing_memory_type_required_preferred_flags"></a>
 Required and preferred flags</h1>
 <p>You can specify more detailed requirements by filling members <a class="el" href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90" title="Flags that must be set in a Memory Type chosen for an allocation. ">VmaAllocationCreateInfo::requiredFlags</a> and <a class="el" href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d" title="Flags that preferably should be set in a memory type chosen for an allocation. ">VmaAllocationCreateInfo::preferredFlags</a> with a combination of bits from enum <code>VkMemoryPropertyFlags</code>. For example, if you want to create a buffer that will be persistently mapped on host (so it must be <code>HOST_VISIBLE</code>) and preferably will also be <code>HOST_COHERENT</code> and <code>HOST_CACHED</code>, use following code:</p>
-<div class="fragment"><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90">requiredFlags</a> = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">preferredFlags</a> = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line">VmaAllocation allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>A memory type is chosen that has all the required flags and as many preferred flags set as possible.</p>
+<div class="fragment"><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90">requiredFlags</a> = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">preferredFlags</a> = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>A memory type is chosen that has all the required flags and as many preferred flags set as possible.</p>
 <p>If you use <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory. ">VmaAllocationCreateInfo::usage</a>, it is just internally converted to a set of required and preferred flags.</p>
 <h1><a class="anchor" id="choosing_memory_type_explicit_memory_types"></a>
 Explicit memory types</h1>
-<p>If you inspected memory types available on the physical device and you have a preference for memory types that you want to use, you can fill member <a class="el" href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055" title="Bitmask containing one bit set for every memory type acceptable for this allocation. ">VmaAllocationCreateInfo::memoryTypeBits</a>. It is a bit mask, where each bit set means that a memory type with that index is allowed to be used for the allocation. Special value 0, just like UINT32_MAX, means there are no restrictions to memory type index.</p>
+<p>If you inspected memory types available on the physical device and you have a preference for memory types that you want to use, you can fill member <a class="el" href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055" title="Bitmask containing one bit set for every memory type acceptable for this allocation. ">VmaAllocationCreateInfo::memoryTypeBits</a>. It is a bit mask, where each bit set means that a memory type with that index is allowed to be used for the allocation. Special value 0, just like <code>UINT32_MAX</code>, means there are no restrictions to memory type index.</p>
 <p>Please note that this member is NOT just a memory type index. Still you can use it to choose just one, specific memory type. For example, if you already determined that your buffer should be created in memory type 2, use following code:</p>
-<div class="fragment"><div class="line">uint32_t memoryTypeIndex = 2;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055">memoryTypeBits</a> = 1u &lt;&lt; memoryTypeIndex;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line">VmaAllocation allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><h1><a class="anchor" id="choosing_memory_type_custom_memory_pools"></a>
+<div class="fragment"><div class="line">uint32_t memoryTypeIndex = 2;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055">memoryTypeBits</a> = 1u &lt;&lt; memoryTypeIndex;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><h1><a class="anchor" id="choosing_memory_type_custom_memory_pools"></a>
 Custom memory pools</h1>
 <p>If you allocate from custom memory pool, all the ways of specifying memory requirements described above are not applicable and the aforementioned members of <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> 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 <a class="el" href="custom_memory_pools.html">Custom memory pools</a>. </p>
 </div></div><!-- contents -->
diff --git a/docs/html/classes.html b/docs/html/classes.html
index bbb29c7..b900f2a 100644
--- a/docs/html/classes.html
+++ b/docs/html/classes.html
@@ -65,9 +65,10 @@
 <div class="qindex"><a class="qindex" href="#letter_v">v</a></div>
 <table class="classindex">
 <tr><td rowspan="2" valign="bottom"><a name="letter_v"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;v&#160;&#160;</div></td></tr></table>
-</td><td valign="top"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a>&#160;&#160;&#160;</td></tr>
-<tr><td valign="top"><a class="el" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_stat_info.html">VmaStatInfo</a>&#160;&#160;&#160;</td><td></td></tr>
-<tr><td valign="top"><a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_stats.html">VmaStats</a>&#160;&#160;&#160;</td><td></td></tr>
+</td><td valign="top"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a>&#160;&#160;&#160;</td><td></td></tr>
+<tr><td valign="top"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_stat_info.html">VmaStatInfo</a>&#160;&#160;&#160;</td><td></td></tr>
+<tr><td valign="top"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_pool.html">VmaPool</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_stats.html">VmaStats</a>&#160;&#160;&#160;</td><td></td></tr>
+<tr><td valign="top"><a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a>&#160;&#160;&#160;</td><td valign="top"><a class="el" href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a>&#160;&#160;&#160;</td><td></td></tr>
 <tr><td></td><td></td><td></td><td></td><td></td></tr>
 </table>
 <div class="qindex"><a class="qindex" href="#letter_v">v</a></div>
diff --git a/docs/html/configuration.html b/docs/html/configuration.html
index 5b471d9..42ac113 100644
--- a/docs/html/configuration.html
+++ b/docs/html/configuration.html
@@ -66,7 +66,7 @@
 <div class="title">Configuration </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><p>Please check "CONFIGURATION SECTION" in the code to find macros that you can define before each include of this file or change directly in this file to provide your own implementation of basic facilities like assert, <code>min()</code> and <code>max()</code> functions, mutex etc. C++ STL is used by default, but changing these allows you to get rid of any STL usage if you want, as many game developers tend to do.</p>
+<div class="textblock"><p>Please check "CONFIGURATION SECTION" in the code to find macros that you can define before each include of this file or change directly in this file to provide your own implementation of basic facilities like assert, <code>min()</code> and <code>max()</code> functions, mutex, atomic etc. The library uses its own implementation of containers by default, but you can switch to using STL containers instead.</p>
 <h1><a class="anchor" id="config_Vulkan_functions"></a>
 Pointers to Vulkan functions</h1>
 <p>The library uses Vulkan functions straight from the <code>vulkan.h</code> header by default. If you want to provide your own pointers to these functions, e.g. fetched using <code>vkGetInstanceProcAddr()</code> and <code>vkGetDeviceProcAddr()</code>:</p>
@@ -76,13 +76,13 @@
 </ol>
 <h1><a class="anchor" id="custom_memory_allocator"></a>
 Custom host memory allocator</h1>
-<p>If you use custom allocator for CPU memory rather than default operator <code>new</code> and <code>delete</code> from C++, you can make this library using your allocator as well by filling optional member <a class="el" href="struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d" title="Custom CPU memory allocation callbacks. ">VmaAllocatorCreateInfo::pAllocationCallbacks</a>. These functions will be passed to Vulkan, as well as used by the library itself to make any CPU-side allocations.</p>
+<p>If you use custom allocator for CPU memory rather than default operator <code>new</code> and <code>delete</code> from C++, you can make this library using your allocator as well by filling optional member <a class="el" href="struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d" title="Custom CPU memory allocation callbacks. Optional. ">VmaAllocatorCreateInfo::pAllocationCallbacks</a>. These functions will be passed to Vulkan, as well as used by the library itself to make any CPU-side allocations.</p>
 <h1><a class="anchor" id="allocation_callbacks"></a>
 Device memory allocation callbacks</h1>
-<p>The library makes calls to <code>vkAllocateMemory()</code> and <code>vkFreeMemory()</code> internally. You can setup callbacks to be informed about these calls, e.g. for the purpose of gathering some statistics. To do it, fill optional member <a class="el" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e" title="Informative callbacks for vkAllocateMemory, vkFreeMemory. ">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>.</p>
+<p>The library makes calls to <code>vkAllocateMemory()</code> and <code>vkFreeMemory()</code> internally. You can setup callbacks to be informed about these calls, e.g. for the purpose of gathering some statistics. To do it, fill optional member <a class="el" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e" title="Informative callbacks for vkAllocateMemory, vkFreeMemory. Optional. ">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>.</p>
 <h1><a class="anchor" id="heap_memory_limit"></a>
 Device heap memory limit</h1>
-<p>If you want to test how your program behaves with limited amount of Vulkan device memory available without switching your graphics card to one that really has smaller VRAM, you can use a feature of this library intended for this purpose. To do it, fill optional member <a class="el" href="struct_vma_allocator_create_info.html#a31c192aa6cbffa33279f6d9f0c47c44b" title="Either NULL or a pointer to an array of limits on maximum number of bytes that can be allocated out o...">VmaAllocatorCreateInfo::pHeapSizeLimit</a>. </p>
+<p>If you want to test how your program behaves with limited amount of Vulkan device memory available without switching your graphics card to one that really has smaller VRAM, you can use a feature of this library intended for this purpose. To do it, fill optional member <a class="el" href="struct_vma_allocator_create_info.html#a31c192aa6cbffa33279f6d9f0c47c44b" title="Either null or a pointer to an array of limits on maximum number of bytes that can be allocated out o...">VmaAllocatorCreateInfo::pHeapSizeLimit</a>. </p>
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
diff --git a/docs/html/custom_memory_pools.html b/docs/html/custom_memory_pools.html
index c40e397..fed21c8 100644
--- a/docs/html/custom_memory_pools.html
+++ b/docs/html/custom_memory_pools.html
@@ -77,15 +77,19 @@
 <p>To use custom memory pools:</p>
 <ol type="1">
 <li>Fill <a class="el" href="struct_vma_pool_create_info.html" title="Describes parameter of created VmaPool. ">VmaPoolCreateInfo</a> structure.</li>
-<li>Call <a class="el" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50" title="Allocates Vulkan device memory and creates VmaPool object. ">vmaCreatePool()</a> to obtain <code>VmaPool</code> handle.</li>
+<li>Call <a class="el" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50" title="Allocates Vulkan device memory and creates VmaPool object. ">vmaCreatePool()</a> to obtain <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> handle.</li>
 <li>When making an allocation, set <a class="el" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150" title="Pool that this allocation should be created in. ">VmaAllocationCreateInfo::pool</a> to this handle. You don't need to specify any other parameters of this structure, like usage.</li>
 </ol>
 <p>Example:</p>
-<div class="fragment"><div class="line"><span class="comment">// Create a pool that can have at most 2 blocks, 128 MiB each.</span></div><div class="line"><a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> poolCreateInfo = {};</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a> = ...</div><div class="line">poolCreateInfo.blockSize = 128ull * 1024 * 1024;</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">maxBlockCount</a> = 2;</div><div class="line"></div><div class="line">VmaPool pool;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a>(allocator, &amp;poolCreateInfo, &amp;pool);</div><div class="line"></div><div class="line"><span class="comment">// Allocate a buffer out of it.</span></div><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = 1024;</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">pool</a> = pool;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line">VmaAllocation alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div></div><!-- fragment --><p>You have to free all allocations made from this pool before destroying it.</p>
+<div class="fragment"><div class="line"><span class="comment">// Create a pool that can have at most 2 blocks, 128 MiB each.</span></div><div class="line"><a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> poolCreateInfo = {};</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a> = ...</div><div class="line">poolCreateInfo.blockSize = 128ull * 1024 * 1024;</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">maxBlockCount</a> = 2;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_pool.html">VmaPool</a> pool;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a>(allocator, &amp;poolCreateInfo, &amp;pool);</div><div class="line"></div><div class="line"><span class="comment">// Allocate a buffer out of it.</span></div><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = 1024;</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">pool</a> = pool;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div></div><!-- fragment --><p>You have to free all allocations made from this pool before destroying it.</p>
 <div class="fragment"><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(allocator, buf, alloc);</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1">vmaDestroyPool</a>(allocator, pool);</div></div><!-- fragment --><h1><a class="anchor" id="custom_memory_pools_MemTypeIndex"></a>
 Choosing memory type index</h1>
-<p>When creating a pool, you must explicitly specify memory type index. To find the one suitable for your buffers or images, you can use code similar to the following:</p>
-<div class="fragment"><div class="line">VkBufferCreateInfo dummyBufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">dummyBufCreateInfo.size = 1024; <span class="comment">// Whatever.</span></div><div class="line">dummyBufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; <span class="comment">// Change if needed.</span></div><div class="line"></div><div class="line">VkBuffer dummyBuf;</div><div class="line">vkCreateBuffer(device, &amp;dummyBufCreateInfo, <span class="keyword">nullptr</span>, &amp;dummyBuf);</div><div class="line"></div><div class="line">VkMemoryRequirements memReq;</div><div class="line">vkGetBufferMemoryRequirements(device, dummyBuf, &amp;memReq);</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>; <span class="comment">// Change if needed.</span></div><div class="line"></div><div class="line">uint32_t memTypeIndex;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#aef15a94b58fbcb0fe706d5720e84a74a">vmaFindMemoryTypeIndex</a>(allocator, memReq.memoryTypeBits, &amp;allocCreateInfo, &amp;memTypeIndex);</div><div class="line"></div><div class="line">vkDestroyBuffer(device, dummyBuf, <span class="keyword">nullptr</span>);</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> poolCreateInfo = {};</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a> = memTypeIndex;</div><div class="line"><span class="comment">// ...</span></div></div><!-- fragment --><p>Dummy buffer is needed to query driver for <code>memReq.memoryTypeBits</code>. Memory is never allocated for this buffer. You should fill structures <code>dummyBufCreateInfo</code> and <code>allocCreateInfo</code> with the same parameters as you are going to use for buffers created in your pool. </p>
+<p>When creating a pool, you must explicitly specify memory type index. To find the one suitable for your buffers or images, you can use helper functions <a class="el" href="vk__mem__alloc_8h.html#ae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo. ">vmaFindMemoryTypeIndexForBufferInfo()</a>, <a class="el" href="vk__mem__alloc_8h.html#a088da83d8eaf3ce9056d9ea0b981d472" title="Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo. ">vmaFindMemoryTypeIndexForImageInfo()</a>. You need to provide structures with example parameters of buffers or images that you are going to create in that pool.</p>
+<div class="fragment"><div class="line">VkBufferCreateInfo exampleBufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">exampleBufCreateInfo.size = 1024; <span class="comment">// Whatever.</span></div><div class="line">exampleBufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; <span class="comment">// Change if needed.</span></div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>; <span class="comment">// Change if needed.</span></div><div class="line"></div><div class="line">uint32_t memTypeIndex;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ae790ab9ffaf7667fb8f62523e6897888">vmaFindMemoryTypeIndexForBufferInfo</a>(allocator, &amp;exampleBufCreateInfo, &amp;allocCreateInfo, &amp;memTypeIndex);</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> poolCreateInfo = {};</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a> = memTypeIndex;</div><div class="line"><span class="comment">// ...</span></div></div><!-- fragment --><p>When creating buffers/images allocated in that pool, provide following parameters:</p>
+<ul>
+<li><code>VkBufferCreateInfo</code>: Prefer to pass same parameters as above. Otherwise you risk creating resources in a memory type that is not suitable for them, which may result in undefined behavior. Using different <code>VK_BUFFER_USAGE_</code> flags may work, but you shouldn't create images in a pool intended for buffers or the other way around.</li>
+<li><a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>: You don't need to pass same parameters. Fill only <code>pool</code> member. Other members are ignored anyway. </li>
+</ul>
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
diff --git a/docs/html/general_considerations.html b/docs/html/general_considerations.html
new file mode 100644
index 0000000..139d6e6
--- /dev/null
+++ b/docs/html/general_considerations.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Vulkan Memory Allocator: General considerations</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Vulkan Memory Allocator
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+  <ul>
+<li class="navelem"><a class="el" href="index.html">Vulkan Memory Allocator</a></li>  </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">General considerations </div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><h1><a class="anchor" id="general_considerations_thread_safety"></a>
+Thread safety</h1>
+<ul>
+<li>The library has no global state, so separate <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a> objects can be used independently. There should be no need to create multiple such objects though - one per <code>VkDevice</code> is enough.</li>
+<li>By default, all calls to functions that take <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a> as first parameter are safe to call from multiple threads simultaneously because they are synchronized internally when needed.</li>
+<li>When the allocator is created with <a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d" title="Allocator and all objects created from it will not be synchronized internally, so you must guarantee ...">VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT</a> flag, calls to functions that take such <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a> object must be synchronized externally.</li>
+<li>Access to a <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> object must be externally synchronized. For example, you must not call <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> and <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a> from different threads at the same time if you pass the same <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> object to these functions.</li>
+</ul>
+<h1><a class="anchor" id="general_considerations_allocation_algorithm"></a>
+Allocation algorithm</h1>
+<p>The library uses following algorithm for allocation, in order:</p>
+<ol type="1">
+<li>Try to find free range of memory in existing blocks.</li>
+<li>If failed, try to create a new block of <code>VkDeviceMemory</code>, with preferred block size.</li>
+<li>If failed, try to create such block with size/2, size/4, size/8.</li>
+<li>If failed and <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a> flag was specified, try to find space in existing blocks, possilby making some other allocations lost.</li>
+<li>If failed, try to allocate separate <code>VkDeviceMemory</code> for this allocation, just like when you use <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block. ">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a>.</li>
+<li>If failed, choose other memory type that meets the requirements specified in <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> and go to point 1.</li>
+<li>If failed, return <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code>.</li>
+</ol>
+<h1><a class="anchor" id="general_considerations_features_not_supported"></a>
+Features not supported</h1>
+<p>Features deliberately excluded from the scope of this library:</p>
+<ul>
+<li>Data transfer - issuing commands that transfer data between buffers or images, any usage of <code>VkCommandList</code> or <code>VkCommandQueue</code> and related synchronization is responsibility of the user.</li>
+<li>Support for any programming languages other than C/C++. Bindings to other languages are welcomed as external projects. </li>
+</ul>
+</div></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/docs/html/globals.html b/docs/html/globals.html
index 95f9354..e94b352 100644
--- a/docs/html/globals.html
+++ b/docs/html/globals.html
@@ -158,6 +158,12 @@
 <li>VmaAllocatorCreateInfo
 : <a class="el" href="vk__mem__alloc_8h.html#ae0f6d1d733dded220d28134da46b4283">vk_mem_alloc.h</a>
 </li>
+<li>vmaBindBufferMemory()
+: <a class="el" href="vk__mem__alloc_8h.html#a6b0929b914b60cf2d45cac4bf3547470">vk_mem_alloc.h</a>
+</li>
+<li>vmaBindImageMemory()
+: <a class="el" href="vk__mem__alloc_8h.html#a3d3ca45799923aa5d138e9e5f9eb2da5">vk_mem_alloc.h</a>
+</li>
 <li>vmaBuildStatsString()
 : <a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0">vk_mem_alloc.h</a>
 </li>
diff --git a/docs/html/globals_func.html b/docs/html/globals_func.html
index c7268fa..55ac717 100644
--- a/docs/html/globals_func.html
+++ b/docs/html/globals_func.html
@@ -70,6 +70,12 @@
 <li>vmaAllocateMemoryForImage()
 : <a class="el" href="vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb">vk_mem_alloc.h</a>
 </li>
+<li>vmaBindBufferMemory()
+: <a class="el" href="vk__mem__alloc_8h.html#a6b0929b914b60cf2d45cac4bf3547470">vk_mem_alloc.h</a>
+</li>
+<li>vmaBindImageMemory()
+: <a class="el" href="vk__mem__alloc_8h.html#a3d3ca45799923aa5d138e9e5f9eb2da5">vk_mem_alloc.h</a>
+</li>
 <li>vmaBuildStatsString()
 : <a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0">vk_mem_alloc.h</a>
 </li>
diff --git a/docs/html/index.html b/docs/html/index.html
index 921a093..128c049 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -66,29 +66,73 @@
 <p>Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved. <br />
 License: MIT</p>
 <p>Documentation of all members: <a class="el" href="vk__mem__alloc_8h.html">vk_mem_alloc.h</a></p>
-<p>Table of contents:</p>
+<h1><a class="anchor" id="main_table_of_contents"></a>
+Table of contents</h1>
 <ul>
-<li>User guide<ul>
-<li><a class="el" href="quick_start.html">Quick start</a></li>
-<li><a class="el" href="choosing_memory_type.html">Choosing memory type</a></li>
-<li><a class="el" href="memory_mapping.html">Memory mapping</a></li>
-<li><a class="el" href="custom_memory_pools.html">Custom memory pools</a></li>
+<li><b>User guide</b><ul>
+<li><a class="el" href="quick_start.html">Quick start</a><ul>
+<li><a class="el" href="quick_start.html#quick_start_project_setup">Project setup</a></li>
+<li><a class="el" href="quick_start.html#quick_start_initialization">Initialization</a></li>
+<li><a class="el" href="quick_start.html#quick_start_resource_allocation">Resource allocation</a></li>
+</ul>
+</li>
+<li><a class="el" href="choosing_memory_type.html">Choosing memory type</a><ul>
+<li><a class="el" href="choosing_memory_type.html#choosing_memory_type_usage">Usage</a></li>
+<li><a class="el" href="choosing_memory_type.html#choosing_memory_type_required_preferred_flags">Required and preferred flags</a></li>
+<li><a class="el" href="choosing_memory_type.html#choosing_memory_type_explicit_memory_types">Explicit memory types</a></li>
+<li><a class="el" href="choosing_memory_type.html#choosing_memory_type_custom_memory_pools">Custom memory pools</a></li>
+</ul>
+</li>
+<li><a class="el" href="memory_mapping.html">Memory mapping</a><ul>
+<li><a class="el" href="memory_mapping.html#memory_mapping_mapping_functions">Mapping functions</a></li>
+<li><a class="el" href="memory_mapping.html#memory_mapping_persistently_mapped_memory">Persistently mapped memory</a></li>
+<li><a class="el" href="memory_mapping.html#memory_mapping_cache_control">Cache control</a></li>
+<li><a class="el" href="memory_mapping.html#memory_mapping_finding_if_memory_mappable">Finding out if memory is mappable</a></li>
+</ul>
+</li>
+<li><a class="el" href="custom_memory_pools.html">Custom memory pools</a><ul>
+<li><a class="el" href="custom_memory_pools.html#custom_memory_pools_MemTypeIndex">Choosing memory type index</a></li>
+</ul>
+</li>
 <li><a class="el" href="defragmentation.html">Defragmentation</a></li>
 <li><a class="el" href="lost_allocations.html">Lost allocations</a></li>
-<li><a class="el" href="allocation_annotation.html">Allocation names and user data</a></li>
+<li><a class="el" href="statistics.html">Statistics</a><ul>
+<li><a class="el" href="statistics.html#statistics_numeric_statistics">Numeric statistics</a></li>
+<li><a class="el" href="statistics.html#statistics_json_dump">JSON dump</a></li>
+</ul>
+</li>
+<li><a class="el" href="allocation_annotation.html">Allocation names and user data</a><ul>
+<li><a class="el" href="allocation_annotation.html#allocation_user_data">Allocation user data</a></li>
+<li><a class="el" href="allocation_annotation.html#allocation_names">Allocation names</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="el" href="usage_patterns.html">Recommended usage patterns</a><ul>
+<li><a class="el" href="usage_patterns.html#usage_patterns_simple">Simple patterns</a></li>
+<li><a class="el" href="usage_patterns.html#usage_patterns_advanced">Advanced patterns</a></li>
 </ul>
 </li>
 <li><a class="el" href="configuration.html">Configuration</a><ul>
+<li><a class="el" href="configuration.html#config_Vulkan_functions">Pointers to Vulkan functions</a></li>
+<li><a class="el" href="configuration.html#custom_memory_allocator">Custom host memory allocator</a></li>
+<li><a class="el" href="configuration.html#allocation_callbacks">Device memory allocation callbacks</a></li>
+<li><a class="el" href="configuration.html#heap_memory_limit">Device heap memory limit</a></li>
 <li><a class="el" href="vk_khr_dedicated_allocation.html">VK_KHR_dedicated_allocation</a></li>
 </ul>
 </li>
-<li><a class="el" href="thread_safety.html">Thread safety</a></li>
-<li><a class="el" href="about_the_library.html">About the library</a></li>
+<li><a class="el" href="general_considerations.html">General considerations</a><ul>
+<li><a class="el" href="general_considerations.html#general_considerations_thread_safety">Thread safety</a></li>
+<li><a class="el" href="general_considerations.html#general_considerations_allocation_algorithm">Allocation algorithm</a></li>
+<li><a class="el" href="general_considerations.html#general_considerations_features_not_supported">Features not supported</a></li>
 </ul>
-<p>See also:</p>
+</li>
+</ul>
+<h1><a class="anchor" id="main_see_also"></a>
+See also</h1>
 <ul>
-<li><a href="https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator">Source repository on GitHub</a></li>
-<li><a href="https://gpuopen.com/gaming-product/vulkan-memory-allocator/">Product page on GPUOpen</a> </li>
+<li><a href="https://gpuopen.com/gaming-product/vulkan-memory-allocator/">Product page on GPUOpen</a></li>
+<li><a href="https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator">Source repository on GitHub</a> </li>
 </ul>
 </div></div><!-- contents -->
 <!-- start footer part -->
diff --git a/docs/html/lost_allocations.html b/docs/html/lost_allocations.html
index 4b2e113..a4c3113 100644
--- a/docs/html/lost_allocations.html
+++ b/docs/html/lost_allocations.html
@@ -67,27 +67,19 @@
 </div><!--header-->
 <div class="contents">
 <div class="textblock"><p>If your game oversubscribes video memory, if may work OK in previous-generation graphics APIs (DirectX 9, 10, 11, OpenGL) because resources are automatically paged to system RAM. In Vulkan you can't do it because when you run out of memory, an allocation just fails. If you have more data (e.g. textures) that can fit into VRAM and you don't need it all at once, you may want to upload them to GPU on demand and "push out" ones that are not used for a long time to make room for the new ones, effectively using VRAM (or a cartain memory pool) as a form of cache. Vulkan Memory Allocator can help you with that by supporting a concept of "lost allocations".</p>
-<p>To create an allocation that can become lost, include <code>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</code> flag in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum. ">VmaAllocationCreateInfo::flags</a>. Before using a buffer or image bound to such allocation in every new frame, you need to query it if it's not lost. To check it: call <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> and see if <a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67" title="Handle to Vulkan memory object. ">VmaAllocationInfo::deviceMemory</a> is not <code>VK_NULL_HANDLE</code>. If the allocation is lost, you should not use it or buffer/image bound to it. You mustn't forget to destroy this allocation and this buffer/image.</p>
-<p>To create an allocation that can make some other allocations lost to make room for it, use <code>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</code> flag. You will usually use both flags <code>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</code> and <code>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</code> at the same time.</p>
-<p>Warning! Current implementation uses quite naive, brute force algorithm, which can make allocation calls that use <code>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</code> flag quite slow. A new, more optimal algorithm and data structure to speed this up is planned for the future.</p>
-<p><b>When interleaving creation of new allocations with usage of existing ones, how do you make sure that an allocation won't become lost while it's used in the current frame?</b></p>
-<p>It is ensured because <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> not only returns allocation parameters and checks whether it's not lost, but when it's not, it also atomically marks it as used in the current frame, which makes it impossible to become lost in that frame. It uses lockless algorithm, so it works fast and doesn't involve locking any internal mutex.</p>
-<p><b>What if my allocation may still be in use by the GPU when it's rendering a previous frame while I already submit new frame on the CPU?</b></p>
-<p>You can make sure that allocations "touched" by <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> will not become lost for a number of additional frames back from the current one by specifying this number as <a class="el" href="struct_vma_allocator_create_info.html#a21ea188dd212b8171cb9ecbed4a2a3a7" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaAllocatorCreateInfo::frameInUseCount</a> (for default memory pool) and <a class="el" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaPoolCreateInfo::frameInUseCount</a> (for custom pool).</p>
-<p><b>How do you inform the library when new frame starts?</b></p>
+<p>To create an allocation that can become lost, include <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> flag in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum. ">VmaAllocationCreateInfo::flags</a>. Before using a buffer or image bound to such allocation in every new frame, you need to query it if it's not lost. To check it, call <a class="el" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a" title="Returns VK_TRUE if allocation is not lost and atomically marks it as used in current frame...">vmaTouchAllocation()</a>. If the allocation is lost, you should not use it or buffer/image bound to it. You mustn't forget to destroy this allocation and this buffer/image. <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> can also be used for checking status of the allocation. Allocation is lost when returned <a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67" title="Handle to Vulkan memory object. ">VmaAllocationInfo::deviceMemory</a> == <code>VK_NULL_HANDLE</code>.</p>
+<p>To create an allocation that can make some other allocations lost to make room for it, use <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a> flag. You will usually use both flags <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a> and <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> at the same time.</p>
+<p>Warning! Current implementation uses quite naive, brute force algorithm, which can make allocation calls that use <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a> flag quite slow. A new, more optimal algorithm and data structure to speed this up is planned for the future.</p>
+<p><b>Q: When interleaving creation of new allocations with usage of existing ones, how do you make sure that an allocation won't become lost while it's used in the current frame?</b></p>
+<p>It is ensured because <a class="el" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a" title="Returns VK_TRUE if allocation is not lost and atomically marks it as used in current frame...">vmaTouchAllocation()</a> / <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> not only returns allocation status/parameters and checks whether it's not lost, but when it's not, it also atomically marks it as used in the current frame, which makes it impossible to become lost in that frame. It uses lockless algorithm, so it works fast and doesn't involve locking any internal mutex.</p>
+<p><b>Q: What if my allocation may still be in use by the GPU when it's rendering a previous frame while I already submit new frame on the CPU?</b></p>
+<p>You can make sure that allocations "touched" by <a class="el" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a" title="Returns VK_TRUE if allocation is not lost and atomically marks it as used in current frame...">vmaTouchAllocation()</a> / <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> will not become lost for a number of additional frames back from the current one by specifying this number as <a class="el" href="struct_vma_allocator_create_info.html#a21ea188dd212b8171cb9ecbed4a2a3a7" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaAllocatorCreateInfo::frameInUseCount</a> (for default memory pool) and <a class="el" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaPoolCreateInfo::frameInUseCount</a> (for custom pool).</p>
+<p><b>Q: How do you inform the library when new frame starts?</b></p>
 <p>You need to call function <a class="el" href="vk__mem__alloc_8h.html#ade56bf8dc9f5a5eaddf5f119ed525236" title="Sets index of the current frame. ">vmaSetCurrentFrameIndex()</a>.</p>
 <p>Example code:</p>
-<div class="fragment"><div class="line"><span class="keyword">struct </span>MyBuffer</div><div class="line">{</div><div class="line">    VkBuffer m_Buf = <span class="keyword">nullptr</span>;</div><div class="line">    VmaAllocation m_Alloc = <span class="keyword">nullptr</span>;</div><div class="line"></div><div class="line">    <span class="comment">// Called when the buffer is really needed in the current frame.</span></div><div class="line">    <span class="keywordtype">void</span> EnsureBuffer();</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> MyBuffer::EnsureBuffer()</div><div class="line">{</div><div class="line">    <span class="comment">// Buffer has been created.</span></div><div class="line">    <span class="keywordflow">if</span>(m_Buf != VK_NULL_HANDLE)</div><div class="line">    {</div><div class="line">        <span class="comment">// Check if its allocation is not lost + mark it as used in current frame.</span></div><div class="line">        <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line">        <a class="code" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, m_Alloc, &amp;allocInfo);</div><div class="line">        <span class="keywordflow">if</span>(allocInfo.<a class="code" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">deviceMemory</a> != VK_NULL_HANDLE)</div><div class="line">        {</div><div class="line">            <span class="comment">// It&#39;s all OK - safe to use m_Buf.</span></div><div class="line">            <span class="keywordflow">return</span>;</div><div class="line">        }</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Buffer not yet exists or lost - destroy and recreate it.</span></div><div class="line"></div><div class="line">    <a class="code" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(allocator, m_Buf, m_Alloc);</div><div class="line"></div><div class="line">    VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">    bufCreateInfo.size = 1024;</div><div class="line">    bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line">    <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">    allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">    allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> |</div><div class="line">        <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a>;</div><div class="line"></div><div class="line">    <a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;m_Buf, &amp;m_Alloc, <span class="keyword">nullptr</span>);</div><div class="line">}</div></div><!-- fragment --><p>When using lost allocations, you may see some Vulkan validation layer warnings about overlapping regions of memory bound to different kinds of buffers and images. This is still valid as long as you implement proper handling of lost allocations (like in the example above) and don't use them.</p>
-<p>The library uses following algorithm for allocation, in order:</p>
-<ol type="1">
-<li>Try to find free range of memory in existing blocks.</li>
-<li>If failed, try to create a new block of <code>VkDeviceMemory</code>, with preferred block size.</li>
-<li>If failed, try to create such block with size/2 and size/4.</li>
-<li>If failed and <code>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</code> flag was specified, try to find space in existing blocks, possilby making some other allocations lost.</li>
-<li>If failed, try to allocate separate <code>VkDeviceMemory</code> for this allocation, just like when you use <code>VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</code>.</li>
-<li>If failed, choose other memory type that meets the requirements specified in <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> and go to point 1.</li>
-<li>If failed, return <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code>. </li>
-</ol>
+<div class="fragment"><div class="line"><span class="keyword">struct </span>MyBuffer</div><div class="line">{</div><div class="line">    VkBuffer m_Buf = <span class="keyword">nullptr</span>;</div><div class="line">    <a class="code" href="struct_vma_allocation.html">VmaAllocation</a> m_Alloc = <span class="keyword">nullptr</span>;</div><div class="line"></div><div class="line">    <span class="comment">// Called when the buffer is really needed in the current frame.</span></div><div class="line">    <span class="keywordtype">void</span> EnsureBuffer();</div><div class="line">};</div><div class="line"></div><div class="line"><span class="keywordtype">void</span> MyBuffer::EnsureBuffer()</div><div class="line">{</div><div class="line">    <span class="comment">// Buffer has been created.</span></div><div class="line">    <span class="keywordflow">if</span>(m_Buf != VK_NULL_HANDLE)</div><div class="line">    {</div><div class="line">        <span class="comment">// Check if its allocation is not lost + mark it as used in current frame.</span></div><div class="line">        <span class="keywordflow">if</span>(<a class="code" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a">vmaTouchAllocation</a>(allocator, m_Alloc))</div><div class="line">        {</div><div class="line">            <span class="comment">// It&#39;s all OK - safe to use m_Buf.</span></div><div class="line">            <span class="keywordflow">return</span>;</div><div class="line">        }</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="comment">// Buffer not yet exists or lost - destroy and recreate it.</span></div><div class="line"></div><div class="line">    <a class="code" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(allocator, m_Buf, m_Alloc);</div><div class="line"></div><div class="line">    VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">    bufCreateInfo.size = 1024;</div><div class="line">    bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line">    <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">    allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">    allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> |</div><div class="line">        <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a>;</div><div class="line"></div><div class="line">    <a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;m_Buf, &amp;m_Alloc, <span class="keyword">nullptr</span>);</div><div class="line">}</div></div><!-- fragment --><p>When using lost allocations, you may see some Vulkan validation layer warnings about overlapping regions of memory bound to different kinds of buffers and images. This is still valid as long as you implement proper handling of lost allocations (like in the example above) and don't use them.</p>
+<p>You can create an allocation that is already in lost state from the beginning using function <a class="el" href="vk__mem__alloc_8h.html#ae5c9657d9e94756269145b01c05d16f1" title="Creates new allocation that is in lost state from the beginning. ">vmaCreateLostAllocation()</a>. It may be useful if you need a "dummy" allocation that is not null.</p>
+<p>You can call function <a class="el" href="vk__mem__alloc_8h.html#a736bd6cbda886f36c891727e73bd4024" title="Marks all allocations in given pool as lost if they are not used in current frame or VmaPoolCreateInf...">vmaMakePoolAllocationsLost()</a> to set all eligible allocations in a specified custom pool to lost state. Allocations that have been "touched" in current frame or <a class="el" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaPoolCreateInfo::frameInUseCount</a> frames back cannot become lost. </p>
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
diff --git a/docs/html/memory_mapping.html b/docs/html/memory_mapping.html
index f4e37a0..90480cb 100644
--- a/docs/html/memory_mapping.html
+++ b/docs/html/memory_mapping.html
@@ -69,26 +69,26 @@
 <div class="textblock"><p>To "map memory" in Vulkan means to obtain a CPU pointer to <code>VkDeviceMemory</code>, to be able to read from it or write to it in CPU code. Mapping is possible only of memory allocated from a memory type that has <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> flag. Functions <code>vkMapMemory()</code>, <code>vkUnmapMemory()</code> are designed for this purpose. You can use them directly with memory allocated by this library, but it is not recommended because of following issue: Mapping the same <code>VkDeviceMemory</code> block multiple times is illegal - only one mapping at a time is allowed. This includes mapping disjoint regions. Mapping is not reference-counted internally by Vulkan. Because of this, Vulkan Memory Allocator provides following facilities:</p>
 <h1><a class="anchor" id="memory_mapping_mapping_functions"></a>
 Mapping functions</h1>
-<p>The library provides following functions for mapping of a specific <code>VmaAllocation</code>: <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a>, <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a>. They are safer and more convenient to use than standard Vulkan functions. You can map an allocation multiple times simultaneously - mapping is reference-counted internally. You can also map different allocations simultaneously regardless of whether they use the same <code>VkDeviceMemory</code> block. They way it's implemented is that the library always maps entire memory block, not just region of the allocation. For further details, see description of <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a> function. Example:</p>
-<div class="fragment"><div class="line"><span class="comment">// Having these objects initialized:</span></div><div class="line"></div><div class="line"><span class="keyword">struct </span>ConstantBuffer</div><div class="line">{</div><div class="line">    ...</div><div class="line">};</div><div class="line">ConstantBuffer constantBufferData;</div><div class="line"></div><div class="line">VmaAllocator allocator;</div><div class="line">VmaBuffer constantBuffer;</div><div class="line">VmaAllocation constantBufferAllocation;</div><div class="line"></div><div class="line"><span class="comment">// You can map and fill your buffer using following code:</span></div><div class="line"></div><div class="line"><span class="keywordtype">void</span>* mappedData;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069">vmaMapMemory</a>(allocator, constantBufferAllocation, &amp;mappedData);</div><div class="line">memcpy(mappedData, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a>(allocator, constantBufferAllocation);</div></div><!-- fragment --><h1><a class="anchor" id="memory_mapping_persistently_mapped_memory"></a>
+<p>The library provides following functions for mapping of a specific <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a>: <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a>, <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a>. They are safer and more convenient to use than standard Vulkan functions. You can map an allocation multiple times simultaneously - mapping is reference-counted internally. You can also map different allocations simultaneously regardless of whether they use the same <code>VkDeviceMemory</code> block. They way it's implemented is that the library always maps entire memory block, not just region of the allocation. For further details, see description of <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a> function. Example:</p>
+<div class="fragment"><div class="line"><span class="comment">// Having these objects initialized:</span></div><div class="line"></div><div class="line"><span class="keyword">struct </span>ConstantBuffer</div><div class="line">{</div><div class="line">    ...</div><div class="line">};</div><div class="line">ConstantBuffer constantBufferData;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocator.html">VmaAllocator</a> allocator;</div><div class="line">VmaBuffer constantBuffer;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> constantBufferAllocation;</div><div class="line"></div><div class="line"><span class="comment">// You can map and fill your buffer using following code:</span></div><div class="line"></div><div class="line"><span class="keywordtype">void</span>* mappedData;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069">vmaMapMemory</a>(allocator, constantBufferAllocation, &amp;mappedData);</div><div class="line">memcpy(mappedData, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a>(allocator, constantBufferAllocation);</div></div><!-- fragment --><h1><a class="anchor" id="memory_mapping_persistently_mapped_memory"></a>
 Persistently mapped memory</h1>
-<p>Kepping your memory persistently mapped is generally OK in Vulkan. You don't need to unmap it before using its data on the GPU. The library provides a special feature designed for that: Allocations made with <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code> flag set in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum. ">VmaAllocationCreateInfo::flags</a> stay mapped all the time, so you can just access CPU pointer to it any time without a need to call any "map" or "unmap" function. Example:</p>
-<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = <span class="keyword">sizeof</span>(ConstantBuffer);</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line">VmaAllocation alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div><div class="line"></div><div class="line"><span class="comment">// Buffer is already mapped. You can access its memory.</span></div><div class="line">memcpy(allocInfo.<a class="code" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div></div><!-- fragment --><p>There are some exceptions though, when you should consider mapping memory only for a short period of time:</p>
+<p>Kepping your memory persistently mapped is generally OK in Vulkan. You don't need to unmap it before using its data on the GPU. The library provides a special feature designed for that: Allocations made with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> flag set in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum. ">VmaAllocationCreateInfo::flags</a> stay mapped all the time, so you can just access CPU pointer to it any time without a need to call any "map" or "unmap" function. Example:</p>
+<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = <span class="keyword">sizeof</span>(ConstantBuffer);</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div><div class="line"></div><div class="line"><span class="comment">// Buffer is already mapped. You can access its memory.</span></div><div class="line">memcpy(allocInfo.<a class="code" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div></div><!-- fragment --><p>There are some exceptions though, when you should consider mapping memory only for a short period of time:</p>
 <ul>
-<li>When operating system is Windows 7 or 8.x (Windows 10 is not affected because it uses WDDM2), device is discrete AMD GPU, and memory type is the special 256 MiB pool of <code>DEVICE_LOCAL + HOST_VISIBLE</code> memory (selected when you use <code>VMA_MEMORY_USAGE_CPU_TO_GPU</code>), then whenever a memory block allocated from this memory type stays mapped for the time of any call to <code>vkQueueSubmit()</code> or <code>vkQueuePresentKHR()</code>, this block is migrated by WDDM to system RAM, which degrades performance. It doesn't matter if that particular memory block is actually used by the command buffer being submitted.</li>
+<li>When operating system is Windows 7 or 8.x (Windows 10 is not affected because it uses WDDM2), device is discrete AMD GPU, and memory type is the special 256 MiB pool of <code>DEVICE_LOCAL + HOST_VISIBLE</code> memory (selected when you use <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">VMA_MEMORY_USAGE_CPU_TO_GPU</a>), then whenever a memory block allocated from this memory type stays mapped for the time of any call to <code>vkQueueSubmit()</code> or <code>vkQueuePresentKHR()</code>, this block is migrated by WDDM to system RAM, which degrades performance. It doesn't matter if that particular memory block is actually used by the command buffer being submitted.</li>
 <li>Keeping many large memory blocks mapped may impact performance or stability of some debugging tools.</li>
 </ul>
 <h1><a class="anchor" id="memory_mapping_cache_control"></a>
 Cache control</h1>
 <p>Memory in Vulkan doesn't need to be unmapped before using it on GPU, but unless a memory types has <code>VK_MEMORY_PROPERTY_HOST_COHERENT_BIT</code> flag set, you need to manually invalidate cache before reading of mapped pointer using function <code>vkvkInvalidateMappedMemoryRanges()</code> and flush cache after writing to mapped pointer using function <code>vkFlushMappedMemoryRanges()</code>. Example:</p>
-<div class="fragment"><div class="line">memcpy(allocInfo.<a class="code" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div><div class="line"></div><div class="line">VkMemoryPropertyFlags memFlags;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca">vmaGetMemoryTypeProperties</a>(allocator, allocInfo.<a class="code" href="struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5">memoryType</a>, &amp;memFlags);</div><div class="line"><span class="keywordflow">if</span>((memFlags &amp; VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) == 0)</div><div class="line">{</div><div class="line">    VkMappedMemoryRange memRange = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE };</div><div class="line">    memRange.memory = allocInfo.<a class="code" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">deviceMemory</a>;</div><div class="line">    memRange.offset = allocInfo.<a class="code" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268">offset</a>;</div><div class="line">    memRange.size   = allocInfo.<a class="code" href="struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f">size</a>;</div><div class="line">    vkFlushMappedMemoryRanges(device, 1, &amp;memRange);</div><div class="line">}</div></div><!-- fragment --><p>Please note that memory allocated with <code>VMA_MEMORY_USAGE_CPU_ONLY</code> is guaranteed to be host coherent.</p>
+<div class="fragment"><div class="line">memcpy(allocInfo.<a class="code" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div><div class="line"></div><div class="line">VkMemoryPropertyFlags memFlags;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca">vmaGetMemoryTypeProperties</a>(allocator, allocInfo.<a class="code" href="struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5">memoryType</a>, &amp;memFlags);</div><div class="line"><span class="keywordflow">if</span>((memFlags &amp; VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) == 0)</div><div class="line">{</div><div class="line">    VkMappedMemoryRange memRange = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE };</div><div class="line">    memRange.memory = allocInfo.<a class="code" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">deviceMemory</a>;</div><div class="line">    memRange.offset = allocInfo.<a class="code" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268">offset</a>;</div><div class="line">    memRange.size   = allocInfo.<a class="code" href="struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f">size</a>;</div><div class="line">    vkFlushMappedMemoryRanges(device, 1, &amp;memRange);</div><div class="line">}</div></div><!-- fragment --><p>Please note that memory allocated with <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a> is guaranteed to be host coherent.</p>
 <p>Also, Windows drivers from all 3 PC GPU vendors (AMD, Intel, NVIDIA) currently provide <code>VK_MEMORY_PROPERTY_HOST_COHERENT_BIT</code> flag on all memory types that are <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code>, so on this platform you may not need to bother.</p>
 <h1><a class="anchor" id="memory_mapping_finding_if_memory_mappable"></a>
 Finding out if memory is mappable</h1>
 <p>It may happen that your allocation ends up in memory that is <code>HOST_VISIBLE</code> (available for mapping) despite it wasn't explicitly requested. For example, application may work on integrated graphics with unified memory (like Intel) or allocation from video memory might have failed, so the library chose system memory as fallback.</p>
 <p>You can detect this case and map such allocation to access its memory on CPU directly, instead of launching a transfer operation. In order to do that: inspect <code>allocInfo.memoryType</code>, call <a class="el" href="vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca" title="Given Memory Type Index, returns Property Flags of this memory type. ">vmaGetMemoryTypeProperties()</a>, and look for <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> flag in properties of that memory type.</p>
-<p>You can even use <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code> flag while creating allocations that are not necessarily <code>HOST_VISIBLE</code> (e.g. using <code>VMA_MEMORY_USAGE_GPU_ONLY</code>). If the allocation ends up in memory type that is <code>HOST_VISIBLE</code>, it will be persistently mapped and you can use it directly. If not, the flag is just ignored. Example:</p>
-<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = <span class="keyword">sizeof</span>(ConstantBuffer);</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line">VmaAllocation alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div><div class="line"></div><div class="line"><span class="keywordflow">if</span>(allocInfo.<a class="code" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a> != <span class="keyword">nullptr</span>)</div><div class="line">{</div><div class="line">    <span class="comment">// Allocation ended up in mappable memory.</span></div><div class="line">    <span class="comment">// It&#39;s persistently mapped. You can access it directly.</span></div><div class="line">    memcpy(allocInfo.<a class="code" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div><div class="line">}</div><div class="line"><span class="keywordflow">else</span></div><div class="line">{</div><div class="line">    <span class="comment">// Allocation ended up in non-mappable memory.</span></div><div class="line">    <span class="comment">// You need to create CPU-side copy in VMA_MEMORY_USAGE_CPU_ONLY and make a transfer.</span></div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents -->
+<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = <span class="keyword">sizeof</span>(ConstantBuffer);</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div><div class="line"></div><div class="line">VkMemoryPropertyFlags memFlags;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca">vmaGetMemoryTypeProperties</a>(allocator, allocInfo.<a class="code" href="struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5">memoryType</a>, &amp;memFlags);</div><div class="line"><span class="keywordflow">if</span>((memFlags &amp; VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)</div><div class="line">{</div><div class="line">    <span class="comment">// Allocation ended up in mappable memory. You can map it and access it directly.</span></div><div class="line">    <span class="keywordtype">void</span>* mappedData;</div><div class="line">    <a class="code" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069">vmaMapMemory</a>(allocator, alloc, &amp;mappedData);</div><div class="line">    memcpy(mappedData, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div><div class="line">    <a class="code" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a>(allocator, alloc);</div><div class="line">}</div><div class="line"><span class="keywordflow">else</span></div><div class="line">{</div><div class="line">    <span class="comment">// Allocation ended up in non-mappable memory.</span></div><div class="line">    <span class="comment">// You need to create CPU-side buffer in VMA_MEMORY_USAGE_CPU_ONLY and make a transfer.</span></div><div class="line">}</div></div><!-- fragment --><p>You can even use <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> flag while creating allocations that are not necessarily <code>HOST_VISIBLE</code> (e.g. using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>). If the allocation ends up in memory type that is <code>HOST_VISIBLE</code>, it will be persistently mapped and you can use it directly. If not, the flag is just ignored. Example:</p>
+<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = <span class="keyword">sizeof</span>(ConstantBuffer);</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div><div class="line"></div><div class="line"><span class="keywordflow">if</span>(allocInfo.<a class="code" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a> != <span class="keyword">nullptr</span>)</div><div class="line">{</div><div class="line">    <span class="comment">// Allocation ended up in mappable memory.</span></div><div class="line">    <span class="comment">// It&#39;s persistently mapped. You can access it directly.</span></div><div class="line">    memcpy(allocInfo.<a class="code" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div><div class="line">}</div><div class="line"><span class="keywordflow">else</span></div><div class="line">{</div><div class="line">    <span class="comment">// Allocation ended up in non-mappable memory.</span></div><div class="line">    <span class="comment">// You need to create CPU-side buffer in VMA_MEMORY_USAGE_CPU_ONLY and make a transfer.</span></div><div class="line">}</div></div><!-- fragment --> </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
 Generated by &#160;<a href="http://www.doxygen.org/index.html">
diff --git a/docs/html/quick_start.html b/docs/html/quick_start.html
index adb1f28..ae0bc59 100644
--- a/docs/html/quick_start.html
+++ b/docs/html/quick_start.html
@@ -66,21 +66,24 @@
 <div class="title">Quick start </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><h1><a class="anchor" id="project_setup"></a>
+<div class="textblock"><h1><a class="anchor" id="quick_start_project_setup"></a>
 Project setup</h1>
-<p>In your project code:</p>
+<p>Vulkan Memory Allocator comes in form of a single header file. You don't need to build it as a separate library project. You can add this file directly to your project and submit it to code repository next to your other source files.</p>
+<p>"Single header" doesn't mean that everything is contained in C/C++ declarations, like it tends to be in case of inline functions or C++ templates. It means that implementation is bundled with interface in a single file and needs to be extracted using preprocessor macro. If you don't do it properly, you will get linker errors.</p>
+<p>To do it properly:</p>
 <ol type="1">
-<li>Include "vk_mem_alloc.h" file wherever you want to use the library.</li>
-<li>In exacly one C++ file define following macro before include to build library implementation.</li>
+<li>Include "vk_mem_alloc.h" file in each CPP file where you want to use the library. This includes declarations of all members of the library.</li>
+<li>In exacly one CPP file define following macro before this include. It enables also internal definitions.</li>
 </ol>
-<div class="fragment"><div class="line"><span class="preprocessor">#define VMA_IMPLEMENTATION</span></div><div class="line"><span class="preprocessor">#include &quot;vk_mem_alloc.h&quot;</span></div></div><!-- fragment --><h1><a class="anchor" id="initialization"></a>
+<div class="fragment"><div class="line"><span class="preprocessor">#define VMA_IMPLEMENTATION</span></div><div class="line"><span class="preprocessor">#include &quot;vk_mem_alloc.h&quot;</span></div></div><!-- fragment --><p>It may be a good idea to create dedicated CPP file just for this purpose.</p>
+<h1><a class="anchor" id="quick_start_initialization"></a>
 Initialization</h1>
 <p>At program startup:</p>
 <ol type="1">
 <li>Initialize Vulkan to have <code>VkPhysicalDevice</code> and <code>VkDevice</code> object.</li>
-<li>Fill <a class="el" href="struct_vma_allocator_create_info.html" title="Description of a Allocator to be created. ">VmaAllocatorCreateInfo</a> structure and create <code>VmaAllocator</code> object by calling <a class="el" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb" title="Creates Allocator object. ">vmaCreateAllocator()</a>.</li>
+<li>Fill <a class="el" href="struct_vma_allocator_create_info.html" title="Description of a Allocator to be created. ">VmaAllocatorCreateInfo</a> structure and create <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a> object by calling <a class="el" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb" title="Creates Allocator object. ">vmaCreateAllocator()</a>.</li>
 </ol>
-<div class="fragment"><div class="line"><a class="code" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a> allocatorInfo = {};</div><div class="line">allocatorInfo.<a class="code" href="struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156">physicalDevice</a> = physicalDevice;</div><div class="line">allocatorInfo.<a class="code" href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500">device</a> = device;</div><div class="line"></div><div class="line">VmaAllocator allocator;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a>(&amp;allocatorInfo, &amp;allocator);</div></div><!-- fragment --><h1><a class="anchor" id="resource_allocation"></a>
+<div class="fragment"><div class="line"><a class="code" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a> allocatorInfo = {};</div><div class="line">allocatorInfo.<a class="code" href="struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156">physicalDevice</a> = physicalDevice;</div><div class="line">allocatorInfo.<a class="code" href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500">device</a> = device;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocator.html">VmaAllocator</a> allocator;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a>(&amp;allocatorInfo, &amp;allocator);</div></div><!-- fragment --><h1><a class="anchor" id="quick_start_resource_allocation"></a>
 Resource allocation</h1>
 <p>When you want to create a buffer or image:</p>
 <ol type="1">
@@ -88,7 +91,7 @@
 <li>Fill <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> structure.</li>
 <li>Call <a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a> / <a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a> to get <code>VkBuffer</code>/<code>VkImage</code> with memory already allocated and bound to it.</li>
 </ol>
-<div class="fragment"><div class="line">VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufferInfo.size = 65536;</div><div class="line">bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line">VmaAllocation allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>Don't forget to destroy your objects when no longer needed:</p>
+<div class="fragment"><div class="line">VkBufferCreateInfo bufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufferInfo.size = 65536;</div><div class="line">bufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div><div class="line">allocInfo.<a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div><div class="line"></div><div class="line">VkBuffer buffer;</div><div class="line"><a class="code" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div></div><!-- fragment --><p>Don't forget to destroy your objects when no longer needed:</p>
 <div class="fragment"><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(allocator, buffer, allocation);</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d">vmaDestroyAllocator</a>(allocator);</div></div><!-- fragment --> </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js
index 269b59b..a4ffe71 100644
--- a/docs/html/search/all_0.js
+++ b/docs/html/search/all_0.js
@@ -1,6 +1,5 @@
 var searchData=
 [
-  ['about_20the_20library',['About the library',['../about_the_library.html',1,'index']]],
   ['allocation_20names_20and_20user_20data',['Allocation names and user data',['../allocation_annotation.html',1,'index']]],
   ['allocationcount',['allocationCount',['../struct_vma_stat_info.html#a537741e4d5cdddc1c0ab95ec650afaff',1,'VmaStatInfo::allocationCount()'],['../struct_vma_pool_stats.html#ad1924eb54fffa45e9e0e65670c8fe5eb',1,'VmaPoolStats::allocationCount()']]],
   ['allocationsizeavg',['allocationSizeAvg',['../struct_vma_stat_info.html#a1081a039964e566c672e7a2347f9e599',1,'VmaStatInfo']]],
diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js
index 2cd9042..93e8ffe 100644
--- a/docs/html/search/all_5.js
+++ b/docs/html/search/all_5.js
@@ -1,4 +1,4 @@
 var searchData=
 [
-  ['lost_20allocations',['Lost allocations',['../lost_allocations.html',1,'index']]]
+  ['general_20considerations',['General considerations',['../general_considerations.html',1,'index']]]
 ];
diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js
index 8e80e1a..2cd9042 100644
--- a/docs/html/search/all_6.js
+++ b/docs/html/search/all_6.js
@@ -1,12 +1,4 @@
 var searchData=
 [
-  ['maxallocationstomove',['maxAllocationsToMove',['../struct_vma_defragmentation_info.html#aa7c7304e13c71f604c907196c4e28fbc',1,'VmaDefragmentationInfo']]],
-  ['maxblockcount',['maxBlockCount',['../struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c',1,'VmaPoolCreateInfo']]],
-  ['maxbytestomove',['maxBytesToMove',['../struct_vma_defragmentation_info.html#acb311c940a777270e67e1b81c5ab6a1d',1,'VmaDefragmentationInfo']]],
-  ['memory_20mapping',['Memory mapping',['../memory_mapping.html',1,'index']]],
-  ['memoryheap',['memoryHeap',['../struct_vma_stats.html#a0e6611508c29a187f0fd14ff1a0329c0',1,'VmaStats']]],
-  ['memorytype',['memoryType',['../struct_vma_stats.html#a13e3caf754be79352c42408756309331',1,'VmaStats::memoryType()'],['../struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5',1,'VmaAllocationInfo::memoryType()']]],
-  ['memorytypebits',['memoryTypeBits',['../struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055',1,'VmaAllocationCreateInfo']]],
-  ['memorytypeindex',['memoryTypeIndex',['../struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319',1,'VmaPoolCreateInfo']]],
-  ['minblockcount',['minBlockCount',['../struct_vma_pool_create_info.html#ad8006fb803185c0a699d30f3e9a865ae',1,'VmaPoolCreateInfo']]]
+  ['lost_20allocations',['Lost allocations',['../lost_allocations.html',1,'index']]]
 ];
diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js
index c9c4229..8e80e1a 100644
--- a/docs/html/search/all_7.js
+++ b/docs/html/search/all_7.js
@@ -1,4 +1,12 @@
 var searchData=
 [
-  ['offset',['offset',['../struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268',1,'VmaAllocationInfo']]]
+  ['maxallocationstomove',['maxAllocationsToMove',['../struct_vma_defragmentation_info.html#aa7c7304e13c71f604c907196c4e28fbc',1,'VmaDefragmentationInfo']]],
+  ['maxblockcount',['maxBlockCount',['../struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c',1,'VmaPoolCreateInfo']]],
+  ['maxbytestomove',['maxBytesToMove',['../struct_vma_defragmentation_info.html#acb311c940a777270e67e1b81c5ab6a1d',1,'VmaDefragmentationInfo']]],
+  ['memory_20mapping',['Memory mapping',['../memory_mapping.html',1,'index']]],
+  ['memoryheap',['memoryHeap',['../struct_vma_stats.html#a0e6611508c29a187f0fd14ff1a0329c0',1,'VmaStats']]],
+  ['memorytype',['memoryType',['../struct_vma_stats.html#a13e3caf754be79352c42408756309331',1,'VmaStats::memoryType()'],['../struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5',1,'VmaAllocationInfo::memoryType()']]],
+  ['memorytypebits',['memoryTypeBits',['../struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055',1,'VmaAllocationCreateInfo']]],
+  ['memorytypeindex',['memoryTypeIndex',['../struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319',1,'VmaPoolCreateInfo']]],
+  ['minblockcount',['minBlockCount',['../struct_vma_pool_create_info.html#ad8006fb803185c0a699d30f3e9a865ae',1,'VmaPoolCreateInfo']]]
 ];
diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js
index 590465a..c9c4229 100644
--- a/docs/html/search/all_8.js
+++ b/docs/html/search/all_8.js
@@ -1,17 +1,4 @@
 var searchData=
 [
-  ['pallocationcallbacks',['pAllocationCallbacks',['../struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d',1,'VmaAllocatorCreateInfo']]],
-  ['pdevicememorycallbacks',['pDeviceMemoryCallbacks',['../struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e',1,'VmaAllocatorCreateInfo']]],
-  ['pfn_5fvmaallocatedevicememoryfunction',['PFN_vmaAllocateDeviceMemoryFunction',['../vk__mem__alloc_8h.html#ab6a6477cda1ce775b30bde96d766203b',1,'vk_mem_alloc.h']]],
-  ['pfn_5fvmafreedevicememoryfunction',['PFN_vmaFreeDeviceMemoryFunction',['../vk__mem__alloc_8h.html#aef2545dc2e9dd4f29ab9ba6ac6fe2f49',1,'vk_mem_alloc.h']]],
-  ['pfnallocate',['pfnAllocate',['../struct_vma_device_memory_callbacks.html#a4f17f7b255101e733b44d5633aceabfb',1,'VmaDeviceMemoryCallbacks']]],
-  ['pfnfree',['pfnFree',['../struct_vma_device_memory_callbacks.html#abe8a3328bbc916f6f712fdb6b299444c',1,'VmaDeviceMemoryCallbacks']]],
-  ['pheapsizelimit',['pHeapSizeLimit',['../struct_vma_allocator_create_info.html#a31c192aa6cbffa33279f6d9f0c47c44b',1,'VmaAllocatorCreateInfo']]],
-  ['physicaldevice',['physicalDevice',['../struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156',1,'VmaAllocatorCreateInfo']]],
-  ['pmappeddata',['pMappedData',['../struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2',1,'VmaAllocationInfo']]],
-  ['pool',['pool',['../struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150',1,'VmaAllocationCreateInfo']]],
-  ['preferredflags',['preferredFlags',['../struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d',1,'VmaAllocationCreateInfo']]],
-  ['preferredlargeheapblocksize',['preferredLargeHeapBlockSize',['../struct_vma_allocator_create_info.html#a8e4714298e3121cdd8b214a1ae7a637a',1,'VmaAllocatorCreateInfo']]],
-  ['puserdata',['pUserData',['../struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19',1,'VmaAllocationCreateInfo::pUserData()'],['../struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13',1,'VmaAllocationInfo::pUserData()']]],
-  ['pvulkanfunctions',['pVulkanFunctions',['../struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd',1,'VmaAllocatorCreateInfo']]]
+  ['offset',['offset',['../struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268',1,'VmaAllocationInfo']]]
 ];
diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js
index de761c9..590465a 100644
--- a/docs/html/search/all_9.js
+++ b/docs/html/search/all_9.js
@@ -1,4 +1,17 @@
 var searchData=
 [
-  ['quick_20start',['Quick start',['../quick_start.html',1,'index']]]
+  ['pallocationcallbacks',['pAllocationCallbacks',['../struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d',1,'VmaAllocatorCreateInfo']]],
+  ['pdevicememorycallbacks',['pDeviceMemoryCallbacks',['../struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e',1,'VmaAllocatorCreateInfo']]],
+  ['pfn_5fvmaallocatedevicememoryfunction',['PFN_vmaAllocateDeviceMemoryFunction',['../vk__mem__alloc_8h.html#ab6a6477cda1ce775b30bde96d766203b',1,'vk_mem_alloc.h']]],
+  ['pfn_5fvmafreedevicememoryfunction',['PFN_vmaFreeDeviceMemoryFunction',['../vk__mem__alloc_8h.html#aef2545dc2e9dd4f29ab9ba6ac6fe2f49',1,'vk_mem_alloc.h']]],
+  ['pfnallocate',['pfnAllocate',['../struct_vma_device_memory_callbacks.html#a4f17f7b255101e733b44d5633aceabfb',1,'VmaDeviceMemoryCallbacks']]],
+  ['pfnfree',['pfnFree',['../struct_vma_device_memory_callbacks.html#abe8a3328bbc916f6f712fdb6b299444c',1,'VmaDeviceMemoryCallbacks']]],
+  ['pheapsizelimit',['pHeapSizeLimit',['../struct_vma_allocator_create_info.html#a31c192aa6cbffa33279f6d9f0c47c44b',1,'VmaAllocatorCreateInfo']]],
+  ['physicaldevice',['physicalDevice',['../struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156',1,'VmaAllocatorCreateInfo']]],
+  ['pmappeddata',['pMappedData',['../struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2',1,'VmaAllocationInfo']]],
+  ['pool',['pool',['../struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150',1,'VmaAllocationCreateInfo']]],
+  ['preferredflags',['preferredFlags',['../struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d',1,'VmaAllocationCreateInfo']]],
+  ['preferredlargeheapblocksize',['preferredLargeHeapBlockSize',['../struct_vma_allocator_create_info.html#a8e4714298e3121cdd8b214a1ae7a637a',1,'VmaAllocatorCreateInfo']]],
+  ['puserdata',['pUserData',['../struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19',1,'VmaAllocationCreateInfo::pUserData()'],['../struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13',1,'VmaAllocationInfo::pUserData()']]],
+  ['pvulkanfunctions',['pVulkanFunctions',['../struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd',1,'VmaAllocatorCreateInfo']]]
 ];
diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js
index 9505699..de761c9 100644
--- a/docs/html/search/all_a.js
+++ b/docs/html/search/all_a.js
@@ -1,4 +1,4 @@
 var searchData=
 [
-  ['requiredflags',['requiredFlags',['../struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90',1,'VmaAllocationCreateInfo']]]
+  ['quick_20start',['Quick start',['../quick_start.html',1,'index']]]
 ];
diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js
index 740c955..f3376c8 100644
--- a/docs/html/search/all_b.js
+++ b/docs/html/search/all_b.js
@@ -1,4 +1,5 @@
 var searchData=
 [
-  ['size',['size',['../struct_vma_pool_stats.html#a326807b2de2b0931cee4ed9a5f2e420c',1,'VmaPoolStats::size()'],['../struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f',1,'VmaAllocationInfo::size()']]]
+  ['requiredflags',['requiredFlags',['../struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90',1,'VmaAllocationCreateInfo']]],
+  ['recommended_20usage_20patterns',['Recommended usage patterns',['../usage_patterns.html',1,'index']]]
 ];
diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js
index 439118e..e93f611 100644
--- a/docs/html/search/all_c.js
+++ b/docs/html/search/all_c.js
@@ -1,5 +1,5 @@
 var searchData=
 [
-  ['thread_20safety',['Thread safety',['../thread_safety.html',1,'index']]],
-  ['total',['total',['../struct_vma_stats.html#a2e8f5b3353f2fefef3c27f29e245a1f9',1,'VmaStats']]]
+  ['size',['size',['../struct_vma_pool_stats.html#a326807b2de2b0931cee4ed9a5f2e420c',1,'VmaPoolStats::size()'],['../struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f',1,'VmaAllocationInfo::size()']]],
+  ['statistics',['Statistics',['../statistics.html',1,'index']]]
 ];
diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js
index bb52d7a..f8fbe3d 100644
--- a/docs/html/search/all_d.js
+++ b/docs/html/search/all_d.js
@@ -1,11 +1,4 @@
 var searchData=
 [
-  ['unusedbytes',['unusedBytes',['../struct_vma_stat_info.html#a1859d290aca2cd582d8dc25922092669',1,'VmaStatInfo']]],
-  ['unusedrangecount',['unusedRangeCount',['../struct_vma_stat_info.html#ae06129c771bfebfd6468a7f4276502a9',1,'VmaStatInfo::unusedRangeCount()'],['../struct_vma_pool_stats.html#ae4f3546ffa4d1e598b64d8e6134854f4',1,'VmaPoolStats::unusedRangeCount()']]],
-  ['unusedrangesizeavg',['unusedRangeSizeAvg',['../struct_vma_stat_info.html#a2f9b3452af90c9768a30b7fb6ae194fc',1,'VmaStatInfo']]],
-  ['unusedrangesizemax',['unusedRangeSizeMax',['../struct_vma_stat_info.html#a5ba1a2476c4d39b10f7e2f7ebbb72ac4',1,'VmaStatInfo::unusedRangeSizeMax()'],['../struct_vma_pool_stats.html#ab4c8f52dd42ab01998f60f0b6acc722b',1,'VmaPoolStats::unusedRangeSizeMax()']]],
-  ['unusedrangesizemin',['unusedRangeSizeMin',['../struct_vma_stat_info.html#aedeba931324f16589cd2416c0d2dd0d4',1,'VmaStatInfo']]],
-  ['unusedsize',['unusedSize',['../struct_vma_pool_stats.html#ad7c54874724fce7b06aba526202d82a8',1,'VmaPoolStats']]],
-  ['usage',['usage',['../struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910',1,'VmaAllocationCreateInfo']]],
-  ['usedbytes',['usedBytes',['../struct_vma_stat_info.html#ab0c6c73837e5a70c749fbd4f6064895a',1,'VmaStatInfo']]]
+  ['total',['total',['../struct_vma_stats.html#a2e8f5b3353f2fefef3c27f29e245a1f9',1,'VmaStats']]]
 ];
diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js
index ba33b86..bb52d7a 100644
--- a/docs/html/search/all_e.js
+++ b/docs/html/search/all_e.js
@@ -1,90 +1,11 @@
 var searchData=
 [
-  ['vulkan_20memory_20allocator',['Vulkan Memory Allocator',['../index.html',1,'']]],
-  ['vk_5fkhr_5fdedicated_5fallocation',['VK_KHR_dedicated_allocation',['../vk_khr_dedicated_allocation.html',1,'index']]],
-  ['vk_5fmem_5falloc_2eh',['vk_mem_alloc.h',['../vk__mem__alloc_8h.html',1,'']]],
-  ['vkallocatememory',['vkAllocateMemory',['../struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c',1,'VmaVulkanFunctions']]],
-  ['vkbindbuffermemory',['vkBindBufferMemory',['../struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2',1,'VmaVulkanFunctions']]],
-  ['vkbindimagememory',['vkBindImageMemory',['../struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637',1,'VmaVulkanFunctions']]],
-  ['vkcreatebuffer',['vkCreateBuffer',['../struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f',1,'VmaVulkanFunctions']]],
-  ['vkcreateimage',['vkCreateImage',['../struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325',1,'VmaVulkanFunctions']]],
-  ['vkdestroybuffer',['vkDestroyBuffer',['../struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45',1,'VmaVulkanFunctions']]],
-  ['vkdestroyimage',['vkDestroyImage',['../struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa',1,'VmaVulkanFunctions']]],
-  ['vkfreememory',['vkFreeMemory',['../struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4',1,'VmaVulkanFunctions']]],
-  ['vkgetbuffermemoryrequirements',['vkGetBufferMemoryRequirements',['../struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143',1,'VmaVulkanFunctions']]],
-  ['vkgetbuffermemoryrequirements2khr',['vkGetBufferMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9d8d1b05d2b1e7e1d9b27f6f585acf9c',1,'VmaVulkanFunctions']]],
-  ['vkgetimagememoryrequirements',['vkGetImageMemoryRequirements',['../struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4',1,'VmaVulkanFunctions']]],
-  ['vkgetimagememoryrequirements2khr',['vkGetImageMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875',1,'VmaVulkanFunctions']]],
-  ['vkgetphysicaldevicememoryproperties',['vkGetPhysicalDeviceMemoryProperties',['../struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830',1,'VmaVulkanFunctions']]],
-  ['vkgetphysicaldeviceproperties',['vkGetPhysicalDeviceProperties',['../struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96',1,'VmaVulkanFunctions']]],
-  ['vkmapmemory',['vkMapMemory',['../struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49',1,'VmaVulkanFunctions']]],
-  ['vkunmapmemory',['vkUnmapMemory',['../struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9',1,'VmaVulkanFunctions']]],
-  ['vma_5fallocation_5fcreate_5fcan_5fbecome_5flost_5fbit',['VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocation_5fcreate_5fcan_5fmake_5fother_5flost_5fbit',['VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocation_5fcreate_5fdedicated_5fmemory_5fbit',['VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum',['VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocation_5fcreate_5fmapped_5fbit',['VMA_ALLOCATION_CREATE_MAPPED_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocation_5fcreate_5fnever_5fallocate_5fbit',['VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocation_5fcreate_5fuser_5fdata_5fcopy_5fstring_5fbit',['VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocator_5fcreate_5fexternally_5fsynchronized_5fbit',['VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocator_5fcreate_5fflag_5fbits_5fmax_5fenum',['VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c',1,'vk_mem_alloc.h']]],
-  ['vma_5fallocator_5fcreate_5fkhr_5fdedicated_5fallocation_5fbit',['VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878',1,'vk_mem_alloc.h']]],
-  ['vma_5fmemory_5fusage_5fcpu_5fonly',['VMA_MEMORY_USAGE_CPU_ONLY',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5',1,'vk_mem_alloc.h']]],
-  ['vma_5fmemory_5fusage_5fcpu_5fto_5fgpu',['VMA_MEMORY_USAGE_CPU_TO_GPU',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67',1,'vk_mem_alloc.h']]],
-  ['vma_5fmemory_5fusage_5fgpu_5fonly',['VMA_MEMORY_USAGE_GPU_ONLY',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7',1,'vk_mem_alloc.h']]],
-  ['vma_5fmemory_5fusage_5fgpu_5fto_5fcpu',['VMA_MEMORY_USAGE_GPU_TO_CPU',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27',1,'vk_mem_alloc.h']]],
-  ['vma_5fmemory_5fusage_5fmax_5fenum',['VMA_MEMORY_USAGE_MAX_ENUM',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e',1,'vk_mem_alloc.h']]],
-  ['vma_5fmemory_5fusage_5funknown',['VMA_MEMORY_USAGE_UNKNOWN',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd',1,'vk_mem_alloc.h']]],
-  ['vma_5fpool_5fcreate_5fflag_5fbits_5fmax_5fenum',['VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM',['../vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec',1,'vk_mem_alloc.h']]],
-  ['vma_5fpool_5fcreate_5fignore_5fbuffer_5fimage_5fgranularity_5fbit',['VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT',['../vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2',1,'vk_mem_alloc.h']]],
-  ['vma_5fstats_5fstring_5fenabled',['VMA_STATS_STRING_ENABLED',['../vk__mem__alloc_8h.html#ae25f0d55fd91cb166f002b63244800e1',1,'vk_mem_alloc.h']]],
-  ['vmaallocatememory',['vmaAllocateMemory',['../vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8',1,'vk_mem_alloc.h']]],
-  ['vmaallocatememoryforbuffer',['vmaAllocateMemoryForBuffer',['../vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b',1,'vk_mem_alloc.h']]],
-  ['vmaallocatememoryforimage',['vmaAllocateMemoryForImage',['../vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb',1,'vk_mem_alloc.h']]],
-  ['vmaallocationcreateflagbits',['VmaAllocationCreateFlagBits',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#abf6bf6748c7a9fe7ce5b7835c0f56af4',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h']]],
-  ['vmaallocationcreateflags',['VmaAllocationCreateFlags',['../vk__mem__alloc_8h.html#a5225e5e11f8376f6a31a1791f3d6e817',1,'vk_mem_alloc.h']]],
-  ['vmaallocationcreateinfo',['VmaAllocationCreateInfo',['../struct_vma_allocation_create_info.html',1,'VmaAllocationCreateInfo'],['../vk__mem__alloc_8h.html#a86c44f9950b40d50088ed93a17870a7a',1,'VmaAllocationCreateInfo():&#160;vk_mem_alloc.h']]],
-  ['vmaallocationinfo',['VmaAllocationInfo',['../struct_vma_allocation_info.html',1,'VmaAllocationInfo'],['../vk__mem__alloc_8h.html#a795e6ff02a21d5486c0565f403dd9255',1,'VmaAllocationInfo():&#160;vk_mem_alloc.h']]],
-  ['vmaallocatorcreateflagbits',['VmaAllocatorCreateFlagBits',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#a4ddf381b6ce795bdfbc6c614640b9915',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h']]],
-  ['vmaallocatorcreateflags',['VmaAllocatorCreateFlags',['../vk__mem__alloc_8h.html#acfe6863e160722c2c1bbcf7573fddc4d',1,'vk_mem_alloc.h']]],
-  ['vmaallocatorcreateinfo',['VmaAllocatorCreateInfo',['../struct_vma_allocator_create_info.html',1,'VmaAllocatorCreateInfo'],['../vk__mem__alloc_8h.html#ae0f6d1d733dded220d28134da46b4283',1,'VmaAllocatorCreateInfo():&#160;vk_mem_alloc.h']]],
-  ['vmabuildstatsstring',['vmaBuildStatsString',['../vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0',1,'vk_mem_alloc.h']]],
-  ['vmacalculatestats',['vmaCalculateStats',['../vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3',1,'vk_mem_alloc.h']]],
-  ['vmacreateallocator',['vmaCreateAllocator',['../vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb',1,'vk_mem_alloc.h']]],
-  ['vmacreatebuffer',['vmaCreateBuffer',['../vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51',1,'vk_mem_alloc.h']]],
-  ['vmacreateimage',['vmaCreateImage',['../vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73',1,'vk_mem_alloc.h']]],
-  ['vmacreatelostallocation',['vmaCreateLostAllocation',['../vk__mem__alloc_8h.html#ae5c9657d9e94756269145b01c05d16f1',1,'vk_mem_alloc.h']]],
-  ['vmacreatepool',['vmaCreatePool',['../vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50',1,'vk_mem_alloc.h']]],
-  ['vmadefragment',['vmaDefragment',['../vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb',1,'vk_mem_alloc.h']]],
-  ['vmadefragmentationinfo',['VmaDefragmentationInfo',['../struct_vma_defragmentation_info.html',1,'VmaDefragmentationInfo'],['../vk__mem__alloc_8h.html#ae67f8573a0cf20f16f0a1eecbca566a0',1,'VmaDefragmentationInfo():&#160;vk_mem_alloc.h']]],
-  ['vmadefragmentationstats',['VmaDefragmentationStats',['../struct_vma_defragmentation_stats.html',1,'VmaDefragmentationStats'],['../vk__mem__alloc_8h.html#ab0f9b06441c840fee560de4a2967f8c9',1,'VmaDefragmentationStats():&#160;vk_mem_alloc.h']]],
-  ['vmadestroyallocator',['vmaDestroyAllocator',['../vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d',1,'vk_mem_alloc.h']]],
-  ['vmadestroybuffer',['vmaDestroyBuffer',['../vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77',1,'vk_mem_alloc.h']]],
-  ['vmadestroyimage',['vmaDestroyImage',['../vk__mem__alloc_8h.html#ae50d2cb3b4a3bfd4dd40987234e50e7e',1,'vk_mem_alloc.h']]],
-  ['vmadestroypool',['vmaDestroyPool',['../vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1',1,'vk_mem_alloc.h']]],
-  ['vmadevicememorycallbacks',['VmaDeviceMemoryCallbacks',['../struct_vma_device_memory_callbacks.html',1,'VmaDeviceMemoryCallbacks'],['../vk__mem__alloc_8h.html#a5e2eb68d727cfd4df25702b027b7aa31',1,'VmaDeviceMemoryCallbacks():&#160;vk_mem_alloc.h']]],
-  ['vmafindmemorytypeindex',['vmaFindMemoryTypeIndex',['../vk__mem__alloc_8h.html#aef15a94b58fbcb0fe706d5720e84a74a',1,'vk_mem_alloc.h']]],
-  ['vmafindmemorytypeindexforbufferinfo',['vmaFindMemoryTypeIndexForBufferInfo',['../vk__mem__alloc_8h.html#ae790ab9ffaf7667fb8f62523e6897888',1,'vk_mem_alloc.h']]],
-  ['vmafindmemorytypeindexforimageinfo',['vmaFindMemoryTypeIndexForImageInfo',['../vk__mem__alloc_8h.html#a088da83d8eaf3ce9056d9ea0b981d472',1,'vk_mem_alloc.h']]],
-  ['vmafreememory',['vmaFreeMemory',['../vk__mem__alloc_8h.html#a11f0fbc034fa81a4efedd73d61ce7568',1,'vk_mem_alloc.h']]],
-  ['vmafreestatsstring',['vmaFreeStatsString',['../vk__mem__alloc_8h.html#a3104eb30d8122c84dd8541063f145288',1,'vk_mem_alloc.h']]],
-  ['vmagetallocationinfo',['vmaGetAllocationInfo',['../vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b',1,'vk_mem_alloc.h']]],
-  ['vmagetmemoryproperties',['vmaGetMemoryProperties',['../vk__mem__alloc_8h.html#ab88db292a17974f911182543fda52d19',1,'vk_mem_alloc.h']]],
-  ['vmagetmemorytypeproperties',['vmaGetMemoryTypeProperties',['../vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca',1,'vk_mem_alloc.h']]],
-  ['vmagetphysicaldeviceproperties',['vmaGetPhysicalDeviceProperties',['../vk__mem__alloc_8h.html#aecabf7b6e91ea87d0316fa0a9e014fe0',1,'vk_mem_alloc.h']]],
-  ['vmagetpoolstats',['vmaGetPoolStats',['../vk__mem__alloc_8h.html#ae8bf76997b234ef68aad922616df4153',1,'vk_mem_alloc.h']]],
-  ['vmamakepoolallocationslost',['vmaMakePoolAllocationsLost',['../vk__mem__alloc_8h.html#a736bd6cbda886f36c891727e73bd4024',1,'vk_mem_alloc.h']]],
-  ['vmamapmemory',['vmaMapMemory',['../vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069',1,'vk_mem_alloc.h']]],
-  ['vmamemoryusage',['VmaMemoryUsage',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#ad63b2113c0bfdbeade1cb498f5a8580d',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h']]],
-  ['vmapoolcreateflagbits',['VmaPoolCreateFlagBits',['../vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#a8f93195158e0e2ac80ca352064e71c1f',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h']]],
-  ['vmapoolcreateflags',['VmaPoolCreateFlags',['../vk__mem__alloc_8h.html#a2770e325ea42e087c1b91fdf46d0292a',1,'vk_mem_alloc.h']]],
-  ['vmapoolcreateinfo',['VmaPoolCreateInfo',['../struct_vma_pool_create_info.html',1,'VmaPoolCreateInfo'],['../vk__mem__alloc_8h.html#a211706e9348dcee25a843ed4ea69bce7',1,'VmaPoolCreateInfo():&#160;vk_mem_alloc.h']]],
-  ['vmapoolstats',['VmaPoolStats',['../struct_vma_pool_stats.html',1,'VmaPoolStats'],['../vk__mem__alloc_8h.html#a2e5612d871d64c5624087b837a338c34',1,'VmaPoolStats():&#160;vk_mem_alloc.h']]],
-  ['vmasetallocationuserdata',['vmaSetAllocationUserData',['../vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f',1,'vk_mem_alloc.h']]],
-  ['vmasetcurrentframeindex',['vmaSetCurrentFrameIndex',['../vk__mem__alloc_8h.html#ade56bf8dc9f5a5eaddf5f119ed525236',1,'vk_mem_alloc.h']]],
-  ['vmastatinfo',['VmaStatInfo',['../struct_vma_stat_info.html',1,'VmaStatInfo'],['../vk__mem__alloc_8h.html#a810b009a788ee8aac72a25b42ffbe31c',1,'VmaStatInfo():&#160;vk_mem_alloc.h']]],
-  ['vmastats',['VmaStats',['../struct_vma_stats.html',1,'VmaStats'],['../vk__mem__alloc_8h.html#a732be855fb4a7c248e6853d928a729af',1,'VmaStats():&#160;vk_mem_alloc.h']]],
-  ['vmatouchallocation',['vmaTouchAllocation',['../vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a',1,'vk_mem_alloc.h']]],
-  ['vmaunmapmemory',['vmaUnmapMemory',['../vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45',1,'vk_mem_alloc.h']]],
-  ['vmavulkanfunctions',['VmaVulkanFunctions',['../struct_vma_vulkan_functions.html',1,'VmaVulkanFunctions'],['../vk__mem__alloc_8h.html#a97064a1a271b0061ebfc3a079862d0c5',1,'VmaVulkanFunctions():&#160;vk_mem_alloc.h']]]
+  ['unusedbytes',['unusedBytes',['../struct_vma_stat_info.html#a1859d290aca2cd582d8dc25922092669',1,'VmaStatInfo']]],
+  ['unusedrangecount',['unusedRangeCount',['../struct_vma_stat_info.html#ae06129c771bfebfd6468a7f4276502a9',1,'VmaStatInfo::unusedRangeCount()'],['../struct_vma_pool_stats.html#ae4f3546ffa4d1e598b64d8e6134854f4',1,'VmaPoolStats::unusedRangeCount()']]],
+  ['unusedrangesizeavg',['unusedRangeSizeAvg',['../struct_vma_stat_info.html#a2f9b3452af90c9768a30b7fb6ae194fc',1,'VmaStatInfo']]],
+  ['unusedrangesizemax',['unusedRangeSizeMax',['../struct_vma_stat_info.html#a5ba1a2476c4d39b10f7e2f7ebbb72ac4',1,'VmaStatInfo::unusedRangeSizeMax()'],['../struct_vma_pool_stats.html#ab4c8f52dd42ab01998f60f0b6acc722b',1,'VmaPoolStats::unusedRangeSizeMax()']]],
+  ['unusedrangesizemin',['unusedRangeSizeMin',['../struct_vma_stat_info.html#aedeba931324f16589cd2416c0d2dd0d4',1,'VmaStatInfo']]],
+  ['unusedsize',['unusedSize',['../struct_vma_pool_stats.html#ad7c54874724fce7b06aba526202d82a8',1,'VmaPoolStats']]],
+  ['usage',['usage',['../struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910',1,'VmaAllocationCreateInfo']]],
+  ['usedbytes',['usedBytes',['../struct_vma_stat_info.html#ab0c6c73837e5a70c749fbd4f6064895a',1,'VmaStatInfo']]]
 ];
diff --git a/docs/html/search/all_f.html b/docs/html/search/all_f.html
new file mode 100644
index 0000000..6ecfc0e
--- /dev/null
+++ b/docs/html/search/all_f.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="all_f.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js
new file mode 100644
index 0000000..c41492b
--- /dev/null
+++ b/docs/html/search/all_f.js
@@ -0,0 +1,95 @@
+var searchData=
+[
+  ['vulkan_20memory_20allocator',['Vulkan Memory Allocator',['../index.html',1,'']]],
+  ['vk_5fkhr_5fdedicated_5fallocation',['VK_KHR_dedicated_allocation',['../vk_khr_dedicated_allocation.html',1,'index']]],
+  ['vk_5fmem_5falloc_2eh',['vk_mem_alloc.h',['../vk__mem__alloc_8h.html',1,'']]],
+  ['vkallocatememory',['vkAllocateMemory',['../struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c',1,'VmaVulkanFunctions']]],
+  ['vkbindbuffermemory',['vkBindBufferMemory',['../struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2',1,'VmaVulkanFunctions']]],
+  ['vkbindimagememory',['vkBindImageMemory',['../struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637',1,'VmaVulkanFunctions']]],
+  ['vkcreatebuffer',['vkCreateBuffer',['../struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f',1,'VmaVulkanFunctions']]],
+  ['vkcreateimage',['vkCreateImage',['../struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325',1,'VmaVulkanFunctions']]],
+  ['vkdestroybuffer',['vkDestroyBuffer',['../struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45',1,'VmaVulkanFunctions']]],
+  ['vkdestroyimage',['vkDestroyImage',['../struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa',1,'VmaVulkanFunctions']]],
+  ['vkfreememory',['vkFreeMemory',['../struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4',1,'VmaVulkanFunctions']]],
+  ['vkgetbuffermemoryrequirements',['vkGetBufferMemoryRequirements',['../struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143',1,'VmaVulkanFunctions']]],
+  ['vkgetbuffermemoryrequirements2khr',['vkGetBufferMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9d8d1b05d2b1e7e1d9b27f6f585acf9c',1,'VmaVulkanFunctions']]],
+  ['vkgetimagememoryrequirements',['vkGetImageMemoryRequirements',['../struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4',1,'VmaVulkanFunctions']]],
+  ['vkgetimagememoryrequirements2khr',['vkGetImageMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875',1,'VmaVulkanFunctions']]],
+  ['vkgetphysicaldevicememoryproperties',['vkGetPhysicalDeviceMemoryProperties',['../struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830',1,'VmaVulkanFunctions']]],
+  ['vkgetphysicaldeviceproperties',['vkGetPhysicalDeviceProperties',['../struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96',1,'VmaVulkanFunctions']]],
+  ['vkmapmemory',['vkMapMemory',['../struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49',1,'VmaVulkanFunctions']]],
+  ['vkunmapmemory',['vkUnmapMemory',['../struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9',1,'VmaVulkanFunctions']]],
+  ['vma_5fallocation_5fcreate_5fcan_5fbecome_5flost_5fbit',['VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocation_5fcreate_5fcan_5fmake_5fother_5flost_5fbit',['VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocation_5fcreate_5fdedicated_5fmemory_5fbit',['VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum',['VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocation_5fcreate_5fmapped_5fbit',['VMA_ALLOCATION_CREATE_MAPPED_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocation_5fcreate_5fnever_5fallocate_5fbit',['VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocation_5fcreate_5fuser_5fdata_5fcopy_5fstring_5fbit',['VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocator_5fcreate_5fexternally_5fsynchronized_5fbit',['VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocator_5fcreate_5fflag_5fbits_5fmax_5fenum',['VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c',1,'vk_mem_alloc.h']]],
+  ['vma_5fallocator_5fcreate_5fkhr_5fdedicated_5fallocation_5fbit',['VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878',1,'vk_mem_alloc.h']]],
+  ['vma_5fmemory_5fusage_5fcpu_5fonly',['VMA_MEMORY_USAGE_CPU_ONLY',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5',1,'vk_mem_alloc.h']]],
+  ['vma_5fmemory_5fusage_5fcpu_5fto_5fgpu',['VMA_MEMORY_USAGE_CPU_TO_GPU',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67',1,'vk_mem_alloc.h']]],
+  ['vma_5fmemory_5fusage_5fgpu_5fonly',['VMA_MEMORY_USAGE_GPU_ONLY',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7',1,'vk_mem_alloc.h']]],
+  ['vma_5fmemory_5fusage_5fgpu_5fto_5fcpu',['VMA_MEMORY_USAGE_GPU_TO_CPU',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27',1,'vk_mem_alloc.h']]],
+  ['vma_5fmemory_5fusage_5fmax_5fenum',['VMA_MEMORY_USAGE_MAX_ENUM',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e',1,'vk_mem_alloc.h']]],
+  ['vma_5fmemory_5fusage_5funknown',['VMA_MEMORY_USAGE_UNKNOWN',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd',1,'vk_mem_alloc.h']]],
+  ['vma_5fpool_5fcreate_5fflag_5fbits_5fmax_5fenum',['VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM',['../vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec',1,'vk_mem_alloc.h']]],
+  ['vma_5fpool_5fcreate_5fignore_5fbuffer_5fimage_5fgranularity_5fbit',['VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT',['../vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2',1,'vk_mem_alloc.h']]],
+  ['vma_5fstats_5fstring_5fenabled',['VMA_STATS_STRING_ENABLED',['../vk__mem__alloc_8h.html#ae25f0d55fd91cb166f002b63244800e1',1,'vk_mem_alloc.h']]],
+  ['vmaallocatememory',['vmaAllocateMemory',['../vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8',1,'vk_mem_alloc.h']]],
+  ['vmaallocatememoryforbuffer',['vmaAllocateMemoryForBuffer',['../vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b',1,'vk_mem_alloc.h']]],
+  ['vmaallocatememoryforimage',['vmaAllocateMemoryForImage',['../vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb',1,'vk_mem_alloc.h']]],
+  ['vmaallocation',['VmaAllocation',['../struct_vma_allocation.html',1,'']]],
+  ['vmaallocationcreateflagbits',['VmaAllocationCreateFlagBits',['../vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#abf6bf6748c7a9fe7ce5b7835c0f56af4',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h']]],
+  ['vmaallocationcreateflags',['VmaAllocationCreateFlags',['../vk__mem__alloc_8h.html#a5225e5e11f8376f6a31a1791f3d6e817',1,'vk_mem_alloc.h']]],
+  ['vmaallocationcreateinfo',['VmaAllocationCreateInfo',['../struct_vma_allocation_create_info.html',1,'VmaAllocationCreateInfo'],['../vk__mem__alloc_8h.html#a86c44f9950b40d50088ed93a17870a7a',1,'VmaAllocationCreateInfo():&#160;vk_mem_alloc.h']]],
+  ['vmaallocationinfo',['VmaAllocationInfo',['../struct_vma_allocation_info.html',1,'VmaAllocationInfo'],['../vk__mem__alloc_8h.html#a795e6ff02a21d5486c0565f403dd9255',1,'VmaAllocationInfo():&#160;vk_mem_alloc.h']]],
+  ['vmaallocator',['VmaAllocator',['../struct_vma_allocator.html',1,'']]],
+  ['vmaallocatorcreateflagbits',['VmaAllocatorCreateFlagBits',['../vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#a4ddf381b6ce795bdfbc6c614640b9915',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h']]],
+  ['vmaallocatorcreateflags',['VmaAllocatorCreateFlags',['../vk__mem__alloc_8h.html#acfe6863e160722c2c1bbcf7573fddc4d',1,'vk_mem_alloc.h']]],
+  ['vmaallocatorcreateinfo',['VmaAllocatorCreateInfo',['../struct_vma_allocator_create_info.html',1,'VmaAllocatorCreateInfo'],['../vk__mem__alloc_8h.html#ae0f6d1d733dded220d28134da46b4283',1,'VmaAllocatorCreateInfo():&#160;vk_mem_alloc.h']]],
+  ['vmabindbuffermemory',['vmaBindBufferMemory',['../vk__mem__alloc_8h.html#a6b0929b914b60cf2d45cac4bf3547470',1,'vk_mem_alloc.h']]],
+  ['vmabindimagememory',['vmaBindImageMemory',['../vk__mem__alloc_8h.html#a3d3ca45799923aa5d138e9e5f9eb2da5',1,'vk_mem_alloc.h']]],
+  ['vmabuildstatsstring',['vmaBuildStatsString',['../vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0',1,'vk_mem_alloc.h']]],
+  ['vmacalculatestats',['vmaCalculateStats',['../vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3',1,'vk_mem_alloc.h']]],
+  ['vmacreateallocator',['vmaCreateAllocator',['../vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb',1,'vk_mem_alloc.h']]],
+  ['vmacreatebuffer',['vmaCreateBuffer',['../vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51',1,'vk_mem_alloc.h']]],
+  ['vmacreateimage',['vmaCreateImage',['../vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73',1,'vk_mem_alloc.h']]],
+  ['vmacreatelostallocation',['vmaCreateLostAllocation',['../vk__mem__alloc_8h.html#ae5c9657d9e94756269145b01c05d16f1',1,'vk_mem_alloc.h']]],
+  ['vmacreatepool',['vmaCreatePool',['../vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50',1,'vk_mem_alloc.h']]],
+  ['vmadefragment',['vmaDefragment',['../vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb',1,'vk_mem_alloc.h']]],
+  ['vmadefragmentationinfo',['VmaDefragmentationInfo',['../struct_vma_defragmentation_info.html',1,'VmaDefragmentationInfo'],['../vk__mem__alloc_8h.html#ae67f8573a0cf20f16f0a1eecbca566a0',1,'VmaDefragmentationInfo():&#160;vk_mem_alloc.h']]],
+  ['vmadefragmentationstats',['VmaDefragmentationStats',['../struct_vma_defragmentation_stats.html',1,'VmaDefragmentationStats'],['../vk__mem__alloc_8h.html#ab0f9b06441c840fee560de4a2967f8c9',1,'VmaDefragmentationStats():&#160;vk_mem_alloc.h']]],
+  ['vmadestroyallocator',['vmaDestroyAllocator',['../vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d',1,'vk_mem_alloc.h']]],
+  ['vmadestroybuffer',['vmaDestroyBuffer',['../vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77',1,'vk_mem_alloc.h']]],
+  ['vmadestroyimage',['vmaDestroyImage',['../vk__mem__alloc_8h.html#ae50d2cb3b4a3bfd4dd40987234e50e7e',1,'vk_mem_alloc.h']]],
+  ['vmadestroypool',['vmaDestroyPool',['../vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1',1,'vk_mem_alloc.h']]],
+  ['vmadevicememorycallbacks',['VmaDeviceMemoryCallbacks',['../struct_vma_device_memory_callbacks.html',1,'VmaDeviceMemoryCallbacks'],['../vk__mem__alloc_8h.html#a5e2eb68d727cfd4df25702b027b7aa31',1,'VmaDeviceMemoryCallbacks():&#160;vk_mem_alloc.h']]],
+  ['vmafindmemorytypeindex',['vmaFindMemoryTypeIndex',['../vk__mem__alloc_8h.html#aef15a94b58fbcb0fe706d5720e84a74a',1,'vk_mem_alloc.h']]],
+  ['vmafindmemorytypeindexforbufferinfo',['vmaFindMemoryTypeIndexForBufferInfo',['../vk__mem__alloc_8h.html#ae790ab9ffaf7667fb8f62523e6897888',1,'vk_mem_alloc.h']]],
+  ['vmafindmemorytypeindexforimageinfo',['vmaFindMemoryTypeIndexForImageInfo',['../vk__mem__alloc_8h.html#a088da83d8eaf3ce9056d9ea0b981d472',1,'vk_mem_alloc.h']]],
+  ['vmafreememory',['vmaFreeMemory',['../vk__mem__alloc_8h.html#a11f0fbc034fa81a4efedd73d61ce7568',1,'vk_mem_alloc.h']]],
+  ['vmafreestatsstring',['vmaFreeStatsString',['../vk__mem__alloc_8h.html#a3104eb30d8122c84dd8541063f145288',1,'vk_mem_alloc.h']]],
+  ['vmagetallocationinfo',['vmaGetAllocationInfo',['../vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b',1,'vk_mem_alloc.h']]],
+  ['vmagetmemoryproperties',['vmaGetMemoryProperties',['../vk__mem__alloc_8h.html#ab88db292a17974f911182543fda52d19',1,'vk_mem_alloc.h']]],
+  ['vmagetmemorytypeproperties',['vmaGetMemoryTypeProperties',['../vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca',1,'vk_mem_alloc.h']]],
+  ['vmagetphysicaldeviceproperties',['vmaGetPhysicalDeviceProperties',['../vk__mem__alloc_8h.html#aecabf7b6e91ea87d0316fa0a9e014fe0',1,'vk_mem_alloc.h']]],
+  ['vmagetpoolstats',['vmaGetPoolStats',['../vk__mem__alloc_8h.html#ae8bf76997b234ef68aad922616df4153',1,'vk_mem_alloc.h']]],
+  ['vmamakepoolallocationslost',['vmaMakePoolAllocationsLost',['../vk__mem__alloc_8h.html#a736bd6cbda886f36c891727e73bd4024',1,'vk_mem_alloc.h']]],
+  ['vmamapmemory',['vmaMapMemory',['../vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069',1,'vk_mem_alloc.h']]],
+  ['vmamemoryusage',['VmaMemoryUsage',['../vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#ad63b2113c0bfdbeade1cb498f5a8580d',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h']]],
+  ['vmapool',['VmaPool',['../struct_vma_pool.html',1,'']]],
+  ['vmapoolcreateflagbits',['VmaPoolCreateFlagBits',['../vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h'],['../vk__mem__alloc_8h.html#a8f93195158e0e2ac80ca352064e71c1f',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h']]],
+  ['vmapoolcreateflags',['VmaPoolCreateFlags',['../vk__mem__alloc_8h.html#a2770e325ea42e087c1b91fdf46d0292a',1,'vk_mem_alloc.h']]],
+  ['vmapoolcreateinfo',['VmaPoolCreateInfo',['../struct_vma_pool_create_info.html',1,'VmaPoolCreateInfo'],['../vk__mem__alloc_8h.html#a211706e9348dcee25a843ed4ea69bce7',1,'VmaPoolCreateInfo():&#160;vk_mem_alloc.h']]],
+  ['vmapoolstats',['VmaPoolStats',['../struct_vma_pool_stats.html',1,'VmaPoolStats'],['../vk__mem__alloc_8h.html#a2e5612d871d64c5624087b837a338c34',1,'VmaPoolStats():&#160;vk_mem_alloc.h']]],
+  ['vmasetallocationuserdata',['vmaSetAllocationUserData',['../vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f',1,'vk_mem_alloc.h']]],
+  ['vmasetcurrentframeindex',['vmaSetCurrentFrameIndex',['../vk__mem__alloc_8h.html#ade56bf8dc9f5a5eaddf5f119ed525236',1,'vk_mem_alloc.h']]],
+  ['vmastatinfo',['VmaStatInfo',['../struct_vma_stat_info.html',1,'VmaStatInfo'],['../vk__mem__alloc_8h.html#a810b009a788ee8aac72a25b42ffbe31c',1,'VmaStatInfo():&#160;vk_mem_alloc.h']]],
+  ['vmastats',['VmaStats',['../struct_vma_stats.html',1,'VmaStats'],['../vk__mem__alloc_8h.html#a732be855fb4a7c248e6853d928a729af',1,'VmaStats():&#160;vk_mem_alloc.h']]],
+  ['vmatouchallocation',['vmaTouchAllocation',['../vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a',1,'vk_mem_alloc.h']]],
+  ['vmaunmapmemory',['vmaUnmapMemory',['../vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45',1,'vk_mem_alloc.h']]],
+  ['vmavulkanfunctions',['VmaVulkanFunctions',['../struct_vma_vulkan_functions.html',1,'VmaVulkanFunctions'],['../vk__mem__alloc_8h.html#a97064a1a271b0061ebfc3a079862d0c5',1,'VmaVulkanFunctions():&#160;vk_mem_alloc.h']]]
+];
diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js
index 6fa18bb..152fb2b 100644
--- a/docs/html/search/classes_0.js
+++ b/docs/html/search/classes_0.js
@@ -1,11 +1,14 @@
 var searchData=
 [
+  ['vmaallocation',['VmaAllocation',['../struct_vma_allocation.html',1,'']]],
   ['vmaallocationcreateinfo',['VmaAllocationCreateInfo',['../struct_vma_allocation_create_info.html',1,'']]],
   ['vmaallocationinfo',['VmaAllocationInfo',['../struct_vma_allocation_info.html',1,'']]],
+  ['vmaallocator',['VmaAllocator',['../struct_vma_allocator.html',1,'']]],
   ['vmaallocatorcreateinfo',['VmaAllocatorCreateInfo',['../struct_vma_allocator_create_info.html',1,'']]],
   ['vmadefragmentationinfo',['VmaDefragmentationInfo',['../struct_vma_defragmentation_info.html',1,'']]],
   ['vmadefragmentationstats',['VmaDefragmentationStats',['../struct_vma_defragmentation_stats.html',1,'']]],
   ['vmadevicememorycallbacks',['VmaDeviceMemoryCallbacks',['../struct_vma_device_memory_callbacks.html',1,'']]],
+  ['vmapool',['VmaPool',['../struct_vma_pool.html',1,'']]],
   ['vmapoolcreateinfo',['VmaPoolCreateInfo',['../struct_vma_pool_create_info.html',1,'']]],
   ['vmapoolstats',['VmaPoolStats',['../struct_vma_pool_stats.html',1,'']]],
   ['vmastatinfo',['VmaStatInfo',['../struct_vma_stat_info.html',1,'']]],
diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js
index e918fc3..efddc9f 100644
--- a/docs/html/search/functions_0.js
+++ b/docs/html/search/functions_0.js
@@ -3,6 +3,8 @@
   ['vmaallocatememory',['vmaAllocateMemory',['../vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8',1,'vk_mem_alloc.h']]],
   ['vmaallocatememoryforbuffer',['vmaAllocateMemoryForBuffer',['../vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b',1,'vk_mem_alloc.h']]],
   ['vmaallocatememoryforimage',['vmaAllocateMemoryForImage',['../vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb',1,'vk_mem_alloc.h']]],
+  ['vmabindbuffermemory',['vmaBindBufferMemory',['../vk__mem__alloc_8h.html#a6b0929b914b60cf2d45cac4bf3547470',1,'vk_mem_alloc.h']]],
+  ['vmabindimagememory',['vmaBindImageMemory',['../vk__mem__alloc_8h.html#a3d3ca45799923aa5d138e9e5f9eb2da5',1,'vk_mem_alloc.h']]],
   ['vmabuildstatsstring',['vmaBuildStatsString',['../vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0',1,'vk_mem_alloc.h']]],
   ['vmacalculatestats',['vmaCalculateStats',['../vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3',1,'vk_mem_alloc.h']]],
   ['vmacreateallocator',['vmaCreateAllocator',['../vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb',1,'vk_mem_alloc.h']]],
diff --git a/docs/html/search/pages_0.js b/docs/html/search/pages_0.js
index 6ae1461..703dee4 100644
--- a/docs/html/search/pages_0.js
+++ b/docs/html/search/pages_0.js
@@ -1,5 +1,4 @@
 var searchData=
 [
-  ['about_20the_20library',['About the library',['../about_the_library.html',1,'index']]],
   ['allocation_20names_20and_20user_20data',['Allocation names and user data',['../allocation_annotation.html',1,'index']]]
 ];
diff --git a/docs/html/search/pages_3.js b/docs/html/search/pages_3.js
index 2cd9042..93e8ffe 100644
--- a/docs/html/search/pages_3.js
+++ b/docs/html/search/pages_3.js
@@ -1,4 +1,4 @@
 var searchData=
 [
-  ['lost_20allocations',['Lost allocations',['../lost_allocations.html',1,'index']]]
+  ['general_20considerations',['General considerations',['../general_considerations.html',1,'index']]]
 ];
diff --git a/docs/html/search/pages_4.js b/docs/html/search/pages_4.js
index 125c1d3..2cd9042 100644
--- a/docs/html/search/pages_4.js
+++ b/docs/html/search/pages_4.js
@@ -1,4 +1,4 @@
 var searchData=
 [
-  ['memory_20mapping',['Memory mapping',['../memory_mapping.html',1,'index']]]
+  ['lost_20allocations',['Lost allocations',['../lost_allocations.html',1,'index']]]
 ];
diff --git a/docs/html/search/pages_5.js b/docs/html/search/pages_5.js
index de761c9..125c1d3 100644
--- a/docs/html/search/pages_5.js
+++ b/docs/html/search/pages_5.js
@@ -1,4 +1,4 @@
 var searchData=
 [
-  ['quick_20start',['Quick start',['../quick_start.html',1,'index']]]
+  ['memory_20mapping',['Memory mapping',['../memory_mapping.html',1,'index']]]
 ];
diff --git a/docs/html/search/pages_6.js b/docs/html/search/pages_6.js
index 50aac68..de761c9 100644
--- a/docs/html/search/pages_6.js
+++ b/docs/html/search/pages_6.js
@@ -1,4 +1,4 @@
 var searchData=
 [
-  ['thread_20safety',['Thread safety',['../thread_safety.html',1,'index']]]
+  ['quick_20start',['Quick start',['../quick_start.html',1,'index']]]
 ];
diff --git a/docs/html/search/pages_7.js b/docs/html/search/pages_7.js
index f9c7890..1e4f738 100644
--- a/docs/html/search/pages_7.js
+++ b/docs/html/search/pages_7.js
@@ -1,5 +1,4 @@
 var searchData=
 [
-  ['vulkan_20memory_20allocator',['Vulkan Memory Allocator',['../index.html',1,'']]],
-  ['vk_5fkhr_5fdedicated_5fallocation',['VK_KHR_dedicated_allocation',['../vk_khr_dedicated_allocation.html',1,'index']]]
+  ['recommended_20usage_20patterns',['Recommended usage patterns',['../usage_patterns.html',1,'index']]]
 ];
diff --git a/docs/html/search/pages_8.html b/docs/html/search/pages_8.html
new file mode 100644
index 0000000..b704407
--- /dev/null
+++ b/docs/html/search/pages_8.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="pages_8.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/docs/html/search/pages_8.js b/docs/html/search/pages_8.js
new file mode 100644
index 0000000..566811f
--- /dev/null
+++ b/docs/html/search/pages_8.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+  ['statistics',['Statistics',['../statistics.html',1,'index']]]
+];
diff --git a/docs/html/search/pages_9.html b/docs/html/search/pages_9.html
new file mode 100644
index 0000000..751a30f
--- /dev/null
+++ b/docs/html/search/pages_9.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html><head><title></title>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<link rel="stylesheet" type="text/css" href="search.css"/>
+<script type="text/javascript" src="pages_9.js"></script>
+<script type="text/javascript" src="search.js"></script>
+</head>
+<body class="SRPage">
+<div id="SRIndex">
+<div class="SRStatus" id="Loading">Loading...</div>
+<div id="SRResults"></div>
+<script type="text/javascript"><!--
+createResults();
+--></script>
+<div class="SRStatus" id="Searching">Searching...</div>
+<div class="SRStatus" id="NoMatches">No Matches</div>
+<script type="text/javascript"><!--
+document.getElementById("Loading").style.display="none";
+document.getElementById("NoMatches").style.display="none";
+var searchResults = new SearchResults("searchResults");
+searchResults.Search();
+--></script>
+</div>
+</body>
+</html>
diff --git a/docs/html/search/pages_9.js b/docs/html/search/pages_9.js
new file mode 100644
index 0000000..f9c7890
--- /dev/null
+++ b/docs/html/search/pages_9.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+  ['vulkan_20memory_20allocator',['Vulkan Memory Allocator',['../index.html',1,'']]],
+  ['vk_5fkhr_5fdedicated_5fallocation',['VK_KHR_dedicated_allocation',['../vk_khr_dedicated_allocation.html',1,'index']]]
+];
diff --git a/docs/html/search/searchdata.js b/docs/html/search/searchdata.js
index b48bb9e..4653a57 100644
--- a/docs/html/search/searchdata.js
+++ b/docs/html/search/searchdata.js
@@ -1,6 +1,6 @@
 var indexSectionsWithContent =
 {
-  0: "abcdflmopqrstuv",
+  0: "abcdfglmopqrstuv",
   1: "v",
   2: "v",
   3: "v",
@@ -9,7 +9,7 @@
   6: "v",
   7: "v",
   8: "v",
-  9: "acdlmqtv"
+  9: "acdglmqrsv"
 };
 
 var indexSectionNames =
diff --git a/docs/html/statistics.html b/docs/html/statistics.html
new file mode 100644
index 0000000..ecc9ca2
--- /dev/null
+++ b/docs/html/statistics.html
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Vulkan Memory Allocator: Statistics</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Vulkan Memory Allocator
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+  <ul>
+<li class="navelem"><a class="el" href="index.html">Vulkan Memory Allocator</a></li>  </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">Statistics </div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><p>This library contains functions that return information about its internal state, especially the amount of memory allocated from Vulkan. Please keep in mind that these functions need to traverse all internal data structures to gather these information, so they may be quite time-consuming. Don't call them too often.</p>
+<h1><a class="anchor" id="statistics_numeric_statistics"></a>
+Numeric statistics</h1>
+<p>You can query for overall statistics of the allocator using function <a class="el" href="vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3" title="Retrieves statistics from current state of the Allocator. ">vmaCalculateStats()</a>. Information are returned using structure <a class="el" href="struct_vma_stats.html" title="General statistics from current state of Allocator. ">VmaStats</a>. It contains <a class="el" href="struct_vma_stat_info.html" title="Calculated statistics of memory usage in entire allocator. ">VmaStatInfo</a> - number of allocated blocks, number of allocations (occupied ranges in these blocks), number of unused (free) ranges in these blocks, number of bytes used and unused (but still allocated from Vulkan) and other information. They are summed across memory heaps, memory types and total for whole allocator.</p>
+<p>You can query for statistics of a custom pool using function <a class="el" href="vk__mem__alloc_8h.html#ae8bf76997b234ef68aad922616df4153" title="Retrieves statistics of existing VmaPool object. ">vmaGetPoolStats()</a>. Information are returned using structure <a class="el" href="struct_vma_pool_stats.html" title="Describes parameter of existing VmaPool. ">VmaPoolStats</a>.</p>
+<p>You can query for information about specific allocation using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>. It fill structure <a class="el" href="struct_vma_allocation_info.html" title="Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo(). ">VmaAllocationInfo</a>.</p>
+<h1><a class="anchor" id="statistics_json_dump"></a>
+JSON dump</h1>
+<p>You can dump internal state of the allocator to a string in JSON format using function <a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as string in JSON format. ">vmaBuildStatsString()</a>. The result is guaranteed to be correct JSON. It uses ANSI encoding. Any strings provided by user (see <a class="el" href="allocation_annotation.html#allocation_names">Allocation names</a>) are copied as-is and properly escaped for JSON, so if they use UTF-8, ISO-8859-2 or any other encoding, this JSON string can be treated as using this encoding. It must be freed using function <a class="el" href="vk__mem__alloc_8h.html#a3104eb30d8122c84dd8541063f145288">vmaFreeStatsString()</a>.</p>
+<p>The format of this JSON string is not part of official documentation of the library, but it will not change in backward-incompatible way without increasing library major version number and appropriate mention in changelog.</p>
+<p>The JSON string contains all the data that can be obtained using <a class="el" href="vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3" title="Retrieves statistics from current state of the Allocator. ">vmaCalculateStats()</a>. It can also contain detailed map of allocated memory blocks and their regions - free and occupied by allocations. This allows e.g. to visualize the memory or assess fragmentation. </p>
+</div></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/docs/html/struct_vma_allocation.html b/docs/html/struct_vma_allocation.html
new file mode 100644
index 0000000..7e0dc83
--- /dev/null
+++ b/docs/html/struct_vma_allocation.html
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Vulkan Memory Allocator: VmaAllocation Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Vulkan Memory Allocator
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">VmaAllocation Struct Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+
+<p>Represents single memory allocation.  
+ <a href="struct_vma_allocation.html#details">More...</a></p>
+
+<p><code>#include &lt;<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a>&gt;</code></p>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Represents single memory allocation. </p>
+<p>It may be either dedicated block of <code>VkDeviceMemory</code> or a specific region of a bigger block of this type plus unique offset.</p>
+<p>There are multiple ways to create such object. You need to fill structure <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>. For more information see <a class="el" href="choosing_memory_type.html">Choosing memory type</a>.</p>
+<p>Although the library provides convenience functions that create Vulkan buffer or image, allocate memory for it and bind them together, binding of the allocation to a buffer or an image is out of scope of the allocation itself. Allocation object can exist without buffer/image bound, binding can be done manually by the user, and destruction of it can be done independently of destruction of the allocation.</p>
+<p>The object also remembers its size and some other information. To retrieve this information, use function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> and inspect returned structure <a class="el" href="struct_vma_allocation_info.html" title="Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo(). ">VmaAllocationInfo</a>.</p>
+<p>Some kinds allocations can be in lost state. For more information, see <a class="el" href="lost_allocations.html">Lost allocations</a>. </p>
+</div><hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/docs/html/struct_vma_allocation_create_info.html b/docs/html/struct_vma_allocation_create_info.html
index 30623d1..1bd8a32 100644
--- a/docs/html/struct_vma_allocation_create_info.html
+++ b/docs/html/struct_vma_allocation_create_info.html
@@ -85,11 +85,11 @@
 <tr class="memitem:a3bf940c0271d85d6ba32a4d820075055"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055">memoryTypeBits</a></td></tr>
 <tr class="memdesc:a3bf940c0271d85d6ba32a4d820075055"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bitmask containing one bit set for every memory type acceptable for this allocation.  <a href="#a3bf940c0271d85d6ba32a4d820075055">More...</a><br /></td></tr>
 <tr class="separator:a3bf940c0271d85d6ba32a4d820075055"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a6272c0555cfd1fe28bff1afeb6190150"><td class="memItemLeft" align="right" valign="top">VmaPool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">pool</a></td></tr>
+<tr class="memitem:a6272c0555cfd1fe28bff1afeb6190150"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_vma_pool.html">VmaPool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">pool</a></td></tr>
 <tr class="memdesc:a6272c0555cfd1fe28bff1afeb6190150"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pool that this allocation should be created in.  <a href="#a6272c0555cfd1fe28bff1afeb6190150">More...</a><br /></td></tr>
 <tr class="separator:a6272c0555cfd1fe28bff1afeb6190150"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a8259e85c272683434f4abb4ddddffe19"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">pUserData</a></td></tr>
-<tr class="memdesc:a8259e85c272683434f4abb4ddddffe19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom general-purpose pointer that will be stored in VmaAllocation, can be read as <a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13" title="Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...">VmaAllocationInfo::pUserData</a> and changed using <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value. ">vmaSetAllocationUserData()</a>.  <a href="#a8259e85c272683434f4abb4ddddffe19">More...</a><br /></td></tr>
+<tr class="memdesc:a8259e85c272683434f4abb4ddddffe19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom general-purpose pointer that will be stored in <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a>, can be read as <a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13" title="Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...">VmaAllocationInfo::pUserData</a> and changed using <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value. ">vmaSetAllocationUserData()</a>.  <a href="#a8259e85c272683434f4abb4ddddffe19">More...</a><br /></td></tr>
 <tr class="separator:a8259e85c272683434f4abb4ddddffe19"><td class="memSeparator" colspan="2">&#160;</td></tr>
 </table>
 <h2 class="groupheader">Member Data Documentation</h2>
@@ -134,7 +134,7 @@
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">VmaPool VmaAllocationCreateInfo::pool</td>
+          <td class="memname"><a class="el" href="struct_vma_pool.html">VmaPool</a> VmaAllocationCreateInfo::pool</td>
         </tr>
       </table>
 </div><div class="memdoc">
@@ -174,8 +174,8 @@
       </table>
 </div><div class="memdoc">
 
-<p>Custom general-purpose pointer that will be stored in VmaAllocation, can be read as <a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13" title="Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...">VmaAllocationInfo::pUserData</a> and changed using <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value. ">vmaSetAllocationUserData()</a>. </p>
-<p>If <code>VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</code> is used, it must be either null or pointer to a null-terminated string. The string will be then copied to internal buffer, so it doesn't need to be valid after allocation call. </p>
+<p>Custom general-purpose pointer that will be stored in <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a>, can be read as <a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13" title="Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...">VmaAllocationInfo::pUserData</a> and changed using <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value. ">vmaSetAllocationUserData()</a>. </p>
+<p>If <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a> is used, it must be either null or pointer to a null-terminated string. The string will be then copied to internal buffer, so it doesn't need to be valid after allocation call. </p>
 
 </div>
 </div>
@@ -210,7 +210,7 @@
 </div><div class="memdoc">
 
 <p>Intended usage of memory. </p>
-<p>You can leave <code>VMA_MEMORY_USAGE_UNKNOWN</code> if you specify memory requirements in other way. <br />
+<p>You can leave <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd">VMA_MEMORY_USAGE_UNKNOWN</a> if you specify memory requirements in other way. <br />
 If <code>pool</code> is not null, this member is ignored. </p>
 
 </div>
diff --git a/docs/html/struct_vma_allocation_info.html b/docs/html/struct_vma_allocation_info.html
index 52cb2f8..eaf2de5 100644
--- a/docs/html/struct_vma_allocation_info.html
+++ b/docs/html/struct_vma_allocation_info.html
@@ -66,7 +66,7 @@
 </div><!--header-->
 <div class="contents">
 
-<p>Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.  
+<p>Parameters of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>.  
  <a href="struct_vma_allocation_info.html#details">More...</a></p>
 
 <p><code>#include &lt;<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a>&gt;</code></p>
@@ -93,7 +93,7 @@
 <tr class="separator:adc507656149c04de7ed95d0042ba2a13"><td class="memSeparator" colspan="2">&#160;</td></tr>
 </table>
 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p>Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>. </p>
+<div class="textblock"><p>Parameters of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>. </p>
 </div><h2 class="groupheader">Member Data Documentation</h2>
 <a id="ae0bfb7dfdf79a76ffefc9a94677a2f67"></a>
 <h2 class="memtitle"><span class="permalink"><a href="#ae0bfb7dfdf79a76ffefc9a94677a2f67">&#9670;&nbsp;</a></span>deviceMemory</h2>
@@ -161,7 +161,7 @@
 </div><div class="memdoc">
 
 <p>Pointer to the beginning of this allocation as mapped data. </p>
-<p>If the allocation hasn't been mapped using <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a> and hasn't been created with <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code> flag, this value null.</p>
+<p>If the allocation hasn't been mapped using <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a> and hasn't been created with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> flag, this value null.</p>
 <p>It can change after call to <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a>, <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a>. It can also change after call to <a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a> if this allocation is passed to the function. </p>
 
 </div>
diff --git a/docs/html/struct_vma_allocator.html b/docs/html/struct_vma_allocator.html
new file mode 100644
index 0000000..0f6dd81
--- /dev/null
+++ b/docs/html/struct_vma_allocator.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Vulkan Memory Allocator: VmaAllocator Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Vulkan Memory Allocator
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">VmaAllocator Struct Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+
+<p>Represents main object of this library initialized.  
+ <a href="struct_vma_allocator.html#details">More...</a></p>
+
+<p><code>#include &lt;<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a>&gt;</code></p>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Represents main object of this library initialized. </p>
+<p>Fill structure <a class="el" href="struct_vma_allocator_create_info.html" title="Description of a Allocator to be created. ">VmaAllocatorCreateInfo</a> and call function <a class="el" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb" title="Creates Allocator object. ">vmaCreateAllocator()</a> to create it. Call function <a class="el" href="vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d" title="Destroys allocator object. ">vmaDestroyAllocator()</a> to destroy it.</p>
+<p>It is recommended to create just one object of this type per <code>VkDevice</code> object, right after Vulkan is initialized and keep it alive until before Vulkan device is destroyed. </p>
+</div><hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/docs/html/struct_vma_allocator_create_info.html b/docs/html/struct_vma_allocator_create_info.html
index 3391251..35e8d05 100644
--- a/docs/html/struct_vma_allocator_create_info.html
+++ b/docs/html/struct_vma_allocator_create_info.html
@@ -83,19 +83,19 @@
 <tr class="memdesc:ad924ddd77b04039c88d0c09b0ffcd500"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vulkan device.  <a href="#ad924ddd77b04039c88d0c09b0ffcd500">More...</a><br /></td></tr>
 <tr class="separator:ad924ddd77b04039c88d0c09b0ffcd500"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a8e4714298e3121cdd8b214a1ae7a637a"><td class="memItemLeft" align="right" valign="top">VkDeviceSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#a8e4714298e3121cdd8b214a1ae7a637a">preferredLargeHeapBlockSize</a></td></tr>
-<tr class="memdesc:a8e4714298e3121cdd8b214a1ae7a637a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps &gt; 1 GiB.  <a href="#a8e4714298e3121cdd8b214a1ae7a637a">More...</a><br /></td></tr>
+<tr class="memdesc:a8e4714298e3121cdd8b214a1ae7a637a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps &gt; 1 GiB. Optional.  <a href="#a8e4714298e3121cdd8b214a1ae7a637a">More...</a><br /></td></tr>
 <tr class="separator:a8e4714298e3121cdd8b214a1ae7a637a"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a6e409087e3be55400d0e4ccbe43c608d"><td class="memItemLeft" align="right" valign="top">const VkAllocationCallbacks *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d">pAllocationCallbacks</a></td></tr>
-<tr class="memdesc:a6e409087e3be55400d0e4ccbe43c608d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom CPU memory allocation callbacks.  <a href="#a6e409087e3be55400d0e4ccbe43c608d">More...</a><br /></td></tr>
+<tr class="memdesc:a6e409087e3be55400d0e4ccbe43c608d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom CPU memory allocation callbacks. Optional.  <a href="#a6e409087e3be55400d0e4ccbe43c608d">More...</a><br /></td></tr>
 <tr class="separator:a6e409087e3be55400d0e4ccbe43c608d"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:af1380969b5e1ea4c3184a877892d260e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e">pDeviceMemoryCallbacks</a></td></tr>
-<tr class="memdesc:af1380969b5e1ea4c3184a877892d260e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informative callbacks for vkAllocateMemory, vkFreeMemory.  <a href="#af1380969b5e1ea4c3184a877892d260e">More...</a><br /></td></tr>
+<tr class="memdesc:af1380969b5e1ea4c3184a877892d260e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informative callbacks for <code>vkAllocateMemory</code>, <code>vkFreeMemory</code>. Optional.  <a href="#af1380969b5e1ea4c3184a877892d260e">More...</a><br /></td></tr>
 <tr class="separator:af1380969b5e1ea4c3184a877892d260e"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a21ea188dd212b8171cb9ecbed4a2a3a7"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#a21ea188dd212b8171cb9ecbed4a2a3a7">frameInUseCount</a></td></tr>
 <tr class="memdesc:a21ea188dd212b8171cb9ecbed4a2a3a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of additional frames that are in use at the same time as current frame.  <a href="#a21ea188dd212b8171cb9ecbed4a2a3a7">More...</a><br /></td></tr>
 <tr class="separator:a21ea188dd212b8171cb9ecbed4a2a3a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a31c192aa6cbffa33279f6d9f0c47c44b"><td class="memItemLeft" align="right" valign="top">const VkDeviceSize *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#a31c192aa6cbffa33279f6d9f0c47c44b">pHeapSizeLimit</a></td></tr>
-<tr class="memdesc:a31c192aa6cbffa33279f6d9f0c47c44b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Either NULL or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap.  <a href="#a31c192aa6cbffa33279f6d9f0c47c44b">More...</a><br /></td></tr>
+<tr class="memdesc:a31c192aa6cbffa33279f6d9f0c47c44b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Either null or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap.  <a href="#a31c192aa6cbffa33279f6d9f0c47c44b">More...</a><br /></td></tr>
 <tr class="separator:a31c192aa6cbffa33279f6d9f0c47c44b"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a3dc197be3227da7338b1643f70db36bd"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd">pVulkanFunctions</a></td></tr>
 <tr class="memdesc:a3dc197be3227da7338b1643f70db36bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointers to Vulkan functions. Can be null if you leave define <code>VMA_STATIC_VULKAN_FUNCTIONS 1</code>.  <a href="#a3dc197be3227da7338b1643f70db36bd">More...</a><br /></td></tr>
@@ -168,7 +168,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Custom CPU memory allocation callbacks. </p>
+<p>Custom CPU memory allocation callbacks. Optional. </p>
 <p>Optional, can be null. When specified, will also be used for all CPU-side memory allocations. </p>
 
 </div>
@@ -185,7 +185,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Informative callbacks for vkAllocateMemory, vkFreeMemory. </p>
+<p>Informative callbacks for <code>vkAllocateMemory</code>, <code>vkFreeMemory</code>. Optional. </p>
 <p>Optional, can be null. </p>
 
 </div>
@@ -202,7 +202,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Either NULL or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap. </p>
+<p>Either null or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap. </p>
 <p>If not NULL, it must be a pointer to an array of <code>VkPhysicalDeviceMemoryProperties::memoryHeapCount</code> elements, defining limit on maximum number of bytes that can be allocated out of particular Vulkan memory heap.</p>
 <p>Any of the elements may be equal to <code>VK_WHOLE_SIZE</code>, which means no limit on that heap. This is also the default in case of <code>pHeapSizeLimit</code> = NULL.</p>
 <p>If there is a limit defined for a heap:</p>
@@ -243,7 +243,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps &gt; 1 GiB. </p>
+<p>Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps &gt; 1 GiB. Optional. </p>
 <p>Set to 0 to use default, which is currently 256 MiB. </p>
 
 </div>
diff --git a/docs/html/struct_vma_device_memory_callbacks.html b/docs/html/struct_vma_device_memory_callbacks.html
index 4838de2..701c578 100644
--- a/docs/html/struct_vma_device_memory_callbacks.html
+++ b/docs/html/struct_vma_device_memory_callbacks.html
@@ -83,7 +83,7 @@
 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
 <div class="textblock"><p>Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code>. </p>
 <p>Provided for informative purpose, e.g. to gather statistics about number of allocations or total amount of memory allocated in Vulkan.</p>
-<p>Used in <a class="el" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e" title="Informative callbacks for vkAllocateMemory, vkFreeMemory. ">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>. </p>
+<p>Used in <a class="el" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e" title="Informative callbacks for vkAllocateMemory, vkFreeMemory. Optional. ">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>. </p>
 </div><h2 class="groupheader">Member Data Documentation</h2>
 <a id="a4f17f7b255101e733b44d5633aceabfb"></a>
 <h2 class="memtitle"><span class="permalink"><a href="#a4f17f7b255101e733b44d5633aceabfb">&#9670;&nbsp;</a></span>pfnAllocate</h2>
diff --git a/docs/html/struct_vma_pool.html b/docs/html/struct_vma_pool.html
new file mode 100644
index 0000000..92b3d44
--- /dev/null
+++ b/docs/html/struct_vma_pool.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Vulkan Memory Allocator: VmaPool Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Vulkan Memory Allocator
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">VmaPool Struct Reference</div>  </div>
+</div><!--header-->
+<div class="contents">
+
+<p>Represents custom memory pool.  
+ <a href="struct_vma_pool.html#details">More...</a></p>
+
+<p><code>#include &lt;<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a>&gt;</code></p>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Represents custom memory pool. </p>
+<p>Fill structure <a class="el" href="struct_vma_pool_create_info.html" title="Describes parameter of created VmaPool. ">VmaPoolCreateInfo</a> and call function <a class="el" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50" title="Allocates Vulkan device memory and creates VmaPool object. ">vmaCreatePool()</a> to create it. Call function <a class="el" href="vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1" title="Destroys VmaPool object and frees Vulkan device memory. ">vmaDestroyPool()</a> to destroy it.</p>
+<p>For more information see <a class="el" href="choosing_memory_type.html#choosing_memory_type_custom_memory_pools">Custom memory pools</a>. </p>
+</div><hr/>The documentation for this struct was generated from the following file:<ul>
+<li><a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/docs/html/struct_vma_pool_create_info.html b/docs/html/struct_vma_pool_create_info.html
index 06fd23f..153ff87 100644
--- a/docs/html/struct_vma_pool_create_info.html
+++ b/docs/html/struct_vma_pool_create_info.html
@@ -66,7 +66,7 @@
 </div><!--header-->
 <div class="contents">
 
-<p>Describes parameter of created <code>VmaPool</code>.  
+<p>Describes parameter of created <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>.  
  <a href="struct_vma_pool_create_info.html#details">More...</a></p>
 
 <p><code>#include &lt;<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a>&gt;</code></p>
@@ -86,14 +86,14 @@
 <tr class="memdesc:ad8006fb803185c0a699d30f3e9a865ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum number of blocks to be always allocated in this pool, even if they stay empty.  <a href="#ad8006fb803185c0a699d30f3e9a865ae">More...</a><br /></td></tr>
 <tr class="separator:ad8006fb803185c0a699d30f3e9a865ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:ae41142f2834fcdc82baa4883c187b75c"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">maxBlockCount</a></td></tr>
-<tr class="memdesc:ae41142f2834fcdc82baa4883c187b75c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of blocks that can be allocated in this pool.  <a href="#ae41142f2834fcdc82baa4883c187b75c">More...</a><br /></td></tr>
+<tr class="memdesc:ae41142f2834fcdc82baa4883c187b75c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of blocks that can be allocated in this pool. Optional.  <a href="#ae41142f2834fcdc82baa4883c187b75c">More...</a><br /></td></tr>
 <tr class="separator:ae41142f2834fcdc82baa4883c187b75c"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a9437e43ffbb644dbbf7fc4e50cfad6aa"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa">frameInUseCount</a></td></tr>
 <tr class="memdesc:a9437e43ffbb644dbbf7fc4e50cfad6aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of additional frames that are in use at the same time as current frame.  <a href="#a9437e43ffbb644dbbf7fc4e50cfad6aa">More...</a><br /></td></tr>
 <tr class="separator:a9437e43ffbb644dbbf7fc4e50cfad6aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
 </table>
 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p>Describes parameter of created <code>VmaPool</code>. </p>
+<div class="textblock"><p>Describes parameter of created <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>. </p>
 </div><h2 class="groupheader">Member Data Documentation</h2>
 <a id="aa4265160536cdb9be821b7686c16c676"></a>
 <h2 class="memtitle"><span class="permalink"><a href="#aa4265160536cdb9be821b7686c16c676">&#9670;&nbsp;</a></span>blockSize</h2>
@@ -141,7 +141,7 @@
 </div><div class="memdoc">
 
 <p>Maximum number of additional frames that are in use at the same time as current frame. </p>
-<p>This value is used only when you make allocations with <code>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</code> flag. Such allocation cannot become lost if allocation.lastUseFrameIndex &gt;= allocator.currentFrameIndex - frameInUseCount.</p>
+<p>This value is used only when you make allocations with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> flag. Such allocation cannot become lost if allocation.lastUseFrameIndex &gt;= allocator.currentFrameIndex - frameInUseCount.</p>
 <p>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.</p>
 <p>If you want to allow any allocations other than used in the current frame to become lost, set this value to 0. </p>
 
@@ -159,7 +159,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Maximum number of blocks that can be allocated in this pool. </p>
+<p>Maximum number of blocks that can be allocated in this pool. Optional. </p>
 <p>Optional. Set to 0 to use <code>SIZE_MAX</code>, which means no limit.</p>
 <p>Set to same value as minBlockCount to have fixed amount of memory allocated throuout whole lifetime of this pool. </p>
 
diff --git a/docs/html/struct_vma_pool_stats.html b/docs/html/struct_vma_pool_stats.html
index 92e1999..3ee189b 100644
--- a/docs/html/struct_vma_pool_stats.html
+++ b/docs/html/struct_vma_pool_stats.html
@@ -66,7 +66,7 @@
 </div><!--header-->
 <div class="contents">
 
-<p>Describes parameter of existing <code>VmaPool</code>.  
+<p>Describes parameter of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>.  
  <a href="struct_vma_pool_stats.html#details">More...</a></p>
 
 <p><code>#include &lt;<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.h</a>&gt;</code></p>
@@ -77,20 +77,20 @@
 <tr class="memdesc:a326807b2de2b0931cee4ed9a5f2e420c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total amount of <code>VkDeviceMemory</code> allocated from Vulkan for this pool, in bytes.  <a href="#a326807b2de2b0931cee4ed9a5f2e420c">More...</a><br /></td></tr>
 <tr class="separator:a326807b2de2b0931cee4ed9a5f2e420c"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:ad7c54874724fce7b06aba526202d82a8"><td class="memItemLeft" align="right" valign="top">VkDeviceSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_stats.html#ad7c54874724fce7b06aba526202d82a8">unusedSize</a></td></tr>
-<tr class="memdesc:ad7c54874724fce7b06aba526202d82a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total number of bytes in the pool not used by any <code>VmaAllocation</code>.  <a href="#ad7c54874724fce7b06aba526202d82a8">More...</a><br /></td></tr>
+<tr class="memdesc:ad7c54874724fce7b06aba526202d82a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total number of bytes in the pool not used by any <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a>.  <a href="#ad7c54874724fce7b06aba526202d82a8">More...</a><br /></td></tr>
 <tr class="separator:ad7c54874724fce7b06aba526202d82a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:ad1924eb54fffa45e9e0e65670c8fe5eb"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_stats.html#ad1924eb54fffa45e9e0e65670c8fe5eb">allocationCount</a></td></tr>
-<tr class="memdesc:ad1924eb54fffa45e9e0e65670c8fe5eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of VmaAllocation objects created from this pool that were not destroyed or lost.  <a href="#ad1924eb54fffa45e9e0e65670c8fe5eb">More...</a><br /></td></tr>
+<tr class="memdesc:ad1924eb54fffa45e9e0e65670c8fe5eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects created from this pool that were not destroyed or lost.  <a href="#ad1924eb54fffa45e9e0e65670c8fe5eb">More...</a><br /></td></tr>
 <tr class="separator:ad1924eb54fffa45e9e0e65670c8fe5eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:ae4f3546ffa4d1e598b64d8e6134854f4"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_stats.html#ae4f3546ffa4d1e598b64d8e6134854f4">unusedRangeCount</a></td></tr>
-<tr class="memdesc:ae4f3546ffa4d1e598b64d8e6134854f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of continuous memory ranges in the pool not used by any <code>VmaAllocation</code>.  <a href="#ae4f3546ffa4d1e598b64d8e6134854f4">More...</a><br /></td></tr>
+<tr class="memdesc:ae4f3546ffa4d1e598b64d8e6134854f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of continuous memory ranges in the pool not used by any <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a>.  <a href="#ae4f3546ffa4d1e598b64d8e6134854f4">More...</a><br /></td></tr>
 <tr class="separator:ae4f3546ffa4d1e598b64d8e6134854f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:ab4c8f52dd42ab01998f60f0b6acc722b"><td class="memItemLeft" align="right" valign="top">VkDeviceSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_stats.html#ab4c8f52dd42ab01998f60f0b6acc722b">unusedRangeSizeMax</a></td></tr>
 <tr class="memdesc:ab4c8f52dd42ab01998f60f0b6acc722b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the largest continuous free memory region.  <a href="#ab4c8f52dd42ab01998f60f0b6acc722b">More...</a><br /></td></tr>
 <tr class="separator:ab4c8f52dd42ab01998f60f0b6acc722b"><td class="memSeparator" colspan="2">&#160;</td></tr>
 </table>
 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
-<div class="textblock"><p>Describes parameter of existing <code>VmaPool</code>. </p>
+<div class="textblock"><p>Describes parameter of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>. </p>
 </div><h2 class="groupheader">Member Data Documentation</h2>
 <a id="ad1924eb54fffa45e9e0e65670c8fe5eb"></a>
 <h2 class="memtitle"><span class="permalink"><a href="#ad1924eb54fffa45e9e0e65670c8fe5eb">&#9670;&nbsp;</a></span>allocationCount</h2>
@@ -104,7 +104,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Number of VmaAllocation objects created from this pool that were not destroyed or lost. </p>
+<p>Number of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects created from this pool that were not destroyed or lost. </p>
 
 </div>
 </div>
@@ -136,7 +136,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Number of continuous memory ranges in the pool not used by any <code>VmaAllocation</code>. </p>
+<p>Number of continuous memory ranges in the pool not used by any <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a>. </p>
 
 </div>
 </div>
@@ -169,7 +169,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Total number of bytes in the pool not used by any <code>VmaAllocation</code>. </p>
+<p>Total number of bytes in the pool not used by any <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a>. </p>
 
 </div>
 </div>
diff --git a/docs/html/struct_vma_stat_info.html b/docs/html/struct_vma_stat_info.html
index 1a430fa..8dfebaa 100644
--- a/docs/html/struct_vma_stat_info.html
+++ b/docs/html/struct_vma_stat_info.html
@@ -77,7 +77,7 @@
 <tr class="memdesc:abc4bb7cd611900778464c56e50c970a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of <code>VkDeviceMemory</code> Vulkan memory blocks allocated.  <a href="#abc4bb7cd611900778464c56e50c970a4">More...</a><br /></td></tr>
 <tr class="separator:abc4bb7cd611900778464c56e50c970a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a537741e4d5cdddc1c0ab95ec650afaff"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_stat_info.html#a537741e4d5cdddc1c0ab95ec650afaff">allocationCount</a></td></tr>
-<tr class="memdesc:a537741e4d5cdddc1c0ab95ec650afaff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of <code>VmaAllocation</code> allocation objects allocated.  <a href="#a537741e4d5cdddc1c0ab95ec650afaff">More...</a><br /></td></tr>
+<tr class="memdesc:a537741e4d5cdddc1c0ab95ec650afaff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> allocation objects allocated.  <a href="#a537741e4d5cdddc1c0ab95ec650afaff">More...</a><br /></td></tr>
 <tr class="separator:a537741e4d5cdddc1c0ab95ec650afaff"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:ae06129c771bfebfd6468a7f4276502a9"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_stat_info.html#ae06129c771bfebfd6468a7f4276502a9">unusedRangeCount</a></td></tr>
 <tr class="memdesc:ae06129c771bfebfd6468a7f4276502a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of free ranges of memory between allocations.  <a href="#ae06129c771bfebfd6468a7f4276502a9">More...</a><br /></td></tr>
@@ -116,7 +116,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Number of <code>VmaAllocation</code> allocation objects allocated. </p>
+<p>Number of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> allocation objects allocated. </p>
 
 </div>
 </div>
diff --git a/docs/html/thread_safety.html b/docs/html/thread_safety.html
index 8585ce0..339e09d 100644
--- a/docs/html/thread_safety.html
+++ b/docs/html/thread_safety.html
@@ -67,10 +67,10 @@
 </div><!--header-->
 <div class="contents">
 <div class="textblock"><ul>
-<li>The library has no global state, so separate <code>VmaAllocator</code> objects can be used independently.</li>
+<li>The library has no global state, so separate <code>VmaAllocator</code> objects can be used independently. There should be no need to create multiple such objects though - one per <code>VkDevice</code> is enough.</li>
 <li>By default, all calls to functions that take <code>VmaAllocator</code> as first parameter are safe to call from multiple threads simultaneously because they are synchronized internally when needed.</li>
-<li>When the allocator is created with <code>VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT</code> flag, calls to functions that take such <code>VmaAllocator</code> object must be synchronized externally.</li>
-<li>Access to a <code>VmaAllocation</code> object must be externally synchronized. For example, you must not call <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> and <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a> from different threads at the same time if you pass the same <code>VmaAllocation</code> object to these functions. </li>
+<li>When the allocator is created with <a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d" title="Allocator and all objects created from it will not be synchronized internally, so you must guarantee ...">VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT</a> flag, calls to functions that take such <code>VmaAllocator</code> object must be synchronized externally.</li>
+<li>Access to a <code>VmaAllocation</code> object must be externally synchronized. For example, you must not call <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> and <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a> from different threads at the same time if you pass the same <code>VmaAllocation</code> object to these functions. </li>
 </ul>
 </div></div><!-- contents -->
 <!-- start footer part -->
diff --git a/docs/html/usage_patterns.html b/docs/html/usage_patterns.html
new file mode 100644
index 0000000..9b9f459
--- /dev/null
+++ b/docs/html/usage_patterns.html
@@ -0,0 +1,126 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>Vulkan Memory Allocator: Recommended usage patterns</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+  <td id="projectalign" style="padding-left: 0.5em;">
+   <div id="projectname">Vulkan Memory Allocator
+   </div>
+  </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+  initMenu('',true,false,'search.php','Search');
+  $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+     onmouseover="return searchBox.OnSearchSelectShow()"
+     onmouseout="return searchBox.OnSearchSelectHide()"
+     onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0" 
+        name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div id="nav-path" class="navpath">
+  <ul>
+<li class="navelem"><a class="el" href="index.html">Vulkan Memory Allocator</a></li>  </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+  <div class="headertitle">
+<div class="title">Recommended usage patterns </div>  </div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><h1><a class="anchor" id="usage_patterns_simple"></a>
+Simple patterns</h1>
+<h2><a class="anchor" id="usage_patterns_simple_render_targets"></a>
+Render targets</h2>
+<p><b>When:</b> Any resources that you frequently write and read on GPU, e.g. images used as color attachments (aka "render targets"), depth-stencil attachments, images/buffers used as storage image/buffer (aka "Unordered Access View (UAV)").</p>
+<p><b>What to do:</b> Create them in video memory that is fastest to access from GPU using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>.</p>
+<p>Consider using <a class="el" href="vk_khr_dedicated_allocation.html">VK_KHR_dedicated_allocation</a> extension and/or manually creating them as dedicated allocations using <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block. ">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a>, especially if they are large or if you plan to destroy and recreate them e.g. when display resolution changes. Prefer to create such resources first and all other GPU resources (like textures and vertex buffers) later.</p>
+<h2><a class="anchor" id="usage_patterns_simple_immutable_resources"></a>
+Immutable resources</h2>
+<p><b>When:</b> Any resources that you fill on CPU only once (aka "immutable") or infrequently and then read frequently on GPU, e.g. textures, vertex and index buffers, constant buffers that don't change often.</p>
+<p><b>What to do:</b> Create them in video memory that is fastest to access from GPU using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>.</p>
+<p>To initialize content of such resource, create a CPU-side (aka "staging") copy of it in system memory - <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a>, map it, fill it, and submit a transfer from it to the GPU resource. You can keep the staging copy if you need it for another upload transfer in the future. If you don't, you can destroy it or reuse this buffer for uploading different resource after the transfer finishes.</p>
+<p>Prefer to create just buffers in system memory rather than images, even for uploading textures. Use <code>vkCmdCopyBufferToImage()</code>. Dont use images with <code>VK_IMAGE_TILING_LINEAR</code>.</p>
+<h2><a class="anchor" id="usage_patterns_dynamic_resources"></a>
+Dynamic resources</h2>
+<p><b>When:</b> Any resources that change frequently (aka "dynamic"), e.g. every frame or every draw call, written on CPU, read on GPU.</p>
+<p><b>What to do:</b> Create them using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">VMA_MEMORY_USAGE_CPU_TO_GPU</a>. You can map it and write to it directly on CPU, as well as read from it on GPU.</p>
+<p>This is a more complex situation. Different solutions are possible, and the best one depends on specific GPU type, but you can use this simple approach for the start. Prefer to write to such resource sequentially (e.g. using <code>memcpy</code>). Don't perform random access or any reads from it, as it may be very slow.</p>
+<h2><a class="anchor" id="usage_patterns_readback"></a>
+Readback</h2>
+<p><b>When:</b> Resources that contain data written by GPU that you want to read back on CPU, e.g. results of some computations.</p>
+<p><b>What to do:</b> Create them using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a>. You can write to them directly on GPU, as well as map and read them on CPU.</p>
+<h1><a class="anchor" id="usage_patterns_advanced"></a>
+Advanced patterns</h1>
+<h2><a class="anchor" id="usage_patterns_integrated_graphics"></a>
+Detecting integrated graphics</h2>
+<p>You can support integrated graphics (like Intel HD Graphics, AMD APU) better by detecting it in Vulkan. To do it, call <code>vkGetPhysicalDeviceProperties()</code>, inspect <code>VkPhysicalDeviceProperties::deviceType</code> and look for <code>VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU</code>. When you find it, you can assume that memory is unified and all memory types are equally fast to access from GPU, regardless of <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>.</p>
+<p>You can then sum up sizes of all available memory heaps and treat them as useful for your GPU resources, instead of only <code>DEVICE_LOCAL</code> ones. You can also prefer to create your resources in memory types that are <code>HOST_VISIBLE</code> to map them directly instead of submitting explicit transfer (see below).</p>
+<h2><a class="anchor" id="usage_patterns_direct_vs_transfer"></a>
+Direct access versus transfer</h2>
+<p>For resources that you frequently write on CPU and read on GPU, many solutions are possible:</p>
+<ol type="1">
+<li>Create one copy in video memory using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>, second copy in system memory using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a> and submit explicit tranfer each time.</li>
+<li>Create just single copy using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">VMA_MEMORY_USAGE_CPU_TO_GPU</a>, map it and fill it on CPU, read it directly on GPU.</li>
+<li>Create just single copy using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a>, map it and fill it on CPU, read it directly on GPU.</li>
+</ol>
+<p>Which solution is the most efficient depends on your resource and especially on the GPU. It is best to measure it and then make the decision. Some general recommendations:</p>
+<ul>
+<li>On integrated graphics use (2) or (3) to avoid unnecesary time and memory overhead related to using a second copy.</li>
+<li>For small resources (e.g. constant buffers) use (2). Discrete AMD cards have special 256 MiB pool of video memory that is directly mappable. Even if the resource ends up in system memory, its data may be cached on GPU after first fetch over PCIe bus.</li>
+<li>For larger resources (e.g. textures), decide between (1) and (2). You may want to differentiate NVIDIA and AMD, e.g. by looking for memory type that is both <code>DEVICE_LOCAL</code> and <code>HOST_VISIBLE</code>. When you find it, use (2), otherwise use (1).</li>
+</ul>
+<p>Similarly, for resources that you frequently write on GPU and read on CPU, multiple solutions are possible:</p>
+<ol type="1">
+<li>Create one copy in video memory using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>, second copy in system memory using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a> and submit explicit tranfer each time.</li>
+<li>Create just single copy using <a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a>, write to it directly on GPU, map it and read it on CPU.</li>
+</ol>
+<p>You should take some measurements to decide which option is faster in case of your specific resource.</p>
+<p>If you don't want to specialize your code for specific types of GPUs, yon can still make an simple optimization for cases when your resource ends up in mappable memory to use it directly in this case instead of creating CPU-side staging copy. For details see <a class="el" href="memory_mapping.html#memory_mapping_finding_if_memory_mappable">Finding out if memory is mappable</a>. </p>
+</div></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by &#160;<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.13
+</small></address>
+</body>
+</html>
diff --git a/docs/html/vk__mem__alloc_8h.html b/docs/html/vk__mem__alloc_8h.html
index a7b3265..6fa4720 100644
--- a/docs/html/vk__mem__alloc_8h.html
+++ b/docs/html/vk__mem__alloc_8h.html
@@ -92,13 +92,13 @@
 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></td></tr>
 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a></td></tr>
-<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of created <code>VmaPool</code>.  <a href="struct_vma_pool_create_info.html#details">More...</a><br /></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of created <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>.  <a href="struct_vma_pool_create_info.html#details">More...</a><br /></td></tr>
 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a></td></tr>
-<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of existing <code>VmaPool</code>.  <a href="struct_vma_pool_stats.html#details">More...</a><br /></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>.  <a href="struct_vma_pool_stats.html#details">More...</a><br /></td></tr>
 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a></td></tr>
-<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.  <a href="struct_vma_allocation_info.html#details">More...</a><br /></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>.  <a href="struct_vma_allocation_info.html#details">More...</a><br /></td></tr>
 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a></td></tr>
 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional configuration parameters to be passed to function <a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>.  <a href="struct_vma_defragmentation_info.html#details">More...</a><br /></td></tr>
@@ -114,17 +114,17 @@
 </table><table class="memberdecls">
 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
 Typedefs</h2></td></tr>
-<tr class="memitem:ab6a6477cda1ce775b30bde96d766203b"><td class="memItemLeft" align="right" valign="top">typedef void(VKAPI_PTR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ab6a6477cda1ce775b30bde96d766203b">PFN_vmaAllocateDeviceMemoryFunction</a>) (VmaAllocator allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td></tr>
+<tr class="memitem:ab6a6477cda1ce775b30bde96d766203b"><td class="memItemLeft" align="right" valign="top">typedef void(VKAPI_PTR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ab6a6477cda1ce775b30bde96d766203b">PFN_vmaAllocateDeviceMemoryFunction</a>) (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td></tr>
 <tr class="memdesc:ab6a6477cda1ce775b30bde96d766203b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function called after successful vkAllocateMemory.  <a href="#ab6a6477cda1ce775b30bde96d766203b">More...</a><br /></td></tr>
 <tr class="separator:ab6a6477cda1ce775b30bde96d766203b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aef2545dc2e9dd4f29ab9ba6ac6fe2f49"><td class="memItemLeft" align="right" valign="top">typedef void(VKAPI_PTR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aef2545dc2e9dd4f29ab9ba6ac6fe2f49">PFN_vmaFreeDeviceMemoryFunction</a>) (VmaAllocator allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td></tr>
+<tr class="memitem:aef2545dc2e9dd4f29ab9ba6ac6fe2f49"><td class="memItemLeft" align="right" valign="top">typedef void(VKAPI_PTR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aef2545dc2e9dd4f29ab9ba6ac6fe2f49">PFN_vmaFreeDeviceMemoryFunction</a>) (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td></tr>
 <tr class="memdesc:aef2545dc2e9dd4f29ab9ba6ac6fe2f49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function called before vkFreeMemory.  <a href="#aef2545dc2e9dd4f29ab9ba6ac6fe2f49">More...</a><br /></td></tr>
 <tr class="separator:aef2545dc2e9dd4f29ab9ba6ac6fe2f49"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a5e2eb68d727cfd4df25702b027b7aa31"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a5e2eb68d727cfd4df25702b027b7aa31">VmaDeviceMemoryCallbacks</a></td></tr>
 <tr class="memdesc:a5e2eb68d727cfd4df25702b027b7aa31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code>.  <a href="#a5e2eb68d727cfd4df25702b027b7aa31">More...</a><br /></td></tr>
 <tr class="separator:a5e2eb68d727cfd4df25702b027b7aa31"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a4ddf381b6ce795bdfbc6c614640b9915"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c">VmaAllocatorCreateFlagBits</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a4ddf381b6ce795bdfbc6c614640b9915">VmaAllocatorCreateFlagBits</a></td></tr>
-<tr class="memdesc:a4ddf381b6ce795bdfbc6c614640b9915"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags for created VmaAllocator.  <a href="#a4ddf381b6ce795bdfbc6c614640b9915">More...</a><br /></td></tr>
+<tr class="memdesc:a4ddf381b6ce795bdfbc6c614640b9915"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags for created <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a>.  <a href="#a4ddf381b6ce795bdfbc6c614640b9915">More...</a><br /></td></tr>
 <tr class="separator:a4ddf381b6ce795bdfbc6c614640b9915"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:acfe6863e160722c2c1bbcf7573fddc4d"><td class="memItemLeft" align="right" valign="top">typedef VkFlags&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#acfe6863e160722c2c1bbcf7573fddc4d">VmaAllocatorCreateFlags</a></td></tr>
 <tr class="separator:acfe6863e160722c2c1bbcf7573fddc4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
@@ -155,13 +155,13 @@
 <tr class="memitem:a2770e325ea42e087c1b91fdf46d0292a"><td class="memItemLeft" align="right" valign="top">typedef VkFlags&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a></td></tr>
 <tr class="separator:a2770e325ea42e087c1b91fdf46d0292a"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a211706e9348dcee25a843ed4ea69bce7"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a211706e9348dcee25a843ed4ea69bce7">VmaPoolCreateInfo</a></td></tr>
-<tr class="memdesc:a211706e9348dcee25a843ed4ea69bce7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of created <code>VmaPool</code>.  <a href="#a211706e9348dcee25a843ed4ea69bce7">More...</a><br /></td></tr>
+<tr class="memdesc:a211706e9348dcee25a843ed4ea69bce7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of created <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>.  <a href="#a211706e9348dcee25a843ed4ea69bce7">More...</a><br /></td></tr>
 <tr class="separator:a211706e9348dcee25a843ed4ea69bce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a2e5612d871d64c5624087b837a338c34"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a2e5612d871d64c5624087b837a338c34">VmaPoolStats</a></td></tr>
-<tr class="memdesc:a2e5612d871d64c5624087b837a338c34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of existing <code>VmaPool</code>.  <a href="#a2e5612d871d64c5624087b837a338c34">More...</a><br /></td></tr>
+<tr class="memdesc:a2e5612d871d64c5624087b837a338c34"><td class="mdescLeft">&#160;</td><td class="mdescRight">Describes parameter of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>.  <a href="#a2e5612d871d64c5624087b837a338c34">More...</a><br /></td></tr>
 <tr class="separator:a2e5612d871d64c5624087b837a338c34"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:a795e6ff02a21d5486c0565f403dd9255"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a795e6ff02a21d5486c0565f403dd9255">VmaAllocationInfo</a></td></tr>
-<tr class="memdesc:a795e6ff02a21d5486c0565f403dd9255"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.  <a href="#a795e6ff02a21d5486c0565f403dd9255">More...</a><br /></td></tr>
+<tr class="memdesc:a795e6ff02a21d5486c0565f403dd9255"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>.  <a href="#a795e6ff02a21d5486c0565f403dd9255">More...</a><br /></td></tr>
 <tr class="separator:a795e6ff02a21d5486c0565f403dd9255"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:ae67f8573a0cf20f16f0a1eecbca566a0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae67f8573a0cf20f16f0a1eecbca566a0">VmaDefragmentationInfo</a></td></tr>
 <tr class="memdesc:ae67f8573a0cf20f16f0a1eecbca566a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional configuration parameters to be passed to function <a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>.  <a href="#ae67f8573a0cf20f16f0a1eecbca566a0">More...</a><br /></td></tr>
@@ -175,7 +175,7 @@
 <tr class="memitem:a4f87c9100d154a65a4ad495f7763cf7c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c">VmaAllocatorCreateFlagBits</a> { <a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d">VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT</a> = 0x00000001, 
 <a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878">VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</a> = 0x00000002, 
 <a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c">VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF
- }<tr class="memdesc:a4f87c9100d154a65a4ad495f7763cf7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags for created VmaAllocator.  <a href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c">More...</a><br /></td></tr>
+ }<tr class="memdesc:a4f87c9100d154a65a4ad495f7763cf7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags for created <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a>.  <a href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c">More...</a><br /></td></tr>
 </td></tr>
 <tr class="separator:a4f87c9100d154a65a4ad495f7763cf7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
 <tr class="memitem:aa5846affa1e9da3800e3e78fae2305cc"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc">VmaMemoryUsage</a> { <br />
@@ -210,92 +210,98 @@
 </table><table class="memberdecls">
 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
 Functions</h2></td></tr>
-<tr class="memitem:a200692051ddb34240248234f5f4c17bb"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a> (const <a class="el" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a> *pCreateInfo, VmaAllocator *pAllocator)</td></tr>
+<tr class="memitem:a200692051ddb34240248234f5f4c17bb"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a> (const <a class="el" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_allocator.html">VmaAllocator</a> *pAllocator)</td></tr>
 <tr class="memdesc:a200692051ddb34240248234f5f4c17bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates Allocator object.  <a href="#a200692051ddb34240248234f5f4c17bb">More...</a><br /></td></tr>
 <tr class="separator:a200692051ddb34240248234f5f4c17bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aa8d164061c88f22fb1fd3c8f3534bc1d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d">vmaDestroyAllocator</a> (VmaAllocator allocator)</td></tr>
+<tr class="memitem:aa8d164061c88f22fb1fd3c8f3534bc1d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d">vmaDestroyAllocator</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator)</td></tr>
 <tr class="memdesc:aa8d164061c88f22fb1fd3c8f3534bc1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys allocator object.  <a href="#aa8d164061c88f22fb1fd3c8f3534bc1d">More...</a><br /></td></tr>
 <tr class="separator:aa8d164061c88f22fb1fd3c8f3534bc1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aecabf7b6e91ea87d0316fa0a9e014fe0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aecabf7b6e91ea87d0316fa0a9e014fe0">vmaGetPhysicalDeviceProperties</a> (VmaAllocator allocator, const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties)</td></tr>
+<tr class="memitem:aecabf7b6e91ea87d0316fa0a9e014fe0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aecabf7b6e91ea87d0316fa0a9e014fe0">vmaGetPhysicalDeviceProperties</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkPhysicalDeviceProperties **ppPhysicalDeviceProperties)</td></tr>
 <tr class="separator:aecabf7b6e91ea87d0316fa0a9e014fe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ab88db292a17974f911182543fda52d19"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ab88db292a17974f911182543fda52d19">vmaGetMemoryProperties</a> (VmaAllocator allocator, const VkPhysicalDeviceMemoryProperties **ppPhysicalDeviceMemoryProperties)</td></tr>
+<tr class="memitem:ab88db292a17974f911182543fda52d19"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ab88db292a17974f911182543fda52d19">vmaGetMemoryProperties</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkPhysicalDeviceMemoryProperties **ppPhysicalDeviceMemoryProperties)</td></tr>
 <tr class="separator:ab88db292a17974f911182543fda52d19"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a8701444752eb5de4464adb5a2b514bca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca">vmaGetMemoryTypeProperties</a> (VmaAllocator allocator, uint32_t memoryTypeIndex, VkMemoryPropertyFlags *pFlags)</td></tr>
+<tr class="memitem:a8701444752eb5de4464adb5a2b514bca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca">vmaGetMemoryTypeProperties</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, uint32_t memoryTypeIndex, VkMemoryPropertyFlags *pFlags)</td></tr>
 <tr class="memdesc:a8701444752eb5de4464adb5a2b514bca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given Memory Type Index, returns Property Flags of this memory type.  <a href="#a8701444752eb5de4464adb5a2b514bca">More...</a><br /></td></tr>
 <tr class="separator:a8701444752eb5de4464adb5a2b514bca"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ade56bf8dc9f5a5eaddf5f119ed525236"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ade56bf8dc9f5a5eaddf5f119ed525236">vmaSetCurrentFrameIndex</a> (VmaAllocator allocator, uint32_t frameIndex)</td></tr>
+<tr class="memitem:ade56bf8dc9f5a5eaddf5f119ed525236"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ade56bf8dc9f5a5eaddf5f119ed525236">vmaSetCurrentFrameIndex</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, uint32_t frameIndex)</td></tr>
 <tr class="memdesc:ade56bf8dc9f5a5eaddf5f119ed525236"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets index of the current frame.  <a href="#ade56bf8dc9f5a5eaddf5f119ed525236">More...</a><br /></td></tr>
 <tr class="separator:ade56bf8dc9f5a5eaddf5f119ed525236"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a333b61c1788cb23559177531e6a93ca3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3">vmaCalculateStats</a> (VmaAllocator allocator, <a class="el" href="struct_vma_stats.html">VmaStats</a> *pStats)</td></tr>
+<tr class="memitem:a333b61c1788cb23559177531e6a93ca3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3">vmaCalculateStats</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_stats.html">VmaStats</a> *pStats)</td></tr>
 <tr class="memdesc:a333b61c1788cb23559177531e6a93ca3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves statistics from current state of the Allocator.  <a href="#a333b61c1788cb23559177531e6a93ca3">More...</a><br /></td></tr>
 <tr class="separator:a333b61c1788cb23559177531e6a93ca3"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aa4fee7eb5253377599ef4fd38c93c2a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0">vmaBuildStatsString</a> (VmaAllocator allocator, char **ppStatsString, VkBool32 detailedMap)</td></tr>
+<tr class="memitem:aa4fee7eb5253377599ef4fd38c93c2a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0">vmaBuildStatsString</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, char **ppStatsString, VkBool32 detailedMap)</td></tr>
 <tr class="memdesc:aa4fee7eb5253377599ef4fd38c93c2a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds and returns statistics as string in JSON format.  <a href="#aa4fee7eb5253377599ef4fd38c93c2a0">More...</a><br /></td></tr>
 <tr class="separator:aa4fee7eb5253377599ef4fd38c93c2a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a3104eb30d8122c84dd8541063f145288"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a3104eb30d8122c84dd8541063f145288">vmaFreeStatsString</a> (VmaAllocator allocator, char *pStatsString)</td></tr>
+<tr class="memitem:a3104eb30d8122c84dd8541063f145288"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a3104eb30d8122c84dd8541063f145288">vmaFreeStatsString</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, char *pStatsString)</td></tr>
 <tr class="separator:a3104eb30d8122c84dd8541063f145288"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:aef15a94b58fbcb0fe706d5720e84a74a"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aef15a94b58fbcb0fe706d5720e84a74a">vmaFindMemoryTypeIndex</a> (VmaAllocator allocator, uint32_t memoryTypeBits, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)</td></tr>
+<tr class="memitem:aef15a94b58fbcb0fe706d5720e84a74a"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#aef15a94b58fbcb0fe706d5720e84a74a">vmaFindMemoryTypeIndex</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, uint32_t memoryTypeBits, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)</td></tr>
 <tr class="memdesc:aef15a94b58fbcb0fe706d5720e84a74a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helps to find memoryTypeIndex, given memoryTypeBits and <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>.  <a href="#aef15a94b58fbcb0fe706d5720e84a74a">More...</a><br /></td></tr>
 <tr class="separator:aef15a94b58fbcb0fe706d5720e84a74a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae790ab9ffaf7667fb8f62523e6897888"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae790ab9ffaf7667fb8f62523e6897888">vmaFindMemoryTypeIndexForBufferInfo</a> (VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)</td></tr>
+<tr class="memitem:ae790ab9ffaf7667fb8f62523e6897888"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae790ab9ffaf7667fb8f62523e6897888">vmaFindMemoryTypeIndexForBufferInfo</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkBufferCreateInfo *pBufferCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)</td></tr>
 <tr class="memdesc:ae790ab9ffaf7667fb8f62523e6897888"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helps to find memoryTypeIndex, given VkBufferCreateInfo and <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>.  <a href="#ae790ab9ffaf7667fb8f62523e6897888">More...</a><br /></td></tr>
 <tr class="separator:ae790ab9ffaf7667fb8f62523e6897888"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a088da83d8eaf3ce9056d9ea0b981d472"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a088da83d8eaf3ce9056d9ea0b981d472">vmaFindMemoryTypeIndexForImageInfo</a> (VmaAllocator allocator, const VkImageCreateInfo *pImageCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)</td></tr>
+<tr class="memitem:a088da83d8eaf3ce9056d9ea0b981d472"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a088da83d8eaf3ce9056d9ea0b981d472">vmaFindMemoryTypeIndexForImageInfo</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkImageCreateInfo *pImageCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)</td></tr>
 <tr class="memdesc:a088da83d8eaf3ce9056d9ea0b981d472"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helps to find memoryTypeIndex, given VkImageCreateInfo and <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>.  <a href="#a088da83d8eaf3ce9056d9ea0b981d472">More...</a><br /></td></tr>
 <tr class="separator:a088da83d8eaf3ce9056d9ea0b981d472"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a5c8770ded7c59c8caac6de0c2cb00b50"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a> (VmaAllocator allocator, const <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> *pCreateInfo, VmaPool *pPool)</td></tr>
-<tr class="memdesc:a5c8770ded7c59c8caac6de0c2cb00b50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates Vulkan device memory and creates <code>VmaPool</code> object.  <a href="#a5c8770ded7c59c8caac6de0c2cb00b50">More...</a><br /></td></tr>
+<tr class="memitem:a5c8770ded7c59c8caac6de0c2cb00b50"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_pool.html">VmaPool</a> *pPool)</td></tr>
+<tr class="memdesc:a5c8770ded7c59c8caac6de0c2cb00b50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates Vulkan device memory and creates <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> object.  <a href="#a5c8770ded7c59c8caac6de0c2cb00b50">More...</a><br /></td></tr>
 <tr class="separator:a5c8770ded7c59c8caac6de0c2cb00b50"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a5485779c8f1948238fc4e92232fa65e1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1">vmaDestroyPool</a> (VmaAllocator allocator, VmaPool pool)</td></tr>
-<tr class="memdesc:a5485779c8f1948238fc4e92232fa65e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys VmaPool object and frees Vulkan device memory.  <a href="#a5485779c8f1948238fc4e92232fa65e1">More...</a><br /></td></tr>
+<tr class="memitem:a5485779c8f1948238fc4e92232fa65e1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1">vmaDestroyPool</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_pool.html">VmaPool</a> pool)</td></tr>
+<tr class="memdesc:a5485779c8f1948238fc4e92232fa65e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> object and frees Vulkan device memory.  <a href="#a5485779c8f1948238fc4e92232fa65e1">More...</a><br /></td></tr>
 <tr class="separator:a5485779c8f1948238fc4e92232fa65e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae8bf76997b234ef68aad922616df4153"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae8bf76997b234ef68aad922616df4153">vmaGetPoolStats</a> (VmaAllocator allocator, VmaPool pool, <a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a> *pPoolStats)</td></tr>
-<tr class="memdesc:ae8bf76997b234ef68aad922616df4153"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves statistics of existing VmaPool object.  <a href="#ae8bf76997b234ef68aad922616df4153">More...</a><br /></td></tr>
+<tr class="memitem:ae8bf76997b234ef68aad922616df4153"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae8bf76997b234ef68aad922616df4153">vmaGetPoolStats</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_pool.html">VmaPool</a> pool, <a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a> *pPoolStats)</td></tr>
+<tr class="memdesc:ae8bf76997b234ef68aad922616df4153"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves statistics of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> object.  <a href="#ae8bf76997b234ef68aad922616df4153">More...</a><br /></td></tr>
 <tr class="separator:ae8bf76997b234ef68aad922616df4153"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a736bd6cbda886f36c891727e73bd4024"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a736bd6cbda886f36c891727e73bd4024">vmaMakePoolAllocationsLost</a> (VmaAllocator allocator, VmaPool pool, size_t *pLostAllocationCount)</td></tr>
+<tr class="memitem:a736bd6cbda886f36c891727e73bd4024"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a736bd6cbda886f36c891727e73bd4024">vmaMakePoolAllocationsLost</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_pool.html">VmaPool</a> pool, size_t *pLostAllocationCount)</td></tr>
 <tr class="memdesc:a736bd6cbda886f36c891727e73bd4024"><td class="mdescLeft">&#160;</td><td class="mdescRight">Marks all allocations in given pool as lost if they are not used in current frame or <a class="el" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaPoolCreateInfo::frameInUseCount</a> back from now.  <a href="#a736bd6cbda886f36c891727e73bd4024">More...</a><br /></td></tr>
 <tr class="separator:a736bd6cbda886f36c891727e73bd4024"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:abf28077dbf82d0908b8acbe8ee8dd9b8"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8">vmaAllocateMemory</a> (VmaAllocator allocator, const VkMemoryRequirements *pVkMemoryRequirements, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
+<tr class="memitem:abf28077dbf82d0908b8acbe8ee8dd9b8"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8">vmaAllocateMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkMemoryRequirements *pVkMemoryRequirements, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
 <tr class="memdesc:abf28077dbf82d0908b8acbe8ee8dd9b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">General purpose memory allocation.  <a href="#abf28077dbf82d0908b8acbe8ee8dd9b8">More...</a><br /></td></tr>
 <tr class="separator:abf28077dbf82d0908b8acbe8ee8dd9b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a7fdf64415b6c3d83c454f28d2c53df7b"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer</a> (VmaAllocator allocator, VkBuffer buffer, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
+<tr class="memitem:a7fdf64415b6c3d83c454f28d2c53df7b"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, VkBuffer buffer, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
 <tr class="separator:a7fdf64415b6c3d83c454f28d2c53df7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a0faa3f9e5fb233d29d1e00390650febb"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb">vmaAllocateMemoryForImage</a> (VmaAllocator allocator, VkImage image, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
+<tr class="memitem:a0faa3f9e5fb233d29d1e00390650febb"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb">vmaAllocateMemoryForImage</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, VkImage image, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
 <tr class="memdesc:a0faa3f9e5fb233d29d1e00390650febb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function similar to <a class="el" href="vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>.  <a href="#a0faa3f9e5fb233d29d1e00390650febb">More...</a><br /></td></tr>
 <tr class="separator:a0faa3f9e5fb233d29d1e00390650febb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a11f0fbc034fa81a4efedd73d61ce7568"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a> (VmaAllocator allocator, VmaAllocation allocation)</td></tr>
+<tr class="memitem:a11f0fbc034fa81a4efedd73d61ce7568"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
 <tr class="memdesc:a11f0fbc034fa81a4efedd73d61ce7568"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees memory previously allocated using <a class="el" href="vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation. ">vmaAllocateMemory()</a>, <a class="el" href="vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, or <a class="el" href="vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer(). ">vmaAllocateMemoryForImage()</a>.  <a href="#a11f0fbc034fa81a4efedd73d61ce7568">More...</a><br /></td></tr>
 <tr class="separator:a11f0fbc034fa81a4efedd73d61ce7568"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a86dd08aba8633bfa4ad0df2e76481d8b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a> (VmaAllocator allocator, VmaAllocation allocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
-<tr class="memdesc:a86dd08aba8633bfa4ad0df2e76481d8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns current information about specified allocation.  <a href="#a86dd08aba8633bfa4ad0df2e76481d8b">More...</a><br /></td></tr>
+<tr class="memitem:a86dd08aba8633bfa4ad0df2e76481d8b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
+<tr class="memdesc:a86dd08aba8633bfa4ad0df2e76481d8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns current information about specified allocation and atomically marks it as used in current frame.  <a href="#a86dd08aba8633bfa4ad0df2e76481d8b">More...</a><br /></td></tr>
 <tr class="separator:a86dd08aba8633bfa4ad0df2e76481d8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a43d8ba9673c846f049089a5029d5c73a"><td class="memItemLeft" align="right" valign="top">VkBool32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a">vmaTouchAllocation</a> (VmaAllocator allocator, VmaAllocation allocation)</td></tr>
-<tr class="memdesc:a43d8ba9673c846f049089a5029d5c73a"><td class="mdescLeft">&#160;</td><td class="mdescRight">TODO finish documentation...  <a href="#a43d8ba9673c846f049089a5029d5c73a">More...</a><br /></td></tr>
+<tr class="memitem:a43d8ba9673c846f049089a5029d5c73a"><td class="memItemLeft" align="right" valign="top">VkBool32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a">vmaTouchAllocation</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
+<tr class="memdesc:a43d8ba9673c846f049089a5029d5c73a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>VK_TRUE</code> if allocation is not lost and atomically marks it as used in current frame.  <a href="#a43d8ba9673c846f049089a5029d5c73a">More...</a><br /></td></tr>
 <tr class="separator:a43d8ba9673c846f049089a5029d5c73a"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:af9147d31ffc11d62fc187bde283ed14f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f">vmaSetAllocationUserData</a> (VmaAllocator allocator, VmaAllocation allocation, void *pUserData)</td></tr>
+<tr class="memitem:af9147d31ffc11d62fc187bde283ed14f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f">vmaSetAllocationUserData</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation, void *pUserData)</td></tr>
 <tr class="memdesc:af9147d31ffc11d62fc187bde283ed14f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets pUserData in given allocation to new value.  <a href="#af9147d31ffc11d62fc187bde283ed14f">More...</a><br /></td></tr>
 <tr class="separator:af9147d31ffc11d62fc187bde283ed14f"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae5c9657d9e94756269145b01c05d16f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae5c9657d9e94756269145b01c05d16f1">vmaCreateLostAllocation</a> (VmaAllocator allocator, VmaAllocation *pAllocation)</td></tr>
+<tr class="memitem:ae5c9657d9e94756269145b01c05d16f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae5c9657d9e94756269145b01c05d16f1">vmaCreateLostAllocation</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation)</td></tr>
 <tr class="memdesc:ae5c9657d9e94756269145b01c05d16f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new allocation that is in lost state from the beginning.  <a href="#ae5c9657d9e94756269145b01c05d16f1">More...</a><br /></td></tr>
 <tr class="separator:ae5c9657d9e94756269145b01c05d16f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ad5bd1243512d099706de88168992f069"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069">vmaMapMemory</a> (VmaAllocator allocator, VmaAllocation allocation, void **ppData)</td></tr>
+<tr class="memitem:ad5bd1243512d099706de88168992f069"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069">vmaMapMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation, void **ppData)</td></tr>
 <tr class="memdesc:ad5bd1243512d099706de88168992f069"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maps memory represented by given allocation and returns pointer to it.  <a href="#ad5bd1243512d099706de88168992f069">More...</a><br /></td></tr>
 <tr class="separator:ad5bd1243512d099706de88168992f069"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a9bc268595cb33f6ec4d519cfce81ff45"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a> (VmaAllocator allocator, VmaAllocation allocation)</td></tr>
+<tr class="memitem:a9bc268595cb33f6ec4d519cfce81ff45"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
 <tr class="memdesc:a9bc268595cb33f6ec4d519cfce81ff45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unmaps memory represented by given allocation, mapped previously using <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a>.  <a href="#a9bc268595cb33f6ec4d519cfce81ff45">More...</a><br /></td></tr>
 <tr class="separator:a9bc268595cb33f6ec4d519cfce81ff45"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a6aced90fcc7b39882b6654a740a0b9bb"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb">vmaDefragment</a> (VmaAllocator allocator, VmaAllocation *pAllocations, size_t allocationCount, VkBool32 *pAllocationsChanged, const <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> *pDefragmentationInfo, <a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a> *pDefragmentationStats)</td></tr>
+<tr class="memitem:a6aced90fcc7b39882b6654a740a0b9bb"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb">vmaDefragment</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocations, size_t allocationCount, VkBool32 *pAllocationsChanged, const <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> *pDefragmentationInfo, <a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a> *pDefragmentationStats)</td></tr>
 <tr class="memdesc:a6aced90fcc7b39882b6654a740a0b9bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compacts memory by moving allocations.  <a href="#a6aced90fcc7b39882b6654a740a0b9bb">More...</a><br /></td></tr>
 <tr class="separator:a6aced90fcc7b39882b6654a740a0b9bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ac72ee55598617e8eecca384e746bab51"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a> (VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
+<tr class="memitem:a6b0929b914b60cf2d45cac4bf3547470"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a6b0929b914b60cf2d45cac4bf3547470">vmaBindBufferMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation, VkBuffer buffer)</td></tr>
+<tr class="memdesc:a6b0929b914b60cf2d45cac4bf3547470"><td class="mdescLeft">&#160;</td><td class="mdescRight">Binds buffer to allocation.  <a href="#a6b0929b914b60cf2d45cac4bf3547470">More...</a><br /></td></tr>
+<tr class="separator:a6b0929b914b60cf2d45cac4bf3547470"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3d3ca45799923aa5d138e9e5f9eb2da5"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a3d3ca45799923aa5d138e9e5f9eb2da5">vmaBindImageMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation, VkImage image)</td></tr>
+<tr class="memdesc:a3d3ca45799923aa5d138e9e5f9eb2da5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Binds image to allocation.  <a href="#a3d3ca45799923aa5d138e9e5f9eb2da5">More...</a><br /></td></tr>
+<tr class="separator:a3d3ca45799923aa5d138e9e5f9eb2da5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac72ee55598617e8eecca384e746bab51"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkBufferCreateInfo *pBufferCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, VkBuffer *pBuffer, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
 <tr class="separator:ac72ee55598617e8eecca384e746bab51"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a0d9f4e4ba5bf9aab1f1c746387753d77"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a> (VmaAllocator allocator, VkBuffer buffer, VmaAllocation allocation)</td></tr>
+<tr class="memitem:a0d9f4e4ba5bf9aab1f1c746387753d77"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, VkBuffer buffer, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
 <tr class="memdesc:a0d9f4e4ba5bf9aab1f1c746387753d77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys Vulkan buffer and frees allocated memory.  <a href="#a0d9f4e4ba5bf9aab1f1c746387753d77">More...</a><br /></td></tr>
 <tr class="separator:a0d9f4e4ba5bf9aab1f1c746387753d77"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:a02a94f25679275851a53e82eacbcfc73"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a> (VmaAllocator allocator, const VkImageCreateInfo *pImageCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, VkImage *pImage, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
+<tr class="memitem:a02a94f25679275851a53e82eacbcfc73"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkImageCreateInfo *pImageCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, VkImage *pImage, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
 <tr class="memdesc:a02a94f25679275851a53e82eacbcfc73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function similar to <a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>.  <a href="#a02a94f25679275851a53e82eacbcfc73">More...</a><br /></td></tr>
 <tr class="separator:a02a94f25679275851a53e82eacbcfc73"><td class="memSeparator" colspan="2">&#160;</td></tr>
-<tr class="memitem:ae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae50d2cb3b4a3bfd4dd40987234e50e7e">vmaDestroyImage</a> (VmaAllocator allocator, VkImage image, VmaAllocation allocation)</td></tr>
+<tr class="memitem:ae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#ae50d2cb3b4a3bfd4dd40987234e50e7e">vmaDestroyImage</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, VkImage image, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
 <tr class="memdesc:ae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys Vulkan image and frees allocated memory.  <a href="#ae50d2cb3b4a3bfd4dd40987234e50e7e">More...</a><br /></td></tr>
 <tr class="separator:ae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
 </table>
@@ -322,7 +328,7 @@
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">typedef void(VKAPI_PTR * PFN_vmaAllocateDeviceMemoryFunction) (VmaAllocator allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td>
+          <td class="memname">typedef void(VKAPI_PTR * PFN_vmaAllocateDeviceMemoryFunction) (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td>
         </tr>
       </table>
 </div><div class="memdoc">
@@ -338,7 +344,7 @@
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">typedef void(VKAPI_PTR * PFN_vmaFreeDeviceMemoryFunction) (VmaAllocator allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td>
+          <td class="memname">typedef void(VKAPI_PTR * PFN_vmaFreeDeviceMemoryFunction) (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, uint32_t memoryType, VkDeviceMemory memory, VkDeviceSize size)</td>
         </tr>
       </table>
 </div><div class="memdoc">
@@ -403,7 +409,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>. </p>
+<p>Parameters of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>. </p>
 
 </div>
 </div>
@@ -419,7 +425,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Flags for created VmaAllocator. </p>
+<p>Flags for created <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a>. </p>
 
 </div>
 </div>
@@ -499,7 +505,7 @@
 
 <p>Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code>. </p>
 <p>Provided for informative purpose, e.g. to gather statistics about number of allocations or total amount of memory allocated in Vulkan.</p>
-<p>Used in <a class="el" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e" title="Informative callbacks for vkAllocateMemory, vkFreeMemory. ">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>. </p>
+<p>Used in <a class="el" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e" title="Informative callbacks for vkAllocateMemory, vkFreeMemory. Optional. ">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>. </p>
 
 </div>
 </div>
@@ -559,7 +565,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Describes parameter of created <code>VmaPool</code>. </p>
+<p>Describes parameter of created <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>. </p>
 
 </div>
 </div>
@@ -575,7 +581,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Describes parameter of existing <code>VmaPool</code>. </p>
+<p>Describes parameter of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a>. </p>
 
 </div>
 </div>
@@ -650,23 +656,23 @@
 </td></tr>
 <tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff"></a>VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT&#160;</td><td class="fielddoc"><p>Set this flag to only try to allocate from existing <code>VkDeviceMemory</code> blocks and never create new such block. </p>
 <p>If new allocation cannot be placed in any of the existing blocks, allocation fails with <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code> error.</p>
-<p>You should not use <code>VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</code> and <code>VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT</code> at the same time. It makes no sense.</p>
+<p>You should not use <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block. ">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a> and <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff" title="Set this flag to only try to allocate from existing VkDeviceMemory blocks and never create new such b...">VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT</a> at the same time. It makes no sense.</p>
 <p>If <a class="el" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150" title="Pool that this allocation should be created in. ">VmaAllocationCreateInfo::pool</a> is not null, this flag is implied and ignored. </p>
 </td></tr>
 <tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f"></a>VMA_ALLOCATION_CREATE_MAPPED_BIT&#160;</td><td class="fielddoc"><p>Set this flag to use a memory that will be persistently mapped and retrieve pointer to it. </p>
 <p>Pointer to mapped memory will be returned through <a class="el" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2" title="Pointer to the beginning of this allocation as mapped data. ">VmaAllocationInfo::pMappedData</a>.</p>
 <p>Is it valid to use this flag for allocation made from memory type that is not <code>HOST_VISIBLE</code>. This flag is then ignored and memory is not mapped. This is useful if you need an allocation that is efficient to use on GPU (<code>DEVICE_LOCAL</code>) and still want to map it directly if possible on platforms that support it (e.g. Intel GPU).</p>
-<p>You should not use this flag together with <code>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</code>. </p>
+<p>You should not use this flag together with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a>. </p>
 </td></tr>
-<tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2"></a>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT&#160;</td><td class="fielddoc"><p>Allocation created with this flag can become lost as a result of another allocation with <code>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</code> flag, so you must check it before use.</p>
-<p>To check if allocation is not lost, call <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> and check if <a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67" title="Handle to Vulkan memory object. ">VmaAllocationInfo::deviceMemory</a> is not <code>VK_NULL_HANDLE</code>.</p>
+<tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2"></a>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT&#160;</td><td class="fielddoc"><p>Allocation created with this flag can become lost as a result of another allocation with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a> flag, so you must check it before use.</p>
+<p>To check if allocation is not lost, call <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> and check if <a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67" title="Handle to Vulkan memory object. ">VmaAllocationInfo::deviceMemory</a> is not <code>VK_NULL_HANDLE</code>.</p>
 <p>For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page.</p>
-<p>You should not use this flag together with <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code>. </p>
+<p>You should not use this flag together with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>. </p>
 </td></tr>
-<tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e"></a>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT&#160;</td><td class="fielddoc"><p>While creating allocation using this flag, other allocations that were created with flag <code>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</code> can become lost.</p>
+<tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e"></a>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT&#160;</td><td class="fielddoc"><p>While creating allocation using this flag, other allocations that were created with flag <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> can become lost.</p>
 <p>For details about supporting lost allocations, see Lost Allocations chapter of User Guide on Main Page. </p>
 </td></tr>
-<tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520"></a>VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT&#160;</td><td class="fielddoc"><p>Set this flag to treat <a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> as pointer to a null-terminated string. Instead of copying pointer value, a local copy of the string is made and stored in allocation's pUserData. The string is automatically freed together with the allocation. It is also used in <a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as string in JSON format. ">vmaBuildStatsString()</a>. </p>
+<tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520"></a>VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT&#160;</td><td class="fielddoc"><p>Set this flag to treat <a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> as pointer to a null-terminated string. Instead of copying pointer value, a local copy of the string is made and stored in allocation's <code>pUserData</code>. The string is automatically freed together with the allocation. It is also used in <a class="el" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as string in JSON format. ">vmaBuildStatsString()</a>. </p>
 </td></tr>
 <tr><td class="fieldname"><a id="ad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882"></a>VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM&#160;</td><td class="fielddoc"></td></tr>
 </table>
@@ -685,13 +691,13 @@
       </table>
 </div><div class="memdoc">
 
-<p>Flags for created VmaAllocator. </p>
+<p>Flags for created <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized. ">VmaAllocator</a>. </p>
 <table class="fieldtable">
 <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d"></a>VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT&#160;</td><td class="fielddoc"><p>Allocator and all objects created from it will not be synchronized internally, so you must guarantee they are used from only one thread at a time or synchronized externally by you. </p>
 <p>Using this flag may increase performance because internal mutexes are not used. </p>
 </td></tr>
 <tr><td class="fieldname"><a id="a4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878"></a>VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT&#160;</td><td class="fielddoc"><p>Enables usage of VK_KHR_dedicated_allocation extension. </p>
-<p>Using this extenion will automatically allocate dedicated blocks of memory for some buffers and images instead of suballocating place for them out of bigger memory blocks (as if you explicitly used VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag) when it is recommended by the driver. It may improve performance on some GPUs.</p>
+<p>Using this extenion will automatically allocate dedicated blocks of memory for some buffers and images instead of suballocating place for them out of bigger memory blocks (as if you explicitly used <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block. ">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a> flag) when it is recommended by the driver. It may improve performance on some GPUs.</p>
 <p>You may set this flag only if you found out that following device extensions are supported, you enabled them while creating Vulkan device passed as <a class="el" href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500" title="Vulkan device. ">VmaAllocatorCreateInfo::device</a>, and you want them to be used internally by this library:</p>
 <ul>
 <li>VK_KHR_get_memory_requirements2</li>
@@ -727,7 +733,7 @@
 <li>Resources written and read by device, e.g. images used as attachments.</li>
 <li>Resources transferred from host once (immutable) or infrequently and read by device multiple times, e.g. textures to be sampled, vertex buffers, uniform (constant) buffers, and majority of other types of resources used by device.</li>
 </ul>
-<p>Allocation may still end up in <code>HOST_VISIBLE</code> memory on some implementations. In such case, you are free to map it. You can use <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code> with this usage type. </p>
+<p>Allocation may still end up in <code>HOST_VISIBLE</code> memory on some implementations. In such case, you are free to map it. You can use <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> with this usage type. </p>
 </td></tr>
 <tr><td class="fieldname"><a id="aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5"></a>VMA_MEMORY_USAGE_CPU_ONLY&#160;</td><td class="fielddoc"><p>Memory will be mappable on host. It usually means CPU (system) memory. Resources created in this pool may still be accessible to the device, but access to them can be slower. Guarantees to be <code>HOST_VISIBLE</code> and <code>HOST_COHERENT</code>. CPU read may be uncached. It is roughly equivalent of <code>D3D12_HEAP_TYPE_UPLOAD</code>.</p>
 <p>Usage: Staging copy of resources used as transfer source. </p>
@@ -781,7 +787,7 @@
         <tr>
           <td class="memname">VkResult vmaAllocateMemory </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -799,7 +805,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *&#160;</td>
           <td class="paramname"><em>pAllocation</em>, </td>
         </tr>
         <tr>
@@ -820,7 +826,7 @@
 <dl class="params"><dt>Parameters</dt><dd>
   <table class="params">
     <tr><td class="paramdir">[out]</td><td class="paramname">pAllocation</td><td>Handle to allocated memory. </td></tr>
-    <tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.</td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>.</td></tr>
   </table>
   </dd>
 </dl>
@@ -838,7 +844,7 @@
         <tr>
           <td class="memname">VkResult vmaAllocateMemoryForBuffer </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -856,7 +862,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *&#160;</td>
           <td class="paramname"><em>pAllocation</em>, </td>
         </tr>
         <tr>
@@ -875,7 +881,7 @@
 <dl class="params"><dt>Parameters</dt><dd>
   <table class="params">
     <tr><td class="paramdir">[out]</td><td class="paramname">pAllocation</td><td>Handle to allocated memory. </td></tr>
-    <tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.</td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>.</td></tr>
   </table>
   </dd>
 </dl>
@@ -892,7 +898,7 @@
         <tr>
           <td class="memname">VkResult vmaAllocateMemoryForImage </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -910,7 +916,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *&#160;</td>
           <td class="paramname"><em>pAllocation</em>, </td>
         </tr>
         <tr>
@@ -931,6 +937,82 @@
 
 </div>
 </div>
+<a id="a6b0929b914b60cf2d45cac4bf3547470"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6b0929b914b60cf2d45cac4bf3547470">&#9670;&nbsp;</a></span>vmaBindBufferMemory()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">VkResult vmaBindBufferMemory </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
+          <td class="paramname"><em>allocator</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
+          <td class="paramname"><em>allocation</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">VkBuffer&#160;</td>
+          <td class="paramname"><em>buffer</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>Binds buffer to allocation. </p>
+<p>Binds specified buffer to region of memory represented by specified allocation. Gets <code>VkDeviceMemory</code> handle and offset from the allocation. If you want to create a buffer, allocate memory for it and bind them together separately, you should use this function for binding instead of standard <code>vkBindBufferMemory()</code>, because it ensures proper synchronization so that when a <code>VkDeviceMemory</code> object is used by multiple allocations, calls to <code>vkBind*Memory()</code> or <code>vkMapMemory()</code> won't happen from multiple threads simultaneously (which is illegal in Vulkan).</p>
+<p>It is recommended to use function <a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a> instead of this one. </p>
+
+</div>
+</div>
+<a id="a3d3ca45799923aa5d138e9e5f9eb2da5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3d3ca45799923aa5d138e9e5f9eb2da5">&#9670;&nbsp;</a></span>vmaBindImageMemory()</h2>
+
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">VkResult vmaBindImageMemory </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
+          <td class="paramname"><em>allocator</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
+          <td class="paramname"><em>allocation</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">VkImage&#160;</td>
+          <td class="paramname"><em>image</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+
+<p>Binds image to allocation. </p>
+<p>Binds specified image to region of memory represented by specified allocation. Gets <code>VkDeviceMemory</code> handle and offset from the allocation. If you want to create an image, allocate memory for it and bind them together separately, you should use this function for binding instead of standard <code>vkBindImageMemory()</code>, because it ensures proper synchronization so that when a <code>VkDeviceMemory</code> object is used by multiple allocations, calls to <code>vkBind*Memory()</code> or <code>vkMapMemory()</code> won't happen from multiple threads simultaneously (which is illegal in Vulkan).</p>
+<p>It is recommended to use function <a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a> instead of this one. </p>
+
+</div>
+</div>
 <a id="aa4fee7eb5253377599ef4fd38c93c2a0"></a>
 <h2 class="memtitle"><span class="permalink"><a href="#aa4fee7eb5253377599ef4fd38c93c2a0">&#9670;&nbsp;</a></span>vmaBuildStatsString()</h2>
 
@@ -940,7 +1022,7 @@
         <tr>
           <td class="memname">void vmaBuildStatsString </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -982,7 +1064,7 @@
         <tr>
           <td class="memname">void vmaCalculateStats </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1018,7 +1100,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocator *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a> *&#160;</td>
           <td class="paramname"><em>pAllocator</em>&#160;</td>
         </tr>
         <tr>
@@ -1042,7 +1124,7 @@
         <tr>
           <td class="memname">VkResult vmaCreateBuffer </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1066,7 +1148,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *&#160;</td>
           <td class="paramname"><em>pAllocation</em>, </td>
         </tr>
         <tr>
@@ -1086,7 +1168,7 @@
   <table class="params">
     <tr><td class="paramdir">[out]</td><td class="paramname">pBuffer</td><td>Buffer that was created. </td></tr>
     <tr><td class="paramdir">[out]</td><td class="paramname">pAllocation</td><td>Allocation that was created. </td></tr>
-    <tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.</td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>.</td></tr>
   </table>
   </dd>
 </dl>
@@ -1111,7 +1193,7 @@
         <tr>
           <td class="memname">VkResult vmaCreateImage </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1135,7 +1217,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *&#160;</td>
           <td class="paramname"><em>pAllocation</em>, </td>
         </tr>
         <tr>
@@ -1165,13 +1247,13 @@
         <tr>
           <td class="memname">void vmaCreateLostAllocation </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *&#160;</td>
           <td class="paramname"><em>pAllocation</em>&#160;</td>
         </tr>
         <tr>
@@ -1198,7 +1280,7 @@
         <tr>
           <td class="memname">VkResult vmaCreatePool </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1210,7 +1292,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaPool *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_pool.html">VmaPool</a> *&#160;</td>
           <td class="paramname"><em>pPool</em>&#160;</td>
         </tr>
         <tr>
@@ -1221,7 +1303,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Allocates Vulkan device memory and creates <code>VmaPool</code> object. </p>
+<p>Allocates Vulkan device memory and creates <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> object. </p>
 <dl class="params"><dt>Parameters</dt><dd>
   <table class="params">
     <tr><td class="paramdir"></td><td class="paramname">allocator</td><td>Allocator object. </td></tr>
@@ -1242,13 +1324,13 @@
         <tr>
           <td class="memname">VkResult vmaDefragment </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation *&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *&#160;</td>
           <td class="paramname"><em>pAllocations</em>, </td>
         </tr>
         <tr>
@@ -1298,14 +1380,14 @@
 <p>This function works by moving allocations to different places (different <code>VkDeviceMemory</code> objects and/or different offsets) in order to optimize memory usage. Only allocations that are in pAllocations array can be moved. All other allocations are considered nonmovable in this call. Basic rules:</p>
 <ul>
 <li>Only allocations made in memory types that have <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> flag can be compacted. You may pass other allocations but it makes no sense - these will never be moved.</li>
-<li>You may pass allocations made with <code>VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</code> but it makes no sense - they will never be moved.</li>
-<li>Both allocations made with or without <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code> flag can be compacted. If not persistently mapped, memory will be mapped temporarily inside this function if needed.</li>
-<li>You must not pass same <code>VmaAllocation</code> object multiple times in pAllocations array.</li>
+<li>You may pass allocations made with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block. ">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a> but it makes no sense - they will never be moved.</li>
+<li>Both allocations made with or without <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> flag can be compacted. If not persistently mapped, memory will be mapped temporarily inside this function if needed.</li>
+<li>You must not pass same <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation. ">VmaAllocation</a> object multiple times in pAllocations array.</li>
 </ul>
 <p>The function also frees empty <code>VkDeviceMemory</code> blocks.</p>
-<p>After allocation has been moved, its <a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67" title="Handle to Vulkan memory object. ">VmaAllocationInfo::deviceMemory</a> and/or <a class="el" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268" title="Offset into deviceMemory object to the beginning of this allocation, in bytes. (deviceMemory, offset) pair is unique to this allocation. ">VmaAllocationInfo::offset</a> changes. You must query them again using <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> if you need them.</p>
+<p>After allocation has been moved, its <a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67" title="Handle to Vulkan memory object. ">VmaAllocationInfo::deviceMemory</a> and/or <a class="el" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268" title="Offset into deviceMemory object to the beginning of this allocation, in bytes. (deviceMemory, offset) pair is unique to this allocation. ">VmaAllocationInfo::offset</a> changes. You must query them again using <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> if you need them.</p>
 <p>If an allocation has been moved, data in memory is copied to new place automatically, but if it was bound to a buffer or an image, you must destroy that object yourself, create new one and bind it to the new memory pointed by the allocation. You must use <code>vkDestroyBuffer()</code>, <code>vkDestroyImage()</code>, <code>vkCreateBuffer()</code>, <code>vkCreateImage()</code> for that purpose and NOT <a class="el" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77" title="Destroys Vulkan buffer and frees allocated memory. ">vmaDestroyBuffer()</a>, <a class="el" href="vk__mem__alloc_8h.html#ae50d2cb3b4a3bfd4dd40987234e50e7e" title="Destroys Vulkan image and frees allocated memory. ">vmaDestroyImage()</a>, <a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a>! Example:</p>
-<div class="fragment"><div class="line">VkDevice device = ...;</div><div class="line">VmaAllocator allocator = ...;</div><div class="line">std::vector&lt;VkBuffer&gt; buffers = ...;</div><div class="line">std::vector&lt;VmaAllocation&gt; allocations = ...;</div><div class="line"></div><div class="line">std::vector&lt;VkBool32&gt; allocationsChanged(allocations.size());</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb">vmaDefragment</a>(allocator, allocations.data(), allocations.size(), allocationsChanged.data(), <span class="keyword">nullptr</span>, <span class="keyword">nullptr</span>);</div><div class="line"></div><div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; allocations.size(); ++i)</div><div class="line">{</div><div class="line">    <span class="keywordflow">if</span>(allocationsChanged[i])</div><div class="line">    {</div><div class="line">        <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line">        <a class="code" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, allocations[i], &amp;allocInfo);</div><div class="line"></div><div class="line">        vkDestroyBuffer(device, buffers[i], <span class="keyword">nullptr</span>);</div><div class="line"></div><div class="line">        VkBufferCreateInfo bufferInfo = ...;</div><div class="line">        vkCreateBuffer(device, &amp;bufferInfo, <span class="keyword">nullptr</span>, &amp;buffers[i]);</div><div class="line">            </div><div class="line">        <span class="comment">// You can make dummy call to vkGetBufferMemoryRequirements here to silence validation layer warning.</span></div><div class="line">            </div><div class="line">        vkBindBufferMemory(device, buffers[i], allocInfo.<a class="code" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">deviceMemory</a>, allocInfo.<a class="code" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268">offset</a>);</div><div class="line">    }</div><div class="line">}</div></div><!-- fragment --><p>Note: Please don't expect memory to be fully compacted after this call. 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 data that needs to be moved. Some fragmentation still remains after this call. This is normal.</p>
+<div class="fragment"><div class="line">VkDevice device = ...;</div><div class="line"><a class="code" href="struct_vma_allocator.html">VmaAllocator</a> allocator = ...;</div><div class="line">std::vector&lt;VkBuffer&gt; buffers = ...;</div><div class="line">std::vector&lt;VmaAllocation&gt; allocations = ...;</div><div class="line"></div><div class="line">std::vector&lt;VkBool32&gt; allocationsChanged(allocations.size());</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb">vmaDefragment</a>(allocator, allocations.data(), allocations.size(), allocationsChanged.data(), <span class="keyword">nullptr</span>, <span class="keyword">nullptr</span>);</div><div class="line"></div><div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; allocations.size(); ++i)</div><div class="line">{</div><div class="line">    <span class="keywordflow">if</span>(allocationsChanged[i])</div><div class="line">    {</div><div class="line">        <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line">        <a class="code" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, allocations[i], &amp;allocInfo);</div><div class="line"></div><div class="line">        vkDestroyBuffer(device, buffers[i], <span class="keyword">nullptr</span>);</div><div class="line"></div><div class="line">        VkBufferCreateInfo bufferInfo = ...;</div><div class="line">        vkCreateBuffer(device, &amp;bufferInfo, <span class="keyword">nullptr</span>, &amp;buffers[i]);</div><div class="line">            </div><div class="line">        <span class="comment">// You can make dummy call to vkGetBufferMemoryRequirements here to silence validation layer warning.</span></div><div class="line">            </div><div class="line">        vkBindBufferMemory(device, buffers[i], allocInfo.<a class="code" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">deviceMemory</a>, allocInfo.<a class="code" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268">offset</a>);</div><div class="line">    }</div><div class="line">}</div></div><!-- fragment --><p>Note: Please don't expect memory to be fully compacted after this call. 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 data that needs to be moved. Some fragmentation still remains after this call. This is normal.</p>
 <p>Warning: This function is not 100% correct according to Vulkan specification. Use it at your own risk. That's because Vulkan doesn't guarantee that memory requirements (size and alignment) for a new buffer or image are consistent. They may be different even for subsequent calls with the same parameters. It really does happen on some platforms, especially with images.</p>
 <p>Warning: This function may be time-consuming, so you shouldn't call it too often (like every frame or after every resource creation/destruction). You can call it on special occasions (like when reloading a game level or when you just destroyed a lot of objects). </p>
 
@@ -1320,7 +1402,7 @@
         <tr>
           <td class="memname">void vmaDestroyAllocator </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em></td><td>)</td>
           <td></td>
         </tr>
@@ -1340,7 +1422,7 @@
         <tr>
           <td class="memname">void vmaDestroyBuffer </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1352,7 +1434,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>&#160;</td>
         </tr>
         <tr>
@@ -1378,7 +1460,7 @@
         <tr>
           <td class="memname">void vmaDestroyImage </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1390,7 +1472,7 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>&#160;</td>
         </tr>
         <tr>
@@ -1416,13 +1498,13 @@
         <tr>
           <td class="memname">void vmaDestroyPool </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaPool&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_pool.html">VmaPool</a>&#160;</td>
           <td class="paramname"><em>pool</em>&#160;</td>
         </tr>
         <tr>
@@ -1433,7 +1515,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Destroys VmaPool object and frees Vulkan device memory. </p>
+<p>Destroys <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> object and frees Vulkan device memory. </p>
 
 </div>
 </div>
@@ -1446,7 +1528,7 @@
         <tr>
           <td class="memname">VkResult vmaFindMemoryTypeIndex </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1496,7 +1578,7 @@
         <tr>
           <td class="memname">VkResult vmaFindMemoryTypeIndexForBufferInfo </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1545,7 +1627,7 @@
         <tr>
           <td class="memname">VkResult vmaFindMemoryTypeIndexForImageInfo </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1594,13 +1676,13 @@
         <tr>
           <td class="memname">void vmaFreeMemory </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>&#160;</td>
         </tr>
         <tr>
@@ -1624,7 +1706,7 @@
         <tr>
           <td class="memname">void vmaFreeStatsString </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1652,13 +1734,13 @@
         <tr>
           <td class="memname">void vmaGetAllocationInfo </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>, </td>
         </tr>
         <tr>
@@ -1675,8 +1757,14 @@
       </table>
 </div><div class="memdoc">
 
-<p>Returns current information about specified allocation. </p>
-<p>It also "touches" allocation... TODO finish documentation. </p>
+<p>Returns current information about specified allocation and atomically marks it as used in current frame. </p>
+<p>Current paramters of given allocation are returned in <code>pAllocationInfo</code>.</p>
+<p>This function also atomically "touches" allocation - marks it as used in current frame, just like <a class="el" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a" title="Returns VK_TRUE if allocation is not lost and atomically marks it as used in current frame...">vmaTouchAllocation()</a>. If the allocation is in lost state, <code>pAllocationInfo-&gt;deviceMemory == VK_NULL_HANDLE</code>.</p>
+<p>Although this function uses atomics and doesn't lock any mutex, so it should be quite efficient, you can avoid calling it too often.</p>
+<ul>
+<li>You can retrieve same <a class="el" href="struct_vma_allocation_info.html" title="Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo(). ">VmaAllocationInfo</a> structure while creating your resource, from function <a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a>. You can remember it if you are sure parameters don't change (e.g. due to defragmentation or allocation becoming lost).</li>
+<li>If you just want to check if allocation is not lost, <a class="el" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a" title="Returns VK_TRUE if allocation is not lost and atomically marks it as used in current frame...">vmaTouchAllocation()</a> will work faster. </li>
+</ul>
 
 </div>
 </div>
@@ -1689,7 +1777,7 @@
         <tr>
           <td class="memname">void vmaGetMemoryProperties </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1718,7 +1806,7 @@
         <tr>
           <td class="memname">void vmaGetMemoryTypeProperties </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1755,7 +1843,7 @@
         <tr>
           <td class="memname">void vmaGetPhysicalDeviceProperties </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1784,13 +1872,13 @@
         <tr>
           <td class="memname">void vmaGetPoolStats </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaPool&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_pool.html">VmaPool</a>&#160;</td>
           <td class="paramname"><em>pool</em>, </td>
         </tr>
         <tr>
@@ -1807,7 +1895,7 @@
       </table>
 </div><div class="memdoc">
 
-<p>Retrieves statistics of existing VmaPool object. </p>
+<p>Retrieves statistics of existing <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool. ">VmaPool</a> object. </p>
 <dl class="params"><dt>Parameters</dt><dd>
   <table class="params">
     <tr><td class="paramdir"></td><td class="paramname">allocator</td><td>Allocator object. </td></tr>
@@ -1828,13 +1916,13 @@
         <tr>
           <td class="memname">void vmaMakePoolAllocationsLost </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaPool&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_pool.html">VmaPool</a>&#160;</td>
           <td class="paramname"><em>pool</em>, </td>
         </tr>
         <tr>
@@ -1872,13 +1960,13 @@
         <tr>
           <td class="memname">VkResult vmaMapMemory </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>, </td>
         </tr>
         <tr>
@@ -1900,9 +1988,9 @@
 <p>Mapping is internally reference-counted and synchronized, so despite raw Vulkan function <code>vkMapMemory()</code> cannot be used to map same block of <code>VkDeviceMemory</code> multiple times simultaneously, it is safe to call this function on allocations assigned to the same memory block. Actual Vulkan memory will be mapped on first mapping and unmapped on last unmapping.</p>
 <p>If the function succeeded, you must call <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a> to unmap the allocation when mapping is no longer needed or before freeing the allocation, at the latest.</p>
 <p>It also safe to call this function multiple times on the same allocation. You must call <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a> same number of times as you called <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a>.</p>
-<p>It is also safe to call this function on allocation created with <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code> flag. Its memory stays mapped all the time. You must still call <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a> same number of times as you called <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a>. You must not call <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a> additional time to free the "0-th" mapping made automatically due to <code>VMA_ALLOCATION_CREATE_MAPPED_BIT</code> flag.</p>
+<p>It is also safe to call this function on allocation created with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> flag. Its memory stays mapped all the time. You must still call <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a> same number of times as you called <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it. ">vmaMapMemory()</a>. You must not call <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory(). ">vmaUnmapMemory()</a> additional time to free the "0-th" mapping made automatically due to <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it...">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> flag.</p>
 <p>This function fails when used on allocation made in memory type that is not <code>HOST_VISIBLE</code>.</p>
-<p>This function always fails when called for allocation that was created with <code>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</code> flag. Such allocations cannot be mapped. </p>
+<p>This function always fails when called for allocation that was created with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> flag. Such allocations cannot be mapped. </p>
 
 </div>
 </div>
@@ -1915,13 +2003,13 @@
         <tr>
           <td class="memname">void vmaSetAllocationUserData </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>, </td>
         </tr>
         <tr>
@@ -1939,8 +2027,8 @@
 </div><div class="memdoc">
 
 <p>Sets pUserData in given allocation to new value. </p>
-<p>If the allocation was created with VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT, pUserData must be either null, or pointer to a null-terminated string. The function makes local copy of the string and sets it as allocation's pUserData. String passed as pUserData doesn't need to be valid for whole lifetime of the allocation - you can free it after this call. String previously pointed by allocation's pUserData is freed from memory.</p>
-<p>If the flag was not used, the value of pointer pUserData is just copied to allocation's pUserData. It is opaque, so you can use it however you want - e.g. as a pointer, ordinal number or some handle to you own data. </p>
+<p>If the allocation was created with VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT, pUserData must be either null, or pointer to a null-terminated string. The function makes local copy of the string and sets it as allocation's <code>pUserData</code>. String passed as pUserData doesn't need to be valid for whole lifetime of the allocation - you can free it after this call. String previously pointed by allocation's pUserData is freed from memory.</p>
+<p>If the flag was not used, the value of pointer <code>pUserData</code> is just copied to allocation's <code>pUserData</code>. It is opaque, so you can use it however you want - e.g. as a pointer, ordinal number or some handle to you own data. </p>
 
 </div>
 </div>
@@ -1953,7 +2041,7 @@
         <tr>
           <td class="memname">void vmaSetCurrentFrameIndex </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
@@ -1971,7 +2059,7 @@
 </div><div class="memdoc">
 
 <p>Sets index of the current frame. </p>
-<p>This function must be used if you make allocations with <code>VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</code> and <code>VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</code> flags to inform the allocator when a new frame begins. Allocations queried using <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> cannot become lost in the current frame. </p>
+<p>This function must be used if you make allocations with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> and <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a> flags to inform the allocator when a new frame begins. Allocations queried using <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a> cannot become lost in the current frame. </p>
 
 </div>
 </div>
@@ -1984,13 +2072,13 @@
         <tr>
           <td class="memname">VkBool32 vmaTouchAllocation </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>&#160;</td>
         </tr>
         <tr>
@@ -2001,7 +2089,10 @@
       </table>
 </div><div class="memdoc">
 
-<p>TODO finish documentation... </p>
+<p>Returns <code>VK_TRUE</code> if allocation is not lost and atomically marks it as used in current frame. </p>
+<p>If the allocation has been created with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> flag, this function returns <code>VK_TRUE</code> if it's not in lost state, so it can still be used. It then also atomically "touches" the allocation - marks it as used in current frame, so that you can be sure it won't become lost in current frame or next <code>frameInUseCount</code> frames.</p>
+<p>If the allocation is in lost state, the function returns <code>VK_FALSE</code>. Memory of such allocation, as well as buffer or image bound to it, should not be used. Lost allocation and the buffer/image still need to be destroyed.</p>
+<p>If the allocation has been created without <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> flag, this function always returns <code>VK_TRUE</code>. </p>
 
 </div>
 </div>
@@ -2014,13 +2105,13 @@
         <tr>
           <td class="memname">void vmaUnmapMemory </td>
           <td>(</td>
-          <td class="paramtype">VmaAllocator&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a>&#160;</td>
           <td class="paramname"><em>allocator</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
-          <td class="paramtype">VmaAllocation&#160;</td>
+          <td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a>&#160;</td>
           <td class="paramname"><em>allocation</em>&#160;</td>
         </tr>
         <tr>
diff --git a/docs/html/vk__mem__alloc_8h_source.html b/docs/html/vk__mem__alloc_8h_source.html
index bdec8ad..60bb91c 100644
--- a/docs/html/vk__mem__alloc_8h_source.html
+++ b/docs/html/vk__mem__alloc_8h_source.html
@@ -62,157 +62,162 @@
 <div class="title">vk_mem_alloc.h</div>  </div>
 </div><!--header-->
 <div class="contents">
-<a href="vk__mem__alloc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">// Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">// copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">// The above copyright notice and this permission notice shall be included in</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">// THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// THE SOFTWARE.</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef AMD_VULKAN_MEMORY_ALLOCATOR_H</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define AMD_VULKAN_MEMORY_ALLOCATOR_H</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;<span class="preprocessor">#include &lt;vulkan/vulkan.h&gt;</span></div><div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;</div><div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;VK_DEFINE_HANDLE(VmaAllocator)</div><div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;</div><div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;<span class="keyword">typedef</span> void (VKAPI_PTR *<a class="code" href="vk__mem__alloc_8h.html#ab6a6477cda1ce775b30bde96d766203b">PFN_vmaAllocateDeviceMemoryFunction</a>)(</div><div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;    VmaAllocator      allocator,</div><div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;    uint32_t          memoryType,</div><div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;    VkDeviceMemory    memory,</div><div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;    VkDeviceSize      size);</div><div class="line"><a name="l00837"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aef2545dc2e9dd4f29ab9ba6ac6fe2f49">  837</a></span>&#160;<span class="keyword">typedef</span> void (VKAPI_PTR *<a class="code" href="vk__mem__alloc_8h.html#aef2545dc2e9dd4f29ab9ba6ac6fe2f49">PFN_vmaFreeDeviceMemoryFunction</a>)(</div><div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;    VmaAllocator      allocator,</div><div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;    uint32_t          memoryType,</div><div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;    VkDeviceMemory    memory,</div><div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;    VkDeviceSize      size);</div><div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;</div><div class="line"><a name="l00850"></a><span class="lineno"><a class="line" href="struct_vma_device_memory_callbacks.html">  850</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a> {</div><div class="line"><a name="l00852"></a><span class="lineno"><a class="line" href="struct_vma_device_memory_callbacks.html#a4f17f7b255101e733b44d5633aceabfb">  852</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ab6a6477cda1ce775b30bde96d766203b">PFN_vmaAllocateDeviceMemoryFunction</a> <a class="code" href="struct_vma_device_memory_callbacks.html#a4f17f7b255101e733b44d5633aceabfb">pfnAllocate</a>;</div><div class="line"><a name="l00854"></a><span class="lineno"><a class="line" href="struct_vma_device_memory_callbacks.html#abe8a3328bbc916f6f712fdb6b299444c">  854</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aef2545dc2e9dd4f29ab9ba6ac6fe2f49">PFN_vmaFreeDeviceMemoryFunction</a> <a class="code" href="struct_vma_device_memory_callbacks.html#abe8a3328bbc916f6f712fdb6b299444c">pfnFree</a>;</div><div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a5e2eb68d727cfd4df25702b027b7aa31">VmaDeviceMemoryCallbacks</a>;</div><div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;</div><div class="line"><a name="l00858"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c">  858</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c">VmaAllocatorCreateFlagBits</a> {</div><div class="line"><a name="l00863"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d">  863</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d">VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT</a> = 0x00000001,</div><div class="line"><a name="l00885"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878">  885</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878">VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</a> = 0x00000002,</div><div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;</div><div class="line"><a name="l00887"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c">  887</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c">VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF</div><div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7c">VmaAllocatorCreateFlagBits</a>;</div><div class="line"><a name="l00889"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#acfe6863e160722c2c1bbcf7573fddc4d">  889</a></span>&#160;<span class="keyword">typedef</span> VkFlags <a class="code" href="vk__mem__alloc_8h.html#acfe6863e160722c2c1bbcf7573fddc4d">VmaAllocatorCreateFlags</a>;</div><div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;</div><div class="line"><a name="l00895"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html">  895</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a> {</div><div class="line"><a name="l00896"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96">  896</a></span>&#160;    PFN_vkGetPhysicalDeviceProperties <a class="code" href="struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96">vkGetPhysicalDeviceProperties</a>;</div><div class="line"><a name="l00897"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830">  897</a></span>&#160;    PFN_vkGetPhysicalDeviceMemoryProperties <a class="code" href="struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830">vkGetPhysicalDeviceMemoryProperties</a>;</div><div class="line"><a name="l00898"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c">  898</a></span>&#160;    PFN_vkAllocateMemory <a class="code" href="struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c">vkAllocateMemory</a>;</div><div class="line"><a name="l00899"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4">  899</a></span>&#160;    PFN_vkFreeMemory <a class="code" href="struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4">vkFreeMemory</a>;</div><div class="line"><a name="l00900"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49">  900</a></span>&#160;    PFN_vkMapMemory <a class="code" href="struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49">vkMapMemory</a>;</div><div class="line"><a name="l00901"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9">  901</a></span>&#160;    PFN_vkUnmapMemory <a class="code" href="struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9">vkUnmapMemory</a>;</div><div class="line"><a name="l00902"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2">  902</a></span>&#160;    PFN_vkBindBufferMemory <a class="code" href="struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2">vkBindBufferMemory</a>;</div><div class="line"><a name="l00903"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637">  903</a></span>&#160;    PFN_vkBindImageMemory <a class="code" href="struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637">vkBindImageMemory</a>;</div><div class="line"><a name="l00904"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143">  904</a></span>&#160;    PFN_vkGetBufferMemoryRequirements <a class="code" href="struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143">vkGetBufferMemoryRequirements</a>;</div><div class="line"><a name="l00905"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4">  905</a></span>&#160;    PFN_vkGetImageMemoryRequirements <a class="code" href="struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4">vkGetImageMemoryRequirements</a>;</div><div class="line"><a name="l00906"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f">  906</a></span>&#160;    PFN_vkCreateBuffer <a class="code" href="struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f">vkCreateBuffer</a>;</div><div class="line"><a name="l00907"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45">  907</a></span>&#160;    PFN_vkDestroyBuffer <a class="code" href="struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45">vkDestroyBuffer</a>;</div><div class="line"><a name="l00908"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325">  908</a></span>&#160;    PFN_vkCreateImage <a class="code" href="struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325">vkCreateImage</a>;</div><div class="line"><a name="l00909"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa">  909</a></span>&#160;    PFN_vkDestroyImage <a class="code" href="struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa">vkDestroyImage</a>;</div><div class="line"><a name="l00910"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a9d8d1b05d2b1e7e1d9b27f6f585acf9c">  910</a></span>&#160;    PFN_vkGetBufferMemoryRequirements2KHR <a class="code" href="struct_vma_vulkan_functions.html#a9d8d1b05d2b1e7e1d9b27f6f585acf9c">vkGetBufferMemoryRequirements2KHR</a>;</div><div class="line"><a name="l00911"></a><span class="lineno"><a class="line" href="struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875">  911</a></span>&#160;    PFN_vkGetImageMemoryRequirements2KHR <a class="code" href="struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875">vkGetImageMemoryRequirements2KHR</a>;</div><div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a97064a1a271b0061ebfc3a079862d0c5">VmaVulkanFunctions</a>;</div><div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;</div><div class="line"><a name="l00915"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html">  915</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a></div><div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;{</div><div class="line"><a name="l00918"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#a392ea2ecbaff93f91a7c49f735ad4346">  918</a></span>&#160;    VmaAllocatorCreateFlags <a class="code" href="struct_vma_allocator_create_info.html#a392ea2ecbaff93f91a7c49f735ad4346">flags</a>;</div><div class="line"><a name="l00920"></a><span class="lineno">  920</span>&#160;</div><div class="line"><a name="l00921"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156">  921</a></span>&#160;    VkPhysicalDevice <a class="code" href="struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156">physicalDevice</a>;</div><div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;</div><div class="line"><a name="l00924"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500">  924</a></span>&#160;    VkDevice <a class="code" href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500">device</a>;</div><div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160;</div><div class="line"><a name="l00927"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#a8e4714298e3121cdd8b214a1ae7a637a">  927</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_allocator_create_info.html#a8e4714298e3121cdd8b214a1ae7a637a">preferredLargeHeapBlockSize</a>;</div><div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;</div><div class="line"><a name="l00930"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d">  930</a></span>&#160;    <span class="keyword">const</span> VkAllocationCallbacks* <a class="code" href="struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d">pAllocationCallbacks</a>;</div><div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;</div><div class="line"><a name="l00933"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e">  933</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a>* <a class="code" href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e">pDeviceMemoryCallbacks</a>;</div><div class="line"><a name="l00947"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#a21ea188dd212b8171cb9ecbed4a2a3a7">  947</a></span>&#160;    uint32_t <a class="code" href="struct_vma_allocator_create_info.html#a21ea188dd212b8171cb9ecbed4a2a3a7">frameInUseCount</a>;</div><div class="line"><a name="l00971"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#a31c192aa6cbffa33279f6d9f0c47c44b">  971</a></span>&#160;    <span class="keyword">const</span> VkDeviceSize* <a class="code" href="struct_vma_allocator_create_info.html#a31c192aa6cbffa33279f6d9f0c47c44b">pHeapSizeLimit</a>;</div><div class="line"><a name="l00983"></a><span class="lineno"><a class="line" href="struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd">  983</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a>* <a class="code" href="struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd">pVulkanFunctions</a>;</div><div class="line"><a name="l00984"></a><span class="lineno">  984</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#ae0f6d1d733dded220d28134da46b4283">VmaAllocatorCreateInfo</a>;</div><div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;</div><div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#a200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a>(</div><div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a>* pCreateInfo,</div><div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;    VmaAllocator* pAllocator);</div><div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;</div><div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d">vmaDestroyAllocator</a>(</div><div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;    VmaAllocator allocator);</div><div class="line"><a name="l00994"></a><span class="lineno">  994</span>&#160;</div><div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#aecabf7b6e91ea87d0316fa0a9e014fe0">vmaGetPhysicalDeviceProperties</a>(</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;    <span class="keyword">const</span> VkPhysicalDeviceProperties** ppPhysicalDeviceProperties);</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;</div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#ab88db292a17974f911182543fda52d19">vmaGetMemoryProperties</a>(</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;    <span class="keyword">const</span> VkPhysicalDeviceMemoryProperties** ppPhysicalDeviceMemoryProperties);</div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a8701444752eb5de4464adb5a2b514bca">vmaGetMemoryTypeProperties</a>(</div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;    uint32_t memoryTypeIndex,</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;    VkMemoryPropertyFlags* pFlags);</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;</div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#ade56bf8dc9f5a5eaddf5f119ed525236">vmaSetCurrentFrameIndex</a>(</div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;    uint32_t frameIndex);</div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;</div><div class="line"><a name="l01036"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html"> 1036</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_stat_info.html">VmaStatInfo</a></div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;{</div><div class="line"><a name="l01039"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html#abc4bb7cd611900778464c56e50c970a4"> 1039</a></span>&#160;    uint32_t <a class="code" href="struct_vma_stat_info.html#abc4bb7cd611900778464c56e50c970a4">blockCount</a>;</div><div class="line"><a name="l01041"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html#a537741e4d5cdddc1c0ab95ec650afaff"> 1041</a></span>&#160;    uint32_t <a class="code" href="struct_vma_stat_info.html#a537741e4d5cdddc1c0ab95ec650afaff">allocationCount</a>;</div><div class="line"><a name="l01043"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html#ae06129c771bfebfd6468a7f4276502a9"> 1043</a></span>&#160;    uint32_t <a class="code" href="struct_vma_stat_info.html#ae06129c771bfebfd6468a7f4276502a9">unusedRangeCount</a>;</div><div class="line"><a name="l01045"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html#ab0c6c73837e5a70c749fbd4f6064895a"> 1045</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_stat_info.html#ab0c6c73837e5a70c749fbd4f6064895a">usedBytes</a>;</div><div class="line"><a name="l01047"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html#a1859d290aca2cd582d8dc25922092669"> 1047</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_stat_info.html#a1859d290aca2cd582d8dc25922092669">unusedBytes</a>;</div><div class="line"><a name="l01048"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html#ade8b40bd3139c04aabd2fc538a356fea"> 1048</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_stat_info.html#ade8b40bd3139c04aabd2fc538a356fea">allocationSizeMin</a>, allocationSizeAvg, allocationSizeMax;</div><div class="line"><a name="l01049"></a><span class="lineno"><a class="line" href="struct_vma_stat_info.html#aedeba931324f16589cd2416c0d2dd0d4"> 1049</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_stat_info.html#aedeba931324f16589cd2416c0d2dd0d4">unusedRangeSizeMin</a>, unusedRangeSizeAvg, unusedRangeSizeMax;</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a810b009a788ee8aac72a25b42ffbe31c">VmaStatInfo</a>;</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;</div><div class="line"><a name="l01053"></a><span class="lineno"><a class="line" href="struct_vma_stats.html"> 1053</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_stats.html">VmaStats</a></div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;{</div><div class="line"><a name="l01055"></a><span class="lineno"><a class="line" href="struct_vma_stats.html#a13e3caf754be79352c42408756309331"> 1055</a></span>&#160;    <a class="code" href="struct_vma_stat_info.html">VmaStatInfo</a> memoryType[VK_MAX_MEMORY_TYPES];</div><div class="line"><a name="l01056"></a><span class="lineno"><a class="line" href="struct_vma_stats.html#a0e6611508c29a187f0fd14ff1a0329c0"> 1056</a></span>&#160;    <a class="code" href="struct_vma_stat_info.html">VmaStatInfo</a> memoryHeap[VK_MAX_MEMORY_HEAPS];</div><div class="line"><a name="l01057"></a><span class="lineno"><a class="line" href="struct_vma_stats.html#a2e8f5b3353f2fefef3c27f29e245a1f9"> 1057</a></span>&#160;    <a class="code" href="struct_vma_stat_info.html">VmaStatInfo</a> <a class="code" href="struct_vma_stats.html#a2e8f5b3353f2fefef3c27f29e245a1f9">total</a>;</div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a732be855fb4a7c248e6853d928a729af">VmaStats</a>;</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;</div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3">vmaCalculateStats</a>(</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;    <a class="code" href="struct_vma_stats.html">VmaStats</a>* pStats);</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;</div><div class="line"><a name="l01065"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ae25f0d55fd91cb166f002b63244800e1"> 1065</a></span>&#160;<span class="preprocessor">#define VMA_STATS_STRING_ENABLED 1</span></div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160;</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;<span class="preprocessor">#if VMA_STATS_STRING_ENABLED</span></div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;</div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;</div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#aa4fee7eb5253377599ef4fd38c93c2a0">vmaBuildStatsString</a>(</div><div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;    <span class="keywordtype">char</span>** ppStatsString,</div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;    VkBool32 detailedMap);</div><div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;</div><div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a3104eb30d8122c84dd8541063f145288">vmaFreeStatsString</a>(</div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;    <span class="keywordtype">char</span>* pStatsString);</div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;</div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;<span class="preprocessor">#endif // #if VMA_STATS_STRING_ENABLED</span></div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;VK_DEFINE_HANDLE(VmaPool)</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;</div><div class="line"><a name="l01085"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc"> 1085</a></span>&#160;typedef enum <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc">VmaMemoryUsage</a></div><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;{</div><div class="line"><a name="l01090"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd"> 1090</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd">VMA_MEMORY_USAGE_UNKNOWN</a> = 0,</div><div class="line"><a name="l01107"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"> 1107</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a> = 1,</div><div class="line"><a name="l01117"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5"> 1117</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a> = 2,</div><div class="line"><a name="l01124"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67"> 1124</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">VMA_MEMORY_USAGE_CPU_TO_GPU</a> = 3,</div><div class="line"><a name="l01133"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27"> 1133</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a> = 4,</div><div class="line"><a name="l01134"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e"> 1134</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e">VMA_MEMORY_USAGE_MAX_ENUM</a> = 0x7FFFFFFF</div><div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc">VmaMemoryUsage</a>;</div><div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160;</div><div class="line"><a name="l01138"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597"> 1138</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597">VmaAllocationCreateFlagBits</a> {</div><div class="line"><a name="l01150"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f"> 1150</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a> = 0x00000001,</div><div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160;</div><div class="line"><a name="l01161"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff"> 1161</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff">VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT</a> = 0x00000002,</div><div class="line"><a name="l01174"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f"> 1174</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> = 0x00000004,</div><div class="line"><a name="l01187"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2"> 1187</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2">VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT</a> = 0x00000008,</div><div class="line"><a name="l01194"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e"> 1194</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e">VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT</a> = 0x00000010,</div><div class="line"><a name="l01200"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520"> 1200</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a> = 0x00000020,</div><div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>&#160;</div><div class="line"><a name="l01202"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882"> 1202</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882">VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF</div><div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597">VmaAllocationCreateFlagBits</a>;</div><div class="line"><a name="l01204"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a5225e5e11f8376f6a31a1791f3d6e817"> 1204</a></span>&#160;<span class="keyword">typedef</span> VkFlags <a class="code" href="vk__mem__alloc_8h.html#a5225e5e11f8376f6a31a1791f3d6e817">VmaAllocationCreateFlags</a>;</div><div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>&#160;</div><div class="line"><a name="l01206"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html"> 1206</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160;{</div><div class="line"><a name="l01209"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b"> 1209</a></span>&#160;    VmaAllocationCreateFlags <a class="code" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a>;</div><div class="line"><a name="l01215"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910"> 1215</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#aa5846affa1e9da3800e3e78fae2305cc">VmaMemoryUsage</a> <a class="code" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a>;</div><div class="line"><a name="l01220"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90"> 1220</a></span>&#160;    VkMemoryPropertyFlags <a class="code" href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90">requiredFlags</a>;</div><div class="line"><a name="l01225"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d"> 1225</a></span>&#160;    VkMemoryPropertyFlags <a class="code" href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">preferredFlags</a>;</div><div class="line"><a name="l01233"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055"> 1233</a></span>&#160;    uint32_t <a class="code" href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055">memoryTypeBits</a>;</div><div class="line"><a name="l01239"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150"> 1239</a></span>&#160;    VmaPool <a class="code" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">pool</a>;</div><div class="line"><a name="l01246"></a><span class="lineno"><a class="line" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19"> 1246</a></span>&#160;    <span class="keywordtype">void</span>* <a class="code" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">pUserData</a>;</div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a86c44f9950b40d50088ed93a17870a7a">VmaAllocationCreateInfo</a>;</div><div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160;</div><div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#aef15a94b58fbcb0fe706d5720e84a74a">vmaFindMemoryTypeIndex</a>(</div><div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>&#160;    uint32_t memoryTypeBits,</div><div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pAllocationCreateInfo,</div><div class="line"><a name="l01269"></a><span class="lineno"> 1269</span>&#160;    uint32_t* pMemoryTypeIndex);</div><div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>&#160;</div><div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#ae790ab9ffaf7667fb8f62523e6897888">vmaFindMemoryTypeIndexForBufferInfo</a>(</div><div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160;    <span class="keyword">const</span> VkBufferCreateInfo* pBufferCreateInfo,</div><div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pAllocationCreateInfo,</div><div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>&#160;    uint32_t* pMemoryTypeIndex);</div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160;</div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#a088da83d8eaf3ce9056d9ea0b981d472">vmaFindMemoryTypeIndexForImageInfo</a>(</div><div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160;    <span class="keyword">const</span> VkImageCreateInfo* pImageCreateInfo,</div><div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pAllocationCreateInfo,</div><div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>&#160;    uint32_t* pMemoryTypeIndex);</div><div class="line"><a name="l01306"></a><span class="lineno"> 1306</span>&#160;</div><div class="line"><a name="l01308"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7"> 1308</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7">VmaPoolCreateFlagBits</a> {</div><div class="line"><a name="l01326"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2"> 1326</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2">VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT</a> = 0x00000002,</div><div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>&#160;</div><div class="line"><a name="l01328"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec"> 1328</a></span>&#160;    <a class="code" href="vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec">VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF</div><div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a9a7c45f9c863695d98c83fa5ac940fe7">VmaPoolCreateFlagBits</a>;</div><div class="line"><a name="l01330"></a><span class="lineno"><a class="line" href="vk__mem__alloc_8h.html#a2770e325ea42e087c1b91fdf46d0292a"> 1330</a></span>&#160;<span class="keyword">typedef</span> VkFlags <a class="code" href="vk__mem__alloc_8h.html#a2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a>;</div><div class="line"><a name="l01331"></a><span class="lineno"> 1331</span>&#160;</div><div class="line"><a name="l01334"></a><span class="lineno"><a class="line" href="struct_vma_pool_create_info.html"> 1334</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> {</div><div class="line"><a name="l01337"></a><span class="lineno"><a class="line" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319"> 1337</a></span>&#160;    uint32_t <a class="code" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a>;</div><div class="line"><a name="l01340"></a><span class="lineno"><a class="line" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446"> 1340</a></span>&#160;    VmaPoolCreateFlags <a class="code" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446">flags</a>;</div><div class="line"><a name="l01345"></a><span class="lineno"><a class="line" href="struct_vma_pool_create_info.html#aa4265160536cdb9be821b7686c16c676"> 1345</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_pool_create_info.html#aa4265160536cdb9be821b7686c16c676">blockSize</a>;</div><div class="line"><a name="l01350"></a><span class="lineno"><a class="line" href="struct_vma_pool_create_info.html#ad8006fb803185c0a699d30f3e9a865ae"> 1350</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="struct_vma_pool_create_info.html#ad8006fb803185c0a699d30f3e9a865ae">minBlockCount</a>;</div><div class="line"><a name="l01358"></a><span class="lineno"><a class="line" href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c"> 1358</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">maxBlockCount</a>;</div><div class="line"><a name="l01372"></a><span class="lineno"><a class="line" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa"> 1372</a></span>&#160;    uint32_t <a class="code" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa">frameInUseCount</a>;</div><div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a211706e9348dcee25a843ed4ea69bce7">VmaPoolCreateInfo</a>;</div><div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>&#160;</div><div class="line"><a name="l01377"></a><span class="lineno"><a class="line" href="struct_vma_pool_stats.html"> 1377</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_pool_stats.html">VmaPoolStats</a> {</div><div class="line"><a name="l01380"></a><span class="lineno"><a class="line" href="struct_vma_pool_stats.html#a326807b2de2b0931cee4ed9a5f2e420c"> 1380</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_pool_stats.html#a326807b2de2b0931cee4ed9a5f2e420c">size</a>;</div><div class="line"><a name="l01383"></a><span class="lineno"><a class="line" href="struct_vma_pool_stats.html#ad7c54874724fce7b06aba526202d82a8"> 1383</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_pool_stats.html#ad7c54874724fce7b06aba526202d82a8">unusedSize</a>;</div><div class="line"><a name="l01386"></a><span class="lineno"><a class="line" href="struct_vma_pool_stats.html#ad1924eb54fffa45e9e0e65670c8fe5eb"> 1386</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="struct_vma_pool_stats.html#ad1924eb54fffa45e9e0e65670c8fe5eb">allocationCount</a>;</div><div class="line"><a name="l01389"></a><span class="lineno"><a class="line" href="struct_vma_pool_stats.html#ae4f3546ffa4d1e598b64d8e6134854f4"> 1389</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="struct_vma_pool_stats.html#ae4f3546ffa4d1e598b64d8e6134854f4">unusedRangeCount</a>;</div><div class="line"><a name="l01396"></a><span class="lineno"><a class="line" href="struct_vma_pool_stats.html#ab4c8f52dd42ab01998f60f0b6acc722b"> 1396</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_pool_stats.html#ab4c8f52dd42ab01998f60f0b6acc722b">unusedRangeSizeMax</a>;</div><div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a2e5612d871d64c5624087b837a338c34">VmaPoolStats</a>;</div><div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>&#160;</div><div class="line"><a name="l01405"></a><span class="lineno"> 1405</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a>(</div><div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a>* pCreateInfo,</div><div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160;    VmaPool* pPool);</div><div class="line"><a name="l01409"></a><span class="lineno"> 1409</span>&#160;</div><div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1">vmaDestroyPool</a>(</div><div class="line"><a name="l01413"></a><span class="lineno"> 1413</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>&#160;    VmaPool pool);</div><div class="line"><a name="l01415"></a><span class="lineno"> 1415</span>&#160;</div><div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#ae8bf76997b234ef68aad922616df4153">vmaGetPoolStats</a>(</div><div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>&#160;    VmaPool pool,</div><div class="line"><a name="l01425"></a><span class="lineno"> 1425</span>&#160;    <a class="code" href="struct_vma_pool_stats.html">VmaPoolStats</a>* pPoolStats);</div><div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>&#160;</div><div class="line"><a name="l01433"></a><span class="lineno"> 1433</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a736bd6cbda886f36c891727e73bd4024">vmaMakePoolAllocationsLost</a>(</div><div class="line"><a name="l01434"></a><span class="lineno"> 1434</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>&#160;    VmaPool pool,</div><div class="line"><a name="l01436"></a><span class="lineno"> 1436</span>&#160;    <span class="keywordtype">size_t</span>* pLostAllocationCount);</div><div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>&#160;</div><div class="line"><a name="l01438"></a><span class="lineno"> 1438</span>&#160;VK_DEFINE_HANDLE(VmaAllocation)</div><div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>&#160;</div><div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>&#160;</div><div class="line"><a name="l01442"></a><span class="lineno"><a class="line" href="struct_vma_allocation_info.html"> 1442</a></span>&#160;typedef struct <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> {</div><div class="line"><a name="l01447"></a><span class="lineno"><a class="line" href="struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5"> 1447</a></span>&#160;    uint32_t <a class="code" href="struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5">memoryType</a>;</div><div class="line"><a name="l01456"></a><span class="lineno"><a class="line" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67"> 1456</a></span>&#160;    VkDeviceMemory <a class="code" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">deviceMemory</a>;</div><div class="line"><a name="l01461"></a><span class="lineno"><a class="line" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268"> 1461</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268">offset</a>;</div><div class="line"><a name="l01466"></a><span class="lineno"><a class="line" href="struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f"> 1466</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f">size</a>;</div><div class="line"><a name="l01475"></a><span class="lineno"><a class="line" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2"> 1475</a></span>&#160;    <span class="keywordtype">void</span>* <a class="code" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>;</div><div class="line"><a name="l01480"></a><span class="lineno"><a class="line" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13"> 1480</a></span>&#160;    <span class="keywordtype">void</span>* <a class="code" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a>;</div><div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#a795e6ff02a21d5486c0565f403dd9255">VmaAllocationInfo</a>;</div><div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>&#160;</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#abf28077dbf82d0908b8acbe8ee8dd9b8">vmaAllocateMemory</a>(</div><div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>&#160;    <span class="keyword">const</span> VkMemoryRequirements* pVkMemoryRequirements,</div><div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pCreateInfo,</div><div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>&#160;    VmaAllocation* pAllocation,</div><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;    <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>* pAllocationInfo);</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;</div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#a7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer</a>(</div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;    VkBuffer buffer,</div><div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pCreateInfo,</div><div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>&#160;    VmaAllocation* pAllocation,</div><div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>&#160;    <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>* pAllocationInfo);</div><div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>&#160;</div><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#a0faa3f9e5fb233d29d1e00390650febb">vmaAllocateMemoryForImage</a>(</div><div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>&#160;    VkImage image,</div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pCreateInfo,</div><div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>&#160;    VmaAllocation* pAllocation,</div><div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>&#160;    <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>* pAllocationInfo);</div><div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160;</div><div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a>(</div><div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>&#160;    VmaAllocation allocation);</div><div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>&#160;</div><div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(</div><div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>&#160;    VmaAllocation allocation,</div><div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>&#160;    <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>* pAllocationInfo);</div><div class="line"><a name="l01534"></a><span class="lineno"> 1534</span>&#160;</div><div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>&#160;VkBool32 <a class="code" href="vk__mem__alloc_8h.html#a43d8ba9673c846f049089a5029d5c73a">vmaTouchAllocation</a>(</div><div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>&#160;    VmaAllocation allocation);</div><div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>&#160;</div><div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f">vmaSetAllocationUserData</a>(</div><div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>&#160;    VmaAllocation allocation,</div><div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>&#160;    <span class="keywordtype">void</span>* pUserData);</div><div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>&#160;</div><div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#ae5c9657d9e94756269145b01c05d16f1">vmaCreateLostAllocation</a>(</div><div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>&#160;    VmaAllocation* pAllocation);</div><div class="line"><a name="l01572"></a><span class="lineno"> 1572</span>&#160;</div><div class="line"><a name="l01607"></a><span class="lineno"> 1607</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069">vmaMapMemory</a>(</div><div class="line"><a name="l01608"></a><span class="lineno"> 1608</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01609"></a><span class="lineno"> 1609</span>&#160;    VmaAllocation allocation,</div><div class="line"><a name="l01610"></a><span class="lineno"> 1610</span>&#160;    <span class="keywordtype">void</span>** ppData);</div><div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>&#160;</div><div class="line"><a name="l01616"></a><span class="lineno"> 1616</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a>(</div><div class="line"><a name="l01617"></a><span class="lineno"> 1617</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01618"></a><span class="lineno"> 1618</span>&#160;    VmaAllocation allocation);</div><div class="line"><a name="l01619"></a><span class="lineno"> 1619</span>&#160;</div><div class="line"><a name="l01621"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_info.html"> 1621</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> {</div><div class="line"><a name="l01626"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_info.html#acb311c940a777270e67e1b81c5ab6a1d"> 1626</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_defragmentation_info.html#acb311c940a777270e67e1b81c5ab6a1d">maxBytesToMove</a>;</div><div class="line"><a name="l01631"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_info.html#aa7c7304e13c71f604c907196c4e28fbc"> 1631</a></span>&#160;    uint32_t <a class="code" href="struct_vma_defragmentation_info.html#aa7c7304e13c71f604c907196c4e28fbc">maxAllocationsToMove</a>;</div><div class="line"><a name="l01632"></a><span class="lineno"> 1632</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#ae67f8573a0cf20f16f0a1eecbca566a0">VmaDefragmentationInfo</a>;</div><div class="line"><a name="l01633"></a><span class="lineno"> 1633</span>&#160;</div><div class="line"><a name="l01635"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_stats.html"> 1635</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a> {</div><div class="line"><a name="l01637"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_stats.html#a36f9d5df2a10ba2a36b16e126d60572d"> 1637</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_defragmentation_stats.html#a36f9d5df2a10ba2a36b16e126d60572d">bytesMoved</a>;</div><div class="line"><a name="l01639"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_stats.html#ab0cb9ac0dbc106c77e384ea676422f28"> 1639</a></span>&#160;    VkDeviceSize <a class="code" href="struct_vma_defragmentation_stats.html#ab0cb9ac0dbc106c77e384ea676422f28">bytesFreed</a>;</div><div class="line"><a name="l01641"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_stats.html#aefeabf130022008eadd75999478af3f9"> 1641</a></span>&#160;    uint32_t <a class="code" href="struct_vma_defragmentation_stats.html#aefeabf130022008eadd75999478af3f9">allocationsMoved</a>;</div><div class="line"><a name="l01643"></a><span class="lineno"><a class="line" href="struct_vma_defragmentation_stats.html#a0113f1877904a5d1ee8f409216ff276b"> 1643</a></span>&#160;    uint32_t <a class="code" href="struct_vma_defragmentation_stats.html#a0113f1877904a5d1ee8f409216ff276b">deviceMemoryBlocksFreed</a>;</div><div class="line"><a name="l01644"></a><span class="lineno"> 1644</span>&#160;} <a class="code" href="vk__mem__alloc_8h.html#ab0f9b06441c840fee560de4a2967f8c9">VmaDefragmentationStats</a>;</div><div class="line"><a name="l01645"></a><span class="lineno"> 1645</span>&#160;</div><div class="line"><a name="l01728"></a><span class="lineno"> 1728</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#a6aced90fcc7b39882b6654a740a0b9bb">vmaDefragment</a>(</div><div class="line"><a name="l01729"></a><span class="lineno"> 1729</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01730"></a><span class="lineno"> 1730</span>&#160;    VmaAllocation* pAllocations,</div><div class="line"><a name="l01731"></a><span class="lineno"> 1731</span>&#160;    <span class="keywordtype">size_t</span> allocationCount,</div><div class="line"><a name="l01732"></a><span class="lineno"> 1732</span>&#160;    VkBool32* pAllocationsChanged,</div><div class="line"><a name="l01733"></a><span class="lineno"> 1733</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> *pDefragmentationInfo,</div><div class="line"><a name="l01734"></a><span class="lineno"> 1734</span>&#160;    <a class="code" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a>* pDefragmentationStats);</div><div class="line"><a name="l01735"></a><span class="lineno"> 1735</span>&#160;</div><div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(</div><div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>&#160;    <span class="keyword">const</span> VkBufferCreateInfo* pBufferCreateInfo,</div><div class="line"><a name="l01765"></a><span class="lineno"> 1765</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pAllocationCreateInfo,</div><div class="line"><a name="l01766"></a><span class="lineno"> 1766</span>&#160;    VkBuffer* pBuffer,</div><div class="line"><a name="l01767"></a><span class="lineno"> 1767</span>&#160;    VmaAllocation* pAllocation,</div><div class="line"><a name="l01768"></a><span class="lineno"> 1768</span>&#160;    <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>* pAllocationInfo);</div><div class="line"><a name="l01769"></a><span class="lineno"> 1769</span>&#160;</div><div class="line"><a name="l01781"></a><span class="lineno"> 1781</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(</div><div class="line"><a name="l01782"></a><span class="lineno"> 1782</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01783"></a><span class="lineno"> 1783</span>&#160;    VkBuffer buffer,</div><div class="line"><a name="l01784"></a><span class="lineno"> 1784</span>&#160;    VmaAllocation allocation);</div><div class="line"><a name="l01785"></a><span class="lineno"> 1785</span>&#160;</div><div class="line"><a name="l01787"></a><span class="lineno"> 1787</span>&#160;VkResult <a class="code" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a>(</div><div class="line"><a name="l01788"></a><span class="lineno"> 1788</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01789"></a><span class="lineno"> 1789</span>&#160;    <span class="keyword">const</span> VkImageCreateInfo* pImageCreateInfo,</div><div class="line"><a name="l01790"></a><span class="lineno"> 1790</span>&#160;    <span class="keyword">const</span> <a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>* pAllocationCreateInfo,</div><div class="line"><a name="l01791"></a><span class="lineno"> 1791</span>&#160;    VkImage* pImage,</div><div class="line"><a name="l01792"></a><span class="lineno"> 1792</span>&#160;    VmaAllocation* pAllocation,</div><div class="line"><a name="l01793"></a><span class="lineno"> 1793</span>&#160;    <a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a>* pAllocationInfo);</div><div class="line"><a name="l01794"></a><span class="lineno"> 1794</span>&#160;</div><div class="line"><a name="l01806"></a><span class="lineno"> 1806</span>&#160;<span class="keywordtype">void</span> <a class="code" href="vk__mem__alloc_8h.html#ae50d2cb3b4a3bfd4dd40987234e50e7e">vmaDestroyImage</a>(</div><div class="line"><a name="l01807"></a><span class="lineno"> 1807</span>&#160;    VmaAllocator allocator,</div><div class="line"><a name="l01808"></a><span class="lineno"> 1808</span>&#160;    VkImage image,</div><div class="line"><a name="l01809"></a><span class="lineno"> 1809</span>&#160;    VmaAllocation allocation);</div><div class="line"><a name="l01810"></a><span class="lineno"> 1810</span>&#160;</div><div class="line"><a name="l01811"></a><span class="lineno"> 1811</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l01812"></a><span class="lineno"> 1812</span>&#160;}</div><div class="line"><a name="l01813"></a><span class="lineno"> 1813</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01814"></a><span class="lineno"> 1814</span>&#160;</div><div class="line"><a name="l01815"></a><span class="lineno"> 1815</span>&#160;<span class="preprocessor">#endif // AMD_VULKAN_MEMORY_ALLOCATOR_H</span></div><div class="line"><a name="l01816"></a><span class="lineno"> 1816</span>&#160;</div><div class="line"><a name="l01817"></a><span class="lineno"> 1817</span>&#160;<span class="comment">// For Visual Studio IntelliSense.</span></div><div class="line"><a name="l01818"></a><span class="lineno"> 1818</span>&#160;<span class="preprocessor">#ifdef __INTELLISENSE__</span></div><div class="line"><a name="l01819"></a><span class="lineno"> 1819</span>&#160;<span class="preprocessor">#define VMA_IMPLEMENTATION</span></div><div class="line"><a name="l01820"></a><span class="lineno"> 1820</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01821"></a><span class="lineno"> 1821</span>&#160;</div><div class="line"><a name="l01822"></a><span class="lineno"> 1822</span>&#160;<span class="preprocessor">#ifdef VMA_IMPLEMENTATION</span></div><div class="line"><a name="l01823"></a><span class="lineno"> 1823</span>&#160;<span class="preprocessor">#undef VMA_IMPLEMENTATION</span></div><div class="line"><a name="l01824"></a><span class="lineno"> 1824</span>&#160;</div><div class="line"><a name="l01825"></a><span class="lineno"> 1825</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div><div class="line"><a name="l01826"></a><span class="lineno"> 1826</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l01827"></a><span class="lineno"> 1827</span>&#160;<span class="preprocessor">#include &lt;cstring&gt;</span></div><div class="line"><a name="l01828"></a><span class="lineno"> 1828</span>&#160;</div><div class="line"><a name="l01829"></a><span class="lineno"> 1829</span>&#160;<span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l01830"></a><span class="lineno"> 1830</span>&#160;<span class="comment">CONFIGURATION SECTION</span></div><div class="line"><a name="l01831"></a><span class="lineno"> 1831</span>&#160;<span class="comment"></span></div><div class="line"><a name="l01832"></a><span class="lineno"> 1832</span>&#160;<span class="comment">Define some of these macros before each #include of this header or change them</span></div><div class="line"><a name="l01833"></a><span class="lineno"> 1833</span>&#160;<span class="comment">here if you need other then default behavior depending on your environment.</span></div><div class="line"><a name="l01834"></a><span class="lineno"> 1834</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l01835"></a><span class="lineno"> 1835</span>&#160;</div><div class="line"><a name="l01836"></a><span class="lineno"> 1836</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l01837"></a><span class="lineno"> 1837</span>&#160;<span class="comment">Define this macro to 1 to make the library fetch pointers to Vulkan functions</span></div><div class="line"><a name="l01838"></a><span class="lineno"> 1838</span>&#160;<span class="comment">internally, like:</span></div><div class="line"><a name="l01839"></a><span class="lineno"> 1839</span>&#160;<span class="comment"></span></div><div class="line"><a name="l01840"></a><span class="lineno"> 1840</span>&#160;<span class="comment">    vulkanFunctions.vkAllocateMemory = &amp;vkAllocateMemory;</span></div><div class="line"><a name="l01841"></a><span class="lineno"> 1841</span>&#160;<span class="comment"></span></div><div class="line"><a name="l01842"></a><span class="lineno"> 1842</span>&#160;<span class="comment">Define to 0 if you are going to provide you own pointers to Vulkan functions via</span></div><div class="line"><a name="l01843"></a><span class="lineno"> 1843</span>&#160;<span class="comment">VmaAllocatorCreateInfo::pVulkanFunctions.</span></div><div class="line"><a name="l01844"></a><span class="lineno"> 1844</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l01845"></a><span class="lineno"> 1845</span>&#160;<span class="preprocessor">#if !defined(VMA_STATIC_VULKAN_FUNCTIONS) &amp;&amp; !defined(VK_NO_PROTOTYPES)</span></div><div class="line"><a name="l01846"></a><span class="lineno"> 1846</span>&#160;<span class="preprocessor">#define VMA_STATIC_VULKAN_FUNCTIONS 1</span></div><div class="line"><a name="l01847"></a><span class="lineno"> 1847</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01848"></a><span class="lineno"> 1848</span>&#160;</div><div class="line"><a name="l01849"></a><span class="lineno"> 1849</span>&#160;<span class="comment">// Define this macro to 1 to make the library use STL containers instead of its own implementation.</span></div><div class="line"><a name="l01850"></a><span class="lineno"> 1850</span>&#160;<span class="comment">//#define VMA_USE_STL_CONTAINERS 1</span></div><div class="line"><a name="l01851"></a><span class="lineno"> 1851</span>&#160;</div><div class="line"><a name="l01852"></a><span class="lineno"> 1852</span>&#160;<span class="comment">/* Set this macro to 1 to make the library including and using STL containers:</span></div><div class="line"><a name="l01853"></a><span class="lineno"> 1853</span>&#160;<span class="comment">std::pair, std::vector, std::list, std::unordered_map.</span></div><div class="line"><a name="l01854"></a><span class="lineno"> 1854</span>&#160;<span class="comment"></span></div><div class="line"><a name="l01855"></a><span class="lineno"> 1855</span>&#160;<span class="comment">Set it to 0 or undefined to make the library using its own implementation of</span></div><div class="line"><a name="l01856"></a><span class="lineno"> 1856</span>&#160;<span class="comment">the containers.</span></div><div class="line"><a name="l01857"></a><span class="lineno"> 1857</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l01858"></a><span class="lineno"> 1858</span>&#160;<span class="preprocessor">#if VMA_USE_STL_CONTAINERS</span></div><div class="line"><a name="l01859"></a><span class="lineno"> 1859</span>&#160;<span class="preprocessor">   #define VMA_USE_STL_VECTOR 1</span></div><div class="line"><a name="l01860"></a><span class="lineno"> 1860</span>&#160;<span class="preprocessor">   #define VMA_USE_STL_UNORDERED_MAP 1</span></div><div class="line"><a name="l01861"></a><span class="lineno"> 1861</span>&#160;<span class="preprocessor">   #define VMA_USE_STL_LIST 1</span></div><div class="line"><a name="l01862"></a><span class="lineno"> 1862</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01863"></a><span class="lineno"> 1863</span>&#160;</div><div class="line"><a name="l01864"></a><span class="lineno"> 1864</span>&#160;<span class="preprocessor">#if VMA_USE_STL_VECTOR</span></div><div class="line"><a name="l01865"></a><span class="lineno"> 1865</span>&#160;<span class="preprocessor">   #include &lt;vector&gt;</span></div><div class="line"><a name="l01866"></a><span class="lineno"> 1866</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01867"></a><span class="lineno"> 1867</span>&#160;</div><div class="line"><a name="l01868"></a><span class="lineno"> 1868</span>&#160;<span class="preprocessor">#if VMA_USE_STL_UNORDERED_MAP</span></div><div class="line"><a name="l01869"></a><span class="lineno"> 1869</span>&#160;<span class="preprocessor">   #include &lt;unordered_map&gt;</span></div><div class="line"><a name="l01870"></a><span class="lineno"> 1870</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01871"></a><span class="lineno"> 1871</span>&#160;</div><div class="line"><a name="l01872"></a><span class="lineno"> 1872</span>&#160;<span class="preprocessor">#if VMA_USE_STL_LIST</span></div><div class="line"><a name="l01873"></a><span class="lineno"> 1873</span>&#160;<span class="preprocessor">   #include &lt;list&gt;</span></div><div class="line"><a name="l01874"></a><span class="lineno"> 1874</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01875"></a><span class="lineno"> 1875</span>&#160;</div><div class="line"><a name="l01876"></a><span class="lineno"> 1876</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l01877"></a><span class="lineno"> 1877</span>&#160;<span class="comment">Following headers are used in this CONFIGURATION section only, so feel free to</span></div><div class="line"><a name="l01878"></a><span class="lineno"> 1878</span>&#160;<span class="comment">remove them if not needed.</span></div><div class="line"><a name="l01879"></a><span class="lineno"> 1879</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l01880"></a><span class="lineno"> 1880</span>&#160;<span class="preprocessor">#include &lt;cassert&gt;</span> <span class="comment">// for assert</span></div><div class="line"><a name="l01881"></a><span class="lineno"> 1881</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span> <span class="comment">// for min, max</span></div><div class="line"><a name="l01882"></a><span class="lineno"> 1882</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span> <span class="comment">// for std::mutex</span></div><div class="line"><a name="l01883"></a><span class="lineno"> 1883</span>&#160;<span class="preprocessor">#include &lt;atomic&gt;</span> <span class="comment">// for std::atomic</span></div><div class="line"><a name="l01884"></a><span class="lineno"> 1884</span>&#160;</div><div class="line"><a name="l01885"></a><span class="lineno"> 1885</span>&#160;<span class="preprocessor">#if !defined(_WIN32) &amp;&amp; !defined(__APPLE__)</span></div><div class="line"><a name="l01886"></a><span class="lineno"> 1886</span>&#160;<span class="preprocessor">    #include &lt;malloc.h&gt;</span> <span class="comment">// for aligned_alloc()</span></div><div class="line"><a name="l01887"></a><span class="lineno"> 1887</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01888"></a><span class="lineno"> 1888</span>&#160;</div><div class="line"><a name="l01889"></a><span class="lineno"> 1889</span>&#160;<span class="preprocessor">#ifndef VMA_NULL</span></div><div class="line"><a name="l01890"></a><span class="lineno"> 1890</span>&#160;   <span class="comment">// Value used as null pointer. Define it to e.g.: nullptr, NULL, 0, (void*)0.</span></div><div class="line"><a name="l01891"></a><span class="lineno"> 1891</span>&#160;<span class="preprocessor">   #define VMA_NULL   nullptr</span></div><div class="line"><a name="l01892"></a><span class="lineno"> 1892</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01893"></a><span class="lineno"> 1893</span>&#160;</div><div class="line"><a name="l01894"></a><span class="lineno"> 1894</span>&#160;<span class="preprocessor">#if defined(__APPLE__)</span></div><div class="line"><a name="l01895"></a><span class="lineno"> 1895</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l01896"></a><span class="lineno"> 1896</span>&#160;<span class="keywordtype">void</span> *aligned_alloc(<span class="keywordtype">size_t</span> alignment, <span class="keywordtype">size_t</span> size)</div><div class="line"><a name="l01897"></a><span class="lineno"> 1897</span>&#160;{</div><div class="line"><a name="l01898"></a><span class="lineno"> 1898</span>&#160;    <span class="comment">// alignment must be &gt;= sizeof(void*)</span></div><div class="line"><a name="l01899"></a><span class="lineno"> 1899</span>&#160;    <span class="keywordflow">if</span>(alignment &lt; <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*))</div><div class="line"><a name="l01900"></a><span class="lineno"> 1900</span>&#160;    {</div><div class="line"><a name="l01901"></a><span class="lineno"> 1901</span>&#160;        alignment = <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*);</div><div class="line"><a name="l01902"></a><span class="lineno"> 1902</span>&#160;    }</div><div class="line"><a name="l01903"></a><span class="lineno"> 1903</span>&#160;</div><div class="line"><a name="l01904"></a><span class="lineno"> 1904</span>&#160;    <span class="keywordtype">void</span> *pointer;</div><div class="line"><a name="l01905"></a><span class="lineno"> 1905</span>&#160;    <span class="keywordflow">if</span>(posix_memalign(&amp;pointer, alignment, size) == 0)</div><div class="line"><a name="l01906"></a><span class="lineno"> 1906</span>&#160;        <span class="keywordflow">return</span> pointer;</div><div class="line"><a name="l01907"></a><span class="lineno"> 1907</span>&#160;    <span class="keywordflow">return</span> VMA_NULL;</div><div class="line"><a name="l01908"></a><span class="lineno"> 1908</span>&#160;}</div><div class="line"><a name="l01909"></a><span class="lineno"> 1909</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01910"></a><span class="lineno"> 1910</span>&#160;</div><div class="line"><a name="l01911"></a><span class="lineno"> 1911</span>&#160;<span class="comment">// Normal assert to check for programmer&#39;s errors, especially in Debug configuration.</span></div><div class="line"><a name="l01912"></a><span class="lineno"> 1912</span>&#160;<span class="preprocessor">#ifndef VMA_ASSERT</span></div><div class="line"><a name="l01913"></a><span class="lineno"> 1913</span>&#160;<span class="preprocessor">   #ifdef _DEBUG</span></div><div class="line"><a name="l01914"></a><span class="lineno"> 1914</span>&#160;<span class="preprocessor">       #define VMA_ASSERT(expr)         assert(expr)</span></div><div class="line"><a name="l01915"></a><span class="lineno"> 1915</span>&#160;<span class="preprocessor">   #else</span></div><div class="line"><a name="l01916"></a><span class="lineno"> 1916</span>&#160;<span class="preprocessor">       #define VMA_ASSERT(expr)</span></div><div class="line"><a name="l01917"></a><span class="lineno"> 1917</span>&#160;<span class="preprocessor">   #endif</span></div><div class="line"><a name="l01918"></a><span class="lineno"> 1918</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01919"></a><span class="lineno"> 1919</span>&#160;</div><div class="line"><a name="l01920"></a><span class="lineno"> 1920</span>&#160;<span class="comment">// Assert that will be called very often, like inside data structures e.g. operator[].</span></div><div class="line"><a name="l01921"></a><span class="lineno"> 1921</span>&#160;<span class="comment">// Making it non-empty can make program slow.</span></div><div class="line"><a name="l01922"></a><span class="lineno"> 1922</span>&#160;<span class="preprocessor">#ifndef VMA_HEAVY_ASSERT</span></div><div class="line"><a name="l01923"></a><span class="lineno"> 1923</span>&#160;<span class="preprocessor">   #ifdef _DEBUG</span></div><div class="line"><a name="l01924"></a><span class="lineno"> 1924</span>&#160;<span class="preprocessor">       #define VMA_HEAVY_ASSERT(expr)   //VMA_ASSERT(expr)</span></div><div class="line"><a name="l01925"></a><span class="lineno"> 1925</span>&#160;<span class="preprocessor">   #else</span></div><div class="line"><a name="l01926"></a><span class="lineno"> 1926</span>&#160;<span class="preprocessor">       #define VMA_HEAVY_ASSERT(expr)</span></div><div class="line"><a name="l01927"></a><span class="lineno"> 1927</span>&#160;<span class="preprocessor">   #endif</span></div><div class="line"><a name="l01928"></a><span class="lineno"> 1928</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01929"></a><span class="lineno"> 1929</span>&#160;</div><div class="line"><a name="l01930"></a><span class="lineno"> 1930</span>&#160;<span class="preprocessor">#ifndef VMA_ALIGN_OF</span></div><div class="line"><a name="l01931"></a><span class="lineno"> 1931</span>&#160;<span class="preprocessor">   #define VMA_ALIGN_OF(type)       (__alignof(type))</span></div><div class="line"><a name="l01932"></a><span class="lineno"> 1932</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01933"></a><span class="lineno"> 1933</span>&#160;</div><div class="line"><a name="l01934"></a><span class="lineno"> 1934</span>&#160;<span class="preprocessor">#ifndef VMA_SYSTEM_ALIGNED_MALLOC</span></div><div class="line"><a name="l01935"></a><span class="lineno"> 1935</span>&#160;<span class="preprocessor">   #if defined(_WIN32)</span></div><div class="line"><a name="l01936"></a><span class="lineno"> 1936</span>&#160;<span class="preprocessor">       #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment)   (_aligned_malloc((size), (alignment)))</span></div><div class="line"><a name="l01937"></a><span class="lineno"> 1937</span>&#160;<span class="preprocessor">   #else</span></div><div class="line"><a name="l01938"></a><span class="lineno"> 1938</span>&#160;<span class="preprocessor">       #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment)   (aligned_alloc((alignment), (size) ))</span></div><div class="line"><a name="l01939"></a><span class="lineno"> 1939</span>&#160;<span class="preprocessor">   #endif</span></div><div class="line"><a name="l01940"></a><span class="lineno"> 1940</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01941"></a><span class="lineno"> 1941</span>&#160;</div><div class="line"><a name="l01942"></a><span class="lineno"> 1942</span>&#160;<span class="preprocessor">#ifndef VMA_SYSTEM_FREE</span></div><div class="line"><a name="l01943"></a><span class="lineno"> 1943</span>&#160;<span class="preprocessor">   #if defined(_WIN32)</span></div><div class="line"><a name="l01944"></a><span class="lineno"> 1944</span>&#160;<span class="preprocessor">       #define VMA_SYSTEM_FREE(ptr)   _aligned_free(ptr)</span></div><div class="line"><a name="l01945"></a><span class="lineno"> 1945</span>&#160;<span class="preprocessor">   #else</span></div><div class="line"><a name="l01946"></a><span class="lineno"> 1946</span>&#160;<span class="preprocessor">       #define VMA_SYSTEM_FREE(ptr)   free(ptr)</span></div><div class="line"><a name="l01947"></a><span class="lineno"> 1947</span>&#160;<span class="preprocessor">   #endif</span></div><div class="line"><a name="l01948"></a><span class="lineno"> 1948</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01949"></a><span class="lineno"> 1949</span>&#160;</div><div class="line"><a name="l01950"></a><span class="lineno"> 1950</span>&#160;<span class="preprocessor">#ifndef VMA_MIN</span></div><div class="line"><a name="l01951"></a><span class="lineno"> 1951</span>&#160;<span class="preprocessor">   #define VMA_MIN(v1, v2)    (std::min((v1), (v2)))</span></div><div class="line"><a name="l01952"></a><span class="lineno"> 1952</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01953"></a><span class="lineno"> 1953</span>&#160;</div><div class="line"><a name="l01954"></a><span class="lineno"> 1954</span>&#160;<span class="preprocessor">#ifndef VMA_MAX</span></div><div class="line"><a name="l01955"></a><span class="lineno"> 1955</span>&#160;<span class="preprocessor">   #define VMA_MAX(v1, v2)    (std::max((v1), (v2)))</span></div><div class="line"><a name="l01956"></a><span class="lineno"> 1956</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01957"></a><span class="lineno"> 1957</span>&#160;</div><div class="line"><a name="l01958"></a><span class="lineno"> 1958</span>&#160;<span class="preprocessor">#ifndef VMA_SWAP</span></div><div class="line"><a name="l01959"></a><span class="lineno"> 1959</span>&#160;<span class="preprocessor">   #define VMA_SWAP(v1, v2)   std::swap((v1), (v2))</span></div><div class="line"><a name="l01960"></a><span class="lineno"> 1960</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01961"></a><span class="lineno"> 1961</span>&#160;</div><div class="line"><a name="l01962"></a><span class="lineno"> 1962</span>&#160;<span class="preprocessor">#ifndef VMA_SORT</span></div><div class="line"><a name="l01963"></a><span class="lineno"> 1963</span>&#160;<span class="preprocessor">   #define VMA_SORT(beg, end, cmp)  std::sort(beg, end, cmp)</span></div><div class="line"><a name="l01964"></a><span class="lineno"> 1964</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01965"></a><span class="lineno"> 1965</span>&#160;</div><div class="line"><a name="l01966"></a><span class="lineno"> 1966</span>&#160;<span class="preprocessor">#ifndef VMA_DEBUG_LOG</span></div><div class="line"><a name="l01967"></a><span class="lineno"> 1967</span>&#160;<span class="preprocessor">   #define VMA_DEBUG_LOG(format, ...)</span></div><div class="line"><a name="l01968"></a><span class="lineno"> 1968</span>&#160;   <span class="comment">/*</span></div><div class="line"><a name="l01969"></a><span class="lineno"> 1969</span>&#160;<span class="comment">   #define VMA_DEBUG_LOG(format, ...) do { \</span></div><div class="line"><a name="l01970"></a><span class="lineno"> 1970</span>&#160;<span class="comment">       printf(format, __VA_ARGS__); \</span></div><div class="line"><a name="l01971"></a><span class="lineno"> 1971</span>&#160;<span class="comment">       printf(&quot;\n&quot;); \</span></div><div class="line"><a name="l01972"></a><span class="lineno"> 1972</span>&#160;<span class="comment">   } while(false)</span></div><div class="line"><a name="l01973"></a><span class="lineno"> 1973</span>&#160;<span class="comment">   */</span></div><div class="line"><a name="l01974"></a><span class="lineno"> 1974</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01975"></a><span class="lineno"> 1975</span>&#160;</div><div class="line"><a name="l01976"></a><span class="lineno"> 1976</span>&#160;<span class="comment">// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.</span></div><div class="line"><a name="l01977"></a><span class="lineno"> 1977</span>&#160;<span class="preprocessor">#if VMA_STATS_STRING_ENABLED</span></div><div class="line"><a name="l01978"></a><span class="lineno"> 1978</span>&#160;   <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> VmaUint32ToStr(<span class="keywordtype">char</span>* outStr, <span class="keywordtype">size_t</span> strLen, uint32_t num)</div><div class="line"><a name="l01979"></a><span class="lineno"> 1979</span>&#160;   {</div><div class="line"><a name="l01980"></a><span class="lineno"> 1980</span>&#160;       snprintf(outStr, strLen, <span class="stringliteral">&quot;%u&quot;</span>, static_cast&lt;unsigned int&gt;(num));</div><div class="line"><a name="l01981"></a><span class="lineno"> 1981</span>&#160;   }</div><div class="line"><a name="l01982"></a><span class="lineno"> 1982</span>&#160;   <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> VmaUint64ToStr(<span class="keywordtype">char</span>* outStr, <span class="keywordtype">size_t</span> strLen, uint64_t num)</div><div class="line"><a name="l01983"></a><span class="lineno"> 1983</span>&#160;   {</div><div class="line"><a name="l01984"></a><span class="lineno"> 1984</span>&#160;       snprintf(outStr, strLen, <span class="stringliteral">&quot;%llu&quot;</span>, static_cast&lt;unsigned long long&gt;(num));</div><div class="line"><a name="l01985"></a><span class="lineno"> 1985</span>&#160;   }</div><div class="line"><a name="l01986"></a><span class="lineno"> 1986</span>&#160;   <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> VmaPtrToStr(<span class="keywordtype">char</span>* outStr, <span class="keywordtype">size_t</span> strLen, <span class="keyword">const</span> <span class="keywordtype">void</span>* ptr)</div><div class="line"><a name="l01987"></a><span class="lineno"> 1987</span>&#160;   {</div><div class="line"><a name="l01988"></a><span class="lineno"> 1988</span>&#160;       snprintf(outStr, strLen, <span class="stringliteral">&quot;%p&quot;</span>, ptr);</div><div class="line"><a name="l01989"></a><span class="lineno"> 1989</span>&#160;   }</div><div class="line"><a name="l01990"></a><span class="lineno"> 1990</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l01991"></a><span class="lineno"> 1991</span>&#160;</div><div class="line"><a name="l01992"></a><span class="lineno"> 1992</span>&#160;<span class="preprocessor">#ifndef VMA_MUTEX</span></div><div class="line"><a name="l01993"></a><span class="lineno"> 1993</span>&#160;   <span class="keyword">class </span>VmaMutex</div><div class="line"><a name="l01994"></a><span class="lineno"> 1994</span>&#160;   {</div><div class="line"><a name="l01995"></a><span class="lineno"> 1995</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l01996"></a><span class="lineno"> 1996</span>&#160;       VmaMutex() { }</div><div class="line"><a name="l01997"></a><span class="lineno"> 1997</span>&#160;       ~VmaMutex() { }</div><div class="line"><a name="l01998"></a><span class="lineno"> 1998</span>&#160;       <span class="keywordtype">void</span> Lock() { m_Mutex.lock(); }</div><div class="line"><a name="l01999"></a><span class="lineno"> 1999</span>&#160;       <span class="keywordtype">void</span> Unlock() { m_Mutex.unlock(); }</div><div class="line"><a name="l02000"></a><span class="lineno"> 2000</span>&#160;   <span class="keyword">private</span>:</div><div class="line"><a name="l02001"></a><span class="lineno"> 2001</span>&#160;       std::mutex m_Mutex;</div><div class="line"><a name="l02002"></a><span class="lineno"> 2002</span>&#160;   };</div><div class="line"><a name="l02003"></a><span class="lineno"> 2003</span>&#160;<span class="preprocessor">   #define VMA_MUTEX VmaMutex</span></div><div class="line"><a name="l02004"></a><span class="lineno"> 2004</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02005"></a><span class="lineno"> 2005</span>&#160;</div><div class="line"><a name="l02006"></a><span class="lineno"> 2006</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02007"></a><span class="lineno"> 2007</span>&#160;<span class="comment">If providing your own implementation, you need to implement a subset of std::atomic:</span></div><div class="line"><a name="l02008"></a><span class="lineno"> 2008</span>&#160;<span class="comment"></span></div><div class="line"><a name="l02009"></a><span class="lineno"> 2009</span>&#160;<span class="comment">- Constructor(uint32_t desired)</span></div><div class="line"><a name="l02010"></a><span class="lineno"> 2010</span>&#160;<span class="comment">- uint32_t load() const</span></div><div class="line"><a name="l02011"></a><span class="lineno"> 2011</span>&#160;<span class="comment">- void store(uint32_t desired)</span></div><div class="line"><a name="l02012"></a><span class="lineno"> 2012</span>&#160;<span class="comment">- bool compare_exchange_weak(uint32_t&amp; expected, uint32_t desired)</span></div><div class="line"><a name="l02013"></a><span class="lineno"> 2013</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l02014"></a><span class="lineno"> 2014</span>&#160;<span class="preprocessor">#ifndef VMA_ATOMIC_UINT32</span></div><div class="line"><a name="l02015"></a><span class="lineno"> 2015</span>&#160;<span class="preprocessor">   #define VMA_ATOMIC_UINT32 std::atomic&lt;uint32_t&gt;</span></div><div class="line"><a name="l02016"></a><span class="lineno"> 2016</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02017"></a><span class="lineno"> 2017</span>&#160;</div><div class="line"><a name="l02018"></a><span class="lineno"> 2018</span>&#160;<span class="preprocessor">#ifndef VMA_BEST_FIT</span></div><div class="line"><a name="l02019"></a><span class="lineno"> 2019</span>&#160;</div><div class="line"><a name="l02031"></a><span class="lineno"> 2031</span>&#160;<span class="preprocessor">   #define VMA_BEST_FIT (1)</span></div><div class="line"><a name="l02032"></a><span class="lineno"> 2032</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02033"></a><span class="lineno"> 2033</span>&#160;</div><div class="line"><a name="l02034"></a><span class="lineno"> 2034</span>&#160;<span class="preprocessor">#ifndef VMA_DEBUG_ALWAYS_DEDICATED_MEMORY</span></div><div class="line"><a name="l02035"></a><span class="lineno"> 2035</span>&#160;</div><div class="line"><a name="l02039"></a><span class="lineno"> 2039</span>&#160;<span class="preprocessor">   #define VMA_DEBUG_ALWAYS_DEDICATED_MEMORY (0)</span></div><div class="line"><a name="l02040"></a><span class="lineno"> 2040</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02041"></a><span class="lineno"> 2041</span>&#160;</div><div class="line"><a name="l02042"></a><span class="lineno"> 2042</span>&#160;<span class="preprocessor">#ifndef VMA_DEBUG_ALIGNMENT</span></div><div class="line"><a name="l02043"></a><span class="lineno"> 2043</span>&#160;</div><div class="line"><a name="l02047"></a><span class="lineno"> 2047</span>&#160;<span class="preprocessor">   #define VMA_DEBUG_ALIGNMENT (1)</span></div><div class="line"><a name="l02048"></a><span class="lineno"> 2048</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02049"></a><span class="lineno"> 2049</span>&#160;</div><div class="line"><a name="l02050"></a><span class="lineno"> 2050</span>&#160;<span class="preprocessor">#ifndef VMA_DEBUG_MARGIN</span></div><div class="line"><a name="l02051"></a><span class="lineno"> 2051</span>&#160;</div><div class="line"><a name="l02055"></a><span class="lineno"> 2055</span>&#160;<span class="preprocessor">   #define VMA_DEBUG_MARGIN (0)</span></div><div class="line"><a name="l02056"></a><span class="lineno"> 2056</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02057"></a><span class="lineno"> 2057</span>&#160;</div><div class="line"><a name="l02058"></a><span class="lineno"> 2058</span>&#160;<span class="preprocessor">#ifndef VMA_DEBUG_GLOBAL_MUTEX</span></div><div class="line"><a name="l02059"></a><span class="lineno"> 2059</span>&#160;</div><div class="line"><a name="l02063"></a><span class="lineno"> 2063</span>&#160;<span class="preprocessor">   #define VMA_DEBUG_GLOBAL_MUTEX (0)</span></div><div class="line"><a name="l02064"></a><span class="lineno"> 2064</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02065"></a><span class="lineno"> 2065</span>&#160;</div><div class="line"><a name="l02066"></a><span class="lineno"> 2066</span>&#160;<span class="preprocessor">#ifndef VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY</span></div><div class="line"><a name="l02067"></a><span class="lineno"> 2067</span>&#160;</div><div class="line"><a name="l02071"></a><span class="lineno"> 2071</span>&#160;<span class="preprocessor">   #define VMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY (1)</span></div><div class="line"><a name="l02072"></a><span class="lineno"> 2072</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02073"></a><span class="lineno"> 2073</span>&#160;</div><div class="line"><a name="l02074"></a><span class="lineno"> 2074</span>&#160;<span class="preprocessor">#ifndef VMA_SMALL_HEAP_MAX_SIZE</span></div><div class="line"><a name="l02075"></a><span class="lineno"> 2075</span>&#160;<span class="preprocessor">   #define VMA_SMALL_HEAP_MAX_SIZE (1024ull * 1024 * 1024)</span></div><div class="line"><a name="l02077"></a><span class="lineno"> 2077</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02078"></a><span class="lineno"> 2078</span>&#160;</div><div class="line"><a name="l02079"></a><span class="lineno"> 2079</span>&#160;<span class="preprocessor">#ifndef VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE</span></div><div class="line"><a name="l02080"></a><span class="lineno"> 2080</span>&#160;<span class="preprocessor">   #define VMA_DEFAULT_LARGE_HEAP_BLOCK_SIZE (256ull * 1024 * 1024)</span></div><div class="line"><a name="l02082"></a><span class="lineno"> 2082</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02083"></a><span class="lineno"> 2083</span>&#160;</div><div class="line"><a name="l02084"></a><span class="lineno"> 2084</span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> uint32_t VMA_FRAME_INDEX_LOST = UINT32_MAX;</div><div class="line"><a name="l02085"></a><span class="lineno"> 2085</span>&#160;</div><div class="line"><a name="l02086"></a><span class="lineno"> 2086</span>&#160;<span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l02087"></a><span class="lineno"> 2087</span>&#160;<span class="comment">END OF CONFIGURATION</span></div><div class="line"><a name="l02088"></a><span class="lineno"> 2088</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l02089"></a><span class="lineno"> 2089</span>&#160;</div><div class="line"><a name="l02090"></a><span class="lineno"> 2090</span>&#160;<span class="keyword">static</span> VkAllocationCallbacks VmaEmptyAllocationCallbacks = {</div><div class="line"><a name="l02091"></a><span class="lineno"> 2091</span>&#160;    VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL, VMA_NULL };</div><div class="line"><a name="l02092"></a><span class="lineno"> 2092</span>&#160;</div><div class="line"><a name="l02093"></a><span class="lineno"> 2093</span>&#160;<span class="comment">// Returns number of bits set to 1 in (v).</span></div><div class="line"><a name="l02094"></a><span class="lineno"> 2094</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> uint32_t VmaCountBitsSet(uint32_t v)</div><div class="line"><a name="l02095"></a><span class="lineno"> 2095</span>&#160;{</div><div class="line"><a name="l02096"></a><span class="lineno"> 2096</span>&#160;    uint32_t c = v - ((v &gt;&gt; 1) &amp; 0x55555555);</div><div class="line"><a name="l02097"></a><span class="lineno"> 2097</span>&#160;    c = ((c &gt;&gt;  2) &amp; 0x33333333) + (c &amp; 0x33333333);</div><div class="line"><a name="l02098"></a><span class="lineno"> 2098</span>&#160;    c = ((c &gt;&gt;  4) + c) &amp; 0x0F0F0F0F;</div><div class="line"><a name="l02099"></a><span class="lineno"> 2099</span>&#160;    c = ((c &gt;&gt;  8) + c) &amp; 0x00FF00FF;</div><div class="line"><a name="l02100"></a><span class="lineno"> 2100</span>&#160;    c = ((c &gt;&gt; 16) + c) &amp; 0x0000FFFF;</div><div class="line"><a name="l02101"></a><span class="lineno"> 2101</span>&#160;    <span class="keywordflow">return</span> c;</div><div class="line"><a name="l02102"></a><span class="lineno"> 2102</span>&#160;}</div><div class="line"><a name="l02103"></a><span class="lineno"> 2103</span>&#160;</div><div class="line"><a name="l02104"></a><span class="lineno"> 2104</span>&#160;<span class="comment">// Aligns given value up to nearest multiply of align value. For example: VmaAlignUp(11, 8) = 16.</span></div><div class="line"><a name="l02105"></a><span class="lineno"> 2105</span>&#160;<span class="comment">// Use types like uint32_t, uint64_t as T.</span></div><div class="line"><a name="l02106"></a><span class="lineno"> 2106</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02107"></a><span class="lineno"> 2107</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> T VmaAlignUp(T val, T align)</div><div class="line"><a name="l02108"></a><span class="lineno"> 2108</span>&#160;{</div><div class="line"><a name="l02109"></a><span class="lineno"> 2109</span>&#160;    <span class="keywordflow">return</span> (val + align - 1) / align * align;</div><div class="line"><a name="l02110"></a><span class="lineno"> 2110</span>&#160;}</div><div class="line"><a name="l02111"></a><span class="lineno"> 2111</span>&#160;</div><div class="line"><a name="l02112"></a><span class="lineno"> 2112</span>&#160;<span class="comment">// Division with mathematical rounding to nearest number.</span></div><div class="line"><a name="l02113"></a><span class="lineno"> 2113</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02114"></a><span class="lineno"> 2114</span>&#160;<span class="keyword">inline</span> T VmaRoundDiv(T x, T y)</div><div class="line"><a name="l02115"></a><span class="lineno"> 2115</span>&#160;{</div><div class="line"><a name="l02116"></a><span class="lineno"> 2116</span>&#160;    <span class="keywordflow">return</span> (x + (y / (T)2)) / y;</div><div class="line"><a name="l02117"></a><span class="lineno"> 2117</span>&#160;}</div><div class="line"><a name="l02118"></a><span class="lineno"> 2118</span>&#160;</div><div class="line"><a name="l02119"></a><span class="lineno"> 2119</span>&#160;<span class="preprocessor">#ifndef VMA_SORT</span></div><div class="line"><a name="l02120"></a><span class="lineno"> 2120</span>&#160;</div><div class="line"><a name="l02121"></a><span class="lineno"> 2121</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Compare&gt;</div><div class="line"><a name="l02122"></a><span class="lineno"> 2122</span>&#160;Iterator VmaQuickSortPartition(Iterator beg, Iterator end, Compare cmp)</div><div class="line"><a name="l02123"></a><span class="lineno"> 2123</span>&#160;{</div><div class="line"><a name="l02124"></a><span class="lineno"> 2124</span>&#160;    Iterator centerValue = end; --centerValue;</div><div class="line"><a name="l02125"></a><span class="lineno"> 2125</span>&#160;    Iterator insertIndex = beg;</div><div class="line"><a name="l02126"></a><span class="lineno"> 2126</span>&#160;    <span class="keywordflow">for</span>(Iterator memTypeIndex = beg; memTypeIndex &lt; centerValue; ++memTypeIndex)</div><div class="line"><a name="l02127"></a><span class="lineno"> 2127</span>&#160;    {</div><div class="line"><a name="l02128"></a><span class="lineno"> 2128</span>&#160;        <span class="keywordflow">if</span>(cmp(*memTypeIndex, *centerValue))</div><div class="line"><a name="l02129"></a><span class="lineno"> 2129</span>&#160;        {</div><div class="line"><a name="l02130"></a><span class="lineno"> 2130</span>&#160;            <span class="keywordflow">if</span>(insertIndex != memTypeIndex)</div><div class="line"><a name="l02131"></a><span class="lineno"> 2131</span>&#160;            {</div><div class="line"><a name="l02132"></a><span class="lineno"> 2132</span>&#160;                VMA_SWAP(*memTypeIndex, *insertIndex);</div><div class="line"><a name="l02133"></a><span class="lineno"> 2133</span>&#160;            }</div><div class="line"><a name="l02134"></a><span class="lineno"> 2134</span>&#160;            ++insertIndex;</div><div class="line"><a name="l02135"></a><span class="lineno"> 2135</span>&#160;        }</div><div class="line"><a name="l02136"></a><span class="lineno"> 2136</span>&#160;    }</div><div class="line"><a name="l02137"></a><span class="lineno"> 2137</span>&#160;    <span class="keywordflow">if</span>(insertIndex != centerValue)</div><div class="line"><a name="l02138"></a><span class="lineno"> 2138</span>&#160;    {</div><div class="line"><a name="l02139"></a><span class="lineno"> 2139</span>&#160;        VMA_SWAP(*insertIndex, *centerValue);</div><div class="line"><a name="l02140"></a><span class="lineno"> 2140</span>&#160;    }</div><div class="line"><a name="l02141"></a><span class="lineno"> 2141</span>&#160;    <span class="keywordflow">return</span> insertIndex;</div><div class="line"><a name="l02142"></a><span class="lineno"> 2142</span>&#160;}</div><div class="line"><a name="l02143"></a><span class="lineno"> 2143</span>&#160;</div><div class="line"><a name="l02144"></a><span class="lineno"> 2144</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> Compare&gt;</div><div class="line"><a name="l02145"></a><span class="lineno"> 2145</span>&#160;<span class="keywordtype">void</span> VmaQuickSort(Iterator beg, Iterator end, Compare cmp)</div><div class="line"><a name="l02146"></a><span class="lineno"> 2146</span>&#160;{</div><div class="line"><a name="l02147"></a><span class="lineno"> 2147</span>&#160;    <span class="keywordflow">if</span>(beg &lt; end)</div><div class="line"><a name="l02148"></a><span class="lineno"> 2148</span>&#160;    {</div><div class="line"><a name="l02149"></a><span class="lineno"> 2149</span>&#160;        Iterator it = VmaQuickSortPartition&lt;Iterator, Compare&gt;(beg, end, cmp);</div><div class="line"><a name="l02150"></a><span class="lineno"> 2150</span>&#160;        VmaQuickSort&lt;Iterator, Compare&gt;(beg, it, cmp);</div><div class="line"><a name="l02151"></a><span class="lineno"> 2151</span>&#160;        VmaQuickSort&lt;Iterator, Compare&gt;(it + 1, end, cmp);</div><div class="line"><a name="l02152"></a><span class="lineno"> 2152</span>&#160;    }</div><div class="line"><a name="l02153"></a><span class="lineno"> 2153</span>&#160;}</div><div class="line"><a name="l02154"></a><span class="lineno"> 2154</span>&#160;</div><div class="line"><a name="l02155"></a><span class="lineno"> 2155</span>&#160;<span class="preprocessor">#define VMA_SORT(beg, end, cmp) VmaQuickSort(beg, end, cmp)</span></div><div class="line"><a name="l02156"></a><span class="lineno"> 2156</span>&#160;</div><div class="line"><a name="l02157"></a><span class="lineno"> 2157</span>&#160;<span class="preprocessor">#endif // #ifndef VMA_SORT</span></div><div class="line"><a name="l02158"></a><span class="lineno"> 2158</span>&#160;</div><div class="line"><a name="l02159"></a><span class="lineno"> 2159</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02160"></a><span class="lineno"> 2160</span>&#160;<span class="comment">Returns true if two memory blocks occupy overlapping pages.</span></div><div class="line"><a name="l02161"></a><span class="lineno"> 2161</span>&#160;<span class="comment">ResourceA must be in less memory offset than ResourceB.</span></div><div class="line"><a name="l02162"></a><span class="lineno"> 2162</span>&#160;<span class="comment"></span></div><div class="line"><a name="l02163"></a><span class="lineno"> 2163</span>&#160;<span class="comment">Algorithm is based on &quot;Vulkan 1.0.39 - A Specification (with all registered Vulkan extensions)&quot;</span></div><div class="line"><a name="l02164"></a><span class="lineno"> 2164</span>&#160;<span class="comment">chapter 11.6 &quot;Resource Memory Association&quot;, paragraph &quot;Buffer-Image Granularity&quot;.</span></div><div class="line"><a name="l02165"></a><span class="lineno"> 2165</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l02166"></a><span class="lineno"> 2166</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> VmaBlocksOnSamePage(</div><div class="line"><a name="l02167"></a><span class="lineno"> 2167</span>&#160;    VkDeviceSize resourceAOffset,</div><div class="line"><a name="l02168"></a><span class="lineno"> 2168</span>&#160;    VkDeviceSize resourceASize,</div><div class="line"><a name="l02169"></a><span class="lineno"> 2169</span>&#160;    VkDeviceSize resourceBOffset,</div><div class="line"><a name="l02170"></a><span class="lineno"> 2170</span>&#160;    VkDeviceSize pageSize)</div><div class="line"><a name="l02171"></a><span class="lineno"> 2171</span>&#160;{</div><div class="line"><a name="l02172"></a><span class="lineno"> 2172</span>&#160;    VMA_ASSERT(resourceAOffset + resourceASize &lt;= resourceBOffset &amp;&amp; resourceASize &gt; 0 &amp;&amp; pageSize &gt; 0);</div><div class="line"><a name="l02173"></a><span class="lineno"> 2173</span>&#160;    VkDeviceSize resourceAEnd = resourceAOffset + resourceASize - 1;</div><div class="line"><a name="l02174"></a><span class="lineno"> 2174</span>&#160;    VkDeviceSize resourceAEndPage = resourceAEnd &amp; ~(pageSize - 1);</div><div class="line"><a name="l02175"></a><span class="lineno"> 2175</span>&#160;    VkDeviceSize resourceBStart = resourceBOffset;</div><div class="line"><a name="l02176"></a><span class="lineno"> 2176</span>&#160;    VkDeviceSize resourceBStartPage = resourceBStart &amp; ~(pageSize - 1);</div><div class="line"><a name="l02177"></a><span class="lineno"> 2177</span>&#160;    <span class="keywordflow">return</span> resourceAEndPage == resourceBStartPage;</div><div class="line"><a name="l02178"></a><span class="lineno"> 2178</span>&#160;}</div><div class="line"><a name="l02179"></a><span class="lineno"> 2179</span>&#160;</div><div class="line"><a name="l02180"></a><span class="lineno"> 2180</span>&#160;<span class="keyword">enum</span> VmaSuballocationType</div><div class="line"><a name="l02181"></a><span class="lineno"> 2181</span>&#160;{</div><div class="line"><a name="l02182"></a><span class="lineno"> 2182</span>&#160;    VMA_SUBALLOCATION_TYPE_FREE = 0,</div><div class="line"><a name="l02183"></a><span class="lineno"> 2183</span>&#160;    VMA_SUBALLOCATION_TYPE_UNKNOWN = 1,</div><div class="line"><a name="l02184"></a><span class="lineno"> 2184</span>&#160;    VMA_SUBALLOCATION_TYPE_BUFFER = 2,</div><div class="line"><a name="l02185"></a><span class="lineno"> 2185</span>&#160;    VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN = 3,</div><div class="line"><a name="l02186"></a><span class="lineno"> 2186</span>&#160;    VMA_SUBALLOCATION_TYPE_IMAGE_LINEAR = 4,</div><div class="line"><a name="l02187"></a><span class="lineno"> 2187</span>&#160;    VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL = 5,</div><div class="line"><a name="l02188"></a><span class="lineno"> 2188</span>&#160;    VMA_SUBALLOCATION_TYPE_MAX_ENUM = 0x7FFFFFFF</div><div class="line"><a name="l02189"></a><span class="lineno"> 2189</span>&#160;};</div><div class="line"><a name="l02190"></a><span class="lineno"> 2190</span>&#160;</div><div class="line"><a name="l02191"></a><span class="lineno"> 2191</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02192"></a><span class="lineno"> 2192</span>&#160;<span class="comment">Returns true if given suballocation types could conflict and must respect</span></div><div class="line"><a name="l02193"></a><span class="lineno"> 2193</span>&#160;<span class="comment">VkPhysicalDeviceLimits::bufferImageGranularity. They conflict if one is buffer</span></div><div class="line"><a name="l02194"></a><span class="lineno"> 2194</span>&#160;<span class="comment">or linear image and another one is optimal image. If type is unknown, behave</span></div><div class="line"><a name="l02195"></a><span class="lineno"> 2195</span>&#160;<span class="comment">conservatively.</span></div><div class="line"><a name="l02196"></a><span class="lineno"> 2196</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l02197"></a><span class="lineno"> 2197</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> VmaIsBufferImageGranularityConflict(</div><div class="line"><a name="l02198"></a><span class="lineno"> 2198</span>&#160;    VmaSuballocationType suballocType1,</div><div class="line"><a name="l02199"></a><span class="lineno"> 2199</span>&#160;    VmaSuballocationType suballocType2)</div><div class="line"><a name="l02200"></a><span class="lineno"> 2200</span>&#160;{</div><div class="line"><a name="l02201"></a><span class="lineno"> 2201</span>&#160;    <span class="keywordflow">if</span>(suballocType1 &gt; suballocType2)</div><div class="line"><a name="l02202"></a><span class="lineno"> 2202</span>&#160;    {</div><div class="line"><a name="l02203"></a><span class="lineno"> 2203</span>&#160;        VMA_SWAP(suballocType1, suballocType2);</div><div class="line"><a name="l02204"></a><span class="lineno"> 2204</span>&#160;    }</div><div class="line"><a name="l02205"></a><span class="lineno"> 2205</span>&#160;    </div><div class="line"><a name="l02206"></a><span class="lineno"> 2206</span>&#160;    <span class="keywordflow">switch</span>(suballocType1)</div><div class="line"><a name="l02207"></a><span class="lineno"> 2207</span>&#160;    {</div><div class="line"><a name="l02208"></a><span class="lineno"> 2208</span>&#160;    <span class="keywordflow">case</span> VMA_SUBALLOCATION_TYPE_FREE:</div><div class="line"><a name="l02209"></a><span class="lineno"> 2209</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l02210"></a><span class="lineno"> 2210</span>&#160;    <span class="keywordflow">case</span> VMA_SUBALLOCATION_TYPE_UNKNOWN:</div><div class="line"><a name="l02211"></a><span class="lineno"> 2211</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l02212"></a><span class="lineno"> 2212</span>&#160;    <span class="keywordflow">case</span> VMA_SUBALLOCATION_TYPE_BUFFER:</div><div class="line"><a name="l02213"></a><span class="lineno"> 2213</span>&#160;        <span class="keywordflow">return</span></div><div class="line"><a name="l02214"></a><span class="lineno"> 2214</span>&#160;            suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN ||</div><div class="line"><a name="l02215"></a><span class="lineno"> 2215</span>&#160;            suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL;</div><div class="line"><a name="l02216"></a><span class="lineno"> 2216</span>&#160;    <span class="keywordflow">case</span> VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN:</div><div class="line"><a name="l02217"></a><span class="lineno"> 2217</span>&#160;        <span class="keywordflow">return</span></div><div class="line"><a name="l02218"></a><span class="lineno"> 2218</span>&#160;            suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_UNKNOWN ||</div><div class="line"><a name="l02219"></a><span class="lineno"> 2219</span>&#160;            suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_LINEAR ||</div><div class="line"><a name="l02220"></a><span class="lineno"> 2220</span>&#160;            suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL;</div><div class="line"><a name="l02221"></a><span class="lineno"> 2221</span>&#160;    <span class="keywordflow">case</span> VMA_SUBALLOCATION_TYPE_IMAGE_LINEAR:</div><div class="line"><a name="l02222"></a><span class="lineno"> 2222</span>&#160;        <span class="keywordflow">return</span></div><div class="line"><a name="l02223"></a><span class="lineno"> 2223</span>&#160;            suballocType2 == VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL;</div><div class="line"><a name="l02224"></a><span class="lineno"> 2224</span>&#160;    <span class="keywordflow">case</span> VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL:</div><div class="line"><a name="l02225"></a><span class="lineno"> 2225</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l02226"></a><span class="lineno"> 2226</span>&#160;    <span class="keywordflow">default</span>:</div><div class="line"><a name="l02227"></a><span class="lineno"> 2227</span>&#160;        VMA_ASSERT(0);</div><div class="line"><a name="l02228"></a><span class="lineno"> 2228</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l02229"></a><span class="lineno"> 2229</span>&#160;    }</div><div class="line"><a name="l02230"></a><span class="lineno"> 2230</span>&#160;}</div><div class="line"><a name="l02231"></a><span class="lineno"> 2231</span>&#160;</div><div class="line"><a name="l02232"></a><span class="lineno"> 2232</span>&#160;<span class="comment">// Helper RAII class to lock a mutex in constructor and unlock it in destructor (at the end of scope).</span></div><div class="line"><a name="l02233"></a><span class="lineno"> 2233</span>&#160;<span class="keyword">struct </span>VmaMutexLock</div><div class="line"><a name="l02234"></a><span class="lineno"> 2234</span>&#160;{</div><div class="line"><a name="l02235"></a><span class="lineno"> 2235</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l02236"></a><span class="lineno"> 2236</span>&#160;    VmaMutexLock(VMA_MUTEX&amp; mutex, <span class="keywordtype">bool</span> useMutex) :</div><div class="line"><a name="l02237"></a><span class="lineno"> 2237</span>&#160;        m_pMutex(useMutex ? &amp;mutex : VMA_NULL)</div><div class="line"><a name="l02238"></a><span class="lineno"> 2238</span>&#160;    {</div><div class="line"><a name="l02239"></a><span class="lineno"> 2239</span>&#160;        <span class="keywordflow">if</span>(m_pMutex)</div><div class="line"><a name="l02240"></a><span class="lineno"> 2240</span>&#160;        {</div><div class="line"><a name="l02241"></a><span class="lineno"> 2241</span>&#160;            m_pMutex-&gt;Lock();</div><div class="line"><a name="l02242"></a><span class="lineno"> 2242</span>&#160;        }</div><div class="line"><a name="l02243"></a><span class="lineno"> 2243</span>&#160;    }</div><div class="line"><a name="l02244"></a><span class="lineno"> 2244</span>&#160;    </div><div class="line"><a name="l02245"></a><span class="lineno"> 2245</span>&#160;    ~VmaMutexLock()</div><div class="line"><a name="l02246"></a><span class="lineno"> 2246</span>&#160;    {</div><div class="line"><a name="l02247"></a><span class="lineno"> 2247</span>&#160;        <span class="keywordflow">if</span>(m_pMutex)</div><div class="line"><a name="l02248"></a><span class="lineno"> 2248</span>&#160;        {</div><div class="line"><a name="l02249"></a><span class="lineno"> 2249</span>&#160;            m_pMutex-&gt;Unlock();</div><div class="line"><a name="l02250"></a><span class="lineno"> 2250</span>&#160;        }</div><div class="line"><a name="l02251"></a><span class="lineno"> 2251</span>&#160;    }</div><div class="line"><a name="l02252"></a><span class="lineno"> 2252</span>&#160;</div><div class="line"><a name="l02253"></a><span class="lineno"> 2253</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l02254"></a><span class="lineno"> 2254</span>&#160;    VMA_MUTEX* m_pMutex;</div><div class="line"><a name="l02255"></a><span class="lineno"> 2255</span>&#160;};</div><div class="line"><a name="l02256"></a><span class="lineno"> 2256</span>&#160;</div><div class="line"><a name="l02257"></a><span class="lineno"> 2257</span>&#160;<span class="preprocessor">#if VMA_DEBUG_GLOBAL_MUTEX</span></div><div class="line"><a name="l02258"></a><span class="lineno"> 2258</span>&#160;    <span class="keyword">static</span> VMA_MUTEX gDebugGlobalMutex;</div><div class="line"><a name="l02259"></a><span class="lineno"> 2259</span>&#160;<span class="preprocessor">    #define VMA_DEBUG_GLOBAL_MUTEX_LOCK VmaMutexLock debugGlobalMutexLock(gDebugGlobalMutex, true);</span></div><div class="line"><a name="l02260"></a><span class="lineno"> 2260</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l02261"></a><span class="lineno"> 2261</span>&#160;<span class="preprocessor">    #define VMA_DEBUG_GLOBAL_MUTEX_LOCK</span></div><div class="line"><a name="l02262"></a><span class="lineno"> 2262</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l02263"></a><span class="lineno"> 2263</span>&#160;</div><div class="line"><a name="l02264"></a><span class="lineno"> 2264</span>&#160;<span class="comment">// Minimum size of a free suballocation to register it in the free suballocation collection.</span></div><div class="line"><a name="l02265"></a><span class="lineno"> 2265</span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> VkDeviceSize VMA_MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER = 16;</div><div class="line"><a name="l02266"></a><span class="lineno"> 2266</span>&#160;</div><div class="line"><a name="l02267"></a><span class="lineno"> 2267</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02268"></a><span class="lineno"> 2268</span>&#160;<span class="comment">Performs binary search and returns iterator to first element that is greater or</span></div><div class="line"><a name="l02269"></a><span class="lineno"> 2269</span>&#160;<span class="comment">equal to (key), according to comparison (cmp).</span></div><div class="line"><a name="l02270"></a><span class="lineno"> 2270</span>&#160;<span class="comment"></span></div><div class="line"><a name="l02271"></a><span class="lineno"> 2271</span>&#160;<span class="comment">Cmp should return true if first argument is less than second argument.</span></div><div class="line"><a name="l02272"></a><span class="lineno"> 2272</span>&#160;<span class="comment"></span></div><div class="line"><a name="l02273"></a><span class="lineno"> 2273</span>&#160;<span class="comment">Returned value is the found element, if present in the collection or place where</span></div><div class="line"><a name="l02274"></a><span class="lineno"> 2274</span>&#160;<span class="comment">new element with value (key) should be inserted.</span></div><div class="line"><a name="l02275"></a><span class="lineno"> 2275</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l02276"></a><span class="lineno"> 2276</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> IterT, <span class="keyword">typename</span> KeyT, <span class="keyword">typename</span> CmpT&gt;</div><div class="line"><a name="l02277"></a><span class="lineno"> 2277</span>&#160;<span class="keyword">static</span> IterT VmaBinaryFindFirstNotLess(IterT beg, IterT end, <span class="keyword">const</span> KeyT &amp;key, CmpT cmp)</div><div class="line"><a name="l02278"></a><span class="lineno"> 2278</span>&#160;{</div><div class="line"><a name="l02279"></a><span class="lineno"> 2279</span>&#160;   <span class="keywordtype">size_t</span> down = 0, up = (end - beg);</div><div class="line"><a name="l02280"></a><span class="lineno"> 2280</span>&#160;   <span class="keywordflow">while</span>(down &lt; up)</div><div class="line"><a name="l02281"></a><span class="lineno"> 2281</span>&#160;   {</div><div class="line"><a name="l02282"></a><span class="lineno"> 2282</span>&#160;      <span class="keyword">const</span> <span class="keywordtype">size_t</span> mid = (down + up) / 2;</div><div class="line"><a name="l02283"></a><span class="lineno"> 2283</span>&#160;      <span class="keywordflow">if</span>(cmp(*(beg+mid), key))</div><div class="line"><a name="l02284"></a><span class="lineno"> 2284</span>&#160;      {</div><div class="line"><a name="l02285"></a><span class="lineno"> 2285</span>&#160;         down = mid + 1;</div><div class="line"><a name="l02286"></a><span class="lineno"> 2286</span>&#160;      }</div><div class="line"><a name="l02287"></a><span class="lineno"> 2287</span>&#160;      <span class="keywordflow">else</span></div><div class="line"><a name="l02288"></a><span class="lineno"> 2288</span>&#160;      {</div><div class="line"><a name="l02289"></a><span class="lineno"> 2289</span>&#160;         up = mid;</div><div class="line"><a name="l02290"></a><span class="lineno"> 2290</span>&#160;      }</div><div class="line"><a name="l02291"></a><span class="lineno"> 2291</span>&#160;   }</div><div class="line"><a name="l02292"></a><span class="lineno"> 2292</span>&#160;   <span class="keywordflow">return</span> beg + down;</div><div class="line"><a name="l02293"></a><span class="lineno"> 2293</span>&#160;}</div><div class="line"><a name="l02294"></a><span class="lineno"> 2294</span>&#160;</div><div class="line"><a name="l02296"></a><span class="lineno"> 2296</span>&#160;<span class="comment">// Memory allocation</span></div><div class="line"><a name="l02297"></a><span class="lineno"> 2297</span>&#160;</div><div class="line"><a name="l02298"></a><span class="lineno"> 2298</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span>* VmaMalloc(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks, <span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment)</div><div class="line"><a name="l02299"></a><span class="lineno"> 2299</span>&#160;{</div><div class="line"><a name="l02300"></a><span class="lineno"> 2300</span>&#160;    <span class="keywordflow">if</span>((pAllocationCallbacks != VMA_NULL) &amp;&amp;</div><div class="line"><a name="l02301"></a><span class="lineno"> 2301</span>&#160;        (pAllocationCallbacks-&gt;pfnAllocation != VMA_NULL))</div><div class="line"><a name="l02302"></a><span class="lineno"> 2302</span>&#160;    {</div><div class="line"><a name="l02303"></a><span class="lineno"> 2303</span>&#160;        <span class="keywordflow">return</span> (*pAllocationCallbacks-&gt;pfnAllocation)(</div><div class="line"><a name="l02304"></a><span class="lineno"> 2304</span>&#160;            pAllocationCallbacks-&gt;pUserData,</div><div class="line"><a name="l02305"></a><span class="lineno"> 2305</span>&#160;            size,</div><div class="line"><a name="l02306"></a><span class="lineno"> 2306</span>&#160;            alignment,</div><div class="line"><a name="l02307"></a><span class="lineno"> 2307</span>&#160;            VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);</div><div class="line"><a name="l02308"></a><span class="lineno"> 2308</span>&#160;    }</div><div class="line"><a name="l02309"></a><span class="lineno"> 2309</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l02310"></a><span class="lineno"> 2310</span>&#160;    {</div><div class="line"><a name="l02311"></a><span class="lineno"> 2311</span>&#160;        <span class="keywordflow">return</span> VMA_SYSTEM_ALIGNED_MALLOC(size, alignment);</div><div class="line"><a name="l02312"></a><span class="lineno"> 2312</span>&#160;    }</div><div class="line"><a name="l02313"></a><span class="lineno"> 2313</span>&#160;}</div><div class="line"><a name="l02314"></a><span class="lineno"> 2314</span>&#160;</div><div class="line"><a name="l02315"></a><span class="lineno"> 2315</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> VmaFree(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks, <span class="keywordtype">void</span>* ptr)</div><div class="line"><a name="l02316"></a><span class="lineno"> 2316</span>&#160;{</div><div class="line"><a name="l02317"></a><span class="lineno"> 2317</span>&#160;    <span class="keywordflow">if</span>((pAllocationCallbacks != VMA_NULL) &amp;&amp;</div><div class="line"><a name="l02318"></a><span class="lineno"> 2318</span>&#160;        (pAllocationCallbacks-&gt;pfnFree != VMA_NULL))</div><div class="line"><a name="l02319"></a><span class="lineno"> 2319</span>&#160;    {</div><div class="line"><a name="l02320"></a><span class="lineno"> 2320</span>&#160;        (*pAllocationCallbacks-&gt;pfnFree)(pAllocationCallbacks-&gt;pUserData, ptr);</div><div class="line"><a name="l02321"></a><span class="lineno"> 2321</span>&#160;    }</div><div class="line"><a name="l02322"></a><span class="lineno"> 2322</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l02323"></a><span class="lineno"> 2323</span>&#160;    {</div><div class="line"><a name="l02324"></a><span class="lineno"> 2324</span>&#160;        VMA_SYSTEM_FREE(ptr);</div><div class="line"><a name="l02325"></a><span class="lineno"> 2325</span>&#160;    }</div><div class="line"><a name="l02326"></a><span class="lineno"> 2326</span>&#160;}</div><div class="line"><a name="l02327"></a><span class="lineno"> 2327</span>&#160;</div><div class="line"><a name="l02328"></a><span class="lineno"> 2328</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02329"></a><span class="lineno"> 2329</span>&#160;<span class="keyword">static</span> T* VmaAllocate(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks)</div><div class="line"><a name="l02330"></a><span class="lineno"> 2330</span>&#160;{</div><div class="line"><a name="l02331"></a><span class="lineno"> 2331</span>&#160;    <span class="keywordflow">return</span> (T*)VmaMalloc(pAllocationCallbacks, <span class="keyword">sizeof</span>(T), VMA_ALIGN_OF(T));</div><div class="line"><a name="l02332"></a><span class="lineno"> 2332</span>&#160;}</div><div class="line"><a name="l02333"></a><span class="lineno"> 2333</span>&#160;</div><div class="line"><a name="l02334"></a><span class="lineno"> 2334</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02335"></a><span class="lineno"> 2335</span>&#160;<span class="keyword">static</span> T* VmaAllocateArray(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks, <span class="keywordtype">size_t</span> count)</div><div class="line"><a name="l02336"></a><span class="lineno"> 2336</span>&#160;{</div><div class="line"><a name="l02337"></a><span class="lineno"> 2337</span>&#160;    <span class="keywordflow">return</span> (T*)VmaMalloc(pAllocationCallbacks, <span class="keyword">sizeof</span>(T) * count, VMA_ALIGN_OF(T));</div><div class="line"><a name="l02338"></a><span class="lineno"> 2338</span>&#160;}</div><div class="line"><a name="l02339"></a><span class="lineno"> 2339</span>&#160;</div><div class="line"><a name="l02340"></a><span class="lineno"> 2340</span>&#160;<span class="preprocessor">#define vma_new(allocator, type)   new(VmaAllocate&lt;type&gt;(allocator))(type)</span></div><div class="line"><a name="l02341"></a><span class="lineno"> 2341</span>&#160;</div><div class="line"><a name="l02342"></a><span class="lineno"> 2342</span>&#160;<span class="preprocessor">#define vma_new_array(allocator, type, count)   new(VmaAllocateArray&lt;type&gt;((allocator), (count)))(type)</span></div><div class="line"><a name="l02343"></a><span class="lineno"> 2343</span>&#160;</div><div class="line"><a name="l02344"></a><span class="lineno"> 2344</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02345"></a><span class="lineno"> 2345</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> vma_delete(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks, T* ptr)</div><div class="line"><a name="l02346"></a><span class="lineno"> 2346</span>&#160;{</div><div class="line"><a name="l02347"></a><span class="lineno"> 2347</span>&#160;    ptr-&gt;~T();</div><div class="line"><a name="l02348"></a><span class="lineno"> 2348</span>&#160;    VmaFree(pAllocationCallbacks, ptr);</div><div class="line"><a name="l02349"></a><span class="lineno"> 2349</span>&#160;}</div><div class="line"><a name="l02350"></a><span class="lineno"> 2350</span>&#160;</div><div class="line"><a name="l02351"></a><span class="lineno"> 2351</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02352"></a><span class="lineno"> 2352</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> vma_delete_array(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks, T* ptr, <span class="keywordtype">size_t</span> count)</div><div class="line"><a name="l02353"></a><span class="lineno"> 2353</span>&#160;{</div><div class="line"><a name="l02354"></a><span class="lineno"> 2354</span>&#160;    <span class="keywordflow">if</span>(ptr != VMA_NULL)</div><div class="line"><a name="l02355"></a><span class="lineno"> 2355</span>&#160;    {</div><div class="line"><a name="l02356"></a><span class="lineno"> 2356</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = count; i--; )</div><div class="line"><a name="l02357"></a><span class="lineno"> 2357</span>&#160;        {</div><div class="line"><a name="l02358"></a><span class="lineno"> 2358</span>&#160;            ptr[i].~T();</div><div class="line"><a name="l02359"></a><span class="lineno"> 2359</span>&#160;        }</div><div class="line"><a name="l02360"></a><span class="lineno"> 2360</span>&#160;        VmaFree(pAllocationCallbacks, ptr);</div><div class="line"><a name="l02361"></a><span class="lineno"> 2361</span>&#160;    }</div><div class="line"><a name="l02362"></a><span class="lineno"> 2362</span>&#160;}</div><div class="line"><a name="l02363"></a><span class="lineno"> 2363</span>&#160;</div><div class="line"><a name="l02364"></a><span class="lineno"> 2364</span>&#160;<span class="comment">// STL-compatible allocator.</span></div><div class="line"><a name="l02365"></a><span class="lineno"> 2365</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02366"></a><span class="lineno"> 2366</span>&#160;<span class="keyword">class </span>VmaStlAllocator</div><div class="line"><a name="l02367"></a><span class="lineno"> 2367</span>&#160;{</div><div class="line"><a name="l02368"></a><span class="lineno"> 2368</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l02369"></a><span class="lineno"> 2369</span>&#160;    <span class="keyword">const</span> VkAllocationCallbacks* <span class="keyword">const</span> m_pCallbacks;</div><div class="line"><a name="l02370"></a><span class="lineno"> 2370</span>&#160;    <span class="keyword">typedef</span> T value_type;</div><div class="line"><a name="l02371"></a><span class="lineno"> 2371</span>&#160;    </div><div class="line"><a name="l02372"></a><span class="lineno"> 2372</span>&#160;    VmaStlAllocator(<span class="keyword">const</span> VkAllocationCallbacks* pCallbacks) : m_pCallbacks(pCallbacks) { }</div><div class="line"><a name="l02373"></a><span class="lineno"> 2373</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> U&gt; VmaStlAllocator(<span class="keyword">const</span> VmaStlAllocator&lt;U&gt;&amp; src) : m_pCallbacks(src.m_pCallbacks) { }</div><div class="line"><a name="l02374"></a><span class="lineno"> 2374</span>&#160;</div><div class="line"><a name="l02375"></a><span class="lineno"> 2375</span>&#160;    T* allocate(<span class="keywordtype">size_t</span> n) { <span class="keywordflow">return</span> VmaAllocateArray&lt;T&gt;(m_pCallbacks, n); }</div><div class="line"><a name="l02376"></a><span class="lineno"> 2376</span>&#160;    <span class="keywordtype">void</span> deallocate(T* p, <span class="keywordtype">size_t</span> n) { VmaFree(m_pCallbacks, p); }</div><div class="line"><a name="l02377"></a><span class="lineno"> 2377</span>&#160;</div><div class="line"><a name="l02378"></a><span class="lineno"> 2378</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> U&gt;</div><div class="line"><a name="l02379"></a><span class="lineno"> 2379</span>&#160;    <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> VmaStlAllocator&lt;U&gt;&amp; rhs)<span class="keyword"> const</span></div><div class="line"><a name="l02380"></a><span class="lineno"> 2380</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l02381"></a><span class="lineno"> 2381</span>&#160;        <span class="keywordflow">return</span> m_pCallbacks == rhs.m_pCallbacks;</div><div class="line"><a name="l02382"></a><span class="lineno"> 2382</span>&#160;    }</div><div class="line"><a name="l02383"></a><span class="lineno"> 2383</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> U&gt;</div><div class="line"><a name="l02384"></a><span class="lineno"> 2384</span>&#160;    <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> VmaStlAllocator&lt;U&gt;&amp; rhs)<span class="keyword"> const</span></div><div class="line"><a name="l02385"></a><span class="lineno"> 2385</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l02386"></a><span class="lineno"> 2386</span>&#160;        <span class="keywordflow">return</span> m_pCallbacks != rhs.m_pCallbacks;</div><div class="line"><a name="l02387"></a><span class="lineno"> 2387</span>&#160;    }</div><div class="line"><a name="l02388"></a><span class="lineno"> 2388</span>&#160;</div><div class="line"><a name="l02389"></a><span class="lineno"> 2389</span>&#160;    VmaStlAllocator&amp; operator=(<span class="keyword">const</span> VmaStlAllocator&amp; x) = <span class="keyword">delete</span>;</div><div class="line"><a name="l02390"></a><span class="lineno"> 2390</span>&#160;};</div><div class="line"><a name="l02391"></a><span class="lineno"> 2391</span>&#160;</div><div class="line"><a name="l02392"></a><span class="lineno"> 2392</span>&#160;<span class="preprocessor">#if VMA_USE_STL_VECTOR</span></div><div class="line"><a name="l02393"></a><span class="lineno"> 2393</span>&#160;</div><div class="line"><a name="l02394"></a><span class="lineno"> 2394</span>&#160;<span class="preprocessor">#define VmaVector std::vector</span></div><div class="line"><a name="l02395"></a><span class="lineno"> 2395</span>&#160;</div><div class="line"><a name="l02396"></a><span class="lineno"> 2396</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> allocatorT&gt;</div><div class="line"><a name="l02397"></a><span class="lineno"> 2397</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> VmaVectorInsert(std::vector&lt;T, allocatorT&gt;&amp; vec, <span class="keywordtype">size_t</span> index, <span class="keyword">const</span> T&amp; item)</div><div class="line"><a name="l02398"></a><span class="lineno"> 2398</span>&#160;{</div><div class="line"><a name="l02399"></a><span class="lineno"> 2399</span>&#160;    vec.insert(vec.begin() + index, item);</div><div class="line"><a name="l02400"></a><span class="lineno"> 2400</span>&#160;}</div><div class="line"><a name="l02401"></a><span class="lineno"> 2401</span>&#160;</div><div class="line"><a name="l02402"></a><span class="lineno"> 2402</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> allocatorT&gt;</div><div class="line"><a name="l02403"></a><span class="lineno"> 2403</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> VmaVectorRemove(std::vector&lt;T, allocatorT&gt;&amp; vec, <span class="keywordtype">size_t</span> index)</div><div class="line"><a name="l02404"></a><span class="lineno"> 2404</span>&#160;{</div><div class="line"><a name="l02405"></a><span class="lineno"> 2405</span>&#160;    vec.erase(vec.begin() + index);</div><div class="line"><a name="l02406"></a><span class="lineno"> 2406</span>&#160;}</div><div class="line"><a name="l02407"></a><span class="lineno"> 2407</span>&#160;</div><div class="line"><a name="l02408"></a><span class="lineno"> 2408</span>&#160;<span class="preprocessor">#else // #if VMA_USE_STL_VECTOR</span></div><div class="line"><a name="l02409"></a><span class="lineno"> 2409</span>&#160;</div><div class="line"><a name="l02410"></a><span class="lineno"> 2410</span>&#160;<span class="comment">/* Class with interface compatible with subset of std::vector.</span></div><div class="line"><a name="l02411"></a><span class="lineno"> 2411</span>&#160;<span class="comment">T must be POD because constructors and destructors are not called and memcpy is</span></div><div class="line"><a name="l02412"></a><span class="lineno"> 2412</span>&#160;<span class="comment">used for these objects. */</span></div><div class="line"><a name="l02413"></a><span class="lineno"> 2413</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> AllocatorT&gt;</div><div class="line"><a name="l02414"></a><span class="lineno"> 2414</span>&#160;<span class="keyword">class </span>VmaVector</div><div class="line"><a name="l02415"></a><span class="lineno"> 2415</span>&#160;{</div><div class="line"><a name="l02416"></a><span class="lineno"> 2416</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l02417"></a><span class="lineno"> 2417</span>&#160;    <span class="keyword">typedef</span> T value_type;</div><div class="line"><a name="l02418"></a><span class="lineno"> 2418</span>&#160;</div><div class="line"><a name="l02419"></a><span class="lineno"> 2419</span>&#160;    VmaVector(<span class="keyword">const</span> AllocatorT&amp; allocator) :</div><div class="line"><a name="l02420"></a><span class="lineno"> 2420</span>&#160;        m_Allocator(allocator),</div><div class="line"><a name="l02421"></a><span class="lineno"> 2421</span>&#160;        m_pArray(VMA_NULL),</div><div class="line"><a name="l02422"></a><span class="lineno"> 2422</span>&#160;        m_Count(0),</div><div class="line"><a name="l02423"></a><span class="lineno"> 2423</span>&#160;        m_Capacity(0)</div><div class="line"><a name="l02424"></a><span class="lineno"> 2424</span>&#160;    {</div><div class="line"><a name="l02425"></a><span class="lineno"> 2425</span>&#160;    }</div><div class="line"><a name="l02426"></a><span class="lineno"> 2426</span>&#160;</div><div class="line"><a name="l02427"></a><span class="lineno"> 2427</span>&#160;    VmaVector(<span class="keywordtype">size_t</span> count, <span class="keyword">const</span> AllocatorT&amp; allocator) :</div><div class="line"><a name="l02428"></a><span class="lineno"> 2428</span>&#160;        m_Allocator(allocator),</div><div class="line"><a name="l02429"></a><span class="lineno"> 2429</span>&#160;        m_pArray(count ? (T*)VmaAllocateArray&lt;T&gt;(allocator.m_pCallbacks, count) : VMA_NULL),</div><div class="line"><a name="l02430"></a><span class="lineno"> 2430</span>&#160;        m_Count(count),</div><div class="line"><a name="l02431"></a><span class="lineno"> 2431</span>&#160;        m_Capacity(count)</div><div class="line"><a name="l02432"></a><span class="lineno"> 2432</span>&#160;    {</div><div class="line"><a name="l02433"></a><span class="lineno"> 2433</span>&#160;    }</div><div class="line"><a name="l02434"></a><span class="lineno"> 2434</span>&#160;    </div><div class="line"><a name="l02435"></a><span class="lineno"> 2435</span>&#160;    VmaVector(<span class="keyword">const</span> VmaVector&lt;T, AllocatorT&gt;&amp; src) :</div><div class="line"><a name="l02436"></a><span class="lineno"> 2436</span>&#160;        m_Allocator(src.m_Allocator),</div><div class="line"><a name="l02437"></a><span class="lineno"> 2437</span>&#160;        m_pArray(src.m_Count ? (T*)VmaAllocateArray&lt;T&gt;(src.m_Allocator.m_pCallbacks, src.m_Count) : VMA_NULL),</div><div class="line"><a name="l02438"></a><span class="lineno"> 2438</span>&#160;        m_Count(src.m_Count),</div><div class="line"><a name="l02439"></a><span class="lineno"> 2439</span>&#160;        m_Capacity(src.m_Count)</div><div class="line"><a name="l02440"></a><span class="lineno"> 2440</span>&#160;    {</div><div class="line"><a name="l02441"></a><span class="lineno"> 2441</span>&#160;        <span class="keywordflow">if</span>(m_Count != 0)</div><div class="line"><a name="l02442"></a><span class="lineno"> 2442</span>&#160;        {</div><div class="line"><a name="l02443"></a><span class="lineno"> 2443</span>&#160;            memcpy(m_pArray, src.m_pArray, m_Count * <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l02444"></a><span class="lineno"> 2444</span>&#160;        }</div><div class="line"><a name="l02445"></a><span class="lineno"> 2445</span>&#160;    }</div><div class="line"><a name="l02446"></a><span class="lineno"> 2446</span>&#160;    </div><div class="line"><a name="l02447"></a><span class="lineno"> 2447</span>&#160;    ~VmaVector()</div><div class="line"><a name="l02448"></a><span class="lineno"> 2448</span>&#160;    {</div><div class="line"><a name="l02449"></a><span class="lineno"> 2449</span>&#160;        VmaFree(m_Allocator.m_pCallbacks, m_pArray);</div><div class="line"><a name="l02450"></a><span class="lineno"> 2450</span>&#160;    }</div><div class="line"><a name="l02451"></a><span class="lineno"> 2451</span>&#160;</div><div class="line"><a name="l02452"></a><span class="lineno"> 2452</span>&#160;    VmaVector&amp; operator=(<span class="keyword">const</span> VmaVector&lt;T, AllocatorT&gt;&amp; rhs)</div><div class="line"><a name="l02453"></a><span class="lineno"> 2453</span>&#160;    {</div><div class="line"><a name="l02454"></a><span class="lineno"> 2454</span>&#160;        <span class="keywordflow">if</span>(&amp;rhs != <span class="keyword">this</span>)</div><div class="line"><a name="l02455"></a><span class="lineno"> 2455</span>&#160;        {</div><div class="line"><a name="l02456"></a><span class="lineno"> 2456</span>&#160;            resize(rhs.m_Count);</div><div class="line"><a name="l02457"></a><span class="lineno"> 2457</span>&#160;            <span class="keywordflow">if</span>(m_Count != 0)</div><div class="line"><a name="l02458"></a><span class="lineno"> 2458</span>&#160;            {</div><div class="line"><a name="l02459"></a><span class="lineno"> 2459</span>&#160;                memcpy(m_pArray, rhs.m_pArray, m_Count * <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l02460"></a><span class="lineno"> 2460</span>&#160;            }</div><div class="line"><a name="l02461"></a><span class="lineno"> 2461</span>&#160;        }</div><div class="line"><a name="l02462"></a><span class="lineno"> 2462</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l02463"></a><span class="lineno"> 2463</span>&#160;    }</div><div class="line"><a name="l02464"></a><span class="lineno"> 2464</span>&#160;    </div><div class="line"><a name="l02465"></a><span class="lineno"> 2465</span>&#160;    <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Count == 0; }</div><div class="line"><a name="l02466"></a><span class="lineno"> 2466</span>&#160;    <span class="keywordtype">size_t</span> size()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Count; }</div><div class="line"><a name="l02467"></a><span class="lineno"> 2467</span>&#160;    T* data() { <span class="keywordflow">return</span> m_pArray; }</div><div class="line"><a name="l02468"></a><span class="lineno"> 2468</span>&#160;    <span class="keyword">const</span> T* data()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_pArray; }</div><div class="line"><a name="l02469"></a><span class="lineno"> 2469</span>&#160;    </div><div class="line"><a name="l02470"></a><span class="lineno"> 2470</span>&#160;    T&amp; operator[](<span class="keywordtype">size_t</span> index)</div><div class="line"><a name="l02471"></a><span class="lineno"> 2471</span>&#160;    {</div><div class="line"><a name="l02472"></a><span class="lineno"> 2472</span>&#160;        VMA_HEAVY_ASSERT(index &lt; m_Count);</div><div class="line"><a name="l02473"></a><span class="lineno"> 2473</span>&#160;        <span class="keywordflow">return</span> m_pArray[index];</div><div class="line"><a name="l02474"></a><span class="lineno"> 2474</span>&#160;    }</div><div class="line"><a name="l02475"></a><span class="lineno"> 2475</span>&#160;    <span class="keyword">const</span> T&amp; operator[](<span class="keywordtype">size_t</span> index)<span class="keyword"> const</span></div><div class="line"><a name="l02476"></a><span class="lineno"> 2476</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l02477"></a><span class="lineno"> 2477</span>&#160;        VMA_HEAVY_ASSERT(index &lt; m_Count);</div><div class="line"><a name="l02478"></a><span class="lineno"> 2478</span>&#160;        <span class="keywordflow">return</span> m_pArray[index];</div><div class="line"><a name="l02479"></a><span class="lineno"> 2479</span>&#160;    }</div><div class="line"><a name="l02480"></a><span class="lineno"> 2480</span>&#160;</div><div class="line"><a name="l02481"></a><span class="lineno"> 2481</span>&#160;    T&amp; front()</div><div class="line"><a name="l02482"></a><span class="lineno"> 2482</span>&#160;    {</div><div class="line"><a name="l02483"></a><span class="lineno"> 2483</span>&#160;        VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02484"></a><span class="lineno"> 2484</span>&#160;        <span class="keywordflow">return</span> m_pArray[0];</div><div class="line"><a name="l02485"></a><span class="lineno"> 2485</span>&#160;    }</div><div class="line"><a name="l02486"></a><span class="lineno"> 2486</span>&#160;    <span class="keyword">const</span> T&amp; front()<span class="keyword"> const</span></div><div class="line"><a name="l02487"></a><span class="lineno"> 2487</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l02488"></a><span class="lineno"> 2488</span>&#160;        VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02489"></a><span class="lineno"> 2489</span>&#160;        <span class="keywordflow">return</span> m_pArray[0];</div><div class="line"><a name="l02490"></a><span class="lineno"> 2490</span>&#160;    }</div><div class="line"><a name="l02491"></a><span class="lineno"> 2491</span>&#160;    T&amp; back()</div><div class="line"><a name="l02492"></a><span class="lineno"> 2492</span>&#160;    {</div><div class="line"><a name="l02493"></a><span class="lineno"> 2493</span>&#160;        VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02494"></a><span class="lineno"> 2494</span>&#160;        <span class="keywordflow">return</span> m_pArray[m_Count - 1];</div><div class="line"><a name="l02495"></a><span class="lineno"> 2495</span>&#160;    }</div><div class="line"><a name="l02496"></a><span class="lineno"> 2496</span>&#160;    <span class="keyword">const</span> T&amp; back()<span class="keyword"> const</span></div><div class="line"><a name="l02497"></a><span class="lineno"> 2497</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l02498"></a><span class="lineno"> 2498</span>&#160;        VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02499"></a><span class="lineno"> 2499</span>&#160;        <span class="keywordflow">return</span> m_pArray[m_Count - 1];</div><div class="line"><a name="l02500"></a><span class="lineno"> 2500</span>&#160;    }</div><div class="line"><a name="l02501"></a><span class="lineno"> 2501</span>&#160;</div><div class="line"><a name="l02502"></a><span class="lineno"> 2502</span>&#160;    <span class="keywordtype">void</span> reserve(<span class="keywordtype">size_t</span> newCapacity, <span class="keywordtype">bool</span> freeMemory = <span class="keyword">false</span>)</div><div class="line"><a name="l02503"></a><span class="lineno"> 2503</span>&#160;    {</div><div class="line"><a name="l02504"></a><span class="lineno"> 2504</span>&#160;        newCapacity = VMA_MAX(newCapacity, m_Count);</div><div class="line"><a name="l02505"></a><span class="lineno"> 2505</span>&#160;        </div><div class="line"><a name="l02506"></a><span class="lineno"> 2506</span>&#160;        <span class="keywordflow">if</span>((newCapacity &lt; m_Capacity) &amp;&amp; !freeMemory)</div><div class="line"><a name="l02507"></a><span class="lineno"> 2507</span>&#160;        {</div><div class="line"><a name="l02508"></a><span class="lineno"> 2508</span>&#160;            newCapacity = m_Capacity;</div><div class="line"><a name="l02509"></a><span class="lineno"> 2509</span>&#160;        }</div><div class="line"><a name="l02510"></a><span class="lineno"> 2510</span>&#160;        </div><div class="line"><a name="l02511"></a><span class="lineno"> 2511</span>&#160;        <span class="keywordflow">if</span>(newCapacity != m_Capacity)</div><div class="line"><a name="l02512"></a><span class="lineno"> 2512</span>&#160;        {</div><div class="line"><a name="l02513"></a><span class="lineno"> 2513</span>&#160;            T* <span class="keyword">const</span> newArray = newCapacity ? VmaAllocateArray&lt;T&gt;(m_Allocator, newCapacity) : VMA_NULL;</div><div class="line"><a name="l02514"></a><span class="lineno"> 2514</span>&#160;            <span class="keywordflow">if</span>(m_Count != 0)</div><div class="line"><a name="l02515"></a><span class="lineno"> 2515</span>&#160;            {</div><div class="line"><a name="l02516"></a><span class="lineno"> 2516</span>&#160;                memcpy(newArray, m_pArray, m_Count * <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l02517"></a><span class="lineno"> 2517</span>&#160;            }</div><div class="line"><a name="l02518"></a><span class="lineno"> 2518</span>&#160;            VmaFree(m_Allocator.m_pCallbacks, m_pArray);</div><div class="line"><a name="l02519"></a><span class="lineno"> 2519</span>&#160;            m_Capacity = newCapacity;</div><div class="line"><a name="l02520"></a><span class="lineno"> 2520</span>&#160;            m_pArray = newArray;</div><div class="line"><a name="l02521"></a><span class="lineno"> 2521</span>&#160;        }</div><div class="line"><a name="l02522"></a><span class="lineno"> 2522</span>&#160;    }</div><div class="line"><a name="l02523"></a><span class="lineno"> 2523</span>&#160;</div><div class="line"><a name="l02524"></a><span class="lineno"> 2524</span>&#160;    <span class="keywordtype">void</span> resize(<span class="keywordtype">size_t</span> newCount, <span class="keywordtype">bool</span> freeMemory = <span class="keyword">false</span>)</div><div class="line"><a name="l02525"></a><span class="lineno"> 2525</span>&#160;    {</div><div class="line"><a name="l02526"></a><span class="lineno"> 2526</span>&#160;        <span class="keywordtype">size_t</span> newCapacity = m_Capacity;</div><div class="line"><a name="l02527"></a><span class="lineno"> 2527</span>&#160;        <span class="keywordflow">if</span>(newCount &gt; m_Capacity)</div><div class="line"><a name="l02528"></a><span class="lineno"> 2528</span>&#160;        {</div><div class="line"><a name="l02529"></a><span class="lineno"> 2529</span>&#160;            newCapacity = VMA_MAX(newCount, VMA_MAX(m_Capacity * 3 / 2, (<span class="keywordtype">size_t</span>)8));</div><div class="line"><a name="l02530"></a><span class="lineno"> 2530</span>&#160;        }</div><div class="line"><a name="l02531"></a><span class="lineno"> 2531</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(freeMemory)</div><div class="line"><a name="l02532"></a><span class="lineno"> 2532</span>&#160;        {</div><div class="line"><a name="l02533"></a><span class="lineno"> 2533</span>&#160;            newCapacity = newCount;</div><div class="line"><a name="l02534"></a><span class="lineno"> 2534</span>&#160;        }</div><div class="line"><a name="l02535"></a><span class="lineno"> 2535</span>&#160;</div><div class="line"><a name="l02536"></a><span class="lineno"> 2536</span>&#160;        <span class="keywordflow">if</span>(newCapacity != m_Capacity)</div><div class="line"><a name="l02537"></a><span class="lineno"> 2537</span>&#160;        {</div><div class="line"><a name="l02538"></a><span class="lineno"> 2538</span>&#160;            T* <span class="keyword">const</span> newArray = newCapacity ? VmaAllocateArray&lt;T&gt;(m_Allocator.m_pCallbacks, newCapacity) : VMA_NULL;</div><div class="line"><a name="l02539"></a><span class="lineno"> 2539</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> elementsToCopy = VMA_MIN(m_Count, newCount);</div><div class="line"><a name="l02540"></a><span class="lineno"> 2540</span>&#160;            <span class="keywordflow">if</span>(elementsToCopy != 0)</div><div class="line"><a name="l02541"></a><span class="lineno"> 2541</span>&#160;            {</div><div class="line"><a name="l02542"></a><span class="lineno"> 2542</span>&#160;                memcpy(newArray, m_pArray, elementsToCopy * <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l02543"></a><span class="lineno"> 2543</span>&#160;            }</div><div class="line"><a name="l02544"></a><span class="lineno"> 2544</span>&#160;            VmaFree(m_Allocator.m_pCallbacks, m_pArray);</div><div class="line"><a name="l02545"></a><span class="lineno"> 2545</span>&#160;            m_Capacity = newCapacity;</div><div class="line"><a name="l02546"></a><span class="lineno"> 2546</span>&#160;            m_pArray = newArray;</div><div class="line"><a name="l02547"></a><span class="lineno"> 2547</span>&#160;        }</div><div class="line"><a name="l02548"></a><span class="lineno"> 2548</span>&#160;</div><div class="line"><a name="l02549"></a><span class="lineno"> 2549</span>&#160;        m_Count = newCount;</div><div class="line"><a name="l02550"></a><span class="lineno"> 2550</span>&#160;    }</div><div class="line"><a name="l02551"></a><span class="lineno"> 2551</span>&#160;</div><div class="line"><a name="l02552"></a><span class="lineno"> 2552</span>&#160;    <span class="keywordtype">void</span> clear(<span class="keywordtype">bool</span> freeMemory = <span class="keyword">false</span>)</div><div class="line"><a name="l02553"></a><span class="lineno"> 2553</span>&#160;    {</div><div class="line"><a name="l02554"></a><span class="lineno"> 2554</span>&#160;        resize(0, freeMemory);</div><div class="line"><a name="l02555"></a><span class="lineno"> 2555</span>&#160;    }</div><div class="line"><a name="l02556"></a><span class="lineno"> 2556</span>&#160;</div><div class="line"><a name="l02557"></a><span class="lineno"> 2557</span>&#160;    <span class="keywordtype">void</span> insert(<span class="keywordtype">size_t</span> index, <span class="keyword">const</span> T&amp; src)</div><div class="line"><a name="l02558"></a><span class="lineno"> 2558</span>&#160;    {</div><div class="line"><a name="l02559"></a><span class="lineno"> 2559</span>&#160;        VMA_HEAVY_ASSERT(index &lt;= m_Count);</div><div class="line"><a name="l02560"></a><span class="lineno"> 2560</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> oldCount = size();</div><div class="line"><a name="l02561"></a><span class="lineno"> 2561</span>&#160;        resize(oldCount + 1);</div><div class="line"><a name="l02562"></a><span class="lineno"> 2562</span>&#160;        <span class="keywordflow">if</span>(index &lt; oldCount)</div><div class="line"><a name="l02563"></a><span class="lineno"> 2563</span>&#160;        {</div><div class="line"><a name="l02564"></a><span class="lineno"> 2564</span>&#160;            memmove(m_pArray + (index + 1), m_pArray + index, (oldCount - index) * <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l02565"></a><span class="lineno"> 2565</span>&#160;        }</div><div class="line"><a name="l02566"></a><span class="lineno"> 2566</span>&#160;        m_pArray[index] = src;</div><div class="line"><a name="l02567"></a><span class="lineno"> 2567</span>&#160;    }</div><div class="line"><a name="l02568"></a><span class="lineno"> 2568</span>&#160;</div><div class="line"><a name="l02569"></a><span class="lineno"> 2569</span>&#160;    <span class="keywordtype">void</span> <span class="keyword">remove</span>(<span class="keywordtype">size_t</span> index)</div><div class="line"><a name="l02570"></a><span class="lineno"> 2570</span>&#160;    {</div><div class="line"><a name="l02571"></a><span class="lineno"> 2571</span>&#160;        VMA_HEAVY_ASSERT(index &lt; m_Count);</div><div class="line"><a name="l02572"></a><span class="lineno"> 2572</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> oldCount = size();</div><div class="line"><a name="l02573"></a><span class="lineno"> 2573</span>&#160;        <span class="keywordflow">if</span>(index &lt; oldCount - 1)</div><div class="line"><a name="l02574"></a><span class="lineno"> 2574</span>&#160;        {</div><div class="line"><a name="l02575"></a><span class="lineno"> 2575</span>&#160;            memmove(m_pArray + index, m_pArray + (index + 1), (oldCount - index - 1) * <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l02576"></a><span class="lineno"> 2576</span>&#160;        }</div><div class="line"><a name="l02577"></a><span class="lineno"> 2577</span>&#160;        resize(oldCount - 1);</div><div class="line"><a name="l02578"></a><span class="lineno"> 2578</span>&#160;    }</div><div class="line"><a name="l02579"></a><span class="lineno"> 2579</span>&#160;</div><div class="line"><a name="l02580"></a><span class="lineno"> 2580</span>&#160;    <span class="keywordtype">void</span> push_back(<span class="keyword">const</span> T&amp; src)</div><div class="line"><a name="l02581"></a><span class="lineno"> 2581</span>&#160;    {</div><div class="line"><a name="l02582"></a><span class="lineno"> 2582</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">size_t</span> newIndex = size();</div><div class="line"><a name="l02583"></a><span class="lineno"> 2583</span>&#160;        resize(newIndex + 1);</div><div class="line"><a name="l02584"></a><span class="lineno"> 2584</span>&#160;        m_pArray[newIndex] = src;</div><div class="line"><a name="l02585"></a><span class="lineno"> 2585</span>&#160;    }</div><div class="line"><a name="l02586"></a><span class="lineno"> 2586</span>&#160;</div><div class="line"><a name="l02587"></a><span class="lineno"> 2587</span>&#160;    <span class="keywordtype">void</span> pop_back()</div><div class="line"><a name="l02588"></a><span class="lineno"> 2588</span>&#160;    {</div><div class="line"><a name="l02589"></a><span class="lineno"> 2589</span>&#160;        VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02590"></a><span class="lineno"> 2590</span>&#160;        resize(size() - 1);</div><div class="line"><a name="l02591"></a><span class="lineno"> 2591</span>&#160;    }</div><div class="line"><a name="l02592"></a><span class="lineno"> 2592</span>&#160;</div><div class="line"><a name="l02593"></a><span class="lineno"> 2593</span>&#160;    <span class="keywordtype">void</span> push_front(<span class="keyword">const</span> T&amp; src)</div><div class="line"><a name="l02594"></a><span class="lineno"> 2594</span>&#160;    {</div><div class="line"><a name="l02595"></a><span class="lineno"> 2595</span>&#160;        insert(0, src);</div><div class="line"><a name="l02596"></a><span class="lineno"> 2596</span>&#160;    }</div><div class="line"><a name="l02597"></a><span class="lineno"> 2597</span>&#160;</div><div class="line"><a name="l02598"></a><span class="lineno"> 2598</span>&#160;    <span class="keywordtype">void</span> pop_front()</div><div class="line"><a name="l02599"></a><span class="lineno"> 2599</span>&#160;    {</div><div class="line"><a name="l02600"></a><span class="lineno"> 2600</span>&#160;        VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02601"></a><span class="lineno"> 2601</span>&#160;        <span class="keyword">remove</span>(0);</div><div class="line"><a name="l02602"></a><span class="lineno"> 2602</span>&#160;    }</div><div class="line"><a name="l02603"></a><span class="lineno"> 2603</span>&#160;</div><div class="line"><a name="l02604"></a><span class="lineno"> 2604</span>&#160;    <span class="keyword">typedef</span> T* iterator;</div><div class="line"><a name="l02605"></a><span class="lineno"> 2605</span>&#160;</div><div class="line"><a name="l02606"></a><span class="lineno"> 2606</span>&#160;    iterator begin() { <span class="keywordflow">return</span> m_pArray; }</div><div class="line"><a name="l02607"></a><span class="lineno"> 2607</span>&#160;    iterator end() { <span class="keywordflow">return</span> m_pArray + m_Count; }</div><div class="line"><a name="l02608"></a><span class="lineno"> 2608</span>&#160;</div><div class="line"><a name="l02609"></a><span class="lineno"> 2609</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l02610"></a><span class="lineno"> 2610</span>&#160;    AllocatorT m_Allocator;</div><div class="line"><a name="l02611"></a><span class="lineno"> 2611</span>&#160;    T* m_pArray;</div><div class="line"><a name="l02612"></a><span class="lineno"> 2612</span>&#160;    <span class="keywordtype">size_t</span> m_Count;</div><div class="line"><a name="l02613"></a><span class="lineno"> 2613</span>&#160;    <span class="keywordtype">size_t</span> m_Capacity;</div><div class="line"><a name="l02614"></a><span class="lineno"> 2614</span>&#160;};</div><div class="line"><a name="l02615"></a><span class="lineno"> 2615</span>&#160;</div><div class="line"><a name="l02616"></a><span class="lineno"> 2616</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> allocatorT&gt;</div><div class="line"><a name="l02617"></a><span class="lineno"> 2617</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> VmaVectorInsert(VmaVector&lt;T, allocatorT&gt;&amp; vec, <span class="keywordtype">size_t</span> index, <span class="keyword">const</span> T&amp; item)</div><div class="line"><a name="l02618"></a><span class="lineno"> 2618</span>&#160;{</div><div class="line"><a name="l02619"></a><span class="lineno"> 2619</span>&#160;    vec.insert(index, item);</div><div class="line"><a name="l02620"></a><span class="lineno"> 2620</span>&#160;}</div><div class="line"><a name="l02621"></a><span class="lineno"> 2621</span>&#160;</div><div class="line"><a name="l02622"></a><span class="lineno"> 2622</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> allocatorT&gt;</div><div class="line"><a name="l02623"></a><span class="lineno"> 2623</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> VmaVectorRemove(VmaVector&lt;T, allocatorT&gt;&amp; vec, <span class="keywordtype">size_t</span> index)</div><div class="line"><a name="l02624"></a><span class="lineno"> 2624</span>&#160;{</div><div class="line"><a name="l02625"></a><span class="lineno"> 2625</span>&#160;    vec.remove(index);</div><div class="line"><a name="l02626"></a><span class="lineno"> 2626</span>&#160;}</div><div class="line"><a name="l02627"></a><span class="lineno"> 2627</span>&#160;</div><div class="line"><a name="l02628"></a><span class="lineno"> 2628</span>&#160;<span class="preprocessor">#endif // #if VMA_USE_STL_VECTOR</span></div><div class="line"><a name="l02629"></a><span class="lineno"> 2629</span>&#160;</div><div class="line"><a name="l02630"></a><span class="lineno"> 2630</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> CmpLess, <span class="keyword">typename</span> VectorT&gt;</div><div class="line"><a name="l02631"></a><span class="lineno"> 2631</span>&#160;<span class="keywordtype">size_t</span> VmaVectorInsertSorted(VectorT&amp; vector, <span class="keyword">const</span> <span class="keyword">typename</span> VectorT::value_type&amp; value)</div><div class="line"><a name="l02632"></a><span class="lineno"> 2632</span>&#160;{</div><div class="line"><a name="l02633"></a><span class="lineno"> 2633</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">size_t</span> indexToInsert = VmaBinaryFindFirstNotLess(</div><div class="line"><a name="l02634"></a><span class="lineno"> 2634</span>&#160;        vector.data(),</div><div class="line"><a name="l02635"></a><span class="lineno"> 2635</span>&#160;        vector.data() + vector.size(),</div><div class="line"><a name="l02636"></a><span class="lineno"> 2636</span>&#160;        value,</div><div class="line"><a name="l02637"></a><span class="lineno"> 2637</span>&#160;        CmpLess()) - vector.data();</div><div class="line"><a name="l02638"></a><span class="lineno"> 2638</span>&#160;    VmaVectorInsert(vector, indexToInsert, value);</div><div class="line"><a name="l02639"></a><span class="lineno"> 2639</span>&#160;    <span class="keywordflow">return</span> indexToInsert;</div><div class="line"><a name="l02640"></a><span class="lineno"> 2640</span>&#160;}</div><div class="line"><a name="l02641"></a><span class="lineno"> 2641</span>&#160;</div><div class="line"><a name="l02642"></a><span class="lineno"> 2642</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> CmpLess, <span class="keyword">typename</span> VectorT&gt;</div><div class="line"><a name="l02643"></a><span class="lineno"> 2643</span>&#160;<span class="keywordtype">bool</span> VmaVectorRemoveSorted(VectorT&amp; vector, <span class="keyword">const</span> <span class="keyword">typename</span> VectorT::value_type&amp; value)</div><div class="line"><a name="l02644"></a><span class="lineno"> 2644</span>&#160;{</div><div class="line"><a name="l02645"></a><span class="lineno"> 2645</span>&#160;    CmpLess comparator;</div><div class="line"><a name="l02646"></a><span class="lineno"> 2646</span>&#160;    <span class="keyword">typename</span> VectorT::iterator it = VmaBinaryFindFirstNotLess(</div><div class="line"><a name="l02647"></a><span class="lineno"> 2647</span>&#160;        vector.begin(),</div><div class="line"><a name="l02648"></a><span class="lineno"> 2648</span>&#160;        vector.end(),</div><div class="line"><a name="l02649"></a><span class="lineno"> 2649</span>&#160;        value,</div><div class="line"><a name="l02650"></a><span class="lineno"> 2650</span>&#160;        comparator);</div><div class="line"><a name="l02651"></a><span class="lineno"> 2651</span>&#160;    <span class="keywordflow">if</span>((it != vector.end()) &amp;&amp; !comparator(*it, value) &amp;&amp; !comparator(value, *it))</div><div class="line"><a name="l02652"></a><span class="lineno"> 2652</span>&#160;    {</div><div class="line"><a name="l02653"></a><span class="lineno"> 2653</span>&#160;        <span class="keywordtype">size_t</span> indexToRemove = it - vector.begin();</div><div class="line"><a name="l02654"></a><span class="lineno"> 2654</span>&#160;        VmaVectorRemove(vector, indexToRemove);</div><div class="line"><a name="l02655"></a><span class="lineno"> 2655</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l02656"></a><span class="lineno"> 2656</span>&#160;    }</div><div class="line"><a name="l02657"></a><span class="lineno"> 2657</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l02658"></a><span class="lineno"> 2658</span>&#160;}</div><div class="line"><a name="l02659"></a><span class="lineno"> 2659</span>&#160;</div><div class="line"><a name="l02660"></a><span class="lineno"> 2660</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> CmpLess, <span class="keyword">typename</span> VectorT&gt;</div><div class="line"><a name="l02661"></a><span class="lineno"> 2661</span>&#160;<span class="keywordtype">size_t</span> VmaVectorFindSorted(<span class="keyword">const</span> VectorT&amp; vector, <span class="keyword">const</span> <span class="keyword">typename</span> VectorT::value_type&amp; value)</div><div class="line"><a name="l02662"></a><span class="lineno"> 2662</span>&#160;{</div><div class="line"><a name="l02663"></a><span class="lineno"> 2663</span>&#160;    CmpLess comparator;</div><div class="line"><a name="l02664"></a><span class="lineno"> 2664</span>&#160;    <span class="keyword">typename</span> VectorT::iterator it = VmaBinaryFindFirstNotLess(</div><div class="line"><a name="l02665"></a><span class="lineno"> 2665</span>&#160;        vector.data(),</div><div class="line"><a name="l02666"></a><span class="lineno"> 2666</span>&#160;        vector.data() + vector.size(),</div><div class="line"><a name="l02667"></a><span class="lineno"> 2667</span>&#160;        value,</div><div class="line"><a name="l02668"></a><span class="lineno"> 2668</span>&#160;        comparator);</div><div class="line"><a name="l02669"></a><span class="lineno"> 2669</span>&#160;    <span class="keywordflow">if</span>(it != vector.size() &amp;&amp; !comparator(*it, value) &amp;&amp; !comparator(value, *it))</div><div class="line"><a name="l02670"></a><span class="lineno"> 2670</span>&#160;    {</div><div class="line"><a name="l02671"></a><span class="lineno"> 2671</span>&#160;        <span class="keywordflow">return</span> it - vector.begin();</div><div class="line"><a name="l02672"></a><span class="lineno"> 2672</span>&#160;    }</div><div class="line"><a name="l02673"></a><span class="lineno"> 2673</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l02674"></a><span class="lineno"> 2674</span>&#160;    {</div><div class="line"><a name="l02675"></a><span class="lineno"> 2675</span>&#160;        <span class="keywordflow">return</span> vector.size();</div><div class="line"><a name="l02676"></a><span class="lineno"> 2676</span>&#160;    }</div><div class="line"><a name="l02677"></a><span class="lineno"> 2677</span>&#160;}</div><div class="line"><a name="l02678"></a><span class="lineno"> 2678</span>&#160;</div><div class="line"><a name="l02680"></a><span class="lineno"> 2680</span>&#160;<span class="comment">// class VmaPoolAllocator</span></div><div class="line"><a name="l02681"></a><span class="lineno"> 2681</span>&#160;</div><div class="line"><a name="l02682"></a><span class="lineno"> 2682</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l02683"></a><span class="lineno"> 2683</span>&#160;<span class="comment">Allocator for objects of type T using a list of arrays (pools) to speed up</span></div><div class="line"><a name="l02684"></a><span class="lineno"> 2684</span>&#160;<span class="comment">allocation. Number of elements that can be allocated is not bounded because</span></div><div class="line"><a name="l02685"></a><span class="lineno"> 2685</span>&#160;<span class="comment">allocator can create multiple blocks.</span></div><div class="line"><a name="l02686"></a><span class="lineno"> 2686</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l02687"></a><span class="lineno"> 2687</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02688"></a><span class="lineno"> 2688</span>&#160;<span class="keyword">class </span>VmaPoolAllocator</div><div class="line"><a name="l02689"></a><span class="lineno"> 2689</span>&#160;{</div><div class="line"><a name="l02690"></a><span class="lineno"> 2690</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l02691"></a><span class="lineno"> 2691</span>&#160;    VmaPoolAllocator(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks, <span class="keywordtype">size_t</span> itemsPerBlock);</div><div class="line"><a name="l02692"></a><span class="lineno"> 2692</span>&#160;    ~VmaPoolAllocator();</div><div class="line"><a name="l02693"></a><span class="lineno"> 2693</span>&#160;    <span class="keywordtype">void</span> Clear();</div><div class="line"><a name="l02694"></a><span class="lineno"> 2694</span>&#160;    T* Alloc();</div><div class="line"><a name="l02695"></a><span class="lineno"> 2695</span>&#160;    <span class="keywordtype">void</span> Free(T* ptr);</div><div class="line"><a name="l02696"></a><span class="lineno"> 2696</span>&#160;</div><div class="line"><a name="l02697"></a><span class="lineno"> 2697</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l02698"></a><span class="lineno"> 2698</span>&#160;    <span class="keyword">union </span>Item</div><div class="line"><a name="l02699"></a><span class="lineno"> 2699</span>&#160;    {</div><div class="line"><a name="l02700"></a><span class="lineno"> 2700</span>&#160;        uint32_t NextFreeIndex;</div><div class="line"><a name="l02701"></a><span class="lineno"> 2701</span>&#160;        T Value;</div><div class="line"><a name="l02702"></a><span class="lineno"> 2702</span>&#160;    };</div><div class="line"><a name="l02703"></a><span class="lineno"> 2703</span>&#160;</div><div class="line"><a name="l02704"></a><span class="lineno"> 2704</span>&#160;    <span class="keyword">struct </span>ItemBlock</div><div class="line"><a name="l02705"></a><span class="lineno"> 2705</span>&#160;    {</div><div class="line"><a name="l02706"></a><span class="lineno"> 2706</span>&#160;        Item* pItems;</div><div class="line"><a name="l02707"></a><span class="lineno"> 2707</span>&#160;        uint32_t FirstFreeIndex;</div><div class="line"><a name="l02708"></a><span class="lineno"> 2708</span>&#160;    };</div><div class="line"><a name="l02709"></a><span class="lineno"> 2709</span>&#160;    </div><div class="line"><a name="l02710"></a><span class="lineno"> 2710</span>&#160;    <span class="keyword">const</span> VkAllocationCallbacks* m_pAllocationCallbacks;</div><div class="line"><a name="l02711"></a><span class="lineno"> 2711</span>&#160;    <span class="keywordtype">size_t</span> m_ItemsPerBlock;</div><div class="line"><a name="l02712"></a><span class="lineno"> 2712</span>&#160;    VmaVector&lt; ItemBlock, VmaStlAllocator&lt;ItemBlock&gt; &gt; m_ItemBlocks;</div><div class="line"><a name="l02713"></a><span class="lineno"> 2713</span>&#160;</div><div class="line"><a name="l02714"></a><span class="lineno"> 2714</span>&#160;    ItemBlock&amp; CreateNewBlock();</div><div class="line"><a name="l02715"></a><span class="lineno"> 2715</span>&#160;};</div><div class="line"><a name="l02716"></a><span class="lineno"> 2716</span>&#160;</div><div class="line"><a name="l02717"></a><span class="lineno"> 2717</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02718"></a><span class="lineno"> 2718</span>&#160;VmaPoolAllocator&lt;T&gt;::VmaPoolAllocator(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks, <span class="keywordtype">size_t</span> itemsPerBlock) :</div><div class="line"><a name="l02719"></a><span class="lineno"> 2719</span>&#160;    m_pAllocationCallbacks(pAllocationCallbacks),</div><div class="line"><a name="l02720"></a><span class="lineno"> 2720</span>&#160;    m_ItemsPerBlock(itemsPerBlock),</div><div class="line"><a name="l02721"></a><span class="lineno"> 2721</span>&#160;    m_ItemBlocks(VmaStlAllocator&lt;ItemBlock&gt;(pAllocationCallbacks))</div><div class="line"><a name="l02722"></a><span class="lineno"> 2722</span>&#160;{</div><div class="line"><a name="l02723"></a><span class="lineno"> 2723</span>&#160;    VMA_ASSERT(itemsPerBlock &gt; 0);</div><div class="line"><a name="l02724"></a><span class="lineno"> 2724</span>&#160;}</div><div class="line"><a name="l02725"></a><span class="lineno"> 2725</span>&#160;</div><div class="line"><a name="l02726"></a><span class="lineno"> 2726</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02727"></a><span class="lineno"> 2727</span>&#160;VmaPoolAllocator&lt;T&gt;::~VmaPoolAllocator()</div><div class="line"><a name="l02728"></a><span class="lineno"> 2728</span>&#160;{</div><div class="line"><a name="l02729"></a><span class="lineno"> 2729</span>&#160;    Clear();</div><div class="line"><a name="l02730"></a><span class="lineno"> 2730</span>&#160;}</div><div class="line"><a name="l02731"></a><span class="lineno"> 2731</span>&#160;</div><div class="line"><a name="l02732"></a><span class="lineno"> 2732</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02733"></a><span class="lineno"> 2733</span>&#160;<span class="keywordtype">void</span> VmaPoolAllocator&lt;T&gt;::Clear()</div><div class="line"><a name="l02734"></a><span class="lineno"> 2734</span>&#160;{</div><div class="line"><a name="l02735"></a><span class="lineno"> 2735</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = m_ItemBlocks.size(); i--; )</div><div class="line"><a name="l02736"></a><span class="lineno"> 2736</span>&#160;        vma_delete_array(m_pAllocationCallbacks, m_ItemBlocks[i].pItems, m_ItemsPerBlock);</div><div class="line"><a name="l02737"></a><span class="lineno"> 2737</span>&#160;    m_ItemBlocks.clear();</div><div class="line"><a name="l02738"></a><span class="lineno"> 2738</span>&#160;}</div><div class="line"><a name="l02739"></a><span class="lineno"> 2739</span>&#160;</div><div class="line"><a name="l02740"></a><span class="lineno"> 2740</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02741"></a><span class="lineno"> 2741</span>&#160;T* VmaPoolAllocator&lt;T&gt;::Alloc()</div><div class="line"><a name="l02742"></a><span class="lineno"> 2742</span>&#160;{</div><div class="line"><a name="l02743"></a><span class="lineno"> 2743</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = m_ItemBlocks.size(); i--; )</div><div class="line"><a name="l02744"></a><span class="lineno"> 2744</span>&#160;    {</div><div class="line"><a name="l02745"></a><span class="lineno"> 2745</span>&#160;        ItemBlock&amp; block = m_ItemBlocks[i];</div><div class="line"><a name="l02746"></a><span class="lineno"> 2746</span>&#160;        <span class="comment">// This block has some free items: Use first one.</span></div><div class="line"><a name="l02747"></a><span class="lineno"> 2747</span>&#160;        <span class="keywordflow">if</span>(block.FirstFreeIndex != UINT32_MAX)</div><div class="line"><a name="l02748"></a><span class="lineno"> 2748</span>&#160;        {</div><div class="line"><a name="l02749"></a><span class="lineno"> 2749</span>&#160;            Item* <span class="keyword">const</span> pItem = &amp;block.pItems[block.FirstFreeIndex];</div><div class="line"><a name="l02750"></a><span class="lineno"> 2750</span>&#160;            block.FirstFreeIndex = pItem-&gt;NextFreeIndex;</div><div class="line"><a name="l02751"></a><span class="lineno"> 2751</span>&#160;            <span class="keywordflow">return</span> &amp;pItem-&gt;Value;</div><div class="line"><a name="l02752"></a><span class="lineno"> 2752</span>&#160;        }</div><div class="line"><a name="l02753"></a><span class="lineno"> 2753</span>&#160;    }</div><div class="line"><a name="l02754"></a><span class="lineno"> 2754</span>&#160;</div><div class="line"><a name="l02755"></a><span class="lineno"> 2755</span>&#160;    <span class="comment">// No block has free item: Create new one and use it.</span></div><div class="line"><a name="l02756"></a><span class="lineno"> 2756</span>&#160;    ItemBlock&amp; newBlock = CreateNewBlock();</div><div class="line"><a name="l02757"></a><span class="lineno"> 2757</span>&#160;    Item* <span class="keyword">const</span> pItem = &amp;newBlock.pItems[0];</div><div class="line"><a name="l02758"></a><span class="lineno"> 2758</span>&#160;    newBlock.FirstFreeIndex = pItem-&gt;NextFreeIndex;</div><div class="line"><a name="l02759"></a><span class="lineno"> 2759</span>&#160;    <span class="keywordflow">return</span> &amp;pItem-&gt;Value;</div><div class="line"><a name="l02760"></a><span class="lineno"> 2760</span>&#160;}</div><div class="line"><a name="l02761"></a><span class="lineno"> 2761</span>&#160;</div><div class="line"><a name="l02762"></a><span class="lineno"> 2762</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02763"></a><span class="lineno"> 2763</span>&#160;<span class="keywordtype">void</span> VmaPoolAllocator&lt;T&gt;::Free(T* ptr)</div><div class="line"><a name="l02764"></a><span class="lineno"> 2764</span>&#160;{</div><div class="line"><a name="l02765"></a><span class="lineno"> 2765</span>&#160;    <span class="comment">// Search all memory blocks to find ptr.</span></div><div class="line"><a name="l02766"></a><span class="lineno"> 2766</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0; i &lt; m_ItemBlocks.size(); ++i)</div><div class="line"><a name="l02767"></a><span class="lineno"> 2767</span>&#160;    {</div><div class="line"><a name="l02768"></a><span class="lineno"> 2768</span>&#160;        ItemBlock&amp; block = m_ItemBlocks[i];</div><div class="line"><a name="l02769"></a><span class="lineno"> 2769</span>&#160;        </div><div class="line"><a name="l02770"></a><span class="lineno"> 2770</span>&#160;        <span class="comment">// Casting to union.</span></div><div class="line"><a name="l02771"></a><span class="lineno"> 2771</span>&#160;        Item* pItemPtr;</div><div class="line"><a name="l02772"></a><span class="lineno"> 2772</span>&#160;        memcpy(&amp;pItemPtr, &amp;ptr, <span class="keyword">sizeof</span>(pItemPtr));</div><div class="line"><a name="l02773"></a><span class="lineno"> 2773</span>&#160;        </div><div class="line"><a name="l02774"></a><span class="lineno"> 2774</span>&#160;        <span class="comment">// Check if pItemPtr is in address range of this block.</span></div><div class="line"><a name="l02775"></a><span class="lineno"> 2775</span>&#160;        <span class="keywordflow">if</span>((pItemPtr &gt;= block.pItems) &amp;&amp; (pItemPtr &lt; block.pItems + m_ItemsPerBlock))</div><div class="line"><a name="l02776"></a><span class="lineno"> 2776</span>&#160;        {</div><div class="line"><a name="l02777"></a><span class="lineno"> 2777</span>&#160;            <span class="keyword">const</span> uint32_t index = <span class="keyword">static_cast&lt;</span>uint32_t<span class="keyword">&gt;</span>(pItemPtr - block.pItems);</div><div class="line"><a name="l02778"></a><span class="lineno"> 2778</span>&#160;            pItemPtr-&gt;NextFreeIndex = block.FirstFreeIndex;</div><div class="line"><a name="l02779"></a><span class="lineno"> 2779</span>&#160;            block.FirstFreeIndex = index;</div><div class="line"><a name="l02780"></a><span class="lineno"> 2780</span>&#160;            <span class="keywordflow">return</span>;</div><div class="line"><a name="l02781"></a><span class="lineno"> 2781</span>&#160;        }</div><div class="line"><a name="l02782"></a><span class="lineno"> 2782</span>&#160;    }</div><div class="line"><a name="l02783"></a><span class="lineno"> 2783</span>&#160;    VMA_ASSERT(0 &amp;&amp; <span class="stringliteral">&quot;Pointer doesn&#39;t belong to this memory pool.&quot;</span>);</div><div class="line"><a name="l02784"></a><span class="lineno"> 2784</span>&#160;}</div><div class="line"><a name="l02785"></a><span class="lineno"> 2785</span>&#160;</div><div class="line"><a name="l02786"></a><span class="lineno"> 2786</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02787"></a><span class="lineno"> 2787</span>&#160;<span class="keyword">typename</span> VmaPoolAllocator&lt;T&gt;::ItemBlock&amp; VmaPoolAllocator&lt;T&gt;::CreateNewBlock()</div><div class="line"><a name="l02788"></a><span class="lineno"> 2788</span>&#160;{</div><div class="line"><a name="l02789"></a><span class="lineno"> 2789</span>&#160;    ItemBlock newBlock = {</div><div class="line"><a name="l02790"></a><span class="lineno"> 2790</span>&#160;        vma_new_array(m_pAllocationCallbacks, Item, m_ItemsPerBlock), 0 };</div><div class="line"><a name="l02791"></a><span class="lineno"> 2791</span>&#160;</div><div class="line"><a name="l02792"></a><span class="lineno"> 2792</span>&#160;    m_ItemBlocks.push_back(newBlock);</div><div class="line"><a name="l02793"></a><span class="lineno"> 2793</span>&#160;</div><div class="line"><a name="l02794"></a><span class="lineno"> 2794</span>&#160;    <span class="comment">// Setup singly-linked list of all free items in this block.</span></div><div class="line"><a name="l02795"></a><span class="lineno"> 2795</span>&#160;    <span class="keywordflow">for</span>(uint32_t i = 0; i &lt; m_ItemsPerBlock - 1; ++i)</div><div class="line"><a name="l02796"></a><span class="lineno"> 2796</span>&#160;        newBlock.pItems[i].NextFreeIndex = i + 1;</div><div class="line"><a name="l02797"></a><span class="lineno"> 2797</span>&#160;    newBlock.pItems[m_ItemsPerBlock - 1].NextFreeIndex = UINT32_MAX;</div><div class="line"><a name="l02798"></a><span class="lineno"> 2798</span>&#160;    <span class="keywordflow">return</span> m_ItemBlocks.back();</div><div class="line"><a name="l02799"></a><span class="lineno"> 2799</span>&#160;}</div><div class="line"><a name="l02800"></a><span class="lineno"> 2800</span>&#160;</div><div class="line"><a name="l02802"></a><span class="lineno"> 2802</span>&#160;<span class="comment">// class VmaRawList, VmaList</span></div><div class="line"><a name="l02803"></a><span class="lineno"> 2803</span>&#160;</div><div class="line"><a name="l02804"></a><span class="lineno"> 2804</span>&#160;<span class="preprocessor">#if VMA_USE_STL_LIST</span></div><div class="line"><a name="l02805"></a><span class="lineno"> 2805</span>&#160;</div><div class="line"><a name="l02806"></a><span class="lineno"> 2806</span>&#160;<span class="preprocessor">#define VmaList std::list</span></div><div class="line"><a name="l02807"></a><span class="lineno"> 2807</span>&#160;</div><div class="line"><a name="l02808"></a><span class="lineno"> 2808</span>&#160;<span class="preprocessor">#else // #if VMA_USE_STL_LIST</span></div><div class="line"><a name="l02809"></a><span class="lineno"> 2809</span>&#160;</div><div class="line"><a name="l02810"></a><span class="lineno"> 2810</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02811"></a><span class="lineno"> 2811</span>&#160;<span class="keyword">struct </span>VmaListItem</div><div class="line"><a name="l02812"></a><span class="lineno"> 2812</span>&#160;{</div><div class="line"><a name="l02813"></a><span class="lineno"> 2813</span>&#160;    VmaListItem* pPrev;</div><div class="line"><a name="l02814"></a><span class="lineno"> 2814</span>&#160;    VmaListItem* pNext;</div><div class="line"><a name="l02815"></a><span class="lineno"> 2815</span>&#160;    T Value;</div><div class="line"><a name="l02816"></a><span class="lineno"> 2816</span>&#160;};</div><div class="line"><a name="l02817"></a><span class="lineno"> 2817</span>&#160;</div><div class="line"><a name="l02818"></a><span class="lineno"> 2818</span>&#160;<span class="comment">// Doubly linked list.</span></div><div class="line"><a name="l02819"></a><span class="lineno"> 2819</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02820"></a><span class="lineno"> 2820</span>&#160;<span class="keyword">class </span>VmaRawList</div><div class="line"><a name="l02821"></a><span class="lineno"> 2821</span>&#160;{</div><div class="line"><a name="l02822"></a><span class="lineno"> 2822</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l02823"></a><span class="lineno"> 2823</span>&#160;    <span class="keyword">typedef</span> VmaListItem&lt;T&gt; ItemType;</div><div class="line"><a name="l02824"></a><span class="lineno"> 2824</span>&#160;</div><div class="line"><a name="l02825"></a><span class="lineno"> 2825</span>&#160;    VmaRawList(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks);</div><div class="line"><a name="l02826"></a><span class="lineno"> 2826</span>&#160;    ~VmaRawList();</div><div class="line"><a name="l02827"></a><span class="lineno"> 2827</span>&#160;    <span class="keywordtype">void</span> Clear();</div><div class="line"><a name="l02828"></a><span class="lineno"> 2828</span>&#160;</div><div class="line"><a name="l02829"></a><span class="lineno"> 2829</span>&#160;    <span class="keywordtype">size_t</span> GetCount()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Count; }</div><div class="line"><a name="l02830"></a><span class="lineno"> 2830</span>&#160;    <span class="keywordtype">bool</span> IsEmpty()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Count == 0; }</div><div class="line"><a name="l02831"></a><span class="lineno"> 2831</span>&#160;</div><div class="line"><a name="l02832"></a><span class="lineno"> 2832</span>&#160;    ItemType* Front() { <span class="keywordflow">return</span> m_pFront; }</div><div class="line"><a name="l02833"></a><span class="lineno"> 2833</span>&#160;    <span class="keyword">const</span> ItemType* Front()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_pFront; }</div><div class="line"><a name="l02834"></a><span class="lineno"> 2834</span>&#160;    ItemType* Back() { <span class="keywordflow">return</span> m_pBack; }</div><div class="line"><a name="l02835"></a><span class="lineno"> 2835</span>&#160;    <span class="keyword">const</span> ItemType* Back()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_pBack; }</div><div class="line"><a name="l02836"></a><span class="lineno"> 2836</span>&#160;</div><div class="line"><a name="l02837"></a><span class="lineno"> 2837</span>&#160;    ItemType* PushBack();</div><div class="line"><a name="l02838"></a><span class="lineno"> 2838</span>&#160;    ItemType* PushFront();</div><div class="line"><a name="l02839"></a><span class="lineno"> 2839</span>&#160;    ItemType* PushBack(<span class="keyword">const</span> T&amp; value);</div><div class="line"><a name="l02840"></a><span class="lineno"> 2840</span>&#160;    ItemType* PushFront(<span class="keyword">const</span> T&amp; value);</div><div class="line"><a name="l02841"></a><span class="lineno"> 2841</span>&#160;    <span class="keywordtype">void</span> PopBack();</div><div class="line"><a name="l02842"></a><span class="lineno"> 2842</span>&#160;    <span class="keywordtype">void</span> PopFront();</div><div class="line"><a name="l02843"></a><span class="lineno"> 2843</span>&#160;    </div><div class="line"><a name="l02844"></a><span class="lineno"> 2844</span>&#160;    <span class="comment">// Item can be null - it means PushBack.</span></div><div class="line"><a name="l02845"></a><span class="lineno"> 2845</span>&#160;    ItemType* InsertBefore(ItemType* pItem);</div><div class="line"><a name="l02846"></a><span class="lineno"> 2846</span>&#160;    <span class="comment">// Item can be null - it means PushFront.</span></div><div class="line"><a name="l02847"></a><span class="lineno"> 2847</span>&#160;    ItemType* InsertAfter(ItemType* pItem);</div><div class="line"><a name="l02848"></a><span class="lineno"> 2848</span>&#160;</div><div class="line"><a name="l02849"></a><span class="lineno"> 2849</span>&#160;    ItemType* InsertBefore(ItemType* pItem, <span class="keyword">const</span> T&amp; value);</div><div class="line"><a name="l02850"></a><span class="lineno"> 2850</span>&#160;    ItemType* InsertAfter(ItemType* pItem, <span class="keyword">const</span> T&amp; value);</div><div class="line"><a name="l02851"></a><span class="lineno"> 2851</span>&#160;</div><div class="line"><a name="l02852"></a><span class="lineno"> 2852</span>&#160;    <span class="keywordtype">void</span> Remove(ItemType* pItem);</div><div class="line"><a name="l02853"></a><span class="lineno"> 2853</span>&#160;</div><div class="line"><a name="l02854"></a><span class="lineno"> 2854</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l02855"></a><span class="lineno"> 2855</span>&#160;    <span class="keyword">const</span> VkAllocationCallbacks* <span class="keyword">const</span> m_pAllocationCallbacks;</div><div class="line"><a name="l02856"></a><span class="lineno"> 2856</span>&#160;    VmaPoolAllocator&lt;ItemType&gt; m_ItemAllocator;</div><div class="line"><a name="l02857"></a><span class="lineno"> 2857</span>&#160;    ItemType* m_pFront;</div><div class="line"><a name="l02858"></a><span class="lineno"> 2858</span>&#160;    ItemType* m_pBack;</div><div class="line"><a name="l02859"></a><span class="lineno"> 2859</span>&#160;    <span class="keywordtype">size_t</span> m_Count;</div><div class="line"><a name="l02860"></a><span class="lineno"> 2860</span>&#160;</div><div class="line"><a name="l02861"></a><span class="lineno"> 2861</span>&#160;    <span class="comment">// Declared not defined, to block copy constructor and assignment operator.</span></div><div class="line"><a name="l02862"></a><span class="lineno"> 2862</span>&#160;    VmaRawList(<span class="keyword">const</span> VmaRawList&lt;T&gt;&amp; src);</div><div class="line"><a name="l02863"></a><span class="lineno"> 2863</span>&#160;    VmaRawList&lt;T&gt;&amp; operator=(<span class="keyword">const</span> VmaRawList&lt;T&gt;&amp; rhs);</div><div class="line"><a name="l02864"></a><span class="lineno"> 2864</span>&#160;};</div><div class="line"><a name="l02865"></a><span class="lineno"> 2865</span>&#160;</div><div class="line"><a name="l02866"></a><span class="lineno"> 2866</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02867"></a><span class="lineno"> 2867</span>&#160;VmaRawList&lt;T&gt;::VmaRawList(<span class="keyword">const</span> VkAllocationCallbacks* pAllocationCallbacks) :</div><div class="line"><a name="l02868"></a><span class="lineno"> 2868</span>&#160;    m_pAllocationCallbacks(pAllocationCallbacks),</div><div class="line"><a name="l02869"></a><span class="lineno"> 2869</span>&#160;    m_ItemAllocator(pAllocationCallbacks, 128),</div><div class="line"><a name="l02870"></a><span class="lineno"> 2870</span>&#160;    m_pFront(VMA_NULL),</div><div class="line"><a name="l02871"></a><span class="lineno"> 2871</span>&#160;    m_pBack(VMA_NULL),</div><div class="line"><a name="l02872"></a><span class="lineno"> 2872</span>&#160;    m_Count(0)</div><div class="line"><a name="l02873"></a><span class="lineno"> 2873</span>&#160;{</div><div class="line"><a name="l02874"></a><span class="lineno"> 2874</span>&#160;}</div><div class="line"><a name="l02875"></a><span class="lineno"> 2875</span>&#160;</div><div class="line"><a name="l02876"></a><span class="lineno"> 2876</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02877"></a><span class="lineno"> 2877</span>&#160;VmaRawList&lt;T&gt;::~VmaRawList()</div><div class="line"><a name="l02878"></a><span class="lineno"> 2878</span>&#160;{</div><div class="line"><a name="l02879"></a><span class="lineno"> 2879</span>&#160;    <span class="comment">// Intentionally not calling Clear, because that would be unnecessary</span></div><div class="line"><a name="l02880"></a><span class="lineno"> 2880</span>&#160;    <span class="comment">// computations to return all items to m_ItemAllocator as free.</span></div><div class="line"><a name="l02881"></a><span class="lineno"> 2881</span>&#160;}</div><div class="line"><a name="l02882"></a><span class="lineno"> 2882</span>&#160;</div><div class="line"><a name="l02883"></a><span class="lineno"> 2883</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02884"></a><span class="lineno"> 2884</span>&#160;<span class="keywordtype">void</span> VmaRawList&lt;T&gt;::Clear()</div><div class="line"><a name="l02885"></a><span class="lineno"> 2885</span>&#160;{</div><div class="line"><a name="l02886"></a><span class="lineno"> 2886</span>&#160;    <span class="keywordflow">if</span>(IsEmpty() == <span class="keyword">false</span>)</div><div class="line"><a name="l02887"></a><span class="lineno"> 2887</span>&#160;    {</div><div class="line"><a name="l02888"></a><span class="lineno"> 2888</span>&#160;        ItemType* pItem = m_pBack;</div><div class="line"><a name="l02889"></a><span class="lineno"> 2889</span>&#160;        <span class="keywordflow">while</span>(pItem != VMA_NULL)</div><div class="line"><a name="l02890"></a><span class="lineno"> 2890</span>&#160;        {</div><div class="line"><a name="l02891"></a><span class="lineno"> 2891</span>&#160;            ItemType* <span class="keyword">const</span> pPrevItem = pItem-&gt;pPrev;</div><div class="line"><a name="l02892"></a><span class="lineno"> 2892</span>&#160;            m_ItemAllocator.Free(pItem);</div><div class="line"><a name="l02893"></a><span class="lineno"> 2893</span>&#160;            pItem = pPrevItem;</div><div class="line"><a name="l02894"></a><span class="lineno"> 2894</span>&#160;        }</div><div class="line"><a name="l02895"></a><span class="lineno"> 2895</span>&#160;        m_pFront = VMA_NULL;</div><div class="line"><a name="l02896"></a><span class="lineno"> 2896</span>&#160;        m_pBack = VMA_NULL;</div><div class="line"><a name="l02897"></a><span class="lineno"> 2897</span>&#160;        m_Count = 0;</div><div class="line"><a name="l02898"></a><span class="lineno"> 2898</span>&#160;    }</div><div class="line"><a name="l02899"></a><span class="lineno"> 2899</span>&#160;}</div><div class="line"><a name="l02900"></a><span class="lineno"> 2900</span>&#160;</div><div class="line"><a name="l02901"></a><span class="lineno"> 2901</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02902"></a><span class="lineno"> 2902</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::PushBack()</div><div class="line"><a name="l02903"></a><span class="lineno"> 2903</span>&#160;{</div><div class="line"><a name="l02904"></a><span class="lineno"> 2904</span>&#160;    ItemType* <span class="keyword">const</span> pNewItem = m_ItemAllocator.Alloc();</div><div class="line"><a name="l02905"></a><span class="lineno"> 2905</span>&#160;    pNewItem-&gt;pNext = VMA_NULL;</div><div class="line"><a name="l02906"></a><span class="lineno"> 2906</span>&#160;    <span class="keywordflow">if</span>(IsEmpty())</div><div class="line"><a name="l02907"></a><span class="lineno"> 2907</span>&#160;    {</div><div class="line"><a name="l02908"></a><span class="lineno"> 2908</span>&#160;        pNewItem-&gt;pPrev = VMA_NULL;</div><div class="line"><a name="l02909"></a><span class="lineno"> 2909</span>&#160;        m_pFront = pNewItem;</div><div class="line"><a name="l02910"></a><span class="lineno"> 2910</span>&#160;        m_pBack = pNewItem;</div><div class="line"><a name="l02911"></a><span class="lineno"> 2911</span>&#160;        m_Count = 1;</div><div class="line"><a name="l02912"></a><span class="lineno"> 2912</span>&#160;    }</div><div class="line"><a name="l02913"></a><span class="lineno"> 2913</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l02914"></a><span class="lineno"> 2914</span>&#160;    {</div><div class="line"><a name="l02915"></a><span class="lineno"> 2915</span>&#160;        pNewItem-&gt;pPrev = m_pBack;</div><div class="line"><a name="l02916"></a><span class="lineno"> 2916</span>&#160;        m_pBack-&gt;pNext = pNewItem;</div><div class="line"><a name="l02917"></a><span class="lineno"> 2917</span>&#160;        m_pBack = pNewItem;</div><div class="line"><a name="l02918"></a><span class="lineno"> 2918</span>&#160;        ++m_Count;</div><div class="line"><a name="l02919"></a><span class="lineno"> 2919</span>&#160;    }</div><div class="line"><a name="l02920"></a><span class="lineno"> 2920</span>&#160;    <span class="keywordflow">return</span> pNewItem;</div><div class="line"><a name="l02921"></a><span class="lineno"> 2921</span>&#160;}</div><div class="line"><a name="l02922"></a><span class="lineno"> 2922</span>&#160;</div><div class="line"><a name="l02923"></a><span class="lineno"> 2923</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02924"></a><span class="lineno"> 2924</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::PushFront()</div><div class="line"><a name="l02925"></a><span class="lineno"> 2925</span>&#160;{</div><div class="line"><a name="l02926"></a><span class="lineno"> 2926</span>&#160;    ItemType* <span class="keyword">const</span> pNewItem = m_ItemAllocator.Alloc();</div><div class="line"><a name="l02927"></a><span class="lineno"> 2927</span>&#160;    pNewItem-&gt;pPrev = VMA_NULL;</div><div class="line"><a name="l02928"></a><span class="lineno"> 2928</span>&#160;    <span class="keywordflow">if</span>(IsEmpty())</div><div class="line"><a name="l02929"></a><span class="lineno"> 2929</span>&#160;    {</div><div class="line"><a name="l02930"></a><span class="lineno"> 2930</span>&#160;        pNewItem-&gt;pNext = VMA_NULL;</div><div class="line"><a name="l02931"></a><span class="lineno"> 2931</span>&#160;        m_pFront = pNewItem;</div><div class="line"><a name="l02932"></a><span class="lineno"> 2932</span>&#160;        m_pBack = pNewItem;</div><div class="line"><a name="l02933"></a><span class="lineno"> 2933</span>&#160;        m_Count = 1;</div><div class="line"><a name="l02934"></a><span class="lineno"> 2934</span>&#160;    }</div><div class="line"><a name="l02935"></a><span class="lineno"> 2935</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l02936"></a><span class="lineno"> 2936</span>&#160;    {</div><div class="line"><a name="l02937"></a><span class="lineno"> 2937</span>&#160;        pNewItem-&gt;pNext = m_pFront;</div><div class="line"><a name="l02938"></a><span class="lineno"> 2938</span>&#160;        m_pFront-&gt;pPrev = pNewItem;</div><div class="line"><a name="l02939"></a><span class="lineno"> 2939</span>&#160;        m_pFront = pNewItem;</div><div class="line"><a name="l02940"></a><span class="lineno"> 2940</span>&#160;        ++m_Count;</div><div class="line"><a name="l02941"></a><span class="lineno"> 2941</span>&#160;    }</div><div class="line"><a name="l02942"></a><span class="lineno"> 2942</span>&#160;    <span class="keywordflow">return</span> pNewItem;</div><div class="line"><a name="l02943"></a><span class="lineno"> 2943</span>&#160;}</div><div class="line"><a name="l02944"></a><span class="lineno"> 2944</span>&#160;</div><div class="line"><a name="l02945"></a><span class="lineno"> 2945</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02946"></a><span class="lineno"> 2946</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::PushBack(<span class="keyword">const</span> T&amp; value)</div><div class="line"><a name="l02947"></a><span class="lineno"> 2947</span>&#160;{</div><div class="line"><a name="l02948"></a><span class="lineno"> 2948</span>&#160;    ItemType* <span class="keyword">const</span> pNewItem = PushBack();</div><div class="line"><a name="l02949"></a><span class="lineno"> 2949</span>&#160;    pNewItem-&gt;Value = value;</div><div class="line"><a name="l02950"></a><span class="lineno"> 2950</span>&#160;    <span class="keywordflow">return</span> pNewItem;</div><div class="line"><a name="l02951"></a><span class="lineno"> 2951</span>&#160;}</div><div class="line"><a name="l02952"></a><span class="lineno"> 2952</span>&#160;</div><div class="line"><a name="l02953"></a><span class="lineno"> 2953</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02954"></a><span class="lineno"> 2954</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::PushFront(<span class="keyword">const</span> T&amp; value)</div><div class="line"><a name="l02955"></a><span class="lineno"> 2955</span>&#160;{</div><div class="line"><a name="l02956"></a><span class="lineno"> 2956</span>&#160;    ItemType* <span class="keyword">const</span> pNewItem = PushFront();</div><div class="line"><a name="l02957"></a><span class="lineno"> 2957</span>&#160;    pNewItem-&gt;Value = value;</div><div class="line"><a name="l02958"></a><span class="lineno"> 2958</span>&#160;    <span class="keywordflow">return</span> pNewItem;</div><div class="line"><a name="l02959"></a><span class="lineno"> 2959</span>&#160;}</div><div class="line"><a name="l02960"></a><span class="lineno"> 2960</span>&#160;</div><div class="line"><a name="l02961"></a><span class="lineno"> 2961</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02962"></a><span class="lineno"> 2962</span>&#160;<span class="keywordtype">void</span> VmaRawList&lt;T&gt;::PopBack()</div><div class="line"><a name="l02963"></a><span class="lineno"> 2963</span>&#160;{</div><div class="line"><a name="l02964"></a><span class="lineno"> 2964</span>&#160;    VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02965"></a><span class="lineno"> 2965</span>&#160;    ItemType* <span class="keyword">const</span> pBackItem = m_pBack;</div><div class="line"><a name="l02966"></a><span class="lineno"> 2966</span>&#160;    ItemType* <span class="keyword">const</span> pPrevItem = pBackItem-&gt;pPrev;</div><div class="line"><a name="l02967"></a><span class="lineno"> 2967</span>&#160;    <span class="keywordflow">if</span>(pPrevItem != VMA_NULL)</div><div class="line"><a name="l02968"></a><span class="lineno"> 2968</span>&#160;    {</div><div class="line"><a name="l02969"></a><span class="lineno"> 2969</span>&#160;        pPrevItem-&gt;pNext = VMA_NULL;</div><div class="line"><a name="l02970"></a><span class="lineno"> 2970</span>&#160;    }</div><div class="line"><a name="l02971"></a><span class="lineno"> 2971</span>&#160;    m_pBack = pPrevItem;</div><div class="line"><a name="l02972"></a><span class="lineno"> 2972</span>&#160;    m_ItemAllocator.Free(pBackItem);</div><div class="line"><a name="l02973"></a><span class="lineno"> 2973</span>&#160;    --m_Count;</div><div class="line"><a name="l02974"></a><span class="lineno"> 2974</span>&#160;}</div><div class="line"><a name="l02975"></a><span class="lineno"> 2975</span>&#160;</div><div class="line"><a name="l02976"></a><span class="lineno"> 2976</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02977"></a><span class="lineno"> 2977</span>&#160;<span class="keywordtype">void</span> VmaRawList&lt;T&gt;::PopFront()</div><div class="line"><a name="l02978"></a><span class="lineno"> 2978</span>&#160;{</div><div class="line"><a name="l02979"></a><span class="lineno"> 2979</span>&#160;    VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02980"></a><span class="lineno"> 2980</span>&#160;    ItemType* <span class="keyword">const</span> pFrontItem = m_pFront;</div><div class="line"><a name="l02981"></a><span class="lineno"> 2981</span>&#160;    ItemType* <span class="keyword">const</span> pNextItem = pFrontItem-&gt;pNext;</div><div class="line"><a name="l02982"></a><span class="lineno"> 2982</span>&#160;    <span class="keywordflow">if</span>(pNextItem != VMA_NULL)</div><div class="line"><a name="l02983"></a><span class="lineno"> 2983</span>&#160;    {</div><div class="line"><a name="l02984"></a><span class="lineno"> 2984</span>&#160;        pNextItem-&gt;pPrev = VMA_NULL;</div><div class="line"><a name="l02985"></a><span class="lineno"> 2985</span>&#160;    }</div><div class="line"><a name="l02986"></a><span class="lineno"> 2986</span>&#160;    m_pFront = pNextItem;</div><div class="line"><a name="l02987"></a><span class="lineno"> 2987</span>&#160;    m_ItemAllocator.Free(pFrontItem);</div><div class="line"><a name="l02988"></a><span class="lineno"> 2988</span>&#160;    --m_Count;</div><div class="line"><a name="l02989"></a><span class="lineno"> 2989</span>&#160;}</div><div class="line"><a name="l02990"></a><span class="lineno"> 2990</span>&#160;</div><div class="line"><a name="l02991"></a><span class="lineno"> 2991</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l02992"></a><span class="lineno"> 2992</span>&#160;<span class="keywordtype">void</span> VmaRawList&lt;T&gt;::Remove(ItemType* pItem)</div><div class="line"><a name="l02993"></a><span class="lineno"> 2993</span>&#160;{</div><div class="line"><a name="l02994"></a><span class="lineno"> 2994</span>&#160;    VMA_HEAVY_ASSERT(pItem != VMA_NULL);</div><div class="line"><a name="l02995"></a><span class="lineno"> 2995</span>&#160;    VMA_HEAVY_ASSERT(m_Count &gt; 0);</div><div class="line"><a name="l02996"></a><span class="lineno"> 2996</span>&#160;</div><div class="line"><a name="l02997"></a><span class="lineno"> 2997</span>&#160;    <span class="keywordflow">if</span>(pItem-&gt;pPrev != VMA_NULL)</div><div class="line"><a name="l02998"></a><span class="lineno"> 2998</span>&#160;    {</div><div class="line"><a name="l02999"></a><span class="lineno"> 2999</span>&#160;        pItem-&gt;pPrev-&gt;pNext = pItem-&gt;pNext;</div><div class="line"><a name="l03000"></a><span class="lineno"> 3000</span>&#160;    }</div><div class="line"><a name="l03001"></a><span class="lineno"> 3001</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l03002"></a><span class="lineno"> 3002</span>&#160;    {</div><div class="line"><a name="l03003"></a><span class="lineno"> 3003</span>&#160;        VMA_HEAVY_ASSERT(m_pFront == pItem);</div><div class="line"><a name="l03004"></a><span class="lineno"> 3004</span>&#160;        m_pFront = pItem-&gt;pNext;</div><div class="line"><a name="l03005"></a><span class="lineno"> 3005</span>&#160;    }</div><div class="line"><a name="l03006"></a><span class="lineno"> 3006</span>&#160;</div><div class="line"><a name="l03007"></a><span class="lineno"> 3007</span>&#160;    <span class="keywordflow">if</span>(pItem-&gt;pNext != VMA_NULL)</div><div class="line"><a name="l03008"></a><span class="lineno"> 3008</span>&#160;    {</div><div class="line"><a name="l03009"></a><span class="lineno"> 3009</span>&#160;        pItem-&gt;pNext-&gt;pPrev = pItem-&gt;pPrev;</div><div class="line"><a name="l03010"></a><span class="lineno"> 3010</span>&#160;    }</div><div class="line"><a name="l03011"></a><span class="lineno"> 3011</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l03012"></a><span class="lineno"> 3012</span>&#160;    {</div><div class="line"><a name="l03013"></a><span class="lineno"> 3013</span>&#160;        VMA_HEAVY_ASSERT(m_pBack == pItem);</div><div class="line"><a name="l03014"></a><span class="lineno"> 3014</span>&#160;        m_pBack = pItem-&gt;pPrev;</div><div class="line"><a name="l03015"></a><span class="lineno"> 3015</span>&#160;    }</div><div class="line"><a name="l03016"></a><span class="lineno"> 3016</span>&#160;</div><div class="line"><a name="l03017"></a><span class="lineno"> 3017</span>&#160;    m_ItemAllocator.Free(pItem);</div><div class="line"><a name="l03018"></a><span class="lineno"> 3018</span>&#160;    --m_Count;</div><div class="line"><a name="l03019"></a><span class="lineno"> 3019</span>&#160;}</div><div class="line"><a name="l03020"></a><span class="lineno"> 3020</span>&#160;</div><div class="line"><a name="l03021"></a><span class="lineno"> 3021</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l03022"></a><span class="lineno"> 3022</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::InsertBefore(ItemType* pItem)</div><div class="line"><a name="l03023"></a><span class="lineno"> 3023</span>&#160;{</div><div class="line"><a name="l03024"></a><span class="lineno"> 3024</span>&#160;    <span class="keywordflow">if</span>(pItem != VMA_NULL)</div><div class="line"><a name="l03025"></a><span class="lineno"> 3025</span>&#160;    {</div><div class="line"><a name="l03026"></a><span class="lineno"> 3026</span>&#160;        ItemType* <span class="keyword">const</span> prevItem = pItem-&gt;pPrev;</div><div class="line"><a name="l03027"></a><span class="lineno"> 3027</span>&#160;        ItemType* <span class="keyword">const</span> newItem = m_ItemAllocator.Alloc();</div><div class="line"><a name="l03028"></a><span class="lineno"> 3028</span>&#160;        newItem-&gt;pPrev = prevItem;</div><div class="line"><a name="l03029"></a><span class="lineno"> 3029</span>&#160;        newItem-&gt;pNext = pItem;</div><div class="line"><a name="l03030"></a><span class="lineno"> 3030</span>&#160;        pItem-&gt;pPrev = newItem;</div><div class="line"><a name="l03031"></a><span class="lineno"> 3031</span>&#160;        <span class="keywordflow">if</span>(prevItem != VMA_NULL)</div><div class="line"><a name="l03032"></a><span class="lineno"> 3032</span>&#160;        {</div><div class="line"><a name="l03033"></a><span class="lineno"> 3033</span>&#160;            prevItem-&gt;pNext = newItem;</div><div class="line"><a name="l03034"></a><span class="lineno"> 3034</span>&#160;        }</div><div class="line"><a name="l03035"></a><span class="lineno"> 3035</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l03036"></a><span class="lineno"> 3036</span>&#160;        {</div><div class="line"><a name="l03037"></a><span class="lineno"> 3037</span>&#160;            VMA_HEAVY_ASSERT(m_pFront == pItem);</div><div class="line"><a name="l03038"></a><span class="lineno"> 3038</span>&#160;            m_pFront = newItem;</div><div class="line"><a name="l03039"></a><span class="lineno"> 3039</span>&#160;        }</div><div class="line"><a name="l03040"></a><span class="lineno"> 3040</span>&#160;        ++m_Count;</div><div class="line"><a name="l03041"></a><span class="lineno"> 3041</span>&#160;        <span class="keywordflow">return</span> newItem;</div><div class="line"><a name="l03042"></a><span class="lineno"> 3042</span>&#160;    }</div><div class="line"><a name="l03043"></a><span class="lineno"> 3043</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l03044"></a><span class="lineno"> 3044</span>&#160;        <span class="keywordflow">return</span> PushBack();</div><div class="line"><a name="l03045"></a><span class="lineno"> 3045</span>&#160;}</div><div class="line"><a name="l03046"></a><span class="lineno"> 3046</span>&#160;</div><div class="line"><a name="l03047"></a><span class="lineno"> 3047</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l03048"></a><span class="lineno"> 3048</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::InsertAfter(ItemType* pItem)</div><div class="line"><a name="l03049"></a><span class="lineno"> 3049</span>&#160;{</div><div class="line"><a name="l03050"></a><span class="lineno"> 3050</span>&#160;    <span class="keywordflow">if</span>(pItem != VMA_NULL)</div><div class="line"><a name="l03051"></a><span class="lineno"> 3051</span>&#160;    {</div><div class="line"><a name="l03052"></a><span class="lineno"> 3052</span>&#160;        ItemType* <span class="keyword">const</span> nextItem = pItem-&gt;pNext;</div><div class="line"><a name="l03053"></a><span class="lineno"> 3053</span>&#160;        ItemType* <span class="keyword">const</span> newItem = m_ItemAllocator.Alloc();</div><div class="line"><a name="l03054"></a><span class="lineno"> 3054</span>&#160;        newItem-&gt;pNext = nextItem;</div><div class="line"><a name="l03055"></a><span class="lineno"> 3055</span>&#160;        newItem-&gt;pPrev = pItem;</div><div class="line"><a name="l03056"></a><span class="lineno"> 3056</span>&#160;        pItem-&gt;pNext = newItem;</div><div class="line"><a name="l03057"></a><span class="lineno"> 3057</span>&#160;        <span class="keywordflow">if</span>(nextItem != VMA_NULL)</div><div class="line"><a name="l03058"></a><span class="lineno"> 3058</span>&#160;        {</div><div class="line"><a name="l03059"></a><span class="lineno"> 3059</span>&#160;            nextItem-&gt;pPrev = newItem;</div><div class="line"><a name="l03060"></a><span class="lineno"> 3060</span>&#160;        }</div><div class="line"><a name="l03061"></a><span class="lineno"> 3061</span>&#160;        <span class="keywordflow">else</span></div><div class="line"><a name="l03062"></a><span class="lineno"> 3062</span>&#160;        {</div><div class="line"><a name="l03063"></a><span class="lineno"> 3063</span>&#160;            VMA_HEAVY_ASSERT(m_pBack == pItem);</div><div class="line"><a name="l03064"></a><span class="lineno"> 3064</span>&#160;            m_pBack = newItem;</div><div class="line"><a name="l03065"></a><span class="lineno"> 3065</span>&#160;        }</div><div class="line"><a name="l03066"></a><span class="lineno"> 3066</span>&#160;        ++m_Count;</div><div class="line"><a name="l03067"></a><span class="lineno"> 3067</span>&#160;        <span class="keywordflow">return</span> newItem;</div><div class="line"><a name="l03068"></a><span class="lineno"> 3068</span>&#160;    }</div><div class="line"><a name="l03069"></a><span class="lineno"> 3069</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l03070"></a><span class="lineno"> 3070</span>&#160;        <span class="keywordflow">return</span> PushFront();</div><div class="line"><a name="l03071"></a><span class="lineno"> 3071</span>&#160;}</div><div class="line"><a name="l03072"></a><span class="lineno"> 3072</span>&#160;</div><div class="line"><a name="l03073"></a><span class="lineno"> 3073</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l03074"></a><span class="lineno"> 3074</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::InsertBefore(ItemType* pItem, <span class="keyword">const</span> T&amp; value)</div><div class="line"><a name="l03075"></a><span class="lineno"> 3075</span>&#160;{</div><div class="line"><a name="l03076"></a><span class="lineno"> 3076</span>&#160;    ItemType* <span class="keyword">const</span> newItem = InsertBefore(pItem);</div><div class="line"><a name="l03077"></a><span class="lineno"> 3077</span>&#160;    newItem-&gt;Value = value;</div><div class="line"><a name="l03078"></a><span class="lineno"> 3078</span>&#160;    <span class="keywordflow">return</span> newItem;</div><div class="line"><a name="l03079"></a><span class="lineno"> 3079</span>&#160;}</div><div class="line"><a name="l03080"></a><span class="lineno"> 3080</span>&#160;</div><div class="line"><a name="l03081"></a><span class="lineno"> 3081</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l03082"></a><span class="lineno"> 3082</span>&#160;VmaListItem&lt;T&gt;* VmaRawList&lt;T&gt;::InsertAfter(ItemType* pItem, <span class="keyword">const</span> T&amp; value)</div><div class="line"><a name="l03083"></a><span class="lineno"> 3083</span>&#160;{</div><div class="line"><a name="l03084"></a><span class="lineno"> 3084</span>&#160;    ItemType* <span class="keyword">const</span> newItem = InsertAfter(pItem);</div><div class="line"><a name="l03085"></a><span class="lineno"> 3085</span>&#160;    newItem-&gt;Value = value;</div><div class="line"><a name="l03086"></a><span class="lineno"> 3086</span>&#160;    <span class="keywordflow">return</span> newItem;</div><div class="line"><a name="l03087"></a><span class="lineno"> 3087</span>&#160;}</div><div class="line"><a name="l03088"></a><span class="lineno"> 3088</span>&#160;</div><div class="line"><a name="l03089"></a><span class="lineno"> 3089</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> AllocatorT&gt;</div><div class="line"><a name="l03090"></a><span class="lineno"> 3090</span>&#160;<span class="keyword">class </span>VmaList</div><div class="line"><a name="l03091"></a><span class="lineno"> 3091</span>&#160;{</div><div class="line"><a name="l03092"></a><span class="lineno"> 3092</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l03093"></a><span class="lineno"> 3093</span>&#160;    <span class="keyword">class </span>iterator</div><div class="line"><a name="l03094"></a><span class="lineno"> 3094</span>&#160;    {</div><div class="line"><a name="l03095"></a><span class="lineno"> 3095</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l03096"></a><span class="lineno"> 3096</span>&#160;        iterator() :</div><div class="line"><a name="l03097"></a><span class="lineno"> 3097</span>&#160;            m_pList(VMA_NULL),</div><div class="line"><a name="l03098"></a><span class="lineno"> 3098</span>&#160;            m_pItem(VMA_NULL)</div><div class="line"><a name="l03099"></a><span class="lineno"> 3099</span>&#160;        {</div><div class="line"><a name="l03100"></a><span class="lineno"> 3100</span>&#160;        }</div><div class="line"><a name="l03101"></a><span class="lineno"> 3101</span>&#160;</div><div class="line"><a name="l03102"></a><span class="lineno"> 3102</span>&#160;        T&amp; operator*()<span class="keyword"> const</span></div><div class="line"><a name="l03103"></a><span class="lineno"> 3103</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03104"></a><span class="lineno"> 3104</span>&#160;            VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);</div><div class="line"><a name="l03105"></a><span class="lineno"> 3105</span>&#160;            <span class="keywordflow">return</span> m_pItem-&gt;Value;</div><div class="line"><a name="l03106"></a><span class="lineno"> 3106</span>&#160;        }</div><div class="line"><a name="l03107"></a><span class="lineno"> 3107</span>&#160;        T* operator-&gt;()<span class="keyword"> const</span></div><div class="line"><a name="l03108"></a><span class="lineno"> 3108</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03109"></a><span class="lineno"> 3109</span>&#160;            VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);</div><div class="line"><a name="l03110"></a><span class="lineno"> 3110</span>&#160;            <span class="keywordflow">return</span> &amp;m_pItem-&gt;Value;</div><div class="line"><a name="l03111"></a><span class="lineno"> 3111</span>&#160;        }</div><div class="line"><a name="l03112"></a><span class="lineno"> 3112</span>&#160;</div><div class="line"><a name="l03113"></a><span class="lineno"> 3113</span>&#160;        iterator&amp; operator++()</div><div class="line"><a name="l03114"></a><span class="lineno"> 3114</span>&#160;        {</div><div class="line"><a name="l03115"></a><span class="lineno"> 3115</span>&#160;            VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);</div><div class="line"><a name="l03116"></a><span class="lineno"> 3116</span>&#160;            m_pItem = m_pItem-&gt;pNext;</div><div class="line"><a name="l03117"></a><span class="lineno"> 3117</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l03118"></a><span class="lineno"> 3118</span>&#160;        }</div><div class="line"><a name="l03119"></a><span class="lineno"> 3119</span>&#160;        iterator&amp; operator--()</div><div class="line"><a name="l03120"></a><span class="lineno"> 3120</span>&#160;        {</div><div class="line"><a name="l03121"></a><span class="lineno"> 3121</span>&#160;            <span class="keywordflow">if</span>(m_pItem != VMA_NULL)</div><div class="line"><a name="l03122"></a><span class="lineno"> 3122</span>&#160;            {</div><div class="line"><a name="l03123"></a><span class="lineno"> 3123</span>&#160;                m_pItem = m_pItem-&gt;pPrev;</div><div class="line"><a name="l03124"></a><span class="lineno"> 3124</span>&#160;            }</div><div class="line"><a name="l03125"></a><span class="lineno"> 3125</span>&#160;            <span class="keywordflow">else</span></div><div class="line"><a name="l03126"></a><span class="lineno"> 3126</span>&#160;            {</div><div class="line"><a name="l03127"></a><span class="lineno"> 3127</span>&#160;                VMA_HEAVY_ASSERT(!m_pList-&gt;IsEmpty());</div><div class="line"><a name="l03128"></a><span class="lineno"> 3128</span>&#160;                m_pItem = m_pList-&gt;Back();</div><div class="line"><a name="l03129"></a><span class="lineno"> 3129</span>&#160;            }</div><div class="line"><a name="l03130"></a><span class="lineno"> 3130</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l03131"></a><span class="lineno"> 3131</span>&#160;        }</div><div class="line"><a name="l03132"></a><span class="lineno"> 3132</span>&#160;</div><div class="line"><a name="l03133"></a><span class="lineno"> 3133</span>&#160;        iterator operator++(<span class="keywordtype">int</span>)</div><div class="line"><a name="l03134"></a><span class="lineno"> 3134</span>&#160;        {</div><div class="line"><a name="l03135"></a><span class="lineno"> 3135</span>&#160;            iterator result = *<span class="keyword">this</span>;</div><div class="line"><a name="l03136"></a><span class="lineno"> 3136</span>&#160;            ++*<span class="keyword">this</span>;</div><div class="line"><a name="l03137"></a><span class="lineno"> 3137</span>&#160;            <span class="keywordflow">return</span> result;</div><div class="line"><a name="l03138"></a><span class="lineno"> 3138</span>&#160;        }</div><div class="line"><a name="l03139"></a><span class="lineno"> 3139</span>&#160;        iterator operator--(<span class="keywordtype">int</span>)</div><div class="line"><a name="l03140"></a><span class="lineno"> 3140</span>&#160;        {</div><div class="line"><a name="l03141"></a><span class="lineno"> 3141</span>&#160;            iterator result = *<span class="keyword">this</span>;</div><div class="line"><a name="l03142"></a><span class="lineno"> 3142</span>&#160;            --*<span class="keyword">this</span>;</div><div class="line"><a name="l03143"></a><span class="lineno"> 3143</span>&#160;            <span class="keywordflow">return</span> result;</div><div class="line"><a name="l03144"></a><span class="lineno"> 3144</span>&#160;        }</div><div class="line"><a name="l03145"></a><span class="lineno"> 3145</span>&#160;</div><div class="line"><a name="l03146"></a><span class="lineno"> 3146</span>&#160;        <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> iterator&amp; rhs)<span class="keyword"> const</span></div><div class="line"><a name="l03147"></a><span class="lineno"> 3147</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03148"></a><span class="lineno"> 3148</span>&#160;            VMA_HEAVY_ASSERT(m_pList == rhs.m_pList);</div><div class="line"><a name="l03149"></a><span class="lineno"> 3149</span>&#160;            <span class="keywordflow">return</span> m_pItem == rhs.m_pItem;</div><div class="line"><a name="l03150"></a><span class="lineno"> 3150</span>&#160;        }</div><div class="line"><a name="l03151"></a><span class="lineno"> 3151</span>&#160;        <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> iterator&amp; rhs)<span class="keyword"> const</span></div><div class="line"><a name="l03152"></a><span class="lineno"> 3152</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03153"></a><span class="lineno"> 3153</span>&#160;            VMA_HEAVY_ASSERT(m_pList == rhs.m_pList);</div><div class="line"><a name="l03154"></a><span class="lineno"> 3154</span>&#160;            <span class="keywordflow">return</span> m_pItem != rhs.m_pItem;</div><div class="line"><a name="l03155"></a><span class="lineno"> 3155</span>&#160;        }</div><div class="line"><a name="l03156"></a><span class="lineno"> 3156</span>&#160;        </div><div class="line"><a name="l03157"></a><span class="lineno"> 3157</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l03158"></a><span class="lineno"> 3158</span>&#160;        VmaRawList&lt;T&gt;* m_pList;</div><div class="line"><a name="l03159"></a><span class="lineno"> 3159</span>&#160;        VmaListItem&lt;T&gt;* m_pItem;</div><div class="line"><a name="l03160"></a><span class="lineno"> 3160</span>&#160;</div><div class="line"><a name="l03161"></a><span class="lineno"> 3161</span>&#160;        iterator(VmaRawList&lt;T&gt;* pList, VmaListItem&lt;T&gt;* pItem) :</div><div class="line"><a name="l03162"></a><span class="lineno"> 3162</span>&#160;            m_pList(pList),</div><div class="line"><a name="l03163"></a><span class="lineno"> 3163</span>&#160;            m_pItem(pItem)</div><div class="line"><a name="l03164"></a><span class="lineno"> 3164</span>&#160;        {</div><div class="line"><a name="l03165"></a><span class="lineno"> 3165</span>&#160;        }</div><div class="line"><a name="l03166"></a><span class="lineno"> 3166</span>&#160;</div><div class="line"><a name="l03167"></a><span class="lineno"> 3167</span>&#160;        <span class="keyword">friend</span> <span class="keyword">class </span>VmaList&lt;T, AllocatorT&gt;;</div><div class="line"><a name="l03168"></a><span class="lineno"> 3168</span>&#160;    };</div><div class="line"><a name="l03169"></a><span class="lineno"> 3169</span>&#160;</div><div class="line"><a name="l03170"></a><span class="lineno"> 3170</span>&#160;    <span class="keyword">class </span>const_iterator</div><div class="line"><a name="l03171"></a><span class="lineno"> 3171</span>&#160;    {</div><div class="line"><a name="l03172"></a><span class="lineno"> 3172</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l03173"></a><span class="lineno"> 3173</span>&#160;        const_iterator() :</div><div class="line"><a name="l03174"></a><span class="lineno"> 3174</span>&#160;            m_pList(VMA_NULL),</div><div class="line"><a name="l03175"></a><span class="lineno"> 3175</span>&#160;            m_pItem(VMA_NULL)</div><div class="line"><a name="l03176"></a><span class="lineno"> 3176</span>&#160;        {</div><div class="line"><a name="l03177"></a><span class="lineno"> 3177</span>&#160;        }</div><div class="line"><a name="l03178"></a><span class="lineno"> 3178</span>&#160;</div><div class="line"><a name="l03179"></a><span class="lineno"> 3179</span>&#160;        const_iterator(<span class="keyword">const</span> iterator&amp; src) :</div><div class="line"><a name="l03180"></a><span class="lineno"> 3180</span>&#160;            m_pList(src.m_pList),</div><div class="line"><a name="l03181"></a><span class="lineno"> 3181</span>&#160;            m_pItem(src.m_pItem)</div><div class="line"><a name="l03182"></a><span class="lineno"> 3182</span>&#160;        {</div><div class="line"><a name="l03183"></a><span class="lineno"> 3183</span>&#160;        }</div><div class="line"><a name="l03184"></a><span class="lineno"> 3184</span>&#160;        </div><div class="line"><a name="l03185"></a><span class="lineno"> 3185</span>&#160;        <span class="keyword">const</span> T&amp; operator*()<span class="keyword"> const</span></div><div class="line"><a name="l03186"></a><span class="lineno"> 3186</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03187"></a><span class="lineno"> 3187</span>&#160;            VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);</div><div class="line"><a name="l03188"></a><span class="lineno"> 3188</span>&#160;            <span class="keywordflow">return</span> m_pItem-&gt;Value;</div><div class="line"><a name="l03189"></a><span class="lineno"> 3189</span>&#160;        }</div><div class="line"><a name="l03190"></a><span class="lineno"> 3190</span>&#160;        <span class="keyword">const</span> T* operator-&gt;()<span class="keyword"> const</span></div><div class="line"><a name="l03191"></a><span class="lineno"> 3191</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03192"></a><span class="lineno"> 3192</span>&#160;            VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);</div><div class="line"><a name="l03193"></a><span class="lineno"> 3193</span>&#160;            <span class="keywordflow">return</span> &amp;m_pItem-&gt;Value;</div><div class="line"><a name="l03194"></a><span class="lineno"> 3194</span>&#160;        }</div><div class="line"><a name="l03195"></a><span class="lineno"> 3195</span>&#160;</div><div class="line"><a name="l03196"></a><span class="lineno"> 3196</span>&#160;        const_iterator&amp; operator++()</div><div class="line"><a name="l03197"></a><span class="lineno"> 3197</span>&#160;        {</div><div class="line"><a name="l03198"></a><span class="lineno"> 3198</span>&#160;            VMA_HEAVY_ASSERT(m_pItem != VMA_NULL);</div><div class="line"><a name="l03199"></a><span class="lineno"> 3199</span>&#160;            m_pItem = m_pItem-&gt;pNext;</div><div class="line"><a name="l03200"></a><span class="lineno"> 3200</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l03201"></a><span class="lineno"> 3201</span>&#160;        }</div><div class="line"><a name="l03202"></a><span class="lineno"> 3202</span>&#160;        const_iterator&amp; operator--()</div><div class="line"><a name="l03203"></a><span class="lineno"> 3203</span>&#160;        {</div><div class="line"><a name="l03204"></a><span class="lineno"> 3204</span>&#160;            <span class="keywordflow">if</span>(m_pItem != VMA_NULL)</div><div class="line"><a name="l03205"></a><span class="lineno"> 3205</span>&#160;            {</div><div class="line"><a name="l03206"></a><span class="lineno"> 3206</span>&#160;                m_pItem = m_pItem-&gt;pPrev;</div><div class="line"><a name="l03207"></a><span class="lineno"> 3207</span>&#160;            }</div><div class="line"><a name="l03208"></a><span class="lineno"> 3208</span>&#160;            <span class="keywordflow">else</span></div><div class="line"><a name="l03209"></a><span class="lineno"> 3209</span>&#160;            {</div><div class="line"><a name="l03210"></a><span class="lineno"> 3210</span>&#160;                VMA_HEAVY_ASSERT(!m_pList-&gt;IsEmpty());</div><div class="line"><a name="l03211"></a><span class="lineno"> 3211</span>&#160;                m_pItem = m_pList-&gt;Back();</div><div class="line"><a name="l03212"></a><span class="lineno"> 3212</span>&#160;            }</div><div class="line"><a name="l03213"></a><span class="lineno"> 3213</span>&#160;            <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l03214"></a><span class="lineno"> 3214</span>&#160;        }</div><div class="line"><a name="l03215"></a><span class="lineno"> 3215</span>&#160;</div><div class="line"><a name="l03216"></a><span class="lineno"> 3216</span>&#160;        const_iterator operator++(<span class="keywordtype">int</span>)</div><div class="line"><a name="l03217"></a><span class="lineno"> 3217</span>&#160;        {</div><div class="line"><a name="l03218"></a><span class="lineno"> 3218</span>&#160;            const_iterator result = *<span class="keyword">this</span>;</div><div class="line"><a name="l03219"></a><span class="lineno"> 3219</span>&#160;            ++*<span class="keyword">this</span>;</div><div class="line"><a name="l03220"></a><span class="lineno"> 3220</span>&#160;            <span class="keywordflow">return</span> result;</div><div class="line"><a name="l03221"></a><span class="lineno"> 3221</span>&#160;        }</div><div class="line"><a name="l03222"></a><span class="lineno"> 3222</span>&#160;        const_iterator operator--(<span class="keywordtype">int</span>)</div><div class="line"><a name="l03223"></a><span class="lineno"> 3223</span>&#160;        {</div><div class="line"><a name="l03224"></a><span class="lineno"> 3224</span>&#160;            const_iterator result = *<span class="keyword">this</span>;</div><div class="line"><a name="l03225"></a><span class="lineno"> 3225</span>&#160;            --*<span class="keyword">this</span>;</div><div class="line"><a name="l03226"></a><span class="lineno"> 3226</span>&#160;            <span class="keywordflow">return</span> result;</div><div class="line"><a name="l03227"></a><span class="lineno"> 3227</span>&#160;        }</div><div class="line"><a name="l03228"></a><span class="lineno"> 3228</span>&#160;</div><div class="line"><a name="l03229"></a><span class="lineno"> 3229</span>&#160;        <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> const_iterator&amp; rhs)<span class="keyword"> const</span></div><div class="line"><a name="l03230"></a><span class="lineno"> 3230</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03231"></a><span class="lineno"> 3231</span>&#160;            VMA_HEAVY_ASSERT(m_pList == rhs.m_pList);</div><div class="line"><a name="l03232"></a><span class="lineno"> 3232</span>&#160;            <span class="keywordflow">return</span> m_pItem == rhs.m_pItem;</div><div class="line"><a name="l03233"></a><span class="lineno"> 3233</span>&#160;        }</div><div class="line"><a name="l03234"></a><span class="lineno"> 3234</span>&#160;        <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> const_iterator&amp; rhs)<span class="keyword"> const</span></div><div class="line"><a name="l03235"></a><span class="lineno"> 3235</span>&#160;<span class="keyword">        </span>{</div><div class="line"><a name="l03236"></a><span class="lineno"> 3236</span>&#160;            VMA_HEAVY_ASSERT(m_pList == rhs.m_pList);</div><div class="line"><a name="l03237"></a><span class="lineno"> 3237</span>&#160;            <span class="keywordflow">return</span> m_pItem != rhs.m_pItem;</div><div class="line"><a name="l03238"></a><span class="lineno"> 3238</span>&#160;        }</div><div class="line"><a name="l03239"></a><span class="lineno"> 3239</span>&#160;        </div><div class="line"><a name="l03240"></a><span class="lineno"> 3240</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l03241"></a><span class="lineno"> 3241</span>&#160;        const_iterator(<span class="keyword">const</span> VmaRawList&lt;T&gt;* pList, <span class="keyword">const</span> VmaListItem&lt;T&gt;* pItem) :</div><div class="line"><a name="l03242"></a><span class="lineno"> 3242</span>&#160;            m_pList(pList),</div><div class="line"><a name="l03243"></a><span class="lineno"> 3243</span>&#160;            m_pItem(pItem)</div><div class="line"><a name="l03244"></a><span class="lineno"> 3244</span>&#160;        {</div><div class="line"><a name="l03245"></a><span class="lineno"> 3245</span>&#160;        }</div><div class="line"><a name="l03246"></a><span class="lineno"> 3246</span>&#160;</div><div class="line"><a name="l03247"></a><span class="lineno"> 3247</span>&#160;        <span class="keyword">const</span> VmaRawList&lt;T&gt;* m_pList;</div><div class="line"><a name="l03248"></a><span class="lineno"> 3248</span>&#160;        <span class="keyword">const</span> VmaListItem&lt;T&gt;* m_pItem;</div><div class="line"><a name="l03249"></a><span class="lineno"> 3249</span>&#160;</div><div class="line"><a name="l03250"></a><span class="lineno"> 3250</span>&#160;        <span class="keyword">friend</span> <span class="keyword">class </span>VmaList&lt;T, AllocatorT&gt;;</div><div class="line"><a name="l03251"></a><span class="lineno"> 3251</span>&#160;    };</div><div class="line"><a name="l03252"></a><span class="lineno"> 3252</span>&#160;</div><div class="line"><a name="l03253"></a><span class="lineno"> 3253</span>&#160;    VmaList(<span class="keyword">const</span> AllocatorT&amp; allocator) : m_RawList(allocator.m_pCallbacks) { }</div><div class="line"><a name="l03254"></a><span class="lineno"> 3254</span>&#160;</div><div class="line"><a name="l03255"></a><span class="lineno"> 3255</span>&#160;    <span class="keywordtype">bool</span> empty()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_RawList.IsEmpty(); }</div><div class="line"><a name="l03256"></a><span class="lineno"> 3256</span>&#160;    <span class="keywordtype">size_t</span> size()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_RawList.GetCount(); }</div><div class="line"><a name="l03257"></a><span class="lineno"> 3257</span>&#160;</div><div class="line"><a name="l03258"></a><span class="lineno"> 3258</span>&#160;    iterator begin() { <span class="keywordflow">return</span> iterator(&amp;m_RawList, m_RawList.Front()); }</div><div class="line"><a name="l03259"></a><span class="lineno"> 3259</span>&#160;    iterator end() { <span class="keywordflow">return</span> iterator(&amp;m_RawList, VMA_NULL); }</div><div class="line"><a name="l03260"></a><span class="lineno"> 3260</span>&#160;</div><div class="line"><a name="l03261"></a><span class="lineno"> 3261</span>&#160;    const_iterator cbegin()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(&amp;m_RawList, m_RawList.Front()); }</div><div class="line"><a name="l03262"></a><span class="lineno"> 3262</span>&#160;    const_iterator cend()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> const_iterator(&amp;m_RawList, VMA_NULL); }</div><div class="line"><a name="l03263"></a><span class="lineno"> 3263</span>&#160;</div><div class="line"><a name="l03264"></a><span class="lineno"> 3264</span>&#160;    <span class="keywordtype">void</span> clear() { m_RawList.Clear(); }</div><div class="line"><a name="l03265"></a><span class="lineno"> 3265</span>&#160;    <span class="keywordtype">void</span> push_back(<span class="keyword">const</span> T&amp; value) { m_RawList.PushBack(value); }</div><div class="line"><a name="l03266"></a><span class="lineno"> 3266</span>&#160;    <span class="keywordtype">void</span> erase(iterator it) { m_RawList.Remove(it.m_pItem); }</div><div class="line"><a name="l03267"></a><span class="lineno"> 3267</span>&#160;    iterator insert(iterator it, <span class="keyword">const</span> T&amp; value) { <span class="keywordflow">return</span> iterator(&amp;m_RawList, m_RawList.InsertBefore(it.m_pItem, value)); }</div><div class="line"><a name="l03268"></a><span class="lineno"> 3268</span>&#160;</div><div class="line"><a name="l03269"></a><span class="lineno"> 3269</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l03270"></a><span class="lineno"> 3270</span>&#160;    VmaRawList&lt;T&gt; m_RawList;</div><div class="line"><a name="l03271"></a><span class="lineno"> 3271</span>&#160;};</div><div class="line"><a name="l03272"></a><span class="lineno"> 3272</span>&#160;</div><div class="line"><a name="l03273"></a><span class="lineno"> 3273</span>&#160;<span class="preprocessor">#endif // #if VMA_USE_STL_LIST</span></div><div class="line"><a name="l03274"></a><span class="lineno"> 3274</span>&#160;</div><div class="line"><a name="l03276"></a><span class="lineno"> 3276</span>&#160;<span class="comment">// class VmaMap</span></div><div class="line"><a name="l03277"></a><span class="lineno"> 3277</span>&#160;</div><div class="line"><a name="l03278"></a><span class="lineno"> 3278</span>&#160;<span class="comment">// Unused in this version.</span></div><div class="line"><a name="l03279"></a><span class="lineno"> 3279</span>&#160;<span class="preprocessor">#if 0</span></div><div class="line"><a name="l03280"></a><span class="lineno"> 3280</span>&#160;</div><div class="line"><a name="l03281"></a><span class="lineno"> 3281</span>&#160;<span class="preprocessor">#if VMA_USE_STL_UNORDERED_MAP</span></div><div class="line"><a name="l03282"></a><span class="lineno"> 3282</span>&#160;</div><div class="line"><a name="l03283"></a><span class="lineno"> 3283</span>&#160;<span class="preprocessor">#define VmaPair std::pair</span></div><div class="line"><a name="l03284"></a><span class="lineno"> 3284</span>&#160;</div><div class="line"><a name="l03285"></a><span class="lineno"> 3285</span>&#160;<span class="preprocessor">#define VMA_MAP_TYPE(KeyT, ValueT) \</span></div><div class="line"><a name="l03286"></a><span class="lineno"> 3286</span>&#160;<span class="preprocessor">    std::unordered_map&lt; KeyT, ValueT, std::hash&lt;KeyT&gt;, std::equal_to&lt;KeyT&gt;, VmaStlAllocator&lt; std::pair&lt;KeyT, ValueT&gt; &gt; &gt;</span></div><div class="line"><a name="l03287"></a><span class="lineno"> 3287</span>&#160;</div><div class="line"><a name="l03288"></a><span class="lineno"> 3288</span>&#160;<span class="preprocessor">#else // #if VMA_USE_STL_UNORDERED_MAP</span></div><div class="line"><a name="l03289"></a><span class="lineno"> 3289</span>&#160;</div><div class="line"><a name="l03290"></a><span class="lineno"> 3290</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T1, <span class="keyword">typename</span> T2&gt;</div><div class="line"><a name="l03291"></a><span class="lineno"> 3291</span>&#160;<span class="keyword">struct </span>VmaPair</div><div class="line"><a name="l03292"></a><span class="lineno"> 3292</span>&#160;{</div><div class="line"><a name="l03293"></a><span class="lineno"> 3293</span>&#160;    T1 first;</div><div class="line"><a name="l03294"></a><span class="lineno"> 3294</span>&#160;    T2 second;</div><div class="line"><a name="l03295"></a><span class="lineno"> 3295</span>&#160;</div><div class="line"><a name="l03296"></a><span class="lineno"> 3296</span>&#160;    VmaPair() : first(), second() { }</div><div class="line"><a name="l03297"></a><span class="lineno"> 3297</span>&#160;    VmaPair(<span class="keyword">const</span> T1&amp; firstSrc, <span class="keyword">const</span> T2&amp; secondSrc) : first(firstSrc), second(secondSrc) { }</div><div class="line"><a name="l03298"></a><span class="lineno"> 3298</span>&#160;};</div><div class="line"><a name="l03299"></a><span class="lineno"> 3299</span>&#160;</div><div class="line"><a name="l03300"></a><span class="lineno"> 3300</span>&#160;<span class="comment">/* Class compatible with subset of interface of std::unordered_map.</span></div><div class="line"><a name="l03301"></a><span class="lineno"> 3301</span>&#160;<span class="comment">KeyT, ValueT must be POD because they will be stored in VmaVector.</span></div><div class="line"><a name="l03302"></a><span class="lineno"> 3302</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l03303"></a><span class="lineno"> 3303</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> KeyT, <span class="keyword">typename</span> ValueT&gt;</div><div class="line"><a name="l03304"></a><span class="lineno"> 3304</span>&#160;<span class="keyword">class </span>VmaMap</div><div class="line"><a name="l03305"></a><span class="lineno"> 3305</span>&#160;{</div><div class="line"><a name="l03306"></a><span class="lineno"> 3306</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l03307"></a><span class="lineno"> 3307</span>&#160;    <span class="keyword">typedef</span> VmaPair&lt;KeyT, ValueT&gt; PairType;</div><div class="line"><a name="l03308"></a><span class="lineno"> 3308</span>&#160;    <span class="keyword">typedef</span> PairType* iterator;</div><div class="line"><a name="l03309"></a><span class="lineno"> 3309</span>&#160;</div><div class="line"><a name="l03310"></a><span class="lineno"> 3310</span>&#160;    VmaMap(<span class="keyword">const</span> VmaStlAllocator&lt;PairType&gt;&amp; allocator) : m_Vector(allocator) { }</div><div class="line"><a name="l03311"></a><span class="lineno"> 3311</span>&#160;</div><div class="line"><a name="l03312"></a><span class="lineno"> 3312</span>&#160;    iterator begin() { <span class="keywordflow">return</span> m_Vector.begin(); }</div><div class="line"><a name="l03313"></a><span class="lineno"> 3313</span>&#160;    iterator end() { <span class="keywordflow">return</span> m_Vector.end(); }</div><div class="line"><a name="l03314"></a><span class="lineno"> 3314</span>&#160;</div><div class="line"><a name="l03315"></a><span class="lineno"> 3315</span>&#160;    <span class="keywordtype">void</span> insert(<span class="keyword">const</span> PairType&amp; pair);</div><div class="line"><a name="l03316"></a><span class="lineno"> 3316</span>&#160;    iterator find(<span class="keyword">const</span> KeyT&amp; key);</div><div class="line"><a name="l03317"></a><span class="lineno"> 3317</span>&#160;    <span class="keywordtype">void</span> erase(iterator it);</div><div class="line"><a name="l03318"></a><span class="lineno"> 3318</span>&#160;    </div><div class="line"><a name="l03319"></a><span class="lineno"> 3319</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l03320"></a><span class="lineno"> 3320</span>&#160;    VmaVector&lt; PairType, VmaStlAllocator&lt;PairType&gt; &gt; m_Vector;</div><div class="line"><a name="l03321"></a><span class="lineno"> 3321</span>&#160;};</div><div class="line"><a name="l03322"></a><span class="lineno"> 3322</span>&#160;</div><div class="line"><a name="l03323"></a><span class="lineno"> 3323</span>&#160;<span class="preprocessor">#define VMA_MAP_TYPE(KeyT, ValueT) VmaMap&lt;KeyT, ValueT&gt;</span></div><div class="line"><a name="l03324"></a><span class="lineno"> 3324</span>&#160;</div><div class="line"><a name="l03325"></a><span class="lineno"> 3325</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> FirstT, <span class="keyword">typename</span> SecondT&gt;</div><div class="line"><a name="l03326"></a><span class="lineno"> 3326</span>&#160;<span class="keyword">struct </span>VmaPairFirstLess</div><div class="line"><a name="l03327"></a><span class="lineno"> 3327</span>&#160;{</div><div class="line"><a name="l03328"></a><span class="lineno"> 3328</span>&#160;    <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> VmaPair&lt;FirstT, SecondT&gt;&amp; lhs, <span class="keyword">const</span> VmaPair&lt;FirstT, SecondT&gt;&amp; rhs)<span class="keyword"> const</span></div><div class="line"><a name="l03329"></a><span class="lineno"> 3329</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l03330"></a><span class="lineno"> 3330</span>&#160;        <span class="keywordflow">return</span> lhs.first &lt; rhs.first;</div><div class="line"><a name="l03331"></a><span class="lineno"> 3331</span>&#160;    }</div><div class="line"><a name="l03332"></a><span class="lineno"> 3332</span>&#160;    <span class="keywordtype">bool</span> operator()(<span class="keyword">const</span> VmaPair&lt;FirstT, SecondT&gt;&amp; lhs, <span class="keyword">const</span> FirstT&amp; rhsFirst)<span class="keyword"> const</span></div><div class="line"><a name="l03333"></a><span class="lineno"> 3333</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l03334"></a><span class="lineno"> 3334</span>&#160;        <span class="keywordflow">return</span> lhs.first &lt; rhsFirst;</div><div class="line"><a name="l03335"></a><span class="lineno"> 3335</span>&#160;    }</div><div class="line"><a name="l03336"></a><span class="lineno"> 3336</span>&#160;};</div><div class="line"><a name="l03337"></a><span class="lineno"> 3337</span>&#160;</div><div class="line"><a name="l03338"></a><span class="lineno"> 3338</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> KeyT, <span class="keyword">typename</span> ValueT&gt;</div><div class="line"><a name="l03339"></a><span class="lineno"> 3339</span>&#160;<span class="keywordtype">void</span> VmaMap&lt;KeyT, ValueT&gt;::insert(<span class="keyword">const</span> PairType&amp; pair)</div><div class="line"><a name="l03340"></a><span class="lineno"> 3340</span>&#160;{</div><div class="line"><a name="l03341"></a><span class="lineno"> 3341</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">size_t</span> indexToInsert = VmaBinaryFindFirstNotLess(</div><div class="line"><a name="l03342"></a><span class="lineno"> 3342</span>&#160;        m_Vector.data(),</div><div class="line"><a name="l03343"></a><span class="lineno"> 3343</span>&#160;        m_Vector.data() + m_Vector.size(),</div><div class="line"><a name="l03344"></a><span class="lineno"> 3344</span>&#160;        pair,</div><div class="line"><a name="l03345"></a><span class="lineno"> 3345</span>&#160;        VmaPairFirstLess&lt;KeyT, ValueT&gt;()) - m_Vector.data();</div><div class="line"><a name="l03346"></a><span class="lineno"> 3346</span>&#160;    VmaVectorInsert(m_Vector, indexToInsert, pair);</div><div class="line"><a name="l03347"></a><span class="lineno"> 3347</span>&#160;}</div><div class="line"><a name="l03348"></a><span class="lineno"> 3348</span>&#160;</div><div class="line"><a name="l03349"></a><span class="lineno"> 3349</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> KeyT, <span class="keyword">typename</span> ValueT&gt;</div><div class="line"><a name="l03350"></a><span class="lineno"> 3350</span>&#160;VmaPair&lt;KeyT, ValueT&gt;* VmaMap&lt;KeyT, ValueT&gt;::find(<span class="keyword">const</span> KeyT&amp; key)</div><div class="line"><a name="l03351"></a><span class="lineno"> 3351</span>&#160;{</div><div class="line"><a name="l03352"></a><span class="lineno"> 3352</span>&#160;    PairType* it = VmaBinaryFindFirstNotLess(</div><div class="line"><a name="l03353"></a><span class="lineno"> 3353</span>&#160;        m_Vector.data(),</div><div class="line"><a name="l03354"></a><span class="lineno"> 3354</span>&#160;        m_Vector.data() + m_Vector.size(),</div><div class="line"><a name="l03355"></a><span class="lineno"> 3355</span>&#160;        key,</div><div class="line"><a name="l03356"></a><span class="lineno"> 3356</span>&#160;        VmaPairFirstLess&lt;KeyT, ValueT&gt;());</div><div class="line"><a name="l03357"></a><span class="lineno"> 3357</span>&#160;    <span class="keywordflow">if</span>((it != m_Vector.end()) &amp;&amp; (it-&gt;first == key))</div><div class="line"><a name="l03358"></a><span class="lineno"> 3358</span>&#160;    {</div><div class="line"><a name="l03359"></a><span class="lineno"> 3359</span>&#160;        <span class="keywordflow">return</span> it;</div><div class="line"><a name="l03360"></a><span class="lineno"> 3360</span>&#160;    }</div><div class="line"><a name="l03361"></a><span class="lineno"> 3361</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l03362"></a><span class="lineno"> 3362</span>&#160;    {</div><div class="line"><a name="l03363"></a><span class="lineno"> 3363</span>&#160;        <span class="keywordflow">return</span> m_Vector.end();</div><div class="line"><a name="l03364"></a><span class="lineno"> 3364</span>&#160;    }</div><div class="line"><a name="l03365"></a><span class="lineno"> 3365</span>&#160;}</div><div class="line"><a name="l03366"></a><span class="lineno"> 3366</span>&#160;</div><div class="line"><a name="l03367"></a><span class="lineno"> 3367</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> KeyT, <span class="keyword">typename</span> ValueT&gt;</div><div class="line"><a name="l03368"></a><span class="lineno"> 3368</span>&#160;<span class="keywordtype">void</span> VmaMap&lt;KeyT, ValueT&gt;::erase(iterator it)</div><div class="line"><a name="l03369"></a><span class="lineno"> 3369</span>&#160;{</div><div class="line"><a name="l03370"></a><span class="lineno"> 3370</span>&#160;    VmaVectorRemove(m_Vector, it - m_Vector.begin());</div><div class="line"><a name="l03371"></a><span class="lineno"> 3371</span>&#160;}</div><div class="line"><a name="l03372"></a><span class="lineno"> 3372</span>&#160;</div><div class="line"><a name="l03373"></a><span class="lineno"> 3373</span>&#160;<span class="preprocessor">#endif // #if VMA_USE_STL_UNORDERED_MAP</span></div><div class="line"><a name="l03374"></a><span class="lineno"> 3374</span>&#160;</div><div class="line"><a name="l03375"></a><span class="lineno"> 3375</span>&#160;<span class="preprocessor">#endif // #if 0</span></div><div class="line"><a name="l03376"></a><span class="lineno"> 3376</span>&#160;</div><div class="line"><a name="l03378"></a><span class="lineno"> 3378</span>&#160;</div><div class="line"><a name="l03379"></a><span class="lineno"> 3379</span>&#160;<span class="keyword">class </span>VmaDeviceMemoryBlock;</div><div class="line"><a name="l03380"></a><span class="lineno"> 3380</span>&#160;</div><div class="line"><a name="l03381"></a><span class="lineno"> 3381</span>&#160;<span class="keyword">struct </span>VmaAllocation_T</div><div class="line"><a name="l03382"></a><span class="lineno"> 3382</span>&#160;{</div><div class="line"><a name="l03383"></a><span class="lineno"> 3383</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l03384"></a><span class="lineno"> 3384</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint8_t MAP_COUNT_FLAG_PERSISTENT_MAP = 0x80;</div><div class="line"><a name="l03385"></a><span class="lineno"> 3385</span>&#160;</div><div class="line"><a name="l03386"></a><span class="lineno"> 3386</span>&#160;    <span class="keyword">enum</span> FLAGS</div><div class="line"><a name="l03387"></a><span class="lineno"> 3387</span>&#160;    {</div><div class="line"><a name="l03388"></a><span class="lineno"> 3388</span>&#160;        FLAG_USER_DATA_STRING = 0x01,</div><div class="line"><a name="l03389"></a><span class="lineno"> 3389</span>&#160;    };</div><div class="line"><a name="l03390"></a><span class="lineno"> 3390</span>&#160;</div><div class="line"><a name="l03391"></a><span class="lineno"> 3391</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l03392"></a><span class="lineno"> 3392</span>&#160;    <span class="keyword">enum</span> ALLOCATION_TYPE</div><div class="line"><a name="l03393"></a><span class="lineno"> 3393</span>&#160;    {</div><div class="line"><a name="l03394"></a><span class="lineno"> 3394</span>&#160;        ALLOCATION_TYPE_NONE,</div><div class="line"><a name="l03395"></a><span class="lineno"> 3395</span>&#160;        ALLOCATION_TYPE_BLOCK,</div><div class="line"><a name="l03396"></a><span class="lineno"> 3396</span>&#160;        ALLOCATION_TYPE_DEDICATED,</div><div class="line"><a name="l03397"></a><span class="lineno"> 3397</span>&#160;    };</div><div class="line"><a name="l03398"></a><span class="lineno"> 3398</span>&#160;</div><div class="line"><a name="l03399"></a><span class="lineno"> 3399</span>&#160;    VmaAllocation_T(uint32_t currentFrameIndex, <span class="keywordtype">bool</span> userDataString) :</div><div class="line"><a name="l03400"></a><span class="lineno"> 3400</span>&#160;        m_Alignment(1),</div><div class="line"><a name="l03401"></a><span class="lineno"> 3401</span>&#160;        m_Size(0),</div><div class="line"><a name="l03402"></a><span class="lineno"> 3402</span>&#160;        m_pUserData(VMA_NULL),</div><div class="line"><a name="l03403"></a><span class="lineno"> 3403</span>&#160;        m_LastUseFrameIndex(currentFrameIndex),</div><div class="line"><a name="l03404"></a><span class="lineno"> 3404</span>&#160;        m_Type((uint8_t)ALLOCATION_TYPE_NONE),</div><div class="line"><a name="l03405"></a><span class="lineno"> 3405</span>&#160;        m_SuballocationType((uint8_t)VMA_SUBALLOCATION_TYPE_UNKNOWN),</div><div class="line"><a name="l03406"></a><span class="lineno"> 3406</span>&#160;        m_MapCount(0),</div><div class="line"><a name="l03407"></a><span class="lineno"> 3407</span>&#160;        m_Flags(userDataString ? (uint8_t)FLAG_USER_DATA_STRING : 0)</div><div class="line"><a name="l03408"></a><span class="lineno"> 3408</span>&#160;    {</div><div class="line"><a name="l03409"></a><span class="lineno"> 3409</span>&#160;    }</div><div class="line"><a name="l03410"></a><span class="lineno"> 3410</span>&#160;</div><div class="line"><a name="l03411"></a><span class="lineno"> 3411</span>&#160;    ~VmaAllocation_T()</div><div class="line"><a name="l03412"></a><span class="lineno"> 3412</span>&#160;    {</div><div class="line"><a name="l03413"></a><span class="lineno"> 3413</span>&#160;        VMA_ASSERT((m_MapCount &amp; ~MAP_COUNT_FLAG_PERSISTENT_MAP) == 0 &amp;&amp; <span class="stringliteral">&quot;Allocation was not unmapped before destruction.&quot;</span>);</div><div class="line"><a name="l03414"></a><span class="lineno"> 3414</span>&#160;</div><div class="line"><a name="l03415"></a><span class="lineno"> 3415</span>&#160;        <span class="comment">// Check if owned string was freed.</span></div><div class="line"><a name="l03416"></a><span class="lineno"> 3416</span>&#160;        VMA_ASSERT(m_pUserData == VMA_NULL);</div><div class="line"><a name="l03417"></a><span class="lineno"> 3417</span>&#160;    }</div><div class="line"><a name="l03418"></a><span class="lineno"> 3418</span>&#160;</div><div class="line"><a name="l03419"></a><span class="lineno"> 3419</span>&#160;    <span class="keywordtype">void</span> InitBlockAllocation(</div><div class="line"><a name="l03420"></a><span class="lineno"> 3420</span>&#160;        VmaPool hPool,</div><div class="line"><a name="l03421"></a><span class="lineno"> 3421</span>&#160;        VmaDeviceMemoryBlock* block,</div><div class="line"><a name="l03422"></a><span class="lineno"> 3422</span>&#160;        VkDeviceSize offset,</div><div class="line"><a name="l03423"></a><span class="lineno"> 3423</span>&#160;        VkDeviceSize alignment,</div><div class="line"><a name="l03424"></a><span class="lineno"> 3424</span>&#160;        VkDeviceSize size,</div><div class="line"><a name="l03425"></a><span class="lineno"> 3425</span>&#160;        VmaSuballocationType suballocationType,</div><div class="line"><a name="l03426"></a><span class="lineno"> 3426</span>&#160;        <span class="keywordtype">bool</span> mapped,</div><div class="line"><a name="l03427"></a><span class="lineno"> 3427</span>&#160;        <span class="keywordtype">bool</span> canBecomeLost)</div><div class="line"><a name="l03428"></a><span class="lineno"> 3428</span>&#160;    {</div><div class="line"><a name="l03429"></a><span class="lineno"> 3429</span>&#160;        VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE);</div><div class="line"><a name="l03430"></a><span class="lineno"> 3430</span>&#160;        VMA_ASSERT(block != VMA_NULL);</div><div class="line"><a name="l03431"></a><span class="lineno"> 3431</span>&#160;        m_Type = (uint8_t)ALLOCATION_TYPE_BLOCK;</div><div class="line"><a name="l03432"></a><span class="lineno"> 3432</span>&#160;        m_Alignment = alignment;</div><div class="line"><a name="l03433"></a><span class="lineno"> 3433</span>&#160;        m_Size = size;</div><div class="line"><a name="l03434"></a><span class="lineno"> 3434</span>&#160;        m_MapCount = mapped ? MAP_COUNT_FLAG_PERSISTENT_MAP : 0;</div><div class="line"><a name="l03435"></a><span class="lineno"> 3435</span>&#160;        m_SuballocationType = (uint8_t)suballocationType;</div><div class="line"><a name="l03436"></a><span class="lineno"> 3436</span>&#160;        m_BlockAllocation.m_hPool = hPool;</div><div class="line"><a name="l03437"></a><span class="lineno"> 3437</span>&#160;        m_BlockAllocation.m_Block = block;</div><div class="line"><a name="l03438"></a><span class="lineno"> 3438</span>&#160;        m_BlockAllocation.m_Offset = offset;</div><div class="line"><a name="l03439"></a><span class="lineno"> 3439</span>&#160;        m_BlockAllocation.m_CanBecomeLost = canBecomeLost;</div><div class="line"><a name="l03440"></a><span class="lineno"> 3440</span>&#160;    }</div><div class="line"><a name="l03441"></a><span class="lineno"> 3441</span>&#160;</div><div class="line"><a name="l03442"></a><span class="lineno"> 3442</span>&#160;    <span class="keywordtype">void</span> InitLost()</div><div class="line"><a name="l03443"></a><span class="lineno"> 3443</span>&#160;    {</div><div class="line"><a name="l03444"></a><span class="lineno"> 3444</span>&#160;        VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE);</div><div class="line"><a name="l03445"></a><span class="lineno"> 3445</span>&#160;        VMA_ASSERT(m_LastUseFrameIndex.load() == VMA_FRAME_INDEX_LOST);</div><div class="line"><a name="l03446"></a><span class="lineno"> 3446</span>&#160;        m_Type = (uint8_t)ALLOCATION_TYPE_BLOCK;</div><div class="line"><a name="l03447"></a><span class="lineno"> 3447</span>&#160;        m_BlockAllocation.m_hPool = VK_NULL_HANDLE;</div><div class="line"><a name="l03448"></a><span class="lineno"> 3448</span>&#160;        m_BlockAllocation.m_Block = VMA_NULL;</div><div class="line"><a name="l03449"></a><span class="lineno"> 3449</span>&#160;        m_BlockAllocation.m_Offset = 0;</div><div class="line"><a name="l03450"></a><span class="lineno"> 3450</span>&#160;        m_BlockAllocation.m_CanBecomeLost = <span class="keyword">true</span>;</div><div class="line"><a name="l03451"></a><span class="lineno"> 3451</span>&#160;    }</div><div class="line"><a name="l03452"></a><span class="lineno"> 3452</span>&#160;</div><div class="line"><a name="l03453"></a><span class="lineno"> 3453</span>&#160;    <span class="keywordtype">void</span> ChangeBlockAllocation(</div><div class="line"><a name="l03454"></a><span class="lineno"> 3454</span>&#160;        VmaAllocator hAllocator,</div><div class="line"><a name="l03455"></a><span class="lineno"> 3455</span>&#160;        VmaDeviceMemoryBlock* block,</div><div class="line"><a name="l03456"></a><span class="lineno"> 3456</span>&#160;        VkDeviceSize offset);</div><div class="line"><a name="l03457"></a><span class="lineno"> 3457</span>&#160;</div><div class="line"><a name="l03458"></a><span class="lineno"> 3458</span>&#160;    <span class="comment">// pMappedData not null means allocation is created with MAPPED flag.</span></div><div class="line"><a name="l03459"></a><span class="lineno"> 3459</span>&#160;    <span class="keywordtype">void</span> InitDedicatedAllocation(</div><div class="line"><a name="l03460"></a><span class="lineno"> 3460</span>&#160;        uint32_t memoryTypeIndex,</div><div class="line"><a name="l03461"></a><span class="lineno"> 3461</span>&#160;        VkDeviceMemory hMemory,</div><div class="line"><a name="l03462"></a><span class="lineno"> 3462</span>&#160;        VmaSuballocationType suballocationType,</div><div class="line"><a name="l03463"></a><span class="lineno"> 3463</span>&#160;        <span class="keywordtype">void</span>* pMappedData,</div><div class="line"><a name="l03464"></a><span class="lineno"> 3464</span>&#160;        VkDeviceSize size)</div><div class="line"><a name="l03465"></a><span class="lineno"> 3465</span>&#160;    {</div><div class="line"><a name="l03466"></a><span class="lineno"> 3466</span>&#160;        VMA_ASSERT(m_Type == ALLOCATION_TYPE_NONE);</div><div class="line"><a name="l03467"></a><span class="lineno"> 3467</span>&#160;        VMA_ASSERT(hMemory != VK_NULL_HANDLE);</div><div class="line"><a name="l03468"></a><span class="lineno"> 3468</span>&#160;        m_Type = (uint8_t)ALLOCATION_TYPE_DEDICATED;</div><div class="line"><a name="l03469"></a><span class="lineno"> 3469</span>&#160;        m_Alignment = 0;</div><div class="line"><a name="l03470"></a><span class="lineno"> 3470</span>&#160;        m_Size = size;</div><div class="line"><a name="l03471"></a><span class="lineno"> 3471</span>&#160;        m_SuballocationType = (uint8_t)suballocationType;</div><div class="line"><a name="l03472"></a><span class="lineno"> 3472</span>&#160;        m_MapCount = (pMappedData != VMA_NULL) ? MAP_COUNT_FLAG_PERSISTENT_MAP : 0;</div><div class="line"><a name="l03473"></a><span class="lineno"> 3473</span>&#160;        m_DedicatedAllocation.m_MemoryTypeIndex = memoryTypeIndex;</div><div class="line"><a name="l03474"></a><span class="lineno"> 3474</span>&#160;        m_DedicatedAllocation.m_hMemory = hMemory;</div><div class="line"><a name="l03475"></a><span class="lineno"> 3475</span>&#160;        m_DedicatedAllocation.m_pMappedData = pMappedData;</div><div class="line"><a name="l03476"></a><span class="lineno"> 3476</span>&#160;    }</div><div class="line"><a name="l03477"></a><span class="lineno"> 3477</span>&#160;</div><div class="line"><a name="l03478"></a><span class="lineno"> 3478</span>&#160;    ALLOCATION_TYPE GetType()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (ALLOCATION_TYPE)m_Type; }</div><div class="line"><a name="l03479"></a><span class="lineno"> 3479</span>&#160;    VkDeviceSize GetAlignment()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Alignment; }</div><div class="line"><a name="l03480"></a><span class="lineno"> 3480</span>&#160;    VkDeviceSize GetSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_Size; }</div><div class="line"><a name="l03481"></a><span class="lineno"> 3481</span>&#160;    <span class="keywordtype">bool</span> IsUserDataString()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (m_Flags &amp; FLAG_USER_DATA_STRING) != 0; }</div><div class="line"><a name="l03482"></a><span class="lineno"> 3482</span>&#160;    <span class="keywordtype">void</span>* GetUserData()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_pUserData; }</div><div class="line"><a name="l03483"></a><span class="lineno"> 3483</span>&#160;    <span class="keywordtype">void</span> SetUserData(VmaAllocator hAllocator, <span class="keywordtype">void</span>* pUserData);</div><div class="line"><a name="l03484"></a><span class="lineno"> 3484</span>&#160;    VmaSuballocationType GetSuballocationType()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (VmaSuballocationType)m_SuballocationType; }</div><div class="line"><a name="l03485"></a><span class="lineno"> 3485</span>&#160;</div><div class="line"><a name="l03486"></a><span class="lineno"> 3486</span>&#160;    VmaDeviceMemoryBlock* GetBlock()<span class="keyword"> const</span></div><div class="line"><a name="l03487"></a><span class="lineno"> 3487</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l03488"></a><span class="lineno"> 3488</span>&#160;        VMA_ASSERT(m_Type == ALLOCATION_TYPE_BLOCK);</div><div class="line"><a name="l03489"></a><span class="lineno"> 3489</span>&#160;        <span class="keywordflow">return</span> m_BlockAllocation.m_Block;</div><div class="line"><a name="l03490"></a><span class="lineno"> 3490</span>&#160;    }</div><div class="line"><a name="l03491"></a><span class="lineno"> 3491</span>&#160;    VkDeviceSize GetOffset() <span class="keyword">const</span>;</div><div class="line"><a name="l03492"></a><span class="lineno"> 3492</span>&#160;    VkDeviceMemory GetMemory() <span class="keyword">const</span>;</div><div class="line"><a name="l03493"></a><span class="lineno"> 3493</span>&#160;    uint32_t GetMemoryTypeIndex() <span class="keyword">const</span>;</div><div class="line"><a name="l03494"></a><span class="lineno"> 3494</span>&#160;    <span class="keywordtype">bool</span> IsPersistentMap()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (m_MapCount &amp; MAP_COUNT_FLAG_PERSISTENT_MAP) != 0; }</div><div class="line"><a name="l03495"></a><span class="lineno"> 3495</span>&#160;    <span class="keywordtype">void</span>* GetMappedData() <span class="keyword">const</span>;</div><div class="line"><a name="l03496"></a><span class="lineno"> 3496</span>&#160;    <span class="keywordtype">bool</span> CanBecomeLost() <span class="keyword">const</span>;</div><div class="line"><a name="l03497"></a><span class="lineno"> 3497</span>&#160;    VmaPool GetPool() <span class="keyword">const</span>;</div><div class="line"><a name="l03498"></a><span class="lineno"> 3498</span>&#160;    </div><div class="line"><a name="l03499"></a><span class="lineno"> 3499</span>&#160;    uint32_t GetLastUseFrameIndex()<span class="keyword"> const</span></div><div class="line"><a name