Rebuilt the docs

This commit is contained in:
Adam Sawicki 2022-02-17 14:44:48 +01:00
parent aee61b1d25
commit c168e42de4
49 changed files with 645 additions and 587 deletions

View File

@ -72,44 +72,42 @@ $(function() {
<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 is 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="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = ...</div>
<div class="line"> </div>
<div class="line">MyBufferMetadata* pMetadata = CreateBufferMetadata();</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" 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 hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocCreateInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_GPU_ONLY</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:468</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1120</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a8259e85c272683434f4abb4ddddffe19"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">VmaAllocationCreateInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1159</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1128</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:492</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1168</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a8259e85c272683434f4abb4ddddffe19"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">VmaAllocationCreateInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1207</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1176</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></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 hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, allocation, &amp;allocInfo);</div>
<div class="line">MyBufferMetadata* pMetadata = (MyBufferMetadata*)allocInfo.<a class="code hl_variable" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a>;</div>
<div class="ttc" id="agroup__group__alloc_html_ga86dd08aba8633bfa4ad0df2e76481d8b"><div class="ttname"><a href="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a></div><div class="ttdeci">void vmaGetAllocationInfo(VmaAllocator allocator, VmaAllocation allocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">Returns current information about specified allocation.</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1262</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html_adc507656149c04de7ed95d0042ba2a13"><div class="ttname"><a href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">VmaAllocationInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1309</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1310</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html_adc507656149c04de7ed95d0042ba2a13"><div class="ttname"><a href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">VmaAllocationInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using vma...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1357</div></div>
</div><!-- fragment --><p >It can also be changed using function <a class="el" href="group__group__alloc.html#gaf9147d31ffc11d62fc187bde283ed14f" 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="group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as a null-terminated string in JSON format.">vmaBuildStatsString()</a>, in hexadecimal form.</p>
<p >Values of (non-zero) allocations' <code>pUserData</code> are printed in JSON report created by <a class="el" href="group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as a null-terminated 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 <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">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="group__group__alloc.html#gaf9147d31ffc11d62fc187bde283ed14f" 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>
<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="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">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="group__group__alloc.html#gaf9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value.">vmaSetAllocationUserData()</a> must be either null or a 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 = ...</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 hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19">pUserData</a> = imageName.c_str();</div>
<div class="line"> </div>
@ -117,8 +115,8 @@ Allocation names</h1>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a>(allocator, &amp;imageInfo, &amp;allocCreateInfo, &amp;image, &amp;allocation, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="agroup__group__alloc_html_ga02a94f25679275851a53e82eacbcfc73"><div class="ttname"><a href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a></div><div class="ttdeci">VkResult vmaCreateImage(VmaAllocator allocator, const VkImageCreateInfo *pImageCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkImage *pImage, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">Function similar to vmaCreateBuffer().</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:552</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_add09658ac14fe290ace25470ddd6d41b"><div class="ttname"><a href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">VmaAllocationCreateInfo::flags</a></div><div class="ttdeci">VmaAllocationCreateFlags flags</div><div class="ttdoc">Use VmaAllocationCreateFlagBits enum.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1122</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520">VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:560</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_add09658ac14fe290ace25470ddd6d41b"><div class="ttname"><a href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">VmaAllocationCreateInfo::flags</a></div><div class="ttdeci">VmaAllocationCreateFlags flags</div><div class="ttdoc">Use VmaAllocationCreateFlagBits enum.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1170</div></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 hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a>(allocator, allocation, &amp;allocInfo);</div>

View File

@ -71,50 +71,69 @@ $(function() {
<div class="contents">
<div class="textblock"><p >Physical devices in Vulkan support various combinations of memory heaps and types. Help with choosing correct and optimal memory type for your specific resource is one of the key features of this library. You can use it by filling appropriate members of <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> structure, as described below. You can also combine multiple methods.</p>
<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="group__group__alloc.html#gaef15a94b58fbcb0fe706d5720e84a74a" title="Helps to find memoryTypeIndex, given memoryTypeBits and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndex()</a>, <a class="el" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForBufferInfo()</a>, <a class="el" href="group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472" title="Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForImageInfo()</a>.</li>
<li>If you just want to find memory type index that meets your requirements, you can use function: <a class="el" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForBufferInfo()</a>, <a class="el" href="group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472" title="Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForImageInfo()</a>, <a class="el" href="group__group__alloc.html#gaef15a94b58fbcb0fe706d5720e84a74a" 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="group__group__alloc.html#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation.">vmaAllocateMemory()</a>. Usage of this function is not recommended and usually not needed. <a class="el" href="group__group__alloc.html#gad37e82e492b3de38fc3f4cffd9ad0ae1" title="General purpose memory allocation for multiple allocation objects at once.">vmaAllocateMemoryPages()</a> function is also provided for creating multiple allocations at once, which may be useful for sparse binding.</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="group__group__alloc.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, <a class="el" href="group__group__alloc.html#ga0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer().">vmaAllocateMemoryForImage()</a>. For binding you should use functions: <a class="el" href="group__group__alloc.html#ga6b0929b914b60cf2d45cac4bf3547470" title="Binds buffer to allocation.">vmaBindBufferMemory()</a>, <a class="el" href="group__group__alloc.html#ga3d3ca45799923aa5d138e9e5f9eb2da5" title="Binds image to allocation.">vmaBindImageMemory()</a> or their extended versions: <a class="el" href="group__group__alloc.html#ga927c944f45e0f2941182abb6f608e64a" title="Binds buffer to allocation with additional parameters.">vmaBindBufferMemory2()</a>, <a class="el" href="group__group__alloc.html#gaa8251ee81b0045a443e35b8e8aa021bc" title="Binds image to allocation with additional parameters.">vmaBindImageMemory2()</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="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>. This is the easiest and recommended way to use this library.</li>
<li><b>This is the easiest and recommended way to use this library:</b> 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="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>.</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>
<p >If no memory type can be found that meets all the requirements, these functions return <code>VK_ERROR_FEATURE_NOT_PRESENT</code>.</p>
<p >You can leave <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> structure completely filled with zeros. It means no requirements are specified for memory type. It is valid, although not very useful.</p>
<h1><a class="anchor" id="choosing_memory_type_usage"></a>
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="group__group__alloc.html#gaa5846affa1e9da3800e3e78fae2305cc" title="Intended usage of the allocated memory.">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>
<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="group__group__alloc.html#gaa5846affa1e9da3800e3e78fae2305cc" title="Intended usage of the allocated memory.">VmaMemoryUsage</a>. It defines high level, common usage types. Since version 3 of the library, it is recommended to use <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a> to let it select best memory type for your resource automatically.</p>
<p >For example, if you want to create a uniform buffer that will be filled using transfer only once or infrequently and then used for rendering every frame as a uniform buffer, you can do it using following code. The buffer will most likely end up in a memory type with <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code> to be fast to access by the GPU device.</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 hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div>
<div class="line">allocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div>
<div class="line">allocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buffer;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_GPU_ONLY</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:468</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1120</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1128</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:492</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1168</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1176</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
</div><!-- fragment --><h1><a class="anchor" id="choosing_memory_type_required_preferred_flags"></a>
</div><!-- fragment --><p >If you have a preference for putting the resource in GPU (device) memory or CPU (host) memory on systems with discrete graphics card that have the memories separate, you can use <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327">VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE</a> or <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d">VMA_MEMORY_USAGE_AUTO_PREFER_HOST</a>.</p>
<p >When using <code>VMA_MEMORY_USAGE_AUTO*</code> while you want to map the allocated memory, you also need to specify one of the host access flags: <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a>. This will help the library decide about preferred memory type to ensure it has <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> so you can map it.</p>
<p >For example, a staging buffer that will be filled via mapped pointer and then used as a source of transfer to the buffer decribed previously can be created like this. It will likely and up in a memory type that is <code>HOST_VISIBLE</code> and <code>HOST_COHERENT</code> but not <code>HOST_CACHED</code> (meaning uncached, write-combined) and not <code>DEVICE_LOCAL</code> (meaning system RAM).</p>
<div class="fragment"><div class="line">VkBufferCreateInfo stagingBufferInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div>
<div class="line">stagingBufferInfo.size = 65536;</div>
<div class="line">stagingBufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> stagingAllocInfo = {};</div>
<div class="line">stagingAllocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">stagingAllocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer stagingBuffer;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> stagingAllocation;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;stagingBufferInfo, &amp;stagingAllocInfo, &amp;stagingBuffer, &amp;stagingAllocation, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:597</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_add09658ac14fe290ace25470ddd6d41b"><div class="ttname"><a href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">VmaAllocationCreateInfo::flags</a></div><div class="ttdeci">VmaAllocationCreateFlags flags</div><div class="ttdoc">Use VmaAllocationCreateFlagBits enum.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1170</div></div>
</div><!-- fragment --><p >For more examples of creating different kinds of resources, see chapter <a class="el" href="usage_patterns.html">Recommended usage patterns</a>.</p>
<p >Usage values <code>VMA_MEMORY_USAGE_AUTO*</code> are legal to use only when the library knows about the resource being created by having <code>VkBufferCreateInfo</code> / <code>VkImageCreateInfo</code> passed, so they work with functions like: <a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>, <a class="el" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForBufferInfo()</a> etc. If you allocate raw memory using function <a class="el" href="group__group__alloc.html#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation.">vmaAllocateMemory()</a>, you have to use other means of selecting memory type, as decribed below.</p>
<dl class="section note"><dt>Note</dt><dd>Old usage values (<code>VMA_MEMORY_USAGE_GPU_ONLY</code>, <code>VMA_MEMORY_USAGE_CPU_ONLY</code>, <code>VMA_MEMORY_USAGE_CPU_TO_GPU</code>, <code>VMA_MEMORY_USAGE_GPU_TO_CPU</code>, <code>VMA_MEMORY_USAGE_CPU_COPY</code>) are still available and work same way as in previous versions of the library for backward compatibility, but they are not recommended.</dd></dl>
<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 hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div>
<div class="line">allocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90">requiredFlags</a> = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;</div>
<div class="line">allocInfo.<a class="code hl_variable" 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 hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line">allocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> | <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buffer;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_MAPPED_BIT</div><div class="ttdoc">Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:542</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a7fe8d81a1ad10b2a2faacacee5b15d6d"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">VmaAllocationCreateInfo::preferredFlags</a></div><div class="ttdeci">VkMemoryPropertyFlags preferredFlags</div><div class="ttdoc">Flags that preferably should be set in a memory type chosen for an allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1138</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a9166390303ff42d783305bc31c2b6b90"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90">VmaAllocationCreateInfo::requiredFlags</a></div><div class="ttdeci">VkMemoryPropertyFlags requiredFlags</div><div class="ttdoc">Flags that must be set in a Memory Type chosen for an allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1133</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_add09658ac14fe290ace25470ddd6d41b"><div class="ttname"><a href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">VmaAllocationCreateInfo::flags</a></div><div class="ttdeci">VmaAllocationCreateFlags flags</div><div class="ttdoc">Use VmaAllocationCreateFlagBits enum.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1122</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_MAPPED_BIT</div><div class="ttdoc">Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:550</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:609</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a7fe8d81a1ad10b2a2faacacee5b15d6d"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">VmaAllocationCreateInfo::preferredFlags</a></div><div class="ttdeci">VkMemoryPropertyFlags preferredFlags</div><div class="ttdoc">Flags that preferably should be set in a memory type chosen for an allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1186</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a9166390303ff42d783305bc31c2b6b90"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a9166390303ff42d783305bc31c2b6b90">VmaAllocationCreateInfo::requiredFlags</a></div><div class="ttdeci">VkMemoryPropertyFlags requiredFlags</div><div class="ttdoc">Flags that must be set in a Memory Type chosen for an allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1181</div></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>
<p >Value passed in <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory.">VmaAllocationCreateInfo::usage</a> is internally converted to a set of required and preferred flags, plus some extra "magic" (heuristics).</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 <code>UINT32_MAX</code>, means there are no restrictions to memory type index.</p>
@ -127,7 +146,7 @@ Explicit memory types</h1>
<div class="line">VkBuffer buffer;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a3bf940c0271d85d6ba32a4d820075055"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055">VmaAllocationCreateInfo::memoryTypeBits</a></div><div class="ttdeci">uint32_t memoryTypeBits</div><div class="ttdoc">Bitmask containing one bit set for every memory type acceptable for this allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1146</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a3bf940c0271d85d6ba32a4d820075055"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a3bf940c0271d85d6ba32a4d820075055">VmaAllocationCreateInfo::memoryTypeBits</a></div><div class="ttdeci">uint32_t memoryTypeBits</div><div class="ttdoc">Bitmask containing one bit set for every memory type acceptable for this allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1194</div></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>

View File

@ -78,7 +78,7 @@ Pointers to Vulkan functions</h1>
<div class="fragment"><div class="line">m_VulkanFunctions.vkAllocateMemory = (PFN_vkAllocateMemory)vkAllocateMemory;</div>
</div><!-- fragment --><p >If you want to disable this feature, set configuration macro: <code>#define VMA_STATIC_VULKAN_FUNCTIONS 0</code>.</p>
<p >Second, you can provide the pointers yourself by setting member <a class="el" href="struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd" title="Pointers to Vulkan functions. Can be null.">VmaAllocatorCreateInfo::pVulkanFunctions</a>. You can fetch them e.g. using functions <code>vkGetInstanceProcAddr</code> and <code>vkGetDeviceProcAddr</code> or by using a helper library like <a href="https://github.com/zeux/volk">volk</a>.</p>
<p >Third, VMA tries to fetch remaining pointers that are still null by calling <code>vkGetInstanceProcAddr</code> and <code>vkGetDeviceProcAddr</code> on its own. If you want to disable this feature, set configuration macro: <code>#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0</code>.</p>
<p >Third, VMA tries to fetch remaining pointers that are still null by calling <code>vkGetInstanceProcAddr</code> and <code>vkGetDeviceProcAddr</code> on its own. You need to only fill in <a class="el" href="struct_vma_vulkan_functions.html#a3eafa102f5f8915f093f40675636b849" title="Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.">VmaVulkanFunctions::vkGetInstanceProcAddr</a> and <a class="el" href="struct_vma_vulkan_functions.html#ac383ab9af127e5e136622fa4ebea9e57" title="Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.">VmaVulkanFunctions::vkGetDeviceProcAddr</a>. Other pointers will be fetched automatically. If you want to disable this feature, set configuration macro: <code>#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0</code>.</p>
<p >Finally, all the function pointers required by the library (considering selected Vulkan version and enabled extensions) are checked with <code>VMA_ASSERT</code> if they are not null.</p>
<h1><a class="anchor" id="custom_memory_allocator"></a>
Custom host memory allocator</h1>
@ -88,7 +88,7 @@ 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. Optional.">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>.</p>
<h1><a class="anchor" id="heap_memory_limit"></a>
Device heap memory limit</h1>
<p >When device memory of certain heap runs out of free space, new allocations may fail (returning error code) or they may succeed, silently pushing some existing memory blocks from GPU VRAM to system RAM (which degrades performance). This behavior is implementation-dependent - it depends on GPU vendor and graphics driver.</p>
<p >When device memory of certain heap runs out of free space, new allocations may fail (returning error code) or they may succeed, silently pushing some existing_ memory blocks from GPU VRAM to system RAM (which degrades performance). This behavior is implementation-dependent - it depends on GPU vendor and graphics driver.</p>
<p >On AMD cards it can be controlled while creating Vulkan device object by using VK_AMD_memory_overallocation_behavior extension, if available.</p>
<p >Alternatively, 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 -->

View File

@ -77,6 +77,7 @@ $(function() {
<li>Limit maximum amount of Vulkan memory allocated for that pool.</li>
<li>Reserve minimum or fixed amount of Vulkan memory always preallocated for that pool.</li>
<li>Use extra parameters for a set of your allocations that are available in <a class="el" href="struct_vma_pool_create_info.html" title="Describes parameter of created VmaPool.">VmaPoolCreateInfo</a> but not in <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> - e.g., custom minimum alignment, custom <code>pNext</code> chain.</li>
<li>Perform defragmentation on a specific subset of your allocations.</li>
</ul>
<p >To use custom memory pools:</p>
<ol type="1">
@ -108,13 +109,13 @@ $(function() {
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div>
<div class="ttc" id="agroup__group__alloc_html_ga5c8770ded7c59c8caac6de0c2cb00b50"><div class="ttname"><a href="group__group__alloc.html#ga5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a></div><div class="ttdeci">VkResult vmaCreatePool(VmaAllocator allocator, const VmaPoolCreateInfo *pCreateInfo, VmaPool *pPool)</div><div class="ttdoc">Allocates Vulkan device memory and creates VmaPool object.</div></div>
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1120</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a6272c0555cfd1fe28bff1afeb6190150"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">VmaAllocationCreateInfo::pool</a></div><div class="ttdeci">VmaPool pool</div><div class="ttdoc">Pool that this allocation should be created in.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1152</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1168</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a6272c0555cfd1fe28bff1afeb6190150"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">VmaAllocationCreateInfo::pool</a></div><div class="ttdeci">VmaPool pool</div><div class="ttdoc">Pool that this allocation should be created in.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1200</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1262</div></div>
<div class="ttc" id="astruct_vma_pool_create_info_html"><div class="ttname"><a href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a></div><div class="ttdoc">Describes parameter of created VmaPool.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1171</div></div>
<div class="ttc" id="astruct_vma_pool_create_info_html_a596fa76b685d3f1f688f84a709a5b319"><div class="ttname"><a href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">VmaPoolCreateInfo::memoryTypeIndex</a></div><div class="ttdeci">uint32_t memoryTypeIndex</div><div class="ttdoc">Vulkan memory type index to allocate this pool from.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1174</div></div>
<div class="ttc" id="astruct_vma_pool_create_info_html_ae41142f2834fcdc82baa4883c187b75c"><div class="ttname"><a href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">VmaPoolCreateInfo::maxBlockCount</a></div><div class="ttdeci">size_t maxBlockCount</div><div class="ttdoc">Maximum number of blocks that can be allocated in this pool. Optional.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1200</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1310</div></div>
<div class="ttc" id="astruct_vma_pool_create_info_html"><div class="ttname"><a href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a></div><div class="ttdoc">Describes parameter of created VmaPool.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1219</div></div>
<div class="ttc" id="astruct_vma_pool_create_info_html_a596fa76b685d3f1f688f84a709a5b319"><div class="ttname"><a href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">VmaPoolCreateInfo::memoryTypeIndex</a></div><div class="ttdeci">uint32_t memoryTypeIndex</div><div class="ttdoc">Vulkan memory type index to allocate this pool from.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1222</div></div>
<div class="ttc" id="astruct_vma_pool_create_info_html_ae41142f2834fcdc82baa4883c187b75c"><div class="ttname"><a href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">VmaPoolCreateInfo::maxBlockCount</a></div><div class="ttdeci">size_t maxBlockCount</div><div class="ttdoc">Maximum number of blocks that can be allocated in this pool. Optional.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1248</div></div>
<div class="ttc" id="astruct_vma_pool_html"><div class="ttname"><a href="struct_vma_pool.html">VmaPool</a></div><div class="ttdoc">Represents custom memory pool.</div></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 hl_function" href="group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(allocator, buf, alloc);</div>
@ -122,15 +123,16 @@ $(function() {
<div class="ttc" id="agroup__group__alloc_html_ga0d9f4e4ba5bf9aab1f1c746387753d77"><div class="ttname"><a href="group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a></div><div class="ttdeci">void vmaDestroyBuffer(VmaAllocator allocator, VkBuffer buffer, VmaAllocation allocation)</div><div class="ttdoc">Destroys Vulkan buffer and frees allocated memory.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ga5485779c8f1948238fc4e92232fa65e1"><div class="ttname"><a href="group__group__alloc.html#ga5485779c8f1948238fc4e92232fa65e1">vmaDestroyPool</a></div><div class="ttdeci">void vmaDestroyPool(VmaAllocator allocator, VmaPool pool)</div><div class="ttdoc">Destroys VmaPool object and frees Vulkan device memory.</div></div>
</div><!-- fragment --><p >New versions of this library support creating dedicated allocations in custom pools. It is supported only when <a class="el" href="struct_vma_pool_create_info.html#aa4265160536cdb9be821b7686c16c676" title="Size of a single VkDeviceMemory block to be allocated as part of this pool, in bytes....">VmaPoolCreateInfo::blockSize</a> = 0. To use this feature, 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 the pointer to your custom pool and <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum.">VmaAllocationCreateInfo::flags</a> to <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block.">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Excessive use of custom pools is a common mistake when using this library. Custom pools may be useful for special purposes - when you want to keep certain type of resources separate e.g. to reserve minimum amount of memory for them or limit maximum amount of memory they can occupy. For most resources this is not needed and so it is not recommended to create <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool.">VmaPool</a> objects and allocations out of them. Allocating from the default pool is sufficient.</dd></dl>
<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 helper functions <a class="el" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForBufferInfo()</a>, <a class="el" href="group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472" 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">exampleBufCreateInfo.size = 1024; <span class="comment">// Doesn&#39;t matter</span></div>
<div class="line">exampleBufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>; <span class="comment">// Change if needed.</span></div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line"> </div>
<div class="line">uint32_t memTypeIndex;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888">vmaFindMemoryTypeIndexForBufferInfo</a>(allocator, &amp;exampleBufCreateInfo, &amp;allocCreateInfo, &amp;memTypeIndex);</div>
@ -139,8 +141,8 @@ Choosing memory type index</h1>
<div class="line">poolCreateInfo.<a class="code hl_variable" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a> = memTypeIndex;</div>
<div class="line"><span class="comment">// ...</span></div>
<div class="ttc" id="agroup__group__alloc_html_gae790ab9ffaf7667fb8f62523e6897888"><div class="ttname"><a href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888">vmaFindMemoryTypeIndexForBufferInfo</a></div><div class="ttdeci">VkResult vmaFindMemoryTypeIndexForBufferInfo(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, uint32_t *pMemoryTypeIndex)</div><div class="ttdoc">Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_GPU_ONLY</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:468</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1128</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:492</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1176</div></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>

View File

@ -133,15 +133,15 @@ Defragmenting CPU memory</h1>
<div class="ttc" id="agroup__group__alloc_html_ga6b0929b914b60cf2d45cac4bf3547470"><div class="ttname"><a href="group__group__alloc.html#ga6b0929b914b60cf2d45cac4bf3547470">vmaBindBufferMemory</a></div><div class="ttdeci">VkResult vmaBindBufferMemory(VmaAllocator allocator, VmaAllocation allocation, VkBuffer buffer)</div><div class="ttdoc">Binds buffer to allocation.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ga86dd08aba8633bfa4ad0df2e76481d8b"><div class="ttname"><a href="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a></div><div class="ttdeci">void vmaGetAllocationInfo(VmaAllocator allocator, VmaAllocation allocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">Returns current information about specified allocation.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ga8774e20e91e245aae959ba63efa15dd2"><div class="ttname"><a href="group__group__alloc.html#ga8774e20e91e245aae959ba63efa15dd2">vmaDefragmentationEnd</a></div><div class="ttdeci">VkResult vmaDefragmentationEnd(VmaAllocator allocator, VmaDefragmentationContext context)</div><div class="ttdoc">Ends defragmentation process.</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1262</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1310</div></div>
<div class="ttc" id="astruct_vma_allocator_html"><div class="ttname"><a href="struct_vma_allocator.html">VmaAllocator</a></div><div class="ttdoc">Represents main object of this library initialized.</div></div>
<div class="ttc" id="astruct_vma_defragmentation_context_html"><div class="ttname"><a href="struct_vma_defragmentation_context.html">VmaDefragmentationContext</a></div><div class="ttdoc">Represents Opaque object that represents started defragmentation process.</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html"><div class="ttname"><a href="struct_vma_defragmentation_info2.html">VmaDefragmentationInfo2</a></div><div class="ttdoc">Parameters for defragmentation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1317</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a3cf86ab32c1da779b4923d301a3056ba"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a3cf86ab32c1da779b4923d301a3056ba">VmaDefragmentationInfo2::allocationCount</a></div><div class="ttdeci">uint32_t allocationCount</div><div class="ttdoc">Number of allocations in pAllocations array.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1323</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a76d51a644dc7f5405d0cdd0025ecd0cc"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a76d51a644dc7f5405d0cdd0025ecd0cc">VmaDefragmentationInfo2::pAllocationsChanged</a></div><div class="ttdeci">VkBool32 * pAllocationsChanged</div><div class="ttdoc">Optional, output. Pointer to array that will be filled with information whether the allocation at cer...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1337</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a94c2c7223d52878445a8cccce396b671"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a94c2c7223d52878445a8cccce396b671">VmaDefragmentationInfo2::maxCpuAllocationsToMove</a></div><div class="ttdeci">uint32_t maxCpuAllocationsToMove</div><div class="ttdoc">Maximum number of allocations that can be moved to a different place using transfers on CPU side,...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1366</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_ab6d288f29d028156cf73542d630a2e32"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#ab6d288f29d028156cf73542d630a2e32">VmaDefragmentationInfo2::pAllocations</a></div><div class="ttdeci">const VmaAllocation * pAllocations</div><div class="ttdoc">Pointer to array of allocations that can be defragmented.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1331</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_af78e1ea40c22d85137b65f6b384a4d0a"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#af78e1ea40c22d85137b65f6b384a4d0a">VmaDefragmentationInfo2::maxCpuBytesToMove</a></div><div class="ttdeci">VkDeviceSize maxCpuBytesToMove</div><div class="ttdoc">Maximum total numbers of bytes that can be copied while moving allocations to different places using ...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1361</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html"><div class="ttname"><a href="struct_vma_defragmentation_info2.html">VmaDefragmentationInfo2</a></div><div class="ttdoc">Parameters for defragmentation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1365</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a3cf86ab32c1da779b4923d301a3056ba"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a3cf86ab32c1da779b4923d301a3056ba">VmaDefragmentationInfo2::allocationCount</a></div><div class="ttdeci">uint32_t allocationCount</div><div class="ttdoc">Number of allocations in pAllocations array.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1371</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a76d51a644dc7f5405d0cdd0025ecd0cc"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a76d51a644dc7f5405d0cdd0025ecd0cc">VmaDefragmentationInfo2::pAllocationsChanged</a></div><div class="ttdeci">VkBool32 * pAllocationsChanged</div><div class="ttdoc">Optional, output. Pointer to array that will be filled with information whether the allocation at cer...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1385</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a94c2c7223d52878445a8cccce396b671"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a94c2c7223d52878445a8cccce396b671">VmaDefragmentationInfo2::maxCpuAllocationsToMove</a></div><div class="ttdeci">uint32_t maxCpuAllocationsToMove</div><div class="ttdoc">Maximum number of allocations that can be moved to a different place using transfers on CPU side,...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1414</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_ab6d288f29d028156cf73542d630a2e32"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#ab6d288f29d028156cf73542d630a2e32">VmaDefragmentationInfo2::pAllocations</a></div><div class="ttdeci">const VmaAllocation * pAllocations</div><div class="ttdoc">Pointer to array of allocations that can be defragmented.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1379</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_af78e1ea40c22d85137b65f6b384a4d0a"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#af78e1ea40c22d85137b65f6b384a4d0a">VmaDefragmentationInfo2::maxCpuBytesToMove</a></div><div class="ttdeci">VkDeviceSize maxCpuBytesToMove</div><div class="ttdoc">Maximum total numbers of bytes that can be copied while moving allocations to different places using ...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1409</div></div>
</div><!-- fragment --><p >Setting <a class="el" href="struct_vma_defragmentation_info2.html#a76d51a644dc7f5405d0cdd0025ecd0cc" title="Optional, output. Pointer to array that will be filled with information whether the allocation at cer...">VmaDefragmentationInfo2::pAllocationsChanged</a> is optional. This output array tells whether particular allocation in <a class="el" href="struct_vma_defragmentation_info2.html#ab6d288f29d028156cf73542d630a2e32" title="Pointer to array of allocations that can be defragmented.">VmaDefragmentationInfo2::pAllocations</a> at the same index has been modified during defragmentation. You can pass null, but you then need to query every allocation passed to defragmentation for new parameters using <a class="el" href="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation.">vmaGetAllocationInfo()</a> if you might need to recreate and rebind a buffer or image associated with it.</p>
<p >If you use <a class="el" href="choosing_memory_type.html#choosing_memory_type_custom_memory_pools">Custom memory pools</a>, you can fill <a class="el" href="struct_vma_defragmentation_info2.html#a7e70aa2a1081d849dcc7829b19d3ec9d" title="Numer of pools in pPools array.">VmaDefragmentationInfo2::poolCount</a> and <a class="el" href="struct_vma_defragmentation_info2.html#a3c9c6aa5c97d5670f8e362b3a6f3029b" title="Either null or pointer to array of pools to be defragmented.">VmaDefragmentationInfo2::pPools</a> instead of <a class="el" href="struct_vma_defragmentation_info2.html#a3cf86ab32c1da779b4923d301a3056ba" title="Number of allocations in pAllocations array.">VmaDefragmentationInfo2::allocationCount</a> and <a class="el" href="struct_vma_defragmentation_info2.html#ab6d288f29d028156cf73542d630a2e32" title="Pointer to array of allocations that can be defragmented.">VmaDefragmentationInfo2::pAllocations</a> to defragment all allocations in given pools. You cannot use <a class="el" href="struct_vma_defragmentation_info2.html#a76d51a644dc7f5405d0cdd0025ecd0cc" title="Optional, output. Pointer to array that will be filled with information whether the allocation at cer...">VmaDefragmentationInfo2::pAllocationsChanged</a> in that case. You can also combine both methods.</p>
<h1><a class="anchor" id="defragmentation_gpu"></a>
@ -203,9 +203,9 @@ Defragmenting GPU memory</h1>
<div class="line"> <a class="code hl_function" href="group__group__alloc.html#ga6b0929b914b60cf2d45cac4bf3547470">vmaBindBufferMemory</a>(allocator, allocations[i], buffers[i]);</div>
<div class="line"> }</div>
<div class="line">}</div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a40d53d33e71ba0b66f844ed63c05a3f6"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a40d53d33e71ba0b66f844ed63c05a3f6">VmaDefragmentationInfo2::maxGpuAllocationsToMove</a></div><div class="ttdeci">uint32_t maxGpuAllocationsToMove</div><div class="ttdoc">Maximum number of allocations that can be moved to a different place using transfers on GPU side,...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1376</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a4ddbc898d0afe1518f863a3763628f08"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a4ddbc898d0afe1518f863a3763628f08">VmaDefragmentationInfo2::maxGpuBytesToMove</a></div><div class="ttdeci">VkDeviceSize maxGpuBytesToMove</div><div class="ttdoc">Maximum total numbers of bytes that can be copied while moving allocations to different places using ...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1371</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a7f71f39590c5316771493d2333f9c1bd"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a7f71f39590c5316771493d2333f9c1bd">VmaDefragmentationInfo2::commandBuffer</a></div><div class="ttdeci">VkCommandBuffer commandBuffer</div><div class="ttdoc">Optional. Command buffer where GPU copy commands will be posted.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1385</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a40d53d33e71ba0b66f844ed63c05a3f6"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a40d53d33e71ba0b66f844ed63c05a3f6">VmaDefragmentationInfo2::maxGpuAllocationsToMove</a></div><div class="ttdeci">uint32_t maxGpuAllocationsToMove</div><div class="ttdoc">Maximum number of allocations that can be moved to a different place using transfers on GPU side,...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1424</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a4ddbc898d0afe1518f863a3763628f08"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a4ddbc898d0afe1518f863a3763628f08">VmaDefragmentationInfo2::maxGpuBytesToMove</a></div><div class="ttdeci">VkDeviceSize maxGpuBytesToMove</div><div class="ttdoc">Maximum total numbers of bytes that can be copied while moving allocations to different places using ...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1419</div></div>
<div class="ttc" id="astruct_vma_defragmentation_info2_html_a7f71f39590c5316771493d2333f9c1bd"><div class="ttname"><a href="struct_vma_defragmentation_info2.html#a7f71f39590c5316771493d2333f9c1bd">VmaDefragmentationInfo2::commandBuffer</a></div><div class="ttdeci">VkCommandBuffer commandBuffer</div><div class="ttdoc">Optional. Command buffer where GPU copy commands will be posted.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1433</div></div>
</div><!-- fragment --><p >You can combine these two methods by specifying non-zero <code>maxGpu*</code> as well as <code>maxCpu*</code> parameters. The library automatically chooses best method to defragment each memory pool.</p>
<p >You may try not to block your entire program to wait until defragmentation finishes, but do it in the background, as long as you carefully fullfill requirements described in function <a class="el" href="group__group__alloc.html#ga36ba776fd7fd5cb1e9359fdc0d8e6e8a" title="Begins defragmentation process.">vmaDefragmentationBegin()</a>.</p>
<h1><a class="anchor" id="defragmentation_additional_notes"></a>

View File

@ -67,9 +67,19 @@ $(function() {
<div class="contents">
<div class="textblock"><dl class="reflist">
<dt>Member <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103">VMA_ALLOCATION_CREATE_RESERVED_1_BIT</a> </dt>
<dd><a class="anchor" id="_deprecated000003"></a>Removed. Do not use. </dd>
<dd><a class="anchor" id="_deprecated000008"></a>Removed. Do not use. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7">VMA_ALLOCATION_CREATE_RESERVED_2_BIT</a> </dt>
<dd><a class="anchor" id="_deprecated000004"></a>Removed. Do not use. </dd>
<dd><a class="anchor" id="_deprecated000009"></a>Removed. Do not use. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500">VMA_MEMORY_USAGE_CPU_COPY</a> </dt>
<dd><a class="anchor" id="_deprecated000007"></a>Obsolete, preserved for backward compatibility. Prefers not <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a> </dt>
<dd><a class="anchor" id="_deprecated000004"></a>Obsolete, preserved for backward compatibility. Guarantees <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> and <code>VK_MEMORY_PROPERTY_HOST_COHERENT_BIT</code>. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">VMA_MEMORY_USAGE_CPU_TO_GPU</a> </dt>
<dd><a class="anchor" id="_deprecated000005"></a>Obsolete, preserved for backward compatibility. Guarantees <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code>, prefers <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a> </dt>
<dd><a class="anchor" id="_deprecated000003"></a>Obsolete, preserved for backward compatibility. Prefers <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a> </dt>
<dd><a class="anchor" id="_deprecated000006"></a>Obsolete, preserved for backward compatibility. Guarantees <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code>, prefers <code>VK_MEMORY_PROPERTY_HOST_CACHED_BIT</code>. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ga9f0f8f56db5f7f57fe4454f465142dac">vmaDefragment</a> (<a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized.">VmaAllocator</a> allocator, const <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation.">VmaAllocation</a> *pAllocations, size_t allocationCount, VkBool32 *pAllocationsChanged, const <a class="el" href="struct_vma_defragmentation_info.html" title="Deprecated. Optional configuration parameters to be passed to function vmaDefragment().">VmaDefragmentationInfo</a> *pDefragmentationInfo, <a class="el" href="struct_vma_defragmentation_stats.html" title="Statistics returned by function vmaDefragment().">VmaDefragmentationStats</a> *pDefragmentationStats)</dt>
<dd><a class="anchor" id="_deprecated000002"></a>This is a part of the old interface. It is recommended to use structure <a class="el" href="struct_vma_defragmentation_info2.html" title="Parameters for defragmentation.">VmaDefragmentationInfo2</a> and function <a class="el" href="group__group__alloc.html#ga36ba776fd7fd5cb1e9359fdc0d8e6e8a" title="Begins defragmentation process.">vmaDefragmentationBegin()</a> instead. </dd>
<dt>Member <a class="el" href="group__group__alloc.html#ga2bf47f96bf92bed2a49461bd9af3acfa">VmaDefragmentationInfo</a> </dt>

View File

@ -69,7 +69,7 @@ $(function() {
<div class="headertitle"><div class="title">Enabling buffer device address </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p >Device extension VK_KHR_buffer_device_address allow to fetch raw GPU pointer to a buffer and pass it for usage in a shader code. It is promoted to core Vulkan 1.2.</p>
<div class="textblock"><p >Device extension VK_KHR_buffer_device_address allow to fetch raw GPU pointer to a buffer and pass it for usage in a shader code. It has been promoted to core Vulkan 1.2.</p>
<p >If you want to use this feature in connection with VMA, follow these steps:</p>
<h1><a class="anchor" id="enabling_buffer_device_address_initialization"></a>
Initialization</h1>

View File

@ -76,7 +76,7 @@ Thread safety</h1>
<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. This includes allocation and deallocation from default memory pool, as well as custom <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool.">VmaPool</a>.</li>
<li>When the allocator is created with <a class="el" href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d" 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="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation.">vmaGetAllocationInfo()</a> and <a class="el" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069" 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>
<li><a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> is also not safe to be used from multiple threads simultaneously.</li>
<li><a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> is not safe to be used from multiple threads simultaneously.</li>
</ul>
<h1><a class="anchor" id="general_considerations_validation_layer_warnings"></a>
Validation layer warnings</h1>
@ -109,13 +109,13 @@ Allocation algorithm</h1>
<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><b>Data transfer.</b> Uploading (streaming) and downloading data of buffers and images between CPU and GPU memory and related synchronization is responsibility of the user. Defining some "texture" object that would automatically stream its data from a staging copy in CPU memory to GPU memory would rather be a feature of another, higher-level library implemented on top of VMA.</li>
<li><b>Recreation of buffers and images.</b> Although the library has functions for buffer and image creation (<a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>), you need to recreate these objects yourself after defragmentation. That is because the big structures <code>VkBufferCreateInfo</code>, <code>VkImageCreateInfo</code> are not stored in <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation.">VmaAllocation</a> object.</li>
<ol type="1">
<li><b>Data transfer.</b> Uploading (streaming) and downloading data of buffers and images between CPU and GPU memory and related synchronization is responsibility of the user. Defining some "texture" object that would automatically stream its data from a staging copy in CPU memory to GPU memory would rather be a feature of another, higher-level library implemented on top of VMA. VMA doesn't record any commands to a <code>VkCommandBuffer</code>. It just allocates memory.</li>
<li><b>Recreation of buffers and images.</b> Although the library has functions for buffer and image creation: <a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>, you need to recreate these objects yourself after defragmentation. That is because the big structures <code>VkBufferCreateInfo</code>, <code>VkImageCreateInfo</code> are not stored in <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation.">VmaAllocation</a> object.</li>
<li><b>Handling CPU memory allocation failures.</b> When dynamically creating small C++ objects in CPU memory (not Vulkan memory), allocation failures are not checked and handled gracefully, because that would complicate code significantly and is usually not needed in desktop PC applications anyway. Success of an allocation is just checked with an assert.</li>
<li><b>Code free of any compiler warnings.</b> Maintaining the library to compile and work correctly on so many different platforms is hard enough. Being free of any warnings, on any version of any compiler, is simply not feasible. There are many preprocessor macros that make some variables unused, function parameters unreferenced, or conditional expressions constant in some configurations. The code of this library should not be bigger or more complicated just to silence these warnings. It is recommended to disable such warnings instead.</li>
<li>This is a C++ library with C interface. <b>Bindings or ports to any other programming languages</b> are welcome as external projects but are not going to be included into this repository. </li>
</ul>
</ol>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->

View File

@ -72,11 +72,13 @@ $(function() {
<h3><a id="index_v" name="index_v"></a>- v -</h3><ul>
<li>VK_DEFINE_NON_DISPATCHABLE_HANDLE()&#160;:&#160;<a class="el" href="group__group__virtual.html#ga565936f8d98d225b536a2d9703bc7676">vk_mem_alloc.h</a></li>
<li>VK_ERROR_UNKNOWN&#160;:&#160;<a class="el" href="vk__mem__alloc_8h.html#a162894cbe84f7d76632eb9af1e4b3558">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597afb0ee060cd733aaa5e249704ff589ad6">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_DONT_BIND_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a2310568c62208af432724305fe29ccea">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_MAPPED_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_RESERVED_1_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103">vk_mem_alloc.h</a></li>
@ -103,6 +105,9 @@ $(function() {
<li>VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM&#160;:&#160;<a class="el" href="group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50cab87ec33154803bfeb5ac2b379f1d6a97">vk_mem_alloc.h</a></li>
<li>VMA_DEFRAGMENTATION_FLAG_INCREMENTAL&#160;:&#160;<a class="el" href="group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50ca31af49446af2459284a568ce2f3fdd33">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_BUDGET&#160;:&#160;<a class="el" href="vk__mem__alloc_8h.html#a05decf1cf4ebf767beba7acca6c1ec3a">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_AUTO&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_AUTO_PREFER_HOST&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_CPU_COPY&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_CPU_ONLY&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_CPU_TO_GPU&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">vk_mem_alloc.h</a></li>

View File

@ -63,7 +63,6 @@ $(function() {
<div class="contents">
&#160;<ul>
<li>VK_ERROR_UNKNOWN&#160;:&#160;<a class="el" href="vk__mem__alloc_8h.html#a162894cbe84f7d76632eb9af1e4b3558">vk_mem_alloc.h</a></li>
<li>VMA_BIND_MEMORY2&#160;:&#160;<a class="el" href="vk__mem__alloc_8h.html#a88bef97f86d70a34a4c0746e09a2680d">vk_mem_alloc.h</a></li>
<li>VMA_BUFFER_DEVICE_ADDRESS&#160;:&#160;<a class="el" href="vk__mem__alloc_8h.html#a7f9d5e71b70dd1a137c303a8a8262c10">vk_mem_alloc.h</a></li>
<li>VMA_DEDICATED_ALLOCATION&#160;:&#160;<a class="el" href="vk__mem__alloc_8h.html#af7b860e63b96d11e44ae8587ba06bbf4">vk_mem_alloc.h</a></li>

View File

@ -69,6 +69,9 @@ $(function() {
<li>VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_DONT_BIND_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a2310568c62208af432724305fe29ccea">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_MAPPED_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff">vk_mem_alloc.h</a></li>
<li>VMA_ALLOCATION_CREATE_RESERVED_1_BIT&#160;:&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103">vk_mem_alloc.h</a></li>
@ -91,6 +94,9 @@ $(function() {
<li>VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT&#160;:&#160;<a class="el" href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878">vk_mem_alloc.h</a></li>
<li>VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM&#160;:&#160;<a class="el" href="group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50cab87ec33154803bfeb5ac2b379f1d6a97">vk_mem_alloc.h</a></li>
<li>VMA_DEFRAGMENTATION_FLAG_INCREMENTAL&#160;:&#160;<a class="el" href="group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50ca31af49446af2459284a568ce2f3fdd33">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_AUTO&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_AUTO_PREFER_HOST&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_CPU_COPY&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_CPU_ONLY&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">vk_mem_alloc.h</a></li>
<li>VMA_MEMORY_USAGE_CPU_TO_GPU&#160;:&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">vk_mem_alloc.h</a></li>

View File

@ -163,6 +163,10 @@ Enumerations</h2></td></tr>
&#160;&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a> = 4
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500">VMA_MEMORY_USAGE_CPU_COPY</a> = 5
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d">VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED</a> = 6
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a> = 7
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327">VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE</a> = 8
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d">VMA_MEMORY_USAGE_AUTO_PREFER_HOST</a> = 9
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e">VMA_MEMORY_USAGE_MAX_ENUM</a> = 0x7FFFFFFF
<br />
}</td></tr>
@ -181,11 +185,15 @@ Enumerations</h2></td></tr>
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ab8b1764f3e9022368e440c057783b92d">VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT</a> = 0x00000100
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597afb0ee060cd733aaa5e249704ff589ad6">VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT</a> = 0x00000200
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> = 0x00000400
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> = 0x00000800
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</a> = 0x00001000
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d">VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT</a> = 0x00010000
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d">VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT</a> = 0x00020000
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d">VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d">VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777">VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777">VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8e16845d81ae3d27c47106d4770d5c7e">VMA_ALLOCATION_CREATE_STRATEGY_MASK</a>
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882">VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF
<br />
@ -588,9 +596,9 @@ Functions</h2></td></tr>
<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 >It is 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>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103" name="ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103"></a>VMA_ALLOCATION_CREATE_RESERVED_1_BIT&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>Removed. Do not use. </dd></dl>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103" name="ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103"></a>VMA_ALLOCATION_CREATE_RESERVED_1_BIT&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000008">Deprecated:</a></b></dt><dd>Removed. Do not use. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7" name="ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7"></a>VMA_ALLOCATION_CREATE_RESERVED_2_BIT&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>Removed. Do not use. </dd></dl>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7" name="ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7"></a>VMA_ALLOCATION_CREATE_RESERVED_2_BIT&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000009">Deprecated:</a></b></dt><dd>Removed. Do not use. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520" name="ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520"></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="group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0" title="Builds and returns statistics as a null-terminated string in JSON format.">vmaBuildStatsString()</a>. </p>
</td></tr>
@ -604,6 +612,24 @@ Functions</h2></td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597afb0ee060cd733aaa5e249704ff589ad6" name="ggad9889c10c798b040d59c92f257cae597afb0ee060cd733aaa5e249704ff589ad6"></a>VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT&#160;</td><td class="fielddoc"><p >Set this flag if the allocated memory will have aliasing resources. </p>
<p >Usage of this flag prevents supplying <code>VkMemoryDedicatedAllocateInfoKHR</code> when <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block.">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a> is specified. Otherwise created dedicated memory will not be suitable for aliasing resources, resulting in Vulkan Validation Layer errors. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5" name="ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5"></a>VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT&#160;</td><td class="fielddoc"><p >Requests possibility to map the allocation (using <a class="el" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" 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>
<ul>
<li>If you use <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a> or other <code>VMA_MEMORY_USAGE_AUTO*</code> value, you must use this flag to be able to map the allocation. Otherwise, mapping is incorrect.</li>
<li>If you use other value of <a class="el" href="group__group__alloc.html#gaa5846affa1e9da3800e3e78fae2305cc" title="Intended usage of the allocated memory.">VmaMemoryUsage</a>, this flag is ignored and mapping is always possible in memory types that are <code>HOST_VISIBLE</code>. This includes allocations created in <a class="el" href="custom_memory_pools.html">Custom memory pools</a>.</li>
</ul>
<p >Declares that mapped memory will only be written sequentially, e.g. using <code>memcpy()</code> or a loop writing number-by-number, never read or accessed randomly, so a memory type can be selected that is uncached and write-combined.</p>
<dl class="section warning"><dt>Warning</dt><dd>Violating this declaration may work correctly, but will likely be very slow. Watch out for implicit reads introduces by doing e.g. <code>pMappedData[i] += x;</code> Better prepare your data in a local variable and <code>memcpy()</code> it to the mapped pointer all at once. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492" name="ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492"></a>VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT&#160;</td><td class="fielddoc"><p >Requests possibility to map the allocation (using <a class="el" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" 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>
<ul>
<li>If you use <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a> or other <code>VMA_MEMORY_USAGE_AUTO*</code> value, you must use this flag to be able to map the allocation. Otherwise, mapping is incorrect.</li>
<li>If you use other value of <a class="el" href="group__group__alloc.html#gaa5846affa1e9da3800e3e78fae2305cc" title="Intended usage of the allocated memory.">VmaMemoryUsage</a>, this flag is ignored and mapping is always possible in memory types that are <code>HOST_VISIBLE</code>. This includes allocations created in <a class="el" href="custom_memory_pools.html">Custom memory pools</a>.</li>
</ul>
<p >Declares that mapped memory can be read, written, and accessed in random order, so a <code>HOST_CACHED</code> memory type is preferred. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad" name="ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad"></a>VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT&#160;</td><td class="fielddoc"><p >Together with <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a>, it says that despite request for host access, a not-<code>HOST_VISIBLE</code> memory type can be selected if it may improve performance.</p>
<p >By using this flag, you declare that you will check if the allocation ended up in a <code>HOST_VISIBLE</code> memory type (e.g. using <a class="el" href="group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1" title="Given an allocation, returns Property Flags of its memory type.">vmaGetAllocationMemoryProperties()</a>) and if not, you will create some "staging" buffer and issue an explicit transfer to write/read your data. To prepare for this possibility, don't forget to add appropriate flags like <code>VK_BUFFER_USAGE_TRANSFER_DST_BIT</code>, <code>VK_BUFFER_USAGE_TRANSFER_SRC_BIT</code> to the parameters of created buffer or image. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d" name="ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d"></a>VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT&#160;</td><td class="fielddoc"><p >Allocation strategy that chooses smallest possible free range for the allocation to minimize memory usage and fragmentation, possibly at the expense of allocation time. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d" name="ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d"></a>VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT&#160;</td><td class="fielddoc"><p >Allocation strategy that chooses first suitable free range for the allocation - not necessarily in terms of the smallest offset but the one that is easiest and fastest to find to minimize allocation time, possibly at the expense of allocation quality. </p>
@ -655,34 +681,32 @@ Functions</h2></td></tr>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd" name="ggaa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd"></a>VMA_MEMORY_USAGE_UNKNOWN&#160;</td><td class="fielddoc"><p >No intended memory usage specified. Use other members of <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> to specify your requirements. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7" name="ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"></a>VMA_MEMORY_USAGE_GPU_ONLY&#160;</td><td class="fielddoc"><p >Memory will be used on device only, so fast access from the device is preferred. It usually means device-local GPU (video) memory. No need to be mappable on host. It is roughly equivalent of <code>D3D12_HEAP_TYPE_DEFAULT</code>.</p>
<p >Usage:</p>
<ul>
<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 on GPU.</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 <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" 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>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7" name="ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"></a>VMA_MEMORY_USAGE_GPU_ONLY&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>Obsolete, preserved for backward compatibility. Prefers <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5" name="ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5"></a>VMA_MEMORY_USAGE_CPU_ONLY&#160;</td><td class="fielddoc"><p >Memory will be mappable on host. It usually means CPU (system) memory. Guarantees to be <code>HOST_VISIBLE</code> and <code>HOST_COHERENT</code>. CPU access is typically uncached. Writes may be write-combined. Resources created in this pool may still be accessible to the device, but access to them can be slow. It is roughly equivalent of <code>D3D12_HEAP_TYPE_UPLOAD</code>.</p>
<p >Usage: Staging copy of resources used as transfer source. </p>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5" name="ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5"></a>VMA_MEMORY_USAGE_CPU_ONLY&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>Obsolete, preserved for backward compatibility. Guarantees <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> and <code>VK_MEMORY_PROPERTY_HOST_COHERENT_BIT</code>. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67" name="ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67"></a>VMA_MEMORY_USAGE_CPU_TO_GPU&#160;</td><td class="fielddoc"><p >Memory that is both mappable on host (guarantees to be <code>HOST_VISIBLE</code>) and preferably fast to access by GPU. CPU access is typically uncached. Writes may be write-combined.</p>
<p >Usage: Resources written frequently by host (dynamic), read by device. E.g. textures (with LINEAR layout), vertex buffers, uniform buffers updated every frame or every draw call. </p>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67" name="ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67"></a>VMA_MEMORY_USAGE_CPU_TO_GPU&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000005">Deprecated:</a></b></dt><dd>Obsolete, preserved for backward compatibility. Guarantees <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code>, prefers <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27" name="ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27"></a>VMA_MEMORY_USAGE_GPU_TO_CPU&#160;</td><td class="fielddoc"><p >Memory mappable on host (guarantees to be <code>HOST_VISIBLE</code>) and cached. It is roughly equivalent of <code>D3D12_HEAP_TYPE_READBACK</code>.</p>
<p >Usage:</p>
<ul>
<li>Resources written by device, read by host - results of some computations, e.g. screen capture, average scene luminance for HDR tone mapping.</li>
<li>Any resources read or accessed randomly on host, e.g. CPU-side copy of vertex buffer used as source of transfer, but also used for collision detection. </li>
</ul>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27" name="ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27"></a>VMA_MEMORY_USAGE_GPU_TO_CPU&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>Obsolete, preserved for backward compatibility. Guarantees <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code>, prefers <code>VK_MEMORY_PROPERTY_HOST_CACHED_BIT</code>. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500" name="ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500"></a>VMA_MEMORY_USAGE_CPU_COPY&#160;</td><td class="fielddoc"><p >CPU memory - memory that is preferably not <code>DEVICE_LOCAL</code>, but also not guaranteed to be <code>HOST_VISIBLE</code>.</p>
<p >Usage: Staging copy of resources moved from GPU memory to CPU memory as part of custom paging/residency mechanism, to be moved back to GPU memory when needed. </p>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500" name="ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500"></a>VMA_MEMORY_USAGE_CPU_COPY&#160;</td><td class="fielddoc"><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd>Obsolete, preserved for backward compatibility. Prefers not <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d" name="ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d"></a>VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED&#160;</td><td class="fielddoc"><p >Lazily allocated GPU memory having <code>VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT</code>. Exists mostly on mobile platforms. Using it on desktop PC or other GPUs with no such memory type present will fail the allocation.</p>
<p >Usage: Memory for transient attachment images (color attachments, depth attachments etc.), created with <code>VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT</code>.</p>
<p >Allocations with this usage are always created as dedicated - it implies <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" title="Set this flag if the allocation should have its own memory block.">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a>. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e" name="ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"></a>VMA_MEMORY_USAGE_AUTO&#160;</td><td class="fielddoc"><p >Selects best memory type automatically. This flag is recommended for most common use cases.</p>
<p >When using this flag, if you want to map the allocation (using <a class="el" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>), you must pass one of the flags: <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum.">VmaAllocationCreateInfo::flags</a>.</p>
<p >It can be used only with functions that let the library know <code>VkBufferCreateInfo</code> or <code>VkImageCreateInfo</code>, e.g. <a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>, <a class="el" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForBufferInfo()</a>, <a class="el" href="group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472" title="Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForImageInfo()</a> and not with generic memory allocation functions. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327" name="ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327"></a>VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE&#160;</td><td class="fielddoc"><p >Selects best memory type automatically with preference for GPU (device) memory.</p>
<p >When using this flag, if you want to map the allocation (using <a class="el" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>), you must pass one of the flags: <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum.">VmaAllocationCreateInfo::flags</a>.</p>
<p >It can be used only with functions that let the library know <code>VkBufferCreateInfo</code> or <code>VkImageCreateInfo</code>, e.g. <a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>, <a class="el" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForBufferInfo()</a>, <a class="el" href="group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472" title="Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForImageInfo()</a> and not with generic memory allocation functions. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d" name="ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d"></a>VMA_MEMORY_USAGE_AUTO_PREFER_HOST&#160;</td><td class="fielddoc"><p >Selects best memory type automatically with preference for CPU (host) memory.</p>
<p >When using this flag, if you want to map the allocation (using <a class="el" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>), you must pass one of the flags: <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum.">VmaAllocationCreateInfo::flags</a>.</p>
<p >It can be used only with functions that let the library know <code>VkBufferCreateInfo</code> or <code>VkImageCreateInfo</code>, e.g. <a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>, <a class="el" href="group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888" title="Helps to find memoryTypeIndex, given VkBufferCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForBufferInfo()</a>, <a class="el" href="group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472" title="Helps to find memoryTypeIndex, given VkImageCreateInfo and VmaAllocationCreateInfo.">vmaFindMemoryTypeIndexForImageInfo()</a> and not with generic memory allocation functions. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e" name="ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e"></a>VMA_MEMORY_USAGE_MAX_ENUM&#160;</td><td class="fielddoc"></td></tr>
</table>
@ -1901,13 +1925,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Helps to find memoryTypeIndex, given VkBufferCreateInfo and <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>. </p>
<p >It can be useful e.g. to determine value to be used as <a class="el" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319" title="Vulkan memory type index to allocate this pool from.">VmaPoolCreateInfo::memoryTypeIndex</a>. It internally creates a temporary, dummy buffer that never has memory bound. It is just a convenience function, equivalent to calling:</p>
<ul>
<li><code>vkCreateBuffer</code></li>
<li><code>vkGetBufferMemoryRequirements</code></li>
<li><code>vmaFindMemoryTypeIndex</code></li>
<li><code>vkDestroyBuffer</code> </li>
</ul>
<p >It can be useful e.g. to determine value to be used as <a class="el" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319" title="Vulkan memory type index to allocate this pool from.">VmaPoolCreateInfo::memoryTypeIndex</a>. It internally creates a temporary, dummy buffer that never has memory bound. </p>
</div>
</div>
@ -1950,13 +1968,7 @@ Functions</h2></td></tr>
</div><div class="memdoc">
<p>Helps to find memoryTypeIndex, given VkImageCreateInfo and <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a>. </p>
<p >It can be useful e.g. to determine value to be used as <a class="el" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319" title="Vulkan memory type index to allocate this pool from.">VmaPoolCreateInfo::memoryTypeIndex</a>. It internally creates a temporary, dummy image that never has memory bound. It is just a convenience function, equivalent to calling:</p>
<ul>
<li><code>vkCreateImage</code></li>
<li><code>vkGetImageMemoryRequirements</code></li>
<li><code>vmaFindMemoryTypeIndex</code></li>
<li><code>vkDestroyImage</code> </li>
</ul>
<p >It can be useful e.g. to determine value to be used as <a class="el" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319" title="Vulkan memory type index to allocate this pool from.">VmaPoolCreateInfo::memoryTypeIndex</a>. It internally creates a temporary, dummy image that never has memory bound. </p>
</div>
</div>

View File

@ -91,7 +91,6 @@ Table of contents</h1>
<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 flush and invalidate</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="staying_within_budget.html">Staying within budget</a><ul>
@ -140,9 +139,11 @@ Table of contents</h1>
</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_common_mistakes">Common mistakes</a></li>
<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>
<li><a class="el" href="usage_patterns.html#usage_patterns_gpu_only">GPU-only resource</a></li>
<li><a class="el" href="usage_patterns.html#usage_patterns_staging_copy_upload">Staging copy for upload</a></li>
<li><a class="el" href="usage_patterns.html#usage_patterns_readback">Readback</a></li>
<li><a class="el" href="usage_patterns.html#usage_patterns_advanced_data_uploading">Advanced data uploading</a></li>
<li><a class="el" href="usage_patterns.html#usage_patterns_other_use_cases">Other use cases</a></li>
</ul>
</li>
<li><a class="el" href="configuration.html">Configuration</a><ul>
@ -150,11 +151,11 @@ Table of contents</h1>
<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>
</ul>
</li>
<li><a class="el" href="vk_khr_dedicated_allocation.html">VK_KHR_dedicated_allocation</a></li>
<li><a class="el" href="enabling_buffer_device_address.html">Enabling buffer device address</a></li>
<li><a class="el" href="vk_amd_device_coherent_memory.html">VK_AMD_device_coherent_memory</a></li>
</ul>
</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_validation_layer_warnings">Validation layer warnings</a></li>
@ -166,8 +167,8 @@ Table of contents</h1>
<h1><a class="anchor" id="main_see_also"></a>
See also</h1>
<ul>
<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>
<li><a href="https://gpuopen.com/gaming-product/vulkan-memory-allocator/"><b>Product page on GPUOpen</b></a></li>
<li><a href="https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator"><b>Source repository on GitHub</b></a> </li>
</ul>
</div></div><!-- PageDoc -->
</div><!-- contents -->

View File

@ -70,31 +70,29 @@ $(function() {
</div><!--header-->
<div class="contents">
<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>
<dl class="section note"><dt>Note</dt><dd>If you want to be able to map an allocation, you need to specify one of the flags <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> in <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum.">VmaAllocationCreateInfo::flags</a>. These flags are required for an allocation to be mappable when using <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a> or other <code>VMA_MEMORY_USAGE_AUTO*</code> enum values. For other usage values they are ignored and every such allocation made in <code>HOST_VISIBLE</code> memory type is mappable, but they can still be used for consistency.</dd></dl>
<h1><a class="anchor" id="memory_mapping_mapping_functions"></a>
Mapping functions</h1>
<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="group__group__alloc.html#gad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a>, <a class="el" href="group__group__alloc.html#ga9bc268595cb33f6ec4d519cfce81ff45" 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. The way it is 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="group__group__alloc.html#gad5bd1243512d099706de88168992f069" 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">ConstantBuffer constantBufferData = ...</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocator.html">VmaAllocator</a> allocator;</div>
<div class="line">VkBuffer constantBuffer;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> constantBufferAllocation;</div>
<div class="line">VmaAllocator allocator = ...</div>
<div class="line">VkBuffer 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">void* mappedData;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069">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 hl_function" href="group__group__alloc.html#ga9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a>(allocator, constantBufferAllocation);</div>
<div class="ttc" id="agroup__group__alloc_html_ga9bc268595cb33f6ec4d519cfce81ff45"><div class="ttname"><a href="group__group__alloc.html#ga9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a></div><div class="ttdeci">void vmaUnmapMemory(VmaAllocator allocator, VmaAllocation allocation)</div><div class="ttdoc">Unmaps memory represented by given allocation, mapped previously using vmaMapMemory().</div></div>
<div class="ttc" id="agroup__group__alloc_html_gad5bd1243512d099706de88168992f069"><div class="ttname"><a href="group__group__alloc.html#gad5bd1243512d099706de88168992f069">vmaMapMemory</a></div><div class="ttdeci">VkResult vmaMapMemory(VmaAllocator allocator, VmaAllocation allocation, void **ppData)</div><div class="ttdoc">Maps memory represented by given allocation and returns pointer to it.</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
<div class="ttc" id="astruct_vma_allocator_html"><div class="ttname"><a href="struct_vma_allocator.html">VmaAllocator</a></div><div class="ttdoc">Represents main object of this library initialized.</div></div>
</div><!-- fragment --><p >When mapping, you may see a warning from Vulkan validation layer similar to this one:</p>
<p ><em>Mapping an image with layout VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL can result in undefined behavior if this memory is used by the device. Only GENERAL or PREINITIALIZED should be used.</em></p>
<p >It happens because the library maps entire <code>VkDeviceMemory</code> block, where different types of images and buffers may end up together, especially on GPUs with unified memory like Intel. You can safely ignore it if you are sure you access only memory of the intended object that you wanted to map.</p>
@ -106,8 +104,9 @@ Persistently mapped memory</h1>
<div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> |</div>
<div class="line"> <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buf;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
@ -117,84 +116,22 @@ Persistently mapped memory</h1>
<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 hl_variable" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, &amp;constantBufferData, <span class="keyword">sizeof</span>(constantBufferData));</div>
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_CPU_ONLY</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:478</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_MAPPED_BIT</div><div class="ttdoc">Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:542</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1120</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1128</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_add09658ac14fe290ace25470ddd6d41b"><div class="ttname"><a href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">VmaAllocationCreateInfo::flags</a></div><div class="ttdeci">VmaAllocationCreateFlags flags</div><div class="ttdoc">Use VmaAllocationCreateFlagBits enum.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1122</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1262</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html_a5eeffbe2d2f30f53370ff14aefbadbe2"><div class="ttname"><a href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">VmaAllocationInfo::pMappedData</a></div><div class="ttdeci">void * pMappedData</div><div class="ttdoc">Pointer to the beginning of this allocation as mapped data.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1304</div></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 <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">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>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:492</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_MAPPED_BIT</div><div class="ttdoc">Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:550</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:597</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1168</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1176</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_add09658ac14fe290ace25470ddd6d41b"><div class="ttname"><a href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">VmaAllocationCreateInfo::flags</a></div><div class="ttdeci">VmaAllocationCreateFlags flags</div><div class="ttdoc">Use VmaAllocationCreateFlagBits enum.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1170</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1310</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html_a5eeffbe2d2f30f53370ff14aefbadbe2"><div class="ttname"><a href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">VmaAllocationInfo::pMappedData</a></div><div class="ttdeci">void * pMappedData</div><div class="ttdoc">Pointer to the beginning of this allocation as mapped data.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1352</div></div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd><a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> by itself doesn't guarantee that the allocation will end up in a mappable memory type. For this, you need to also specify <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> or <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a>. <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> only guarantees that if the memory is <code>HOST_VISIBLE</code>, the allocation will be mapped on creation. For an example of how to make use of this fact, see section <a class="el" href="usage_patterns.html#usage_patterns_advanced_data_uploading">Advanced data uploading</a>.</dd></dl>
<h1><a class="anchor" id="memory_mapping_cache_control"></a>
Cache flush and invalidate</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 <b>invalidate</b> cache before reading of mapped pointer and <b>flush</b> cache after writing to mapped pointer. Map/unmap operations don't do that automatically. Vulkan provides following functions for this purpose <code>vkFlushMappedMemoryRanges()</code>, <code>vkInvalidateMappedMemoryRanges()</code>, but this library provides more convenient functions that refer to given allocation object: <a class="el" href="group__group__alloc.html#ga30c37c1eec6025f397be41644f48490f" title="Flushes memory of given allocation.">vmaFlushAllocation()</a>, <a class="el" href="group__group__alloc.html#gaaa8412919139ef413a4215ac6a290fae" title="Invalidates memory of given allocation.">vmaInvalidateAllocation()</a>, or multiple objects at once: <a class="el" href="group__group__alloc.html#gac3dd00da721875ed99fa8a881922bdfc" title="Flushes memory of given set of allocations.">vmaFlushAllocations()</a>, <a class="el" href="group__group__alloc.html#gab25b558d75f7378ec944a1522fdcc3c5" title="Invalidates memory of given set of allocations.">vmaInvalidateAllocations()</a>.</p>
<p >Regions of memory specified for flush/invalidate must be aligned to <code>VkPhysicalDeviceLimits::nonCoherentAtomSize</code>. This is automatically ensured by the library. In any memory type that is <code>HOST_VISIBLE</code> but not <code>HOST_COHERENT</code>, all allocations within blocks are aligned to this value, so their offsets are always multiply of <code>nonCoherentAtomSize</code> and two different allocations never share same "line" of this size.</p>
<p >Please note that memory allocated with <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a> is guaranteed to be <code>HOST_COHERENT</code>.</p>
<p >Also, Windows drivers from all 3 <b>PC</b> GPU vendors (AMD, Intel, NVIDIA) currently provide <code>HOST_COHERENT</code> flag on all memory types that are <code>HOST_VISIBLE</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: call <a class="el" href="group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1" title="Given an allocation, returns Property Flags of its memory type.">vmaGetAllocationMemoryProperties()</a> and look for <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> flag.</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 hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">preferredFlags</a> = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;</div>
<div class="line"> </div>
<div class="line">VkBuffer buf;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, <span class="keyword">nullptr</span>);</div>
<div class="line"> </div>
<div class="line">VkMemoryPropertyFlags memFlags;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1">vmaGetAllocationMemoryProperties</a>(allocator, alloc, &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 hl_function" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069">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 hl_function" href="group__group__alloc.html#ga9bc268595cb33f6ec4d519cfce81ff45">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 class="ttc" id="agroup__group__alloc_html_ga571e87dd38e552249b56b1b0b982fad1"><div class="ttname"><a href="group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1">vmaGetAllocationMemoryProperties</a></div><div class="ttdeci">void vmaGetAllocationMemoryProperties(VmaAllocator allocator, VmaAllocation allocation, VkMemoryPropertyFlags *pFlags)</div><div class="ttdoc">Given an allocation, returns Property Flags of its memory type.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_GPU_ONLY</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:468</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a7fe8d81a1ad10b2a2faacacee5b15d6d"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">VmaAllocationCreateInfo::preferredFlags</a></div><div class="ttdeci">VkMemoryPropertyFlags preferredFlags</div><div class="ttdoc">Flags that preferably should be set in a memory type chosen for an allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1138</div></div>
</div><!-- fragment --><p >You can even use <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" 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="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">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 hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buf;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">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 hl_variable" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</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 is persistently mapped. You can access it directly.</span></div>
<div class="line"> memcpy(allocInfo.<a class="code hl_variable" 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 -->
<p >Also, Windows drivers from all 3 PC GPU vendors (AMD, Intel, NVIDIA) currently provide <code>HOST_COHERENT</code> flag on all memory types that are <code>HOST_VISIBLE</code>, so on PC you may not need to bother. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>

View File

@ -124,16 +124,16 @@ Initialization</h1>
<div class="line"><a class="code hl_struct" href="struct_vma_allocator.html">VmaAllocator</a> allocator;</div>
<div class="line"><a class="code hl_function" href="group__group__init.html#ga200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a>(&amp;allocatorCreateInfo, &amp;allocator);</div>
<div class="ttc" id="agroup__group__init_html_ga200692051ddb34240248234f5f4c17bb"><div class="ttname"><a href="group__group__init.html#ga200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a></div><div class="ttdeci">VkResult vmaCreateAllocator(const VmaAllocatorCreateInfo *pCreateInfo, VmaAllocator *pAllocator)</div><div class="ttdoc">Creates VmaAllocator object.</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html"><div class="ttname"><a href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a></div><div class="ttdoc">Description of a Allocator to be created.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:946</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_a08230f04ae6ccf8a78150a9e829a7156"><div class="ttname"><a href="struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156">VmaAllocatorCreateInfo::physicalDevice</a></div><div class="ttdeci">VkPhysicalDevice physicalDevice</div><div class="ttdoc">Vulkan physical device.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:951</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_a3dc197be3227da7338b1643f70db36bd"><div class="ttname"><a href="struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd">VmaAllocatorCreateInfo::pVulkanFunctions</a></div><div class="ttdeci">const VmaVulkanFunctions * pVulkanFunctions</div><div class="ttdoc">Pointers to Vulkan functions. Can be null.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:994</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_a70dd42e29b1df1d1b9b61532ae0b370b"><div class="ttname"><a href="struct_vma_allocator_create_info.html#a70dd42e29b1df1d1b9b61532ae0b370b">VmaAllocatorCreateInfo::instance</a></div><div class="ttdeci">VkInstance instance</div><div class="ttdoc">Handle to Vulkan instance object.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:999</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_ad924ddd77b04039c88d0c09b0ffcd500"><div class="ttname"><a href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500">VmaAllocatorCreateInfo::device</a></div><div class="ttdeci">VkDevice device</div><div class="ttdoc">Vulkan device.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:954</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_ae0ffc55139b54520a6bb704b29ffc285"><div class="ttname"><a href="struct_vma_allocator_create_info.html#ae0ffc55139b54520a6bb704b29ffc285">VmaAllocatorCreateInfo::vulkanApiVersion</a></div><div class="ttdeci">uint32_t vulkanApiVersion</div><div class="ttdoc">Optional. The highest version of Vulkan that the application is designed to use.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1008</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html"><div class="ttname"><a href="struct_vma_allocator_create_info.html">VmaAllocatorCreateInfo</a></div><div class="ttdoc">Description of a Allocator to be created.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:994</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_a08230f04ae6ccf8a78150a9e829a7156"><div class="ttname"><a href="struct_vma_allocator_create_info.html#a08230f04ae6ccf8a78150a9e829a7156">VmaAllocatorCreateInfo::physicalDevice</a></div><div class="ttdeci">VkPhysicalDevice physicalDevice</div><div class="ttdoc">Vulkan physical device.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:999</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_a3dc197be3227da7338b1643f70db36bd"><div class="ttname"><a href="struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd">VmaAllocatorCreateInfo::pVulkanFunctions</a></div><div class="ttdeci">const VmaVulkanFunctions * pVulkanFunctions</div><div class="ttdoc">Pointers to Vulkan functions. Can be null.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1042</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_a70dd42e29b1df1d1b9b61532ae0b370b"><div class="ttname"><a href="struct_vma_allocator_create_info.html#a70dd42e29b1df1d1b9b61532ae0b370b">VmaAllocatorCreateInfo::instance</a></div><div class="ttdeci">VkInstance instance</div><div class="ttdoc">Handle to Vulkan instance object.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1047</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_ad924ddd77b04039c88d0c09b0ffcd500"><div class="ttname"><a href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500">VmaAllocatorCreateInfo::device</a></div><div class="ttdeci">VkDevice device</div><div class="ttdoc">Vulkan device.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1002</div></div>
<div class="ttc" id="astruct_vma_allocator_create_info_html_ae0ffc55139b54520a6bb704b29ffc285"><div class="ttname"><a href="struct_vma_allocator_create_info.html#ae0ffc55139b54520a6bb704b29ffc285">VmaAllocatorCreateInfo::vulkanApiVersion</a></div><div class="ttdeci">uint32_t vulkanApiVersion</div><div class="ttdoc">Optional. The highest version of Vulkan that the application is designed to use.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1056</div></div>
<div class="ttc" id="astruct_vma_allocator_html"><div class="ttname"><a href="struct_vma_allocator.html">VmaAllocator</a></div><div class="ttdoc">Represents main object of this library initialized.</div></div>
<div class="ttc" id="astruct_vma_vulkan_functions_html"><div class="ttname"><a href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a></div><div class="ttdoc">Pointers to some Vulkan functions - a subset used by the library.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:905</div></div>
<div class="ttc" id="astruct_vma_vulkan_functions_html_a3eafa102f5f8915f093f40675636b849"><div class="ttname"><a href="struct_vma_vulkan_functions.html#a3eafa102f5f8915f093f40675636b849">VmaVulkanFunctions::vkGetInstanceProcAddr</a></div><div class="ttdeci">PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr</div><div class="ttdoc">Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:907</div></div>
<div class="ttc" id="astruct_vma_vulkan_functions_html_ac383ab9af127e5e136622fa4ebea9e57"><div class="ttname"><a href="struct_vma_vulkan_functions.html#ac383ab9af127e5e136622fa4ebea9e57">VmaVulkanFunctions::vkGetDeviceProcAddr</a></div><div class="ttdeci">PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr</div><div class="ttdoc">Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:909</div></div>
<div class="ttc" id="astruct_vma_vulkan_functions_html"><div class="ttname"><a href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a></div><div class="ttdoc">Pointers to some Vulkan functions - a subset used by the library.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:953</div></div>
<div class="ttc" id="astruct_vma_vulkan_functions_html_a3eafa102f5f8915f093f40675636b849"><div class="ttname"><a href="struct_vma_vulkan_functions.html#a3eafa102f5f8915f093f40675636b849">VmaVulkanFunctions::vkGetInstanceProcAddr</a></div><div class="ttdeci">PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr</div><div class="ttdoc">Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:955</div></div>
<div class="ttc" id="astruct_vma_vulkan_functions_html_ac383ab9af127e5e136622fa4ebea9e57"><div class="ttname"><a href="struct_vma_vulkan_functions.html#ac383ab9af127e5e136622fa4ebea9e57">VmaVulkanFunctions::vkGetDeviceProcAddr</a></div><div class="ttdeci">PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr</div><div class="ttdoc">Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:957</div></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>
@ -147,15 +147,15 @@ Resource allocation</h1>
<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 hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocInfo = {};</div>
<div class="line">allocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div>
<div class="line">allocInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buffer;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> allocation;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufferInfo, &amp;allocInfo, &amp;buffer, &amp;allocation, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_GPU_ONLY</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:468</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1120</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1128</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:492</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1168</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1176</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></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 hl_function" href="group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(allocator, buffer, allocation);</div>

View File

@ -124,7 +124,7 @@ $(function() {
<div class="line"><span class="comment">// Validate if(finalMemReq.memoryTypeBits != 0)</span></div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">preferredFlags</a> = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
<div class="line">res = <a class="code hl_function" href="group__group__alloc.html#gabf28077dbf82d0908b8acbe8ee8dd9b8">vmaAllocateMemory</a>(allocator, &amp;finalMemReq, &amp;allocCreateInfo, &amp;alloc, <span class="keyword">nullptr</span>);</div>
@ -140,15 +140,14 @@ $(function() {
<div class="ttc" id="agroup__group__alloc_html_ga3d3ca45799923aa5d138e9e5f9eb2da5"><div class="ttname"><a href="group__group__alloc.html#ga3d3ca45799923aa5d138e9e5f9eb2da5">vmaBindImageMemory</a></div><div class="ttdeci">VkResult vmaBindImageMemory(VmaAllocator allocator, VmaAllocation allocation, VkImage image)</div><div class="ttdoc">Binds image to allocation.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ga5fea5518972ae9094b1526cbcb19b05f"><div class="ttname"><a href="group__group__alloc.html#ga5fea5518972ae9094b1526cbcb19b05f">vmaFreeMemory</a></div><div class="ttdeci">void vmaFreeMemory(VmaAllocator allocator, const VmaAllocation allocation)</div><div class="ttdoc">Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...</div></div>
<div class="ttc" id="agroup__group__alloc_html_gabf28077dbf82d0908b8acbe8ee8dd9b8"><div class="ttname"><a href="group__group__alloc.html#gabf28077dbf82d0908b8acbe8ee8dd9b8">vmaAllocateMemory</a></div><div class="ttdeci">VkResult vmaAllocateMemory(VmaAllocator allocator, const VkMemoryRequirements *pVkMemoryRequirements, const VmaAllocationCreateInfo *pCreateInfo, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">General purpose memory allocation.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_GPU_ONLY</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:468</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1120</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1128</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1168</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_a7fe8d81a1ad10b2a2faacacee5b15d6d"><div class="ttname"><a href="struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d">VmaAllocationCreateInfo::preferredFlags</a></div><div class="ttdeci">VkMemoryPropertyFlags preferredFlags</div><div class="ttdoc">Flags that preferably should be set in a memory type chosen for an allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1186</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
</div><!-- fragment --><p >Remember that using resources that alias in memory requires proper synchronization. You need to issue a memory barrier to make sure commands that use <code>img1</code> and <code>img2</code> don't overlap on GPU timeline. You also need to treat a resource after aliasing as uninitialized - containing garbage data. For example, if you use <code>img1</code> and then want to use <code>img2</code>, you need to issue an image memory barrier for <code>img2</code> with <code>oldLayout</code> = <code>VK_IMAGE_LAYOUT_UNDEFINED</code>.</p>
<p >Additional considerations:</p>
<ul>
<li>Vulkan also allows to interpret contents of memory between aliasing resources consistently in some cases. See chapter 11.8. "Memory Aliasing" of Vulkan specification or <code>VK_IMAGE_CREATE_ALIAS_BIT</code> flag.</li>
<li>You can create more complex layout where different images and buffers are bound at different offsets inside one large allocation. For example, one can imagine a big texture used in some render passes, aliasing with a set of many small buffers used between in some further passes. To bind a resource at non-zero offset of an allocation, use <a class="el" href="group__group__alloc.html#ga927c944f45e0f2941182abb6f608e64a" title="Binds buffer to allocation with additional parameters.">vmaBindBufferMemory2()</a> / <a class="el" href="group__group__alloc.html#gaa8251ee81b0045a443e35b8e8aa021bc" title="Binds image to allocation with additional parameters.">vmaBindImageMemory2()</a>.</li>
<li>You can create more complex layout where different images and buffers are bound at different offsets inside one large allocation. For example, one can imagine a big texture used in some render passes, aliasing with a set of many small buffers used between in some further passes. To bind a resource at non-zero offset in an allocation, use <a class="el" href="group__group__alloc.html#ga927c944f45e0f2941182abb6f608e64a" title="Binds buffer to allocation with additional parameters.">vmaBindBufferMemory2()</a> / <a class="el" href="group__group__alloc.html#gaa8251ee81b0045a443e35b8e8aa021bc" title="Binds image to allocation with additional parameters.">vmaBindImageMemory2()</a>.</li>
<li>Before allocating memory for the resources you want to alias, check <code>memoryTypeBits</code> returned in memory requirements of each resource to make sure the bits overlap. Some GPUs may expose multiple memory types suitable e.g. only for buffers or images with <code>COLOR_ATTACHMENT</code> usage, so the sets of memory types supported by your resources may be disjoint. Aliasing them is not possible in that case. </li>
</ul>
</div></div><!-- contents -->

View File

@ -3,187 +3,192 @@ var searchData=
['virtual_20allocator_0',['Virtual allocator',['../group__group__virtual.html',1,'(Global Namespace)'],['../virtual_allocator.html',1,'index']]],
['vk_5famd_5fdevice_5fcoherent_5fmemory_1',['VK_AMD_device_coherent_memory',['../vk_amd_device_coherent_memory.html',1,'index']]],
['vk_5fdefine_5fnon_5fdispatchable_5fhandle_2',['VK_DEFINE_NON_DISPATCHABLE_HANDLE',['../group__group__virtual.html#ga565936f8d98d225b536a2d9703bc7676',1,'vk_mem_alloc.h']]],
['vk_5ferror_5funknown_3',['VK_ERROR_UNKNOWN',['../vk__mem__alloc_8h.html#a162894cbe84f7d76632eb9af1e4b3558',1,'vk_mem_alloc.h']]],
['vk_5fkhr_5fdedicated_5fallocation_4',['VK_KHR_dedicated_allocation',['../vk_khr_dedicated_allocation.html',1,'index']]],
['vk_5fmem_5falloc_2eh_5',['vk_mem_alloc.h',['../vk__mem__alloc_8h.html',1,'']]],
['vkallocatememory_6',['vkAllocateMemory',['../struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c',1,'VmaVulkanFunctions']]],
['vkbindbuffermemory_7',['vkBindBufferMemory',['../struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2',1,'VmaVulkanFunctions']]],
['vkbindbuffermemory2khr_8',['vkBindBufferMemory2KHR',['../struct_vma_vulkan_functions.html#a0c4907235aab9df2767b79836afa2dc9',1,'VmaVulkanFunctions']]],
['vkbindimagememory_9',['vkBindImageMemory',['../struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637',1,'VmaVulkanFunctions']]],
['vkbindimagememory2khr_10',['vkBindImageMemory2KHR',['../struct_vma_vulkan_functions.html#ab95aaa73ab8a3fe9fd3daaaec4e0b2bf',1,'VmaVulkanFunctions']]],
['vkcmdcopybuffer_11',['vkCmdCopyBuffer',['../struct_vma_vulkan_functions.html#ae5c0db8c89a3b82593dc16aa6a49fa3a',1,'VmaVulkanFunctions']]],
['vkcreatebuffer_12',['vkCreateBuffer',['../struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f',1,'VmaVulkanFunctions']]],
['vkcreateimage_13',['vkCreateImage',['../struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325',1,'VmaVulkanFunctions']]],
['vkdestroybuffer_14',['vkDestroyBuffer',['../struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45',1,'VmaVulkanFunctions']]],
['vkdestroyimage_15',['vkDestroyImage',['../struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa',1,'VmaVulkanFunctions']]],
['vkflushmappedmemoryranges_16',['vkFlushMappedMemoryRanges',['../struct_vma_vulkan_functions.html#a33c322f4c4ad2810f8a9c97a277572f9',1,'VmaVulkanFunctions']]],
['vkfreememory_17',['vkFreeMemory',['../struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4',1,'VmaVulkanFunctions']]],
['vkgetbuffermemoryrequirements_18',['vkGetBufferMemoryRequirements',['../struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143',1,'VmaVulkanFunctions']]],
['vkgetbuffermemoryrequirements2khr_19',['vkGetBufferMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9d8d1b05d2b1e7e1d9b27f6f585acf9c',1,'VmaVulkanFunctions']]],
['vkgetdeviceprocaddr_20',['vkGetDeviceProcAddr',['../struct_vma_vulkan_functions.html#ac383ab9af127e5e136622fa4ebea9e57',1,'VmaVulkanFunctions']]],
['vkgetimagememoryrequirements_21',['vkGetImageMemoryRequirements',['../struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4',1,'VmaVulkanFunctions']]],
['vkgetimagememoryrequirements2khr_22',['vkGetImageMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875',1,'VmaVulkanFunctions']]],
['vkgetinstanceprocaddr_23',['vkGetInstanceProcAddr',['../struct_vma_vulkan_functions.html#a3eafa102f5f8915f093f40675636b849',1,'VmaVulkanFunctions']]],
['vkgetphysicaldevicememoryproperties_24',['vkGetPhysicalDeviceMemoryProperties',['../struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830',1,'VmaVulkanFunctions']]],
['vkgetphysicaldevicememoryproperties2khr_25',['vkGetPhysicalDeviceMemoryProperties2KHR',['../struct_vma_vulkan_functions.html#a0d992896e6ffcf92b9d7ea049fa5c445',1,'VmaVulkanFunctions']]],
['vkgetphysicaldeviceproperties_26',['vkGetPhysicalDeviceProperties',['../struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96',1,'VmaVulkanFunctions']]],
['vkinvalidatemappedmemoryranges_27',['vkInvalidateMappedMemoryRanges',['../struct_vma_vulkan_functions.html#a5c1093bc32386a8060c37c9f282078a1',1,'VmaVulkanFunctions']]],
['vkmapmemory_28',['vkMapMemory',['../struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49',1,'VmaVulkanFunctions']]],
['vkunmapmemory_29',['vkUnmapMemory',['../struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9',1,'VmaVulkanFunctions']]],
['vma_5fallocation_5fcreate_5fcan_5falias_5fbit_30',['VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597afb0ee060cd733aaa5e249704ff589ad6',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fdedicated_5fmemory_5fbit_31',['VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fdont_5fbind_5fbit_32',['VMA_ALLOCATION_CREATE_DONT_BIND_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a2310568c62208af432724305fe29ccea',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum_33',['VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fmapped_5fbit_34',['VMA_ALLOCATION_CREATE_MAPPED_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fnever_5fallocate_5fbit_35',['VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f1_5fbit_36',['VMA_ALLOCATION_CREATE_RESERVED_1_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f2_5fbit_37',['VMA_ALLOCATION_CREATE_RESERVED_2_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fbest_5ffit_5fbit_38',['VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5ffirst_5ffit_5fbit_39',['VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmask_40',['VMA_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8e16845d81ae3d27c47106d4770d5c7e',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_41',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_42',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fupper_5faddress_5fbit_43',['VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a42ba3a2d2c7117953210b7c3ef8da0df',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fuser_5fdata_5fcopy_5fstring_5fbit_44',['VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fwithin_5fbudget_5fbit_45',['VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ab8b1764f3e9022368e440c057783b92d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5famd_5fdevice_5fcoherent_5fmemory_5fbit_46',['VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca2acce4886d8078552efa38878413970f',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fbuffer_5fdevice_5faddress_5fbit_47',['VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca5f1b28b0414319d1687e1f2b30ab0089',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fbudget_5fbit_48',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4d4687863f7bd4b418c6006dc04400b0',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fpriority_5fbit_49',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fexternally_5fsynchronized_5fbit_50',['VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fflag_5fbits_5fmax_5fenum_51',['VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fbind_5fmemory2_5fbit_52',['VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca8fb75bf07cd184ab903596295e863dee',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fdedicated_5fallocation_5fbit_53',['VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878',1,'vk_mem_alloc.h']]],
['vma_5fbind_5fmemory2_54',['VMA_BIND_MEMORY2',['../vk__mem__alloc_8h.html#a88bef97f86d70a34a4c0746e09a2680d',1,'vk_mem_alloc.h']]],
['vma_5fbuffer_5fdevice_5faddress_55',['VMA_BUFFER_DEVICE_ADDRESS',['../vk__mem__alloc_8h.html#a7f9d5e71b70dd1a137c303a8a8262c10',1,'vk_mem_alloc.h']]],
['vma_5fdedicated_5fallocation_56',['VMA_DEDICATED_ALLOCATION',['../vk__mem__alloc_8h.html#af7b860e63b96d11e44ae8587ba06bbf4',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fbits_5fmax_5fenum_57',['VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50cab87ec33154803bfeb5ac2b379f1d6a97',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fincremental_58',['VMA_DEFRAGMENTATION_FLAG_INCREMENTAL',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50ca31af49446af2459284a568ce2f3fdd33',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fbudget_59',['VMA_MEMORY_BUDGET',['../vk__mem__alloc_8h.html#a05decf1cf4ebf767beba7acca6c1ec3a',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fcopy_60',['VMA_MEMORY_USAGE_CPU_COPY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fonly_61',['VMA_MEMORY_USAGE_CPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fto_5fgpu_62',['VMA_MEMORY_USAGE_CPU_TO_GPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5flazily_5fallocated_63',['VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fonly_64',['VMA_MEMORY_USAGE_GPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fto_5fcpu_65',['VMA_MEMORY_USAGE_GPU_TO_CPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fmax_5fenum_66',['VMA_MEMORY_USAGE_MAX_ENUM',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5funknown_67',['VMA_MEMORY_USAGE_UNKNOWN',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5falgorithm_5fmask_68',['VMA_POOL_CREATE_ALGORITHM_MASK',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7af4d270f8f42517a0f70037ceb6ac1d9c',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fbuddy_5falgorithm_5fbit_69',['VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a97a0dc38e5161b780594d998d313d35e',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fflag_5fbits_5fmax_5fenum_70',['VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fignore_5fbuffer_5fimage_5fgranularity_5fbit_71',['VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5flinear_5falgorithm_5fbit_72',['VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a13c8a444197c67866be9cb05599fc726',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5ftlsf_5falgorithm_5fbit_73',['VMA_POOL_CREATE_TLSF_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a855ee6e02e46d835ee28c8cd596b7e32',1,'vk_mem_alloc.h']]],
['vma_5fstats_5fstring_5fenabled_74',['VMA_STATS_STRING_ENABLED',['../vk__mem__alloc_8h.html#ae25f0d55fd91cb166f002b63244800e1',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum_75',['VMA_VIRTUAL_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac1163c03ea837fa663462dc286d6a1a9',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmask_76',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac5b5e45c335368d18df59c9f27df17e3',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_77',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ae2a9591a62b5e3b1bdcbc81c6188a1bf',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_78',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a562d10a46012719d33167d3dc5dbbf9b',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fupper_5faddress_5fbit_79',['VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a9524a329a55b5ec390d57d90b67ad78e',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5falgorithm_5fmask_80',['VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaaf9487467136e1a9e371894dc3a7c4844',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fbuddy_5falgorithm_5fbit_81',['VMA_VIRTUAL_BLOCK_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa923116612509e26bf84982b9baf25c63',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fflag_5fbits_5fmax_5fenum_82',['VMA_VIRTUAL_BLOCK_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa5fc0d333c3d5687a8bbf57df9b377a87',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5flinear_5falgorithm_5fbit_83',['VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5ftlsf_5falgorithm_5fbit_84',['VMA_VIRTUAL_BLOCK_CREATE_TLSF_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa4db7cb39f9c0f1a4b71c5f76b4cfa691',1,'vk_mem_alloc.h']]],
['vmaallocatememory_85',['vmaAllocateMemory',['../group__group__alloc.html#gabf28077dbf82d0908b8acbe8ee8dd9b8',1,'vk_mem_alloc.h']]],
['vmaallocatememoryforbuffer_86',['vmaAllocateMemoryForBuffer',['../group__group__alloc.html#ga7fdf64415b6c3d83c454f28d2c53df7b',1,'vk_mem_alloc.h']]],
['vmaallocatememoryforimage_87',['vmaAllocateMemoryForImage',['../group__group__alloc.html#ga0faa3f9e5fb233d29d1e00390650febb',1,'vk_mem_alloc.h']]],
['vmaallocatememorypages_88',['vmaAllocateMemoryPages',['../group__group__alloc.html#gad37e82e492b3de38fc3f4cffd9ad0ae1',1,'vk_mem_alloc.h']]],
['vmaallocation_89',['VmaAllocation',['../struct_vma_allocation.html',1,'']]],
['vmaallocationcreateflagbits_90',['VmaAllocationCreateFlagBits',['../group__group__alloc.html#ga4fceecc301f4064dc808d3cd6c038941',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#gad9889c10c798b040d59c92f257cae597',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmaallocationcreateflags_91',['VmaAllocationCreateFlags',['../group__group__alloc.html#ga5225e5e11f8376f6a31a1791f3d6e817',1,'vk_mem_alloc.h']]],
['vmaallocationcreateinfo_92',['VmaAllocationCreateInfo',['../struct_vma_allocation_create_info.html',1,'VmaAllocationCreateInfo'],['../group__group__alloc.html#ga3bf110892ea2fb4649fedb68488d026a',1,'VmaAllocationCreateInfo():&#160;vk_mem_alloc.h']]],
['vmaallocationinfo_93',['VmaAllocationInfo',['../struct_vma_allocation_info.html',1,'VmaAllocationInfo'],['../group__group__alloc.html#ga1cf7774606721026a68aabe3af2e5b50',1,'VmaAllocationInfo():&#160;vk_mem_alloc.h']]],
['vmaallocator_94',['VmaAllocator',['../struct_vma_allocator.html',1,'']]],
['vmaallocatorcreateflagbits_95',['VmaAllocatorCreateFlagBits',['../group__group__init.html#gafd73b95e737ee7e76f827cb5472f559f',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__init.html#ga4f87c9100d154a65a4ad495f7763cf7c',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmaallocatorcreateflags_96',['VmaAllocatorCreateFlags',['../group__group__init.html#gacfe6863e160722c2c1bbcf7573fddc4d',1,'vk_mem_alloc.h']]],
['vmaallocatorcreateinfo_97',['VmaAllocatorCreateInfo',['../struct_vma_allocator_create_info.html',1,'VmaAllocatorCreateInfo'],['../group__group__init.html#gaad9652301d33759b83e52d4f3605a14a',1,'VmaAllocatorCreateInfo():&#160;vk_mem_alloc.h']]],
['vmaallocatorinfo_98',['VmaAllocatorInfo',['../struct_vma_allocator_info.html',1,'VmaAllocatorInfo'],['../group__group__init.html#ga1988031b0223fdbd564250fa1edd942c',1,'VmaAllocatorInfo():&#160;vk_mem_alloc.h']]],
['vmabegindefragmentationpass_99',['vmaBeginDefragmentationPass',['../group__group__alloc.html#gac0f01545b6262f7d4d128fc8f8e5c77b',1,'vk_mem_alloc.h']]],
['vmabindbuffermemory_100',['vmaBindBufferMemory',['../group__group__alloc.html#ga6b0929b914b60cf2d45cac4bf3547470',1,'vk_mem_alloc.h']]],
['vmabindbuffermemory2_101',['vmaBindBufferMemory2',['../group__group__alloc.html#ga927c944f45e0f2941182abb6f608e64a',1,'vk_mem_alloc.h']]],
['vmabindimagememory_102',['vmaBindImageMemory',['../group__group__alloc.html#ga3d3ca45799923aa5d138e9e5f9eb2da5',1,'vk_mem_alloc.h']]],
['vmabindimagememory2_103',['vmaBindImageMemory2',['../group__group__alloc.html#gaa8251ee81b0045a443e35b8e8aa021bc',1,'vk_mem_alloc.h']]],
['vmabudget_104',['VmaBudget',['../struct_vma_budget.html',1,'VmaBudget'],['../group__group__stats.html#gaa078667e71b1ef24e87a6a30d128381d',1,'VmaBudget():&#160;vk_mem_alloc.h']]],
['vmabuildstatsstring_105',['vmaBuildStatsString',['../group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0',1,'vk_mem_alloc.h']]],
['vmabuildvirtualblockstatsstring_106',['vmaBuildVirtualBlockStatsString',['../group__group__stats.html#ga52d810e1222c592e5d80556ad005f1e6',1,'vk_mem_alloc.h']]],
['vmacalculatestats_107',['vmaCalculateStats',['../group__group__stats.html#ga333b61c1788cb23559177531e6a93ca3',1,'vk_mem_alloc.h']]],
['vmacalculatevirtualblockstats_108',['vmaCalculateVirtualBlockStats',['../group__group__virtual.html#ga95169b4730e94757897470086ec2768a',1,'vk_mem_alloc.h']]],
['vmacheckcorruption_109',['vmaCheckCorruption',['../group__group__alloc.html#ga49329a7f030dafcf82f7b73334c22e98',1,'vk_mem_alloc.h']]],
['vmacheckpoolcorruption_110',['vmaCheckPoolCorruption',['../group__group__alloc.html#gad535935619c7a549bf837e1bb0068f89',1,'vk_mem_alloc.h']]],
['vmaclearvirtualblock_111',['vmaClearVirtualBlock',['../group__group__virtual.html#ga5eda6f55919fb05bd2f56a112590c571',1,'vk_mem_alloc.h']]],
['vmacreateallocator_112',['vmaCreateAllocator',['../group__group__init.html#ga200692051ddb34240248234f5f4c17bb',1,'vk_mem_alloc.h']]],
['vmacreatebuffer_113',['vmaCreateBuffer',['../group__group__alloc.html#gac72ee55598617e8eecca384e746bab51',1,'vk_mem_alloc.h']]],
['vmacreatebufferwithalignment_114',['vmaCreateBufferWithAlignment',['../group__group__alloc.html#gaa06a690013a0d01e60894ac378083834',1,'vk_mem_alloc.h']]],
['vmacreateimage_115',['vmaCreateImage',['../group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73',1,'vk_mem_alloc.h']]],
['vmacreatepool_116',['vmaCreatePool',['../group__group__alloc.html#ga5c8770ded7c59c8caac6de0c2cb00b50',1,'vk_mem_alloc.h']]],
['vmacreatevirtualblock_117',['vmaCreateVirtualBlock',['../group__group__virtual.html#gab585754076877265fdae33e5c40ef13b',1,'vk_mem_alloc.h']]],
['vmadefragment_118',['vmaDefragment',['../group__group__alloc.html#ga9f0f8f56db5f7f57fe4454f465142dac',1,'vk_mem_alloc.h']]],
['vmadefragmentationbegin_119',['vmaDefragmentationBegin',['../group__group__alloc.html#ga36ba776fd7fd5cb1e9359fdc0d8e6e8a',1,'vk_mem_alloc.h']]],
['vmadefragmentationcontext_120',['VmaDefragmentationContext',['../struct_vma_defragmentation_context.html',1,'']]],
['vmadefragmentationend_121',['vmaDefragmentationEnd',['../group__group__alloc.html#ga8774e20e91e245aae959ba63efa15dd2',1,'vk_mem_alloc.h']]],
['vmadefragmentationflagbits_122',['VmaDefragmentationFlagBits',['../group__group__alloc.html#ga13415cc0b443353a7b5abda300b833fc',1,'VmaDefragmentationFlagBits():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#ga6552a65b71d16f378c6994b3ceaef50c',1,'VmaDefragmentationFlagBits():&#160;vk_mem_alloc.h']]],
['vmadefragmentationflags_123',['VmaDefragmentationFlags',['../group__group__alloc.html#ga88a77cef37e5d3c4fc9eb328885d048d',1,'vk_mem_alloc.h']]],
['vmadefragmentationinfo_124',['VmaDefragmentationInfo',['../group__group__alloc.html#ga2bf47f96bf92bed2a49461bd9af3acfa',1,'VmaDefragmentationInfo():&#160;vk_mem_alloc.h'],['../struct_vma_defragmentation_info.html',1,'VmaDefragmentationInfo']]],
['vmadefragmentationinfo2_125',['VmaDefragmentationInfo2',['../struct_vma_defragmentation_info2.html',1,'VmaDefragmentationInfo2'],['../group__group__alloc.html#gad6daeffaa670ce6d11a203a6224c9937',1,'VmaDefragmentationInfo2():&#160;vk_mem_alloc.h']]],
['vmadefragmentationpassinfo_126',['VmaDefragmentationPassInfo',['../struct_vma_defragmentation_pass_info.html',1,'VmaDefragmentationPassInfo'],['../group__group__alloc.html#ga72aebd522242d56abea67b4f47f6549e',1,'VmaDefragmentationPassInfo():&#160;vk_mem_alloc.h']]],
['vmadefragmentationpassmoveinfo_127',['VmaDefragmentationPassMoveInfo',['../struct_vma_defragmentation_pass_move_info.html',1,'VmaDefragmentationPassMoveInfo'],['../group__group__alloc.html#gad6799e8e2b1527abfc84d33bc44aeaf5',1,'VmaDefragmentationPassMoveInfo():&#160;vk_mem_alloc.h']]],
['vmadefragmentationstats_128',['VmaDefragmentationStats',['../struct_vma_defragmentation_stats.html',1,'VmaDefragmentationStats'],['../group__group__alloc.html#gad94034192259c2e34a4d1c5e27810403',1,'VmaDefragmentationStats():&#160;vk_mem_alloc.h']]],
['vmadestroyallocator_129',['vmaDestroyAllocator',['../group__group__init.html#gaa8d164061c88f22fb1fd3c8f3534bc1d',1,'vk_mem_alloc.h']]],
['vmadestroybuffer_130',['vmaDestroyBuffer',['../group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77',1,'vk_mem_alloc.h']]],
['vmadestroyimage_131',['vmaDestroyImage',['../group__group__alloc.html#gae50d2cb3b4a3bfd4dd40987234e50e7e',1,'vk_mem_alloc.h']]],
['vmadestroypool_132',['vmaDestroyPool',['../group__group__alloc.html#ga5485779c8f1948238fc4e92232fa65e1',1,'vk_mem_alloc.h']]],
['vmadestroyvirtualblock_133',['vmaDestroyVirtualBlock',['../group__group__virtual.html#ga3795f7783ae2c182cede067d656f66a5',1,'vk_mem_alloc.h']]],
['vmadevicememorycallbacks_134',['VmaDeviceMemoryCallbacks',['../struct_vma_device_memory_callbacks.html',1,'VmaDeviceMemoryCallbacks'],['../group__group__init.html#ga77692d3c8770ea8882d573206bd27b2b',1,'VmaDeviceMemoryCallbacks():&#160;vk_mem_alloc.h']]],
['vmaenddefragmentationpass_135',['vmaEndDefragmentationPass',['../group__group__alloc.html#ga1b9ffa538bed905af55c747cc48963bd',1,'vk_mem_alloc.h']]],
['vmafindmemorytypeindex_136',['vmaFindMemoryTypeIndex',['../group__group__alloc.html#gaef15a94b58fbcb0fe706d5720e84a74a',1,'vk_mem_alloc.h']]],
['vmafindmemorytypeindexforbufferinfo_137',['vmaFindMemoryTypeIndexForBufferInfo',['../group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888',1,'vk_mem_alloc.h']]],
['vmafindmemorytypeindexforimageinfo_138',['vmaFindMemoryTypeIndexForImageInfo',['../group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472',1,'vk_mem_alloc.h']]],
['vmaflushallocation_139',['vmaFlushAllocation',['../group__group__alloc.html#ga30c37c1eec6025f397be41644f48490f',1,'vk_mem_alloc.h']]],
['vmaflushallocations_140',['vmaFlushAllocations',['../group__group__alloc.html#gac3dd00da721875ed99fa8a881922bdfc',1,'vk_mem_alloc.h']]],
['vmafreememory_141',['vmaFreeMemory',['../group__group__alloc.html#ga5fea5518972ae9094b1526cbcb19b05f',1,'vk_mem_alloc.h']]],
['vmafreememorypages_142',['vmaFreeMemoryPages',['../group__group__alloc.html#ga834b1e4aef395c0a1d56a28e69a4a17e',1,'vk_mem_alloc.h']]],
['vmafreestatsstring_143',['vmaFreeStatsString',['../group__group__stats.html#ga3104eb30d8122c84dd8541063f145288',1,'vk_mem_alloc.h']]],
['vmafreevirtualblockstatsstring_144',['vmaFreeVirtualBlockStatsString',['../group__group__stats.html#ga47fb8d8aa69df4a7c23a9719b4080623',1,'vk_mem_alloc.h']]],
['vmagetallocationinfo_145',['vmaGetAllocationInfo',['../group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b',1,'vk_mem_alloc.h']]],
['vmagetallocationmemoryproperties_146',['vmaGetAllocationMemoryProperties',['../group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1',1,'vk_mem_alloc.h']]],
['vmagetallocatorinfo_147',['vmaGetAllocatorInfo',['../group__group__init.html#gafa02231a791b37255720d566a52683e7',1,'vk_mem_alloc.h']]],
['vmagetheapbudgets_148',['vmaGetHeapBudgets',['../group__group__stats.html#ga9f88db9d46a432c0ad7278cecbc5eaa7',1,'vk_mem_alloc.h']]],
['vmagetmemoryproperties_149',['vmaGetMemoryProperties',['../group__group__init.html#gab88db292a17974f911182543fda52d19',1,'vk_mem_alloc.h']]],
['vmagetmemorytypeproperties_150',['vmaGetMemoryTypeProperties',['../group__group__init.html#ga8701444752eb5de4464adb5a2b514bca',1,'vk_mem_alloc.h']]],
['vmagetphysicaldeviceproperties_151',['vmaGetPhysicalDeviceProperties',['../group__group__init.html#gaecabf7b6e91ea87d0316fa0a9e014fe0',1,'vk_mem_alloc.h']]],
['vmagetpoolname_152',['vmaGetPoolName',['../group__group__alloc.html#gaf09b4e4eafdbee812e8d73ddf960f030',1,'vk_mem_alloc.h']]],
['vmagetpoolstats_153',['vmaGetPoolStats',['../group__group__stats.html#gae8bf76997b234ef68aad922616df4153',1,'vk_mem_alloc.h']]],
['vmagetvirtualallocationinfo_154',['vmaGetVirtualAllocationInfo',['../group__group__virtual.html#ga8ee14ceb1fe033ec84d8aa29e1f75afa',1,'vk_mem_alloc.h']]],
['vmainvalidateallocation_155',['vmaInvalidateAllocation',['../group__group__alloc.html#gaaa8412919139ef413a4215ac6a290fae',1,'vk_mem_alloc.h']]],
['vmainvalidateallocations_156',['vmaInvalidateAllocations',['../group__group__alloc.html#gab25b558d75f7378ec944a1522fdcc3c5',1,'vk_mem_alloc.h']]],
['vmaisvirtualblockempty_157',['vmaIsVirtualBlockEmpty',['../group__group__virtual.html#gacd53b5b1d23f8fcbad692ccfdc1811f1',1,'vk_mem_alloc.h']]],
['vmamapmemory_158',['vmaMapMemory',['../group__group__alloc.html#gad5bd1243512d099706de88168992f069',1,'vk_mem_alloc.h']]],
['vmamemoryusage_159',['VmaMemoryUsage',['../group__group__alloc.html#gaa5846affa1e9da3800e3e78fae2305cc',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#ga806e8499dde802e59eb72a1dc811c35f',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h']]],
['vmapool_160',['VmaPool',['../struct_vma_pool.html',1,'']]],
['vmapoolcreateflagbits_161',['VmaPoolCreateFlagBits',['../group__group__alloc.html#ga9a7c45f9c863695d98c83fa5ac940fe7',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#ga4d4f2efc2509157a9e4ecd4fd7942303',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmapoolcreateflags_162',['VmaPoolCreateFlags',['../group__group__alloc.html#ga2770e325ea42e087c1b91fdf46d0292a',1,'vk_mem_alloc.h']]],
['vmapoolcreateinfo_163',['VmaPoolCreateInfo',['../struct_vma_pool_create_info.html',1,'VmaPoolCreateInfo'],['../group__group__alloc.html#ga1017aa83489c0eee8d2163d2bf253f67',1,'VmaPoolCreateInfo():&#160;vk_mem_alloc.h']]],
['vmapoolstats_164',['VmaPoolStats',['../struct_vma_pool_stats.html',1,'VmaPoolStats'],['../group__group__stats.html#ga4759a2d9f99c19ba7627553c847132f1',1,'VmaPoolStats():&#160;vk_mem_alloc.h']]],
['vmasetallocationuserdata_165',['vmaSetAllocationUserData',['../group__group__alloc.html#gaf9147d31ffc11d62fc187bde283ed14f',1,'vk_mem_alloc.h']]],
['vmasetcurrentframeindex_166',['vmaSetCurrentFrameIndex',['../group__group__init.html#gade56bf8dc9f5a5eaddf5f119ed525236',1,'vk_mem_alloc.h']]],
['vmasetpoolname_167',['vmaSetPoolName',['../group__group__alloc.html#gadbae3a0b4ab078024462fc85c37f3b58',1,'vk_mem_alloc.h']]],
['vmasetvirtualallocationuserdata_168',['vmaSetVirtualAllocationUserData',['../group__group__virtual.html#ga001ea1850458a4062b829e09c303fca2',1,'vk_mem_alloc.h']]],
['vmastatinfo_169',['VmaStatInfo',['../group__group__stats.html#gaec5b57e29c97b5d69c6d5654d60df878',1,'VmaStatInfo():&#160;vk_mem_alloc.h'],['../struct_vma_stat_info.html',1,'VmaStatInfo']]],
['vmastats_170',['VmaStats',['../struct_vma_stats.html',1,'VmaStats'],['../group__group__stats.html#ga21813b2efdf3836767a9058cd8a94034',1,'VmaStats():&#160;vk_mem_alloc.h']]],
['vmaunmapmemory_171',['vmaUnmapMemory',['../group__group__alloc.html#ga9bc268595cb33f6ec4d519cfce81ff45',1,'vk_mem_alloc.h']]],
['vmavirtualallocate_172',['vmaVirtualAllocate',['../group__group__virtual.html#ga6b7cdcc1c3e5103c323fedc4e1319e01',1,'vk_mem_alloc.h']]],
['vmavirtualallocation_173',['VmaVirtualAllocation',['../struct_vma_virtual_allocation.html',1,'']]],
['vmavirtualallocationcreateflagbits_174',['VmaVirtualAllocationCreateFlagBits',['../group__group__virtual.html#ga2e9c64d405b14156fea7e10c4ad06cb6',1,'VmaVirtualAllocationCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__virtual.html#ga936815e64946a6b6d812d08d10184c23',1,'VmaVirtualAllocationCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmavirtualallocationcreateflags_175',['VmaVirtualAllocationCreateFlags',['../group__group__virtual.html#gae96ffc099bf898257fb19e9410ed08a7',1,'vk_mem_alloc.h']]],
['vmavirtualallocationcreateinfo_176',['VmaVirtualAllocationCreateInfo',['../struct_vma_virtual_allocation_create_info.html',1,'VmaVirtualAllocationCreateInfo'],['../group__group__virtual.html#gac3c90d80bedc6847a41b82d0e2158c9e',1,'VmaVirtualAllocationCreateInfo():&#160;vk_mem_alloc.h']]],
['vmavirtualallocationinfo_177',['VmaVirtualAllocationInfo',['../struct_vma_virtual_allocation_info.html',1,'VmaVirtualAllocationInfo'],['../group__group__virtual.html#ga75bc33ff7cf18c98e101f570dc2a5ebc',1,'VmaVirtualAllocationInfo():&#160;vk_mem_alloc.h']]],
['vmavirtualblock_178',['VmaVirtualBlock',['../struct_vma_virtual_block.html',1,'']]],
['vmavirtualblockcreateflagbits_179',['VmaVirtualBlockCreateFlagBits',['../group__group__virtual.html#ga88bcf8c1cd3bb1610ff7343811c65bca',1,'VmaVirtualBlockCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__virtual.html#ga0860ba1c0a67178fae4aecb63a78573e',1,'VmaVirtualBlockCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmavirtualblockcreateflags_180',['VmaVirtualBlockCreateFlags',['../group__group__virtual.html#ga4e49c2f0ab7f6b4868833e5bac78d91e',1,'vk_mem_alloc.h']]],
['vmavirtualblockcreateinfo_181',['VmaVirtualBlockCreateInfo',['../group__group__virtual.html#ga4753d42d40217a3a652a3cdf253ad773',1,'VmaVirtualBlockCreateInfo():&#160;vk_mem_alloc.h'],['../struct_vma_virtual_block_create_info.html',1,'VmaVirtualBlockCreateInfo']]],
['vmavirtualfree_182',['vmaVirtualFree',['../group__group__virtual.html#ga09fc688c0c3653ff23723b037e5d5033',1,'vk_mem_alloc.h']]],
['vmavulkanfunctions_183',['VmaVulkanFunctions',['../group__group__init.html#gabb0a8e3b5040d847571cca6c7f9a8074',1,'VmaVulkanFunctions():&#160;vk_mem_alloc.h'],['../struct_vma_vulkan_functions.html',1,'VmaVulkanFunctions']]],
['vulkan_20memory_20allocator_184',['Vulkan Memory Allocator',['../index.html',1,'']]],
['vulkanapiversion_185',['vulkanApiVersion',['../struct_vma_allocator_create_info.html#ae0ffc55139b54520a6bb704b29ffc285',1,'VmaAllocatorCreateInfo']]]
['vk_5fkhr_5fdedicated_5fallocation_3',['VK_KHR_dedicated_allocation',['../vk_khr_dedicated_allocation.html',1,'index']]],
['vk_5fmem_5falloc_2eh_4',['vk_mem_alloc.h',['../vk__mem__alloc_8h.html',1,'']]],
['vkallocatememory_5',['vkAllocateMemory',['../struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c',1,'VmaVulkanFunctions']]],
['vkbindbuffermemory_6',['vkBindBufferMemory',['../struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2',1,'VmaVulkanFunctions']]],
['vkbindbuffermemory2khr_7',['vkBindBufferMemory2KHR',['../struct_vma_vulkan_functions.html#a0c4907235aab9df2767b79836afa2dc9',1,'VmaVulkanFunctions']]],
['vkbindimagememory_8',['vkBindImageMemory',['../struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637',1,'VmaVulkanFunctions']]],
['vkbindimagememory2khr_9',['vkBindImageMemory2KHR',['../struct_vma_vulkan_functions.html#ab95aaa73ab8a3fe9fd3daaaec4e0b2bf',1,'VmaVulkanFunctions']]],
['vkcmdcopybuffer_10',['vkCmdCopyBuffer',['../struct_vma_vulkan_functions.html#ae5c0db8c89a3b82593dc16aa6a49fa3a',1,'VmaVulkanFunctions']]],
['vkcreatebuffer_11',['vkCreateBuffer',['../struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f',1,'VmaVulkanFunctions']]],
['vkcreateimage_12',['vkCreateImage',['../struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325',1,'VmaVulkanFunctions']]],
['vkdestroybuffer_13',['vkDestroyBuffer',['../struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45',1,'VmaVulkanFunctions']]],
['vkdestroyimage_14',['vkDestroyImage',['../struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa',1,'VmaVulkanFunctions']]],
['vkflushmappedmemoryranges_15',['vkFlushMappedMemoryRanges',['../struct_vma_vulkan_functions.html#a33c322f4c4ad2810f8a9c97a277572f9',1,'VmaVulkanFunctions']]],
['vkfreememory_16',['vkFreeMemory',['../struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4',1,'VmaVulkanFunctions']]],
['vkgetbuffermemoryrequirements_17',['vkGetBufferMemoryRequirements',['../struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143',1,'VmaVulkanFunctions']]],
['vkgetbuffermemoryrequirements2khr_18',['vkGetBufferMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9d8d1b05d2b1e7e1d9b27f6f585acf9c',1,'VmaVulkanFunctions']]],
['vkgetdeviceprocaddr_19',['vkGetDeviceProcAddr',['../struct_vma_vulkan_functions.html#ac383ab9af127e5e136622fa4ebea9e57',1,'VmaVulkanFunctions']]],
['vkgetimagememoryrequirements_20',['vkGetImageMemoryRequirements',['../struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4',1,'VmaVulkanFunctions']]],
['vkgetimagememoryrequirements2khr_21',['vkGetImageMemoryRequirements2KHR',['../struct_vma_vulkan_functions.html#a9cdcdc1e2b2ea7c571f7d27e30ba6875',1,'VmaVulkanFunctions']]],
['vkgetinstanceprocaddr_22',['vkGetInstanceProcAddr',['../struct_vma_vulkan_functions.html#a3eafa102f5f8915f093f40675636b849',1,'VmaVulkanFunctions']]],
['vkgetphysicaldevicememoryproperties_23',['vkGetPhysicalDeviceMemoryProperties',['../struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830',1,'VmaVulkanFunctions']]],
['vkgetphysicaldevicememoryproperties2khr_24',['vkGetPhysicalDeviceMemoryProperties2KHR',['../struct_vma_vulkan_functions.html#a0d992896e6ffcf92b9d7ea049fa5c445',1,'VmaVulkanFunctions']]],
['vkgetphysicaldeviceproperties_25',['vkGetPhysicalDeviceProperties',['../struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96',1,'VmaVulkanFunctions']]],
['vkinvalidatemappedmemoryranges_26',['vkInvalidateMappedMemoryRanges',['../struct_vma_vulkan_functions.html#a5c1093bc32386a8060c37c9f282078a1',1,'VmaVulkanFunctions']]],
['vkmapmemory_27',['vkMapMemory',['../struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49',1,'VmaVulkanFunctions']]],
['vkunmapmemory_28',['vkUnmapMemory',['../struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9',1,'VmaVulkanFunctions']]],
['vma_5fallocation_5fcreate_5fcan_5falias_5fbit_29',['VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597afb0ee060cd733aaa5e249704ff589ad6',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fdedicated_5fmemory_5fbit_30',['VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fdont_5fbind_5fbit_31',['VMA_ALLOCATION_CREATE_DONT_BIND_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a2310568c62208af432724305fe29ccea',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum_32',['VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fhost_5faccess_5fallow_5ftransfer_5finstead_5fbit_33',['VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fhost_5faccess_5frandom_5fbit_34',['VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fhost_5faccess_5fsequential_5fwrite_5fbit_35',['VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fmapped_5fbit_36',['VMA_ALLOCATION_CREATE_MAPPED_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fnever_5fallocate_5fbit_37',['VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f1_5fbit_38',['VMA_ALLOCATION_CREATE_RESERVED_1_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f2_5fbit_39',['VMA_ALLOCATION_CREATE_RESERVED_2_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fbest_5ffit_5fbit_40',['VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5ffirst_5ffit_5fbit_41',['VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmask_42',['VMA_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8e16845d81ae3d27c47106d4770d5c7e',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_43',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_44',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fupper_5faddress_5fbit_45',['VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a42ba3a2d2c7117953210b7c3ef8da0df',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fuser_5fdata_5fcopy_5fstring_5fbit_46',['VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fwithin_5fbudget_5fbit_47',['VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ab8b1764f3e9022368e440c057783b92d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5famd_5fdevice_5fcoherent_5fmemory_5fbit_48',['VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca2acce4886d8078552efa38878413970f',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fbuffer_5fdevice_5faddress_5fbit_49',['VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca5f1b28b0414319d1687e1f2b30ab0089',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fbudget_5fbit_50',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4d4687863f7bd4b418c6006dc04400b0',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fpriority_5fbit_51',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fexternally_5fsynchronized_5fbit_52',['VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fflag_5fbits_5fmax_5fenum_53',['VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fbind_5fmemory2_5fbit_54',['VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca8fb75bf07cd184ab903596295e863dee',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fdedicated_5fallocation_5fbit_55',['VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878',1,'vk_mem_alloc.h']]],
['vma_5fbind_5fmemory2_56',['VMA_BIND_MEMORY2',['../vk__mem__alloc_8h.html#a88bef97f86d70a34a4c0746e09a2680d',1,'vk_mem_alloc.h']]],
['vma_5fbuffer_5fdevice_5faddress_57',['VMA_BUFFER_DEVICE_ADDRESS',['../vk__mem__alloc_8h.html#a7f9d5e71b70dd1a137c303a8a8262c10',1,'vk_mem_alloc.h']]],
['vma_5fdedicated_5fallocation_58',['VMA_DEDICATED_ALLOCATION',['../vk__mem__alloc_8h.html#af7b860e63b96d11e44ae8587ba06bbf4',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fbits_5fmax_5fenum_59',['VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50cab87ec33154803bfeb5ac2b379f1d6a97',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fincremental_60',['VMA_DEFRAGMENTATION_FLAG_INCREMENTAL',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50ca31af49446af2459284a568ce2f3fdd33',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fbudget_61',['VMA_MEMORY_BUDGET',['../vk__mem__alloc_8h.html#a05decf1cf4ebf767beba7acca6c1ec3a',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fauto_62',['VMA_MEMORY_USAGE_AUTO',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fauto_5fprefer_5fdevice_63',['VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fauto_5fprefer_5fhost_64',['VMA_MEMORY_USAGE_AUTO_PREFER_HOST',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fcopy_65',['VMA_MEMORY_USAGE_CPU_COPY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fonly_66',['VMA_MEMORY_USAGE_CPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fto_5fgpu_67',['VMA_MEMORY_USAGE_CPU_TO_GPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5flazily_5fallocated_68',['VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fonly_69',['VMA_MEMORY_USAGE_GPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fto_5fcpu_70',['VMA_MEMORY_USAGE_GPU_TO_CPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fmax_5fenum_71',['VMA_MEMORY_USAGE_MAX_ENUM',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5funknown_72',['VMA_MEMORY_USAGE_UNKNOWN',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5falgorithm_5fmask_73',['VMA_POOL_CREATE_ALGORITHM_MASK',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7af4d270f8f42517a0f70037ceb6ac1d9c',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fbuddy_5falgorithm_5fbit_74',['VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a97a0dc38e5161b780594d998d313d35e',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fflag_5fbits_5fmax_5fenum_75',['VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fignore_5fbuffer_5fimage_5fgranularity_5fbit_76',['VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5flinear_5falgorithm_5fbit_77',['VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a13c8a444197c67866be9cb05599fc726',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5ftlsf_5falgorithm_5fbit_78',['VMA_POOL_CREATE_TLSF_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a855ee6e02e46d835ee28c8cd596b7e32',1,'vk_mem_alloc.h']]],
['vma_5fstats_5fstring_5fenabled_79',['VMA_STATS_STRING_ENABLED',['../vk__mem__alloc_8h.html#ae25f0d55fd91cb166f002b63244800e1',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum_80',['VMA_VIRTUAL_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac1163c03ea837fa663462dc286d6a1a9',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmask_81',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac5b5e45c335368d18df59c9f27df17e3',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_82',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ae2a9591a62b5e3b1bdcbc81c6188a1bf',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_83',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a562d10a46012719d33167d3dc5dbbf9b',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fupper_5faddress_5fbit_84',['VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a9524a329a55b5ec390d57d90b67ad78e',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5falgorithm_5fmask_85',['VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaaf9487467136e1a9e371894dc3a7c4844',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fbuddy_5falgorithm_5fbit_86',['VMA_VIRTUAL_BLOCK_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa923116612509e26bf84982b9baf25c63',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fflag_5fbits_5fmax_5fenum_87',['VMA_VIRTUAL_BLOCK_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa5fc0d333c3d5687a8bbf57df9b377a87',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5flinear_5falgorithm_5fbit_88',['VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5ftlsf_5falgorithm_5fbit_89',['VMA_VIRTUAL_BLOCK_CREATE_TLSF_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa4db7cb39f9c0f1a4b71c5f76b4cfa691',1,'vk_mem_alloc.h']]],
['vmaallocatememory_90',['vmaAllocateMemory',['../group__group__alloc.html#gabf28077dbf82d0908b8acbe8ee8dd9b8',1,'vk_mem_alloc.h']]],
['vmaallocatememoryforbuffer_91',['vmaAllocateMemoryForBuffer',['../group__group__alloc.html#ga7fdf64415b6c3d83c454f28d2c53df7b',1,'vk_mem_alloc.h']]],
['vmaallocatememoryforimage_92',['vmaAllocateMemoryForImage',['../group__group__alloc.html#ga0faa3f9e5fb233d29d1e00390650febb',1,'vk_mem_alloc.h']]],
['vmaallocatememorypages_93',['vmaAllocateMemoryPages',['../group__group__alloc.html#gad37e82e492b3de38fc3f4cffd9ad0ae1',1,'vk_mem_alloc.h']]],
['vmaallocation_94',['VmaAllocation',['../struct_vma_allocation.html',1,'']]],
['vmaallocationcreateflagbits_95',['VmaAllocationCreateFlagBits',['../group__group__alloc.html#ga4fceecc301f4064dc808d3cd6c038941',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#gad9889c10c798b040d59c92f257cae597',1,'VmaAllocationCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmaallocationcreateflags_96',['VmaAllocationCreateFlags',['../group__group__alloc.html#ga5225e5e11f8376f6a31a1791f3d6e817',1,'vk_mem_alloc.h']]],
['vmaallocationcreateinfo_97',['VmaAllocationCreateInfo',['../struct_vma_allocation_create_info.html',1,'VmaAllocationCreateInfo'],['../group__group__alloc.html#ga3bf110892ea2fb4649fedb68488d026a',1,'VmaAllocationCreateInfo():&#160;vk_mem_alloc.h']]],
['vmaallocationinfo_98',['VmaAllocationInfo',['../struct_vma_allocation_info.html',1,'VmaAllocationInfo'],['../group__group__alloc.html#ga1cf7774606721026a68aabe3af2e5b50',1,'VmaAllocationInfo():&#160;vk_mem_alloc.h']]],
['vmaallocator_99',['VmaAllocator',['../struct_vma_allocator.html',1,'']]],
['vmaallocatorcreateflagbits_100',['VmaAllocatorCreateFlagBits',['../group__group__init.html#gafd73b95e737ee7e76f827cb5472f559f',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__init.html#ga4f87c9100d154a65a4ad495f7763cf7c',1,'VmaAllocatorCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmaallocatorcreateflags_101',['VmaAllocatorCreateFlags',['../group__group__init.html#gacfe6863e160722c2c1bbcf7573fddc4d',1,'vk_mem_alloc.h']]],
['vmaallocatorcreateinfo_102',['VmaAllocatorCreateInfo',['../struct_vma_allocator_create_info.html',1,'VmaAllocatorCreateInfo'],['../group__group__init.html#gaad9652301d33759b83e52d4f3605a14a',1,'VmaAllocatorCreateInfo():&#160;vk_mem_alloc.h']]],
['vmaallocatorinfo_103',['VmaAllocatorInfo',['../struct_vma_allocator_info.html',1,'VmaAllocatorInfo'],['../group__group__init.html#ga1988031b0223fdbd564250fa1edd942c',1,'VmaAllocatorInfo():&#160;vk_mem_alloc.h']]],
['vmabegindefragmentationpass_104',['vmaBeginDefragmentationPass',['../group__group__alloc.html#gac0f01545b6262f7d4d128fc8f8e5c77b',1,'vk_mem_alloc.h']]],
['vmabindbuffermemory_105',['vmaBindBufferMemory',['../group__group__alloc.html#ga6b0929b914b60cf2d45cac4bf3547470',1,'vk_mem_alloc.h']]],
['vmabindbuffermemory2_106',['vmaBindBufferMemory2',['../group__group__alloc.html#ga927c944f45e0f2941182abb6f608e64a',1,'vk_mem_alloc.h']]],
['vmabindimagememory_107',['vmaBindImageMemory',['../group__group__alloc.html#ga3d3ca45799923aa5d138e9e5f9eb2da5',1,'vk_mem_alloc.h']]],
['vmabindimagememory2_108',['vmaBindImageMemory2',['../group__group__alloc.html#gaa8251ee81b0045a443e35b8e8aa021bc',1,'vk_mem_alloc.h']]],
['vmabudget_109',['VmaBudget',['../struct_vma_budget.html',1,'VmaBudget'],['../group__group__stats.html#gaa078667e71b1ef24e87a6a30d128381d',1,'VmaBudget():&#160;vk_mem_alloc.h']]],
['vmabuildstatsstring_110',['vmaBuildStatsString',['../group__group__stats.html#gaa4fee7eb5253377599ef4fd38c93c2a0',1,'vk_mem_alloc.h']]],
['vmabuildvirtualblockstatsstring_111',['vmaBuildVirtualBlockStatsString',['../group__group__stats.html#ga52d810e1222c592e5d80556ad005f1e6',1,'vk_mem_alloc.h']]],
['vmacalculatestats_112',['vmaCalculateStats',['../group__group__stats.html#ga333b61c1788cb23559177531e6a93ca3',1,'vk_mem_alloc.h']]],
['vmacalculatevirtualblockstats_113',['vmaCalculateVirtualBlockStats',['../group__group__virtual.html#ga95169b4730e94757897470086ec2768a',1,'vk_mem_alloc.h']]],
['vmacheckcorruption_114',['vmaCheckCorruption',['../group__group__alloc.html#ga49329a7f030dafcf82f7b73334c22e98',1,'vk_mem_alloc.h']]],
['vmacheckpoolcorruption_115',['vmaCheckPoolCorruption',['../group__group__alloc.html#gad535935619c7a549bf837e1bb0068f89',1,'vk_mem_alloc.h']]],
['vmaclearvirtualblock_116',['vmaClearVirtualBlock',['../group__group__virtual.html#ga5eda6f55919fb05bd2f56a112590c571',1,'vk_mem_alloc.h']]],
['vmacreateallocator_117',['vmaCreateAllocator',['../group__group__init.html#ga200692051ddb34240248234f5f4c17bb',1,'vk_mem_alloc.h']]],
['vmacreatebuffer_118',['vmaCreateBuffer',['../group__group__alloc.html#gac72ee55598617e8eecca384e746bab51',1,'vk_mem_alloc.h']]],
['vmacreatebufferwithalignment_119',['vmaCreateBufferWithAlignment',['../group__group__alloc.html#gaa06a690013a0d01e60894ac378083834',1,'vk_mem_alloc.h']]],
['vmacreateimage_120',['vmaCreateImage',['../group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73',1,'vk_mem_alloc.h']]],
['vmacreatepool_121',['vmaCreatePool',['../group__group__alloc.html#ga5c8770ded7c59c8caac6de0c2cb00b50',1,'vk_mem_alloc.h']]],
['vmacreatevirtualblock_122',['vmaCreateVirtualBlock',['../group__group__virtual.html#gab585754076877265fdae33e5c40ef13b',1,'vk_mem_alloc.h']]],
['vmadefragment_123',['vmaDefragment',['../group__group__alloc.html#ga9f0f8f56db5f7f57fe4454f465142dac',1,'vk_mem_alloc.h']]],
['vmadefragmentationbegin_124',['vmaDefragmentationBegin',['../group__group__alloc.html#ga36ba776fd7fd5cb1e9359fdc0d8e6e8a',1,'vk_mem_alloc.h']]],
['vmadefragmentationcontext_125',['VmaDefragmentationContext',['../struct_vma_defragmentation_context.html',1,'']]],
['vmadefragmentationend_126',['vmaDefragmentationEnd',['../group__group__alloc.html#ga8774e20e91e245aae959ba63efa15dd2',1,'vk_mem_alloc.h']]],
['vmadefragmentationflagbits_127',['VmaDefragmentationFlagBits',['../group__group__alloc.html#ga13415cc0b443353a7b5abda300b833fc',1,'VmaDefragmentationFlagBits():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#ga6552a65b71d16f378c6994b3ceaef50c',1,'VmaDefragmentationFlagBits():&#160;vk_mem_alloc.h']]],
['vmadefragmentationflags_128',['VmaDefragmentationFlags',['../group__group__alloc.html#ga88a77cef37e5d3c4fc9eb328885d048d',1,'vk_mem_alloc.h']]],
['vmadefragmentationinfo_129',['VmaDefragmentationInfo',['../struct_vma_defragmentation_info.html',1,'VmaDefragmentationInfo'],['../group__group__alloc.html#ga2bf47f96bf92bed2a49461bd9af3acfa',1,'VmaDefragmentationInfo():&#160;vk_mem_alloc.h']]],
['vmadefragmentationinfo2_130',['VmaDefragmentationInfo2',['../struct_vma_defragmentation_info2.html',1,'VmaDefragmentationInfo2'],['../group__group__alloc.html#gad6daeffaa670ce6d11a203a6224c9937',1,'VmaDefragmentationInfo2():&#160;vk_mem_alloc.h']]],
['vmadefragmentationpassinfo_131',['VmaDefragmentationPassInfo',['../struct_vma_defragmentation_pass_info.html',1,'VmaDefragmentationPassInfo'],['../group__group__alloc.html#ga72aebd522242d56abea67b4f47f6549e',1,'VmaDefragmentationPassInfo():&#160;vk_mem_alloc.h']]],
['vmadefragmentationpassmoveinfo_132',['VmaDefragmentationPassMoveInfo',['../struct_vma_defragmentation_pass_move_info.html',1,'VmaDefragmentationPassMoveInfo'],['../group__group__alloc.html#gad6799e8e2b1527abfc84d33bc44aeaf5',1,'VmaDefragmentationPassMoveInfo():&#160;vk_mem_alloc.h']]],
['vmadefragmentationstats_133',['VmaDefragmentationStats',['../struct_vma_defragmentation_stats.html',1,'VmaDefragmentationStats'],['../group__group__alloc.html#gad94034192259c2e34a4d1c5e27810403',1,'VmaDefragmentationStats():&#160;vk_mem_alloc.h']]],
['vmadestroyallocator_134',['vmaDestroyAllocator',['../group__group__init.html#gaa8d164061c88f22fb1fd3c8f3534bc1d',1,'vk_mem_alloc.h']]],
['vmadestroybuffer_135',['vmaDestroyBuffer',['../group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77',1,'vk_mem_alloc.h']]],
['vmadestroyimage_136',['vmaDestroyImage',['../group__group__alloc.html#gae50d2cb3b4a3bfd4dd40987234e50e7e',1,'vk_mem_alloc.h']]],
['vmadestroypool_137',['vmaDestroyPool',['../group__group__alloc.html#ga5485779c8f1948238fc4e92232fa65e1',1,'vk_mem_alloc.h']]],
['vmadestroyvirtualblock_138',['vmaDestroyVirtualBlock',['../group__group__virtual.html#ga3795f7783ae2c182cede067d656f66a5',1,'vk_mem_alloc.h']]],
['vmadevicememorycallbacks_139',['VmaDeviceMemoryCallbacks',['../struct_vma_device_memory_callbacks.html',1,'VmaDeviceMemoryCallbacks'],['../group__group__init.html#ga77692d3c8770ea8882d573206bd27b2b',1,'VmaDeviceMemoryCallbacks():&#160;vk_mem_alloc.h']]],
['vmaenddefragmentationpass_140',['vmaEndDefragmentationPass',['../group__group__alloc.html#ga1b9ffa538bed905af55c747cc48963bd',1,'vk_mem_alloc.h']]],
['vmafindmemorytypeindex_141',['vmaFindMemoryTypeIndex',['../group__group__alloc.html#gaef15a94b58fbcb0fe706d5720e84a74a',1,'vk_mem_alloc.h']]],
['vmafindmemorytypeindexforbufferinfo_142',['vmaFindMemoryTypeIndexForBufferInfo',['../group__group__alloc.html#gae790ab9ffaf7667fb8f62523e6897888',1,'vk_mem_alloc.h']]],
['vmafindmemorytypeindexforimageinfo_143',['vmaFindMemoryTypeIndexForImageInfo',['../group__group__alloc.html#ga088da83d8eaf3ce9056d9ea0b981d472',1,'vk_mem_alloc.h']]],
['vmaflushallocation_144',['vmaFlushAllocation',['../group__group__alloc.html#ga30c37c1eec6025f397be41644f48490f',1,'vk_mem_alloc.h']]],
['vmaflushallocations_145',['vmaFlushAllocations',['../group__group__alloc.html#gac3dd00da721875ed99fa8a881922bdfc',1,'vk_mem_alloc.h']]],
['vmafreememory_146',['vmaFreeMemory',['../group__group__alloc.html#ga5fea5518972ae9094b1526cbcb19b05f',1,'vk_mem_alloc.h']]],
['vmafreememorypages_147',['vmaFreeMemoryPages',['../group__group__alloc.html#ga834b1e4aef395c0a1d56a28e69a4a17e',1,'vk_mem_alloc.h']]],
['vmafreestatsstring_148',['vmaFreeStatsString',['../group__group__stats.html#ga3104eb30d8122c84dd8541063f145288',1,'vk_mem_alloc.h']]],
['vmafreevirtualblockstatsstring_149',['vmaFreeVirtualBlockStatsString',['../group__group__stats.html#ga47fb8d8aa69df4a7c23a9719b4080623',1,'vk_mem_alloc.h']]],
['vmagetallocationinfo_150',['vmaGetAllocationInfo',['../group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b',1,'vk_mem_alloc.h']]],
['vmagetallocationmemoryproperties_151',['vmaGetAllocationMemoryProperties',['../group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1',1,'vk_mem_alloc.h']]],
['vmagetallocatorinfo_152',['vmaGetAllocatorInfo',['../group__group__init.html#gafa02231a791b37255720d566a52683e7',1,'vk_mem_alloc.h']]],
['vmagetheapbudgets_153',['vmaGetHeapBudgets',['../group__group__stats.html#ga9f88db9d46a432c0ad7278cecbc5eaa7',1,'vk_mem_alloc.h']]],
['vmagetmemoryproperties_154',['vmaGetMemoryProperties',['../group__group__init.html#gab88db292a17974f911182543fda52d19',1,'vk_mem_alloc.h']]],
['vmagetmemorytypeproperties_155',['vmaGetMemoryTypeProperties',['../group__group__init.html#ga8701444752eb5de4464adb5a2b514bca',1,'vk_mem_alloc.h']]],
['vmagetphysicaldeviceproperties_156',['vmaGetPhysicalDeviceProperties',['../group__group__init.html#gaecabf7b6e91ea87d0316fa0a9e014fe0',1,'vk_mem_alloc.h']]],
['vmagetpoolname_157',['vmaGetPoolName',['../group__group__alloc.html#gaf09b4e4eafdbee812e8d73ddf960f030',1,'vk_mem_alloc.h']]],
['vmagetpoolstats_158',['vmaGetPoolStats',['../group__group__stats.html#gae8bf76997b234ef68aad922616df4153',1,'vk_mem_alloc.h']]],
['vmagetvirtualallocationinfo_159',['vmaGetVirtualAllocationInfo',['../group__group__virtual.html#ga8ee14ceb1fe033ec84d8aa29e1f75afa',1,'vk_mem_alloc.h']]],
['vmainvalidateallocation_160',['vmaInvalidateAllocation',['../group__group__alloc.html#gaaa8412919139ef413a4215ac6a290fae',1,'vk_mem_alloc.h']]],
['vmainvalidateallocations_161',['vmaInvalidateAllocations',['../group__group__alloc.html#gab25b558d75f7378ec944a1522fdcc3c5',1,'vk_mem_alloc.h']]],
['vmaisvirtualblockempty_162',['vmaIsVirtualBlockEmpty',['../group__group__virtual.html#gacd53b5b1d23f8fcbad692ccfdc1811f1',1,'vk_mem_alloc.h']]],
['vmamapmemory_163',['vmaMapMemory',['../group__group__alloc.html#gad5bd1243512d099706de88168992f069',1,'vk_mem_alloc.h']]],
['vmamemoryusage_164',['VmaMemoryUsage',['../group__group__alloc.html#gaa5846affa1e9da3800e3e78fae2305cc',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#ga806e8499dde802e59eb72a1dc811c35f',1,'VmaMemoryUsage():&#160;vk_mem_alloc.h']]],
['vmapool_165',['VmaPool',['../struct_vma_pool.html',1,'']]],
['vmapoolcreateflagbits_166',['VmaPoolCreateFlagBits',['../group__group__alloc.html#ga4d4f2efc2509157a9e4ecd4fd7942303',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__alloc.html#ga9a7c45f9c863695d98c83fa5ac940fe7',1,'VmaPoolCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmapoolcreateflags_167',['VmaPoolCreateFlags',['../group__group__alloc.html#ga2770e325ea42e087c1b91fdf46d0292a',1,'vk_mem_alloc.h']]],
['vmapoolcreateinfo_168',['VmaPoolCreateInfo',['../struct_vma_pool_create_info.html',1,'VmaPoolCreateInfo'],['../group__group__alloc.html#ga1017aa83489c0eee8d2163d2bf253f67',1,'VmaPoolCreateInfo():&#160;vk_mem_alloc.h']]],
['vmapoolstats_169',['VmaPoolStats',['../struct_vma_pool_stats.html',1,'VmaPoolStats'],['../group__group__stats.html#ga4759a2d9f99c19ba7627553c847132f1',1,'VmaPoolStats():&#160;vk_mem_alloc.h']]],
['vmasetallocationuserdata_170',['vmaSetAllocationUserData',['../group__group__alloc.html#gaf9147d31ffc11d62fc187bde283ed14f',1,'vk_mem_alloc.h']]],
['vmasetcurrentframeindex_171',['vmaSetCurrentFrameIndex',['../group__group__init.html#gade56bf8dc9f5a5eaddf5f119ed525236',1,'vk_mem_alloc.h']]],
['vmasetpoolname_172',['vmaSetPoolName',['../group__group__alloc.html#gadbae3a0b4ab078024462fc85c37f3b58',1,'vk_mem_alloc.h']]],
['vmasetvirtualallocationuserdata_173',['vmaSetVirtualAllocationUserData',['../group__group__virtual.html#ga001ea1850458a4062b829e09c303fca2',1,'vk_mem_alloc.h']]],
['vmastatinfo_174',['VmaStatInfo',['../group__group__stats.html#gaec5b57e29c97b5d69c6d5654d60df878',1,'VmaStatInfo():&#160;vk_mem_alloc.h'],['../struct_vma_stat_info.html',1,'VmaStatInfo']]],
['vmastats_175',['VmaStats',['../struct_vma_stats.html',1,'VmaStats'],['../group__group__stats.html#ga21813b2efdf3836767a9058cd8a94034',1,'VmaStats():&#160;vk_mem_alloc.h']]],
['vmaunmapmemory_176',['vmaUnmapMemory',['../group__group__alloc.html#ga9bc268595cb33f6ec4d519cfce81ff45',1,'vk_mem_alloc.h']]],
['vmavirtualallocate_177',['vmaVirtualAllocate',['../group__group__virtual.html#ga6b7cdcc1c3e5103c323fedc4e1319e01',1,'vk_mem_alloc.h']]],
['vmavirtualallocation_178',['VmaVirtualAllocation',['../struct_vma_virtual_allocation.html',1,'']]],
['vmavirtualallocationcreateflagbits_179',['VmaVirtualAllocationCreateFlagBits',['../group__group__virtual.html#ga2e9c64d405b14156fea7e10c4ad06cb6',1,'VmaVirtualAllocationCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__virtual.html#ga936815e64946a6b6d812d08d10184c23',1,'VmaVirtualAllocationCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmavirtualallocationcreateflags_180',['VmaVirtualAllocationCreateFlags',['../group__group__virtual.html#gae96ffc099bf898257fb19e9410ed08a7',1,'vk_mem_alloc.h']]],
['vmavirtualallocationcreateinfo_181',['VmaVirtualAllocationCreateInfo',['../struct_vma_virtual_allocation_create_info.html',1,'VmaVirtualAllocationCreateInfo'],['../group__group__virtual.html#gac3c90d80bedc6847a41b82d0e2158c9e',1,'VmaVirtualAllocationCreateInfo():&#160;vk_mem_alloc.h']]],
['vmavirtualallocationinfo_182',['VmaVirtualAllocationInfo',['../struct_vma_virtual_allocation_info.html',1,'VmaVirtualAllocationInfo'],['../group__group__virtual.html#ga75bc33ff7cf18c98e101f570dc2a5ebc',1,'VmaVirtualAllocationInfo():&#160;vk_mem_alloc.h']]],
['vmavirtualblock_183',['VmaVirtualBlock',['../struct_vma_virtual_block.html',1,'']]],
['vmavirtualblockcreateflagbits_184',['VmaVirtualBlockCreateFlagBits',['../group__group__virtual.html#ga88bcf8c1cd3bb1610ff7343811c65bca',1,'VmaVirtualBlockCreateFlagBits():&#160;vk_mem_alloc.h'],['../group__group__virtual.html#ga0860ba1c0a67178fae4aecb63a78573e',1,'VmaVirtualBlockCreateFlagBits():&#160;vk_mem_alloc.h']]],
['vmavirtualblockcreateflags_185',['VmaVirtualBlockCreateFlags',['../group__group__virtual.html#ga4e49c2f0ab7f6b4868833e5bac78d91e',1,'vk_mem_alloc.h']]],
['vmavirtualblockcreateinfo_186',['VmaVirtualBlockCreateInfo',['../group__group__virtual.html#ga4753d42d40217a3a652a3cdf253ad773',1,'VmaVirtualBlockCreateInfo():&#160;vk_mem_alloc.h'],['../struct_vma_virtual_block_create_info.html',1,'VmaVirtualBlockCreateInfo']]],
['vmavirtualfree_187',['vmaVirtualFree',['../group__group__virtual.html#ga09fc688c0c3653ff23723b037e5d5033',1,'vk_mem_alloc.h']]],
['vmavulkanfunctions_188',['VmaVulkanFunctions',['../group__group__init.html#gabb0a8e3b5040d847571cca6c7f9a8074',1,'VmaVulkanFunctions():&#160;vk_mem_alloc.h'],['../struct_vma_vulkan_functions.html',1,'VmaVulkanFunctions']]],
['vulkan_20memory_20allocator_189',['Vulkan Memory Allocator',['../index.html',1,'']]],
['vulkanapiversion_190',['vulkanApiVersion',['../struct_vma_allocator_create_info.html#ae0ffc55139b54520a6bb704b29ffc285',1,'VmaAllocatorCreateInfo']]]
];

View File

@ -1,9 +1,8 @@
var searchData=
[
['vk_5ferror_5funknown_0',['VK_ERROR_UNKNOWN',['../vk__mem__alloc_8h.html#a162894cbe84f7d76632eb9af1e4b3558',1,'vk_mem_alloc.h']]],
['vma_5fbind_5fmemory2_1',['VMA_BIND_MEMORY2',['../vk__mem__alloc_8h.html#a88bef97f86d70a34a4c0746e09a2680d',1,'vk_mem_alloc.h']]],
['vma_5fbuffer_5fdevice_5faddress_2',['VMA_BUFFER_DEVICE_ADDRESS',['../vk__mem__alloc_8h.html#a7f9d5e71b70dd1a137c303a8a8262c10',1,'vk_mem_alloc.h']]],
['vma_5fdedicated_5fallocation_3',['VMA_DEDICATED_ALLOCATION',['../vk__mem__alloc_8h.html#af7b860e63b96d11e44ae8587ba06bbf4',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fbudget_4',['VMA_MEMORY_BUDGET',['../vk__mem__alloc_8h.html#a05decf1cf4ebf767beba7acca6c1ec3a',1,'vk_mem_alloc.h']]],
['vma_5fstats_5fstring_5fenabled_5',['VMA_STATS_STRING_ENABLED',['../vk__mem__alloc_8h.html#ae25f0d55fd91cb166f002b63244800e1',1,'vk_mem_alloc.h']]]
['vma_5fbind_5fmemory2_0',['VMA_BIND_MEMORY2',['../vk__mem__alloc_8h.html#a88bef97f86d70a34a4c0746e09a2680d',1,'vk_mem_alloc.h']]],
['vma_5fbuffer_5fdevice_5faddress_1',['VMA_BUFFER_DEVICE_ADDRESS',['../vk__mem__alloc_8h.html#a7f9d5e71b70dd1a137c303a8a8262c10',1,'vk_mem_alloc.h']]],
['vma_5fdedicated_5fallocation_2',['VMA_DEDICATED_ALLOCATION',['../vk__mem__alloc_8h.html#af7b860e63b96d11e44ae8587ba06bbf4',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fbudget_3',['VMA_MEMORY_BUDGET',['../vk__mem__alloc_8h.html#a05decf1cf4ebf767beba7acca6c1ec3a',1,'vk_mem_alloc.h']]],
['vma_5fstats_5fstring_5fenabled_4',['VMA_STATS_STRING_ENABLED',['../vk__mem__alloc_8h.html#ae25f0d55fd91cb166f002b63244800e1',1,'vk_mem_alloc.h']]]
];

View File

@ -4,50 +4,56 @@ var searchData=
['vma_5fallocation_5fcreate_5fdedicated_5fmemory_5fbit_1',['VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fdont_5fbind_5fbit_2',['VMA_ALLOCATION_CREATE_DONT_BIND_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a2310568c62208af432724305fe29ccea',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum_3',['VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fmapped_5fbit_4',['VMA_ALLOCATION_CREATE_MAPPED_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fnever_5fallocate_5fbit_5',['VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f1_5fbit_6',['VMA_ALLOCATION_CREATE_RESERVED_1_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f2_5fbit_7',['VMA_ALLOCATION_CREATE_RESERVED_2_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fbest_5ffit_5fbit_8',['VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5ffirst_5ffit_5fbit_9',['VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmask_10',['VMA_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8e16845d81ae3d27c47106d4770d5c7e',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_11',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_12',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fupper_5faddress_5fbit_13',['VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a42ba3a2d2c7117953210b7c3ef8da0df',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fuser_5fdata_5fcopy_5fstring_5fbit_14',['VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fwithin_5fbudget_5fbit_15',['VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ab8b1764f3e9022368e440c057783b92d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5famd_5fdevice_5fcoherent_5fmemory_5fbit_16',['VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca2acce4886d8078552efa38878413970f',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fbuffer_5fdevice_5faddress_5fbit_17',['VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca5f1b28b0414319d1687e1f2b30ab0089',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fbudget_5fbit_18',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4d4687863f7bd4b418c6006dc04400b0',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fpriority_5fbit_19',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fexternally_5fsynchronized_5fbit_20',['VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fflag_5fbits_5fmax_5fenum_21',['VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fbind_5fmemory2_5fbit_22',['VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca8fb75bf07cd184ab903596295e863dee',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fdedicated_5fallocation_5fbit_23',['VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fbits_5fmax_5fenum_24',['VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50cab87ec33154803bfeb5ac2b379f1d6a97',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fincremental_25',['VMA_DEFRAGMENTATION_FLAG_INCREMENTAL',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50ca31af49446af2459284a568ce2f3fdd33',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fcopy_26',['VMA_MEMORY_USAGE_CPU_COPY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fonly_27',['VMA_MEMORY_USAGE_CPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fto_5fgpu_28',['VMA_MEMORY_USAGE_CPU_TO_GPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5flazily_5fallocated_29',['VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fonly_30',['VMA_MEMORY_USAGE_GPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fto_5fcpu_31',['VMA_MEMORY_USAGE_GPU_TO_CPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fmax_5fenum_32',['VMA_MEMORY_USAGE_MAX_ENUM',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5funknown_33',['VMA_MEMORY_USAGE_UNKNOWN',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5falgorithm_5fmask_34',['VMA_POOL_CREATE_ALGORITHM_MASK',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7af4d270f8f42517a0f70037ceb6ac1d9c',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fbuddy_5falgorithm_5fbit_35',['VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a97a0dc38e5161b780594d998d313d35e',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fflag_5fbits_5fmax_5fenum_36',['VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fignore_5fbuffer_5fimage_5fgranularity_5fbit_37',['VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5flinear_5falgorithm_5fbit_38',['VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a13c8a444197c67866be9cb05599fc726',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5ftlsf_5falgorithm_5fbit_39',['VMA_POOL_CREATE_TLSF_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a855ee6e02e46d835ee28c8cd596b7e32',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum_40',['VMA_VIRTUAL_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac1163c03ea837fa663462dc286d6a1a9',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmask_41',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac5b5e45c335368d18df59c9f27df17e3',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_42',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ae2a9591a62b5e3b1bdcbc81c6188a1bf',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_43',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a562d10a46012719d33167d3dc5dbbf9b',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fupper_5faddress_5fbit_44',['VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a9524a329a55b5ec390d57d90b67ad78e',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5falgorithm_5fmask_45',['VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaaf9487467136e1a9e371894dc3a7c4844',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fbuddy_5falgorithm_5fbit_46',['VMA_VIRTUAL_BLOCK_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa923116612509e26bf84982b9baf25c63',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fflag_5fbits_5fmax_5fenum_47',['VMA_VIRTUAL_BLOCK_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa5fc0d333c3d5687a8bbf57df9b377a87',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5flinear_5falgorithm_5fbit_48',['VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5ftlsf_5falgorithm_5fbit_49',['VMA_VIRTUAL_BLOCK_CREATE_TLSF_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa4db7cb39f9c0f1a4b71c5f76b4cfa691',1,'vk_mem_alloc.h']]]
['vma_5fallocation_5fcreate_5fhost_5faccess_5fallow_5ftransfer_5finstead_5fbit_4',['VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fhost_5faccess_5frandom_5fbit_5',['VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fhost_5faccess_5fsequential_5fwrite_5fbit_6',['VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fmapped_5fbit_7',['VMA_ALLOCATION_CREATE_MAPPED_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fnever_5fallocate_5fbit_8',['VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f1_5fbit_9',['VMA_ALLOCATION_CREATE_RESERVED_1_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ad7e8035e8edecd8dfa1f32a194bdf103',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5freserved_5f2_5fbit_10',['VMA_ALLOCATION_CREATE_RESERVED_2_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae9290dbcf5817e7616d5802e2aa251e7',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fbest_5ffit_5fbit_11',['VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5ffirst_5ffit_5fbit_12',['VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmask_13',['VMA_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8e16845d81ae3d27c47106d4770d5c7e',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_14',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_15',['VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fupper_5faddress_5fbit_16',['VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a42ba3a2d2c7117953210b7c3ef8da0df',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fuser_5fdata_5fcopy_5fstring_5fbit_17',['VMA_ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597aa6f24f821cd6a7c5e4a443f7bf59c520',1,'vk_mem_alloc.h']]],
['vma_5fallocation_5fcreate_5fwithin_5fbudget_5fbit_18',['VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT',['../group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ab8b1764f3e9022368e440c057783b92d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5famd_5fdevice_5fcoherent_5fmemory_5fbit_19',['VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca2acce4886d8078552efa38878413970f',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fbuffer_5fdevice_5faddress_5fbit_20',['VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca5f1b28b0414319d1687e1f2b30ab0089',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fbudget_5fbit_21',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4d4687863f7bd4b418c6006dc04400b0',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fext_5fmemory_5fpriority_5fbit_22',['VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fexternally_5fsynchronized_5fbit_23',['VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fflag_5fbits_5fmax_5fenum_24',['VMA_ALLOCATOR_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cae4d5ad929caba5f23eb502b13bd5286c',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fbind_5fmemory2_5fbit_25',['VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7ca8fb75bf07cd184ab903596295e863dee',1,'vk_mem_alloc.h']]],
['vma_5fallocator_5fcreate_5fkhr_5fdedicated_5fallocation_5fbit_26',['VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT',['../group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fbits_5fmax_5fenum_27',['VMA_DEFRAGMENTATION_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50cab87ec33154803bfeb5ac2b379f1d6a97',1,'vk_mem_alloc.h']]],
['vma_5fdefragmentation_5fflag_5fincremental_28',['VMA_DEFRAGMENTATION_FLAG_INCREMENTAL',['../group__group__alloc.html#gga6552a65b71d16f378c6994b3ceaef50ca31af49446af2459284a568ce2f3fdd33',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fauto_29',['VMA_MEMORY_USAGE_AUTO',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fauto_5fprefer_5fdevice_30',['VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fauto_5fprefer_5fhost_31',['VMA_MEMORY_USAGE_AUTO_PREFER_HOST',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fcopy_32',['VMA_MEMORY_USAGE_CPU_COPY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fonly_33',['VMA_MEMORY_USAGE_CPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fcpu_5fto_5fgpu_34',['VMA_MEMORY_USAGE_CPU_TO_GPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5flazily_5fallocated_35',['VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fonly_36',['VMA_MEMORY_USAGE_GPU_ONLY',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fgpu_5fto_5fcpu_37',['VMA_MEMORY_USAGE_GPU_TO_CPU',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5fmax_5fenum_38',['VMA_MEMORY_USAGE_MAX_ENUM',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e',1,'vk_mem_alloc.h']]],
['vma_5fmemory_5fusage_5funknown_39',['VMA_MEMORY_USAGE_UNKNOWN',['../group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccaf50d27e34e0925cf3a63db8c839121dd',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5falgorithm_5fmask_40',['VMA_POOL_CREATE_ALGORITHM_MASK',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7af4d270f8f42517a0f70037ceb6ac1d9c',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fbuddy_5falgorithm_5fbit_41',['VMA_POOL_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a97a0dc38e5161b780594d998d313d35e',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fflag_5fbits_5fmax_5fenum_42',['VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5fignore_5fbuffer_5fimage_5fgranularity_5fbit_43',['VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5flinear_5falgorithm_5fbit_44',['VMA_POOL_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a13c8a444197c67866be9cb05599fc726',1,'vk_mem_alloc.h']]],
['vma_5fpool_5fcreate_5ftlsf_5falgorithm_5fbit_45',['VMA_POOL_CREATE_TLSF_ALGORITHM_BIT',['../group__group__alloc.html#gga9a7c45f9c863695d98c83fa5ac940fe7a855ee6e02e46d835ee28c8cd596b7e32',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum_46',['VMA_VIRTUAL_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac1163c03ea837fa663462dc286d6a1a9',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmask_47',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ac5b5e45c335368d18df59c9f27df17e3',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5fmemory_5fbit_48',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6ae2a9591a62b5e3b1bdcbc81c6188a1bf',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fstrategy_5fmin_5ftime_5fbit_49',['VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a562d10a46012719d33167d3dc5dbbf9b',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fallocation_5fcreate_5fupper_5faddress_5fbit_50',['VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT',['../group__group__virtual.html#gga2e9c64d405b14156fea7e10c4ad06cb6a9524a329a55b5ec390d57d90b67ad78e',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5falgorithm_5fmask_51',['VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaaf9487467136e1a9e371894dc3a7c4844',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fbuddy_5falgorithm_5fbit_52',['VMA_VIRTUAL_BLOCK_CREATE_BUDDY_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa923116612509e26bf84982b9baf25c63',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5fflag_5fbits_5fmax_5fenum_53',['VMA_VIRTUAL_BLOCK_CREATE_FLAG_BITS_MAX_ENUM',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa5fc0d333c3d5687a8bbf57df9b377a87',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5flinear_5falgorithm_5fbit_54',['VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96',1,'vk_mem_alloc.h']]],
['vma_5fvirtual_5fblock_5fcreate_5ftlsf_5falgorithm_5fbit_55',['VMA_VIRTUAL_BLOCK_CREATE_TLSF_ALGORITHM_BIT',['../group__group__virtual.html#gga88bcf8c1cd3bb1610ff7343811c65bcaa4db7cb39f9c0f1a4b71c5f76b4cfa691',1,'vk_mem_alloc.h']]]
];

View File

@ -68,8 +68,6 @@ $(function() {
<p>Represents single memory allocation.
<a href="struct_vma_allocation.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&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>

View File

@ -68,8 +68,6 @@ $(function() {
<div class="headertitle"><div class="title">VmaAllocationCreateInfo Struct Reference<div class="ingroups"><a class="el" href="group__group__alloc.html">Memory allocation</a></div></div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<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="group__group__alloc.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation.">vmaGetAllocationInfo()</a>.
<a href="struct_vma_allocation_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -68,8 +68,6 @@ $(function() {
<p>Represents main object of this library initialized.
<a href="struct_vma_allocator.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&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="group__group__init.html#ga200692051ddb34240248234f5f4c17bb" title="Creates VmaAllocator object.">vmaCreateAllocator()</a> to create it. Call function <a class="el" href="group__group__init.html#gaa8d164061c88f22fb1fd3c8f3534bc1d" title="Destroys allocator object.">vmaDestroyAllocator()</a> to destroy it.</p>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Description of a Allocator to be created.
<a href="struct_vma_allocator_create_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Information about existing <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized.">VmaAllocator</a> object.
<a href="struct_vma_allocator_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Statistics of current memory usage and available budget, in bytes, for specific memory heap.
<a href="struct_vma_budget.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -68,8 +68,6 @@ $(function() {
<p>Represents Opaque object that represents started defragmentation process.
<a href="struct_vma_defragmentation_context.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Represents Opaque object that represents started defragmentation process. </p>
<p >Fill structure <a class="el" href="struct_vma_defragmentation_info2.html" title="Parameters for defragmentation.">VmaDefragmentationInfo2</a> and call function <a class="el" href="group__group__alloc.html#ga36ba776fd7fd5cb1e9359fdc0d8e6e8a" title="Begins defragmentation process.">vmaDefragmentationBegin()</a> to create it. Call function <a class="el" href="group__group__alloc.html#ga8774e20e91e245aae959ba63efa15dd2" title="Ends defragmentation process.">vmaDefragmentationEnd()</a> to destroy it. </p>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Deprecated. Optional configuration parameters to be passed to function <a class="el" href="group__group__alloc.html#ga9f0f8f56db5f7f57fe4454f465142dac" title="Deprecated. Compacts memory by moving allocations.">vmaDefragment()</a>.
<a href="struct_vma_defragmentation_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Parameters for defragmentation.
<a href="struct_vma_defragmentation_info2.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Parameters for incremental defragmentation steps.
<a href="struct_vma_defragmentation_pass_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -68,8 +68,6 @@ $(function() {
<div class="headertitle"><div class="title">VmaDefragmentationPassMoveInfo Struct Reference<div class="ingroups"><a class="el" href="group__group__alloc.html">Memory allocation</a></div></div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Statistics returned by function <a class="el" href="group__group__alloc.html#ga9f0f8f56db5f7f57fe4454f465142dac" title="Deprecated. Compacts memory by moving allocations.">vmaDefragment()</a>.
<a href="struct_vma_defragmentation_stats.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code>.
<a href="struct_vma_device_memory_callbacks.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -68,8 +68,6 @@ $(function() {
<p>Represents custom memory pool.
<a href="struct_vma_pool.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&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="group__group__alloc.html#ga5c8770ded7c59c8caac6de0c2cb00b50" title="Allocates Vulkan device memory and creates VmaPool object.">vmaCreatePool()</a> to create it. Call function <a class="el" href="group__group__alloc.html#ga5485779c8f1948238fc4e92232fa65e1" title="Destroys VmaPool object and frees Vulkan device memory.">vmaDestroyPool()</a> to destroy it.</p>

View File

@ -71,8 +71,6 @@ $(function() {
<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;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<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;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Calculated statistics of memory usage in entire allocator.
<a href="struct_vma_stat_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>General statistics from current state of Allocator.
<a href="struct_vma_stats.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -68,8 +68,6 @@ $(function() {
<p>Represents single memory allocation done inside <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>.
<a href="struct_vma_virtual_allocation.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Represents single memory allocation done inside <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>. </p>
<p >Use it as a unique identifier to virtual allocation within the single block.</p>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Parameters of created virtual allocation to be passed to <a class="el" href="group__group__virtual.html#ga6b7cdcc1c3e5103c323fedc4e1319e01" title="Allocates new virtual allocation inside given VmaVirtualBlock.">vmaVirtualAllocate()</a>.
<a href="struct_vma_virtual_allocation_create_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Parameters of an existing virtual allocation, returned by <a class="el" href="group__group__virtual.html#ga8ee14ceb1fe033ec84d8aa29e1f75afa" title="Returns information about a specific virtual allocation within a virtual block, like its size and pUs...">vmaGetVirtualAllocationInfo()</a>.
<a href="struct_vma_virtual_allocation_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -68,8 +68,6 @@ $(function() {
<p>Handle to a virtual block object that allows to use core allocation algorithm without allocating any real GPU memory.
<a href="struct_vma_virtual_block.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Handle to a virtual block object that allows to use core allocation algorithm without allocating any real GPU memory. </p>
<p >Fill in <a class="el" href="struct_vma_virtual_block_create_info.html" title="Parameters of created VmaVirtualBlock object to be passed to vmaCreateVirtualBlock().">VmaVirtualBlockCreateInfo</a> structure and use <a class="el" href="group__group__virtual.html#gab585754076877265fdae33e5c40ef13b" title="Creates new VmaVirtualBlock object.">vmaCreateVirtualBlock()</a> to create it. Use <a class="el" href="group__group__virtual.html#ga3795f7783ae2c182cede067d656f66a5" title="Destroys VmaVirtualBlock object.">vmaDestroyVirtualBlock()</a> to destroy it. For more information, see documentation chapter <a class="el" href="virtual_allocator.html">Virtual allocator</a>.</p>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Parameters of created <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object to be passed to <a class="el" href="group__group__virtual.html#gab585754076877265fdae33e5c40ef13b" title="Creates new VmaVirtualBlock object.">vmaCreateVirtualBlock()</a>.
<a href="struct_vma_virtual_block_create_info.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -71,8 +71,6 @@ $(function() {
<p>Pointers to some Vulkan functions - a subset used by the library.
<a href="struct_vma_vulkan_functions.html#details">More...</a></p>
<p><code>#include &lt;vk_mem_alloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -69,63 +69,179 @@ $(function() {
<div class="headertitle"><div class="title">Recommended usage patterns </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p >See also slides from talk: <a href="https://www.gdcvault.com/play/1025458/Advanced-Graphics-Techniques-Tutorial-New">Sawicki, Adam. Advanced Graphics Techniques Tutorial: Memory management in Vulkan and DX12. Game Developers Conference, 2018</a></p>
<h1><a class="anchor" id="usage_patterns_common_mistakes"></a>
Common mistakes</h1>
<p ><b>Use of CPU_TO_GPU instead of CPU_ONLY memory</b></p>
<p ><a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">VMA_MEMORY_USAGE_CPU_TO_GPU</a> is recommended only for resources that will be mapped and written by the CPU, as well as read directly by the GPU - like some buffers or textures updated every frame (dynamic). If you create a staging copy of a resource to be written by CPU and then used as a source of transfer to another resource placed in the GPU memory, that staging resource should be created with <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a>. Please read the descriptions of these enums carefully for details.</p>
<p ><b>Unnecessary use of custom pools</b></p>
<p ><a class="el" href="custom_memory_pools.html">Custom memory pools</a> may be useful for special purposes - when you want to keep certain type of resources separate e.g. to reserve minimum amount of memory for them or limit maximum amount of memory they can occupy. For most resources this is not needed and so it is not recommended to create <a class="el" href="struct_vma_pool.html" title="Represents custom memory pool.">VmaPool</a> objects and allocations out of them. Allocating from the default pool is sufficient.</p>
<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>
<div class="textblock"><p >Vulkan gives great flexibility in memory allocation. This chapter shows the most common patterns.</p>
<p >See also slides from talk: <a href="https://www.gdcvault.com/play/1025458/Advanced-Graphics-Techniques-Tutorial-New">Sawicki, Adam. Advanced Graphics Techniques Tutorial: Memory management in Vulkan and DX12. Game Developers Conference, 2018</a></p>
<h1><a class="anchor" id="usage_patterns_gpu_only"></a>
GPU-only resource</h1>
<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="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">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="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" 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="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">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="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">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="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">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 on CPU, as it may be very slow. Also note that textures written directly from the host through a mapped pointer need to be in LINEAR not OPTIMAL layout.</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="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">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 comparably 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>
<p ><b>What to do:</b> Let the library select the optimal memory type, which will likely have <code>VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT</code>.</p>
<div class="fragment"><div class="line">VkImageCreateInfo imgCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO };</div>
<div class="line">imgCreateInfo.imageType = VK_IMAGE_TYPE_2D;</div>
<div class="line">imgCreateInfo.extent.width = 3840;</div>
<div class="line">imgCreateInfo.extent.height = 2160;</div>
<div class="line">imgCreateInfo.extent.depth = 1;</div>
<div class="line">imgCreateInfo.mipLevels = 1;</div>
<div class="line">imgCreateInfo.arrayLayers = 1;</div>
<div class="line">imgCreateInfo.format = VK_FORMAT_R8G8B8A8_UNORM;</div>
<div class="line">imgCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;</div>
<div class="line">imgCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;</div>
<div class="line">imgCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;</div>
<div class="line">imgCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkImage img;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a>(allocator, &amp;imgCreateInfo, &amp;allocCreateInfo, &amp;img, &amp;alloc, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="agroup__group__alloc_html_ga02a94f25679275851a53e82eacbcfc73"><div class="ttname"><a href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a></div><div class="ttdeci">VkResult vmaCreateImage(VmaAllocator allocator, const VkImageCreateInfo *pImageCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkImage *pImage, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div><div class="ttdoc">Function similar to vmaCreateBuffer().</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e"><div class="ttname"><a href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></div><div class="ttdeci">@ VMA_MEMORY_USAGE_AUTO</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:492</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</div><div class="ttdoc">Set this flag if the allocation should have its own memory block.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:528</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html"><div class="ttname"><a href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a></div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1168</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><div class="ttname"><a href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><div class="ttdeci">VmaMemoryUsage usage</div><div class="ttdoc">Intended usage of memory.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1176</div></div>
<div class="ttc" id="astruct_vma_allocation_create_info_html_add09658ac14fe290ace25470ddd6d41b"><div class="ttname"><a href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">VmaAllocationCreateInfo::flags</a></div><div class="ttdeci">VmaAllocationCreateFlags flags</div><div class="ttdoc">Use VmaAllocationCreateFlagBits enum.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1170</div></div>
<div class="ttc" id="astruct_vma_allocation_html"><div class="ttname"><a href="struct_vma_allocation.html">VmaAllocation</a></div><div class="ttdoc">Represents single memory allocation.</div></div>
</div><!-- fragment --><p ><b>Also consider:</b> Consider creating them as dedicated allocations using <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f" 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 with different sizes e.g. when display resolution changes. Prefer to create such resources first and all other GPU resources (like textures and vertex buffers) later.</p>
<h1><a class="anchor" id="usage_patterns_staging_copy_upload"></a>
Staging copy for upload</h1>
<p ><b>When:</b> A "staging" buffer than you want to map and fill from CPU code, then use as a source od transfer to some GPU resource.</p>
<p ><b>What to do:</b> Use flag <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a>. Let the library select the optimal memory type, which will always have <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code>.</p>
<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div>
<div class="line">bufCreateInfo.size = 65536;</div>
<div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> |</div>
<div class="line"> <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buf;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div>
<div class="line"> </div>
<div class="line">...</div>
<div class="line"> </div>
<div class="line">memcpy(allocInfo.<a class="code hl_variable" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, myData, myDataSize);</div>
<div class="ttc" id="agroup__group__alloc_html_gac72ee55598617e8eecca384e746bab51"><div class="ttname"><a href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a></div><div class="ttdeci">VkResult vmaCreateBuffer(VmaAllocator allocator, const VkBufferCreateInfo *pBufferCreateInfo, const VmaAllocationCreateInfo *pAllocationCreateInfo, VkBuffer *pBuffer, VmaAllocation *pAllocation, VmaAllocationInfo *pAllocationInfo)</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_MAPPED_BIT</div><div class="ttdoc">Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:550</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:597</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html"><div class="ttname"><a href="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><div class="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1310</div></div>
<div class="ttc" id="astruct_vma_allocation_info_html_a5eeffbe2d2f30f53370ff14aefbadbe2"><div class="ttname"><a href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">VmaAllocationInfo::pMappedData</a></div><div class="ttdeci">void * pMappedData</div><div class="ttdoc">Pointer to the beginning of this allocation as mapped data.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1352</div></div>
</div><!-- fragment --><p ><b>Also consider:</b> You can map the allocation using <a class="el" href="group__group__alloc.html#gad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a> or you can create it as persistenly mapped using <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>, as in the example above.</p>
<h1><a class="anchor" id="usage_patterns_readback"></a>
Readback</h1>
<p ><b>When:</b> Buffers for data written by or transferred from the GPU that you want to read back on the CPU, e.g. results of some computations.</p>
<p ><b>What to do:</b> Use flag <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a>. Let the library select the optimal memory type, which will always have <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> and <code>VK_MEMORY_PROPERTY_HOST_CACHED_BIT</code>.</p>
<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div>
<div class="line">bufCreateInfo.size = 65536;</div>
<div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> |</div>
<div class="line"> <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buf;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div>
<div class="line"> </div>
<div class="line">...</div>
<div class="line"> </div>
<div class="line">const <span class="keywordtype">float</span>* downloadedData = (<span class="keyword">const</span> <span class="keywordtype">float</span>*)allocInfo.<a class="code hl_variable" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>;</div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:609</div></div>
</div><!-- fragment --><h1><a class="anchor" id="usage_patterns_advanced_data_uploading"></a>
Advanced data uploading</h1>
<p >For resources that you frequently write on CPU via mapped pointer and freqnently read on GPU e.g. as a uniform buffer (also called "dynamic"), multiple options are possible:</p>
<ol type="1">
<li>Create one copy in video memory using <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>, second copy in system memory using <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">VMA_MEMORY_USAGE_CPU_ONLY</a> and submit explicit transfer each time.</li>
<li>Create just a single copy using <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9066b52c5a7079bb74a69aaf8b92ff67">VMA_MEMORY_USAGE_CPU_TO_GPU</a>, map it and fill it on CPU, read it directly on GPU.</li>
<li>Create just a single copy using <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca40bdf4cddeffeb12f43d45ca1286e0a5">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 unnecessary time and memory overhead related to using a second copy and making transfer.</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>
<li>Easiest solution is to have one copy of the resource in <code>HOST_VISIBLE</code> memory, even if it means system RAM (not <code>DEVICE_LOCAL</code>) on systems with a discrete graphics card, and make the device reach out to that resource directly.<ul>
<li>Reads performed by the device will then go through PCI Express bus. The performace of this access may be limited, but it may be fine depending on the size of this resource (whether it is small enough to quickly end up in GPU cache) and the sparsity of access.</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="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccac6b5dc1432d88647aa4cd456246eadf7">VMA_MEMORY_USAGE_GPU_ONLY</a>, second copy in system memory using <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a> and submit explicit tranfer each time.</li>
<li>Create just single copy using <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a>, write to it directly on GPU, map it and read it on CPU.</li>
</li>
<li>On systems with unified memory (e.g. AMD APU or Intel integrated graphics, mobile chips), a memory type may be available that is both <code>HOST_VISIBLE</code> (available for mapping) and <code>DEVICE_LOCAL</code> (fast to access from the GPU). Then, it is likely the best choice for such type of resource.</li>
<li>Systems with a discrete graphics card and separate video memory may or may not expose a memory type that is both <code>HOST_VISIBLE</code> and <code>DEVICE_LOCAL</code>, also known as Base Address Register (BAR). If they do, it represents a piece of VRAM (or entire VRAM, if ReBAR is enabled in the motherboard BIOS) that is available to CPU for mapping.<ul>
<li>Writes performed by the host to that memory go through PCI Express bus. The performance of these writes may be limited, but it may be fine, especially on PCIe 4.0, as long as rules of using uncached and write-combined memory are followed - only sequential writes and no reads.</li>
</ul>
</li>
<li>Finally, you may need or prefer to create a separate copy of the resource in <code>DEVICE_LOCAL</code> memory, a separate "staging" copy in <code>HOST_VISIBLE</code> memory and perform an explicit transfer command between them.</li>
</ol>
<p >You should take some measurements to decide which option is faster in case of your specific resource.</p>
<p >Note that textures accessed directly from the host through a mapped pointer need to be in LINEAR layout, which may slow down their usage on the device. Textures accessed only by the device and transfer operations can use OPTIMAL layout.</p>
<p >If you don't want to specialize your code for specific types of GPUs, you 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>
<p >Thankfully, VMA offers an aid to create and use such resources in the the way optimal for the current Vulkan device. To help the library make the best choice, use flag <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> together with <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</a>. It will then prefer a memory type that is both <code>DEVICE_LOCAL</code> and <code>HOST_VISIBLE</code> (integrated memory or BAR), but if no such memory type is available or allocation from it fails (PC graphics cards have only 256 MB of BAR by default, unless ReBAR is supported and enabled in BIOS), it will fall back to <code>DEVICE_LOCAL</code> memory for fast GPU access. It is then up to you to detect that the allocation ended up in a memory type that is not <code>HOST_VISIBLE</code>, so you need to create another "staging" allocation and perform explicit transfers.</p>
<div class="fragment"><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div>
<div class="line">bufCreateInfo.size = 65536;</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 hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line">allocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> |</div>
<div class="line"> <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</a> |</div>
<div class="line"> <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line"> </div>
<div class="line">VkBuffer buf;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> alloc;</div>
<div class="line"><a class="code hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;bufCreateInfo, &amp;allocCreateInfo, &amp;buf, &amp;alloc, &amp;allocInfo);</div>
<div class="line"> </div>
<div class="line">VkMemoryPropertyFlags memPropFlags;</div>
<div class="line"><a class="code hl_function" href="group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1">vmaGetAllocationMemoryProperties</a>(allocator, alloc, &amp;memPropFlags);</div>
<div class="line"> </div>
<div class="line"><span class="keywordflow">if</span>(memPropFlags &amp; VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Allocation ended up in a mappable memory and is already mapped - write to it directly.</span></div>
<div class="line"> </div>
<div class="line"> <span class="comment">// [Executed in runtime]:</span></div>
<div class="line"> memcpy(allocInfo.<a class="code hl_variable" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, myData, myDataSize);</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 a non-mappable memory - need to transfer.</span></div>
<div class="line"> VkBufferCreateInfo stagingBufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div>
<div class="line"> stagingBufCreateInfo.size = 65536;</div>
<div class="line"> stagingBufCreateInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;</div>
<div class="line"> </div>
<div class="line"> <a class="code hl_struct" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> stagingAllocCreateInfo = {};</div>
<div class="line"> stagingAllocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">usage</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a>;</div>
<div class="line"> stagingAllocCreateInfo.<a class="code hl_variable" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b">flags</a> = <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> |</div>
<div class="line"> <a class="code hl_enumvalue" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f">VMA_ALLOCATION_CREATE_MAPPED_BIT</a>;</div>
<div class="line"> </div>
<div class="line"> VkBuffer stagingBuf;</div>
<div class="line"> <a class="code hl_struct" href="struct_vma_allocation.html">VmaAllocation</a> stagingAlloc;</div>
<div class="line"> <a class="code hl_struct" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> stagingAllocInfo;</div>
<div class="line"> <a class="code hl_function" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &amp;stagingBufCreateInfo, &amp;stagingAllocCreateInfo,</div>
<div class="line"> &amp;stagingBuf, &amp;stagingAlloc, stagingAllocInfo);</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// [Executed in runtime]:</span></div>
<div class="line"> memcpy(stagingAllocInfo.<a class="code hl_variable" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a>, myData, myDataSize);</div>
<div class="line"> VkBufferCopy bufCopy = {</div>
<div class="line"> 0, <span class="comment">// srcOffset</span></div>
<div class="line"> 0, <span class="comment">// dstOffset,</span></div>
<div class="line"> myDataSize); <span class="comment">// size</span></div>
<div class="line"> vkCmdCopyBuffer(cmdBuf, stagingBuf, buf, 1, &amp;bufCopy);</div>
<div class="line">}</div>
<div class="ttc" id="agroup__group__alloc_html_ga571e87dd38e552249b56b1b0b982fad1"><div class="ttname"><a href="group__group__alloc.html#ga571e87dd38e552249b56b1b0b982fad1">vmaGetAllocationMemoryProperties</a></div><div class="ttdeci">void vmaGetAllocationMemoryProperties(VmaAllocator allocator, VmaAllocation allocation, VkMemoryPropertyFlags *pFlags)</div><div class="ttdoc">Given an allocation, returns Property Flags of its memory type.</div></div>
<div class="ttc" id="agroup__group__alloc_html_ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad"><div class="ttname"><a href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:621</div></div>
</div><!-- fragment --><h1><a class="anchor" id="usage_patterns_other_use_cases"></a>
Other use cases</h1>
<p >Here are some other, less obvious use cases and their recommended settings:</p>
<ul>
<li>An image that is used only as transfer source and destination, but it should stay on the device, as it is used to temporarily store a copy of some texture, e.g. from the current to the next frame, for temporal antialiasing or other temporal effects.<ul>
<li>Use <code>VkImageCreateInfo::usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT</code></li>
<li>Use <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory.">VmaAllocationCreateInfo::usage</a> = <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a></li>
</ul>
</li>
<li>An image that is used only as transfer source and destination, but it should be placed in the system RAM despite it doesn't need to be mapped, because it serves as a "swap" copy to evict least recently used textures from VRAM.<ul>
<li>Use <code>VkImageCreateInfo::usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT</code></li>
<li>Use <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory.">VmaAllocationCreateInfo::usage</a> = <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d">VMA_MEMORY_USAGE_AUTO_PREFER_HOST</a>, as VMA needs a hint here to differentiate from the previous case.</li>
</ul>
</li>
<li>A buffer that you want to map and write from the CPU, directly read from the GPU (e.g. as a uniform or vertex buffer), but you have a clear preference to place it in device or host memory due to its large size.<ul>
<li>Use <code>VkBufferCreateInfo::usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT</code></li>
<li>Use <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory.">VmaAllocationCreateInfo::usage</a> = <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327">VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE</a> or <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d">VMA_MEMORY_USAGE_AUTO_PREFER_HOST</a></li>
<li>Use <a class="el" href="struct_vma_allocation_create_info.html#add09658ac14fe290ace25470ddd6d41b" title="Use VmaAllocationCreateFlagBits enum.">VmaAllocationCreateInfo::flags</a> = <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> </li>
</ul>
</li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->

View File

@ -84,8 +84,8 @@ Creating virtual block</h1>
<div class="line"><a class="code hl_struct" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> block;</div>
<div class="line">VkResult res = <a class="code hl_function" href="group__group__virtual.html#gab585754076877265fdae33e5c40ef13b">vmaCreateVirtualBlock</a>(&amp;blockCreateInfo, &amp;block);</div>
<div class="ttc" id="agroup__group__virtual_html_gab585754076877265fdae33e5c40ef13b"><div class="ttname"><a href="group__group__virtual.html#gab585754076877265fdae33e5c40ef13b">vmaCreateVirtualBlock</a></div><div class="ttdeci">VkResult vmaCreateVirtualBlock(const VmaVirtualBlockCreateInfo *pCreateInfo, VmaVirtualBlock *pVirtualBlock)</div><div class="ttdoc">Creates new VmaVirtualBlock object.</div></div>
<div class="ttc" id="astruct_vma_virtual_block_create_info_html"><div class="ttname"><a href="struct_vma_virtual_block_create_info.html">VmaVirtualBlockCreateInfo</a></div><div class="ttdoc">Parameters of created VmaVirtualBlock object to be passed to vmaCreateVirtualBlock().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1445</div></div>
<div class="ttc" id="astruct_vma_virtual_block_create_info_html_a670ab8c6a6e822f3c36781d79e8824e9"><div class="ttname"><a href="struct_vma_virtual_block_create_info.html#a670ab8c6a6e822f3c36781d79e8824e9">VmaVirtualBlockCreateInfo::size</a></div><div class="ttdeci">VkDeviceSize size</div><div class="ttdoc">Total size of the virtual block.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1451</div></div>
<div class="ttc" id="astruct_vma_virtual_block_create_info_html"><div class="ttname"><a href="struct_vma_virtual_block_create_info.html">VmaVirtualBlockCreateInfo</a></div><div class="ttdoc">Parameters of created VmaVirtualBlock object to be passed to vmaCreateVirtualBlock().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1493</div></div>
<div class="ttc" id="astruct_vma_virtual_block_create_info_html_a670ab8c6a6e822f3c36781d79e8824e9"><div class="ttname"><a href="struct_vma_virtual_block_create_info.html#a670ab8c6a6e822f3c36781d79e8824e9">VmaVirtualBlockCreateInfo::size</a></div><div class="ttdeci">VkDeviceSize size</div><div class="ttdoc">Total size of the virtual block.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1499</div></div>
<div class="ttc" id="astruct_vma_virtual_block_html"><div class="ttname"><a href="struct_vma_virtual_block.html">VmaVirtualBlock</a></div><div class="ttdoc">Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...</div></div>
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_making_virtual_allocations"></a>
Making virtual allocations</h1>
@ -111,8 +111,8 @@ Making virtual allocations</h1>
<div class="line"> <span class="comment">// Allocation failed - no space for it could be found. Handle this error!</span></div>
<div class="line">}</div>
<div class="ttc" id="agroup__group__virtual_html_ga6b7cdcc1c3e5103c323fedc4e1319e01"><div class="ttname"><a href="group__group__virtual.html#ga6b7cdcc1c3e5103c323fedc4e1319e01">vmaVirtualAllocate</a></div><div class="ttdeci">VkResult vmaVirtualAllocate(VmaVirtualBlock virtualBlock, const VmaVirtualAllocationCreateInfo *pCreateInfo, VmaVirtualAllocation *pAllocation, VkDeviceSize *pOffset)</div><div class="ttdoc">Allocates new virtual allocation inside given VmaVirtualBlock.</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_create_info_html"><div class="ttname"><a href="struct_vma_virtual_allocation_create_info.html">VmaVirtualAllocationCreateInfo</a></div><div class="ttdoc">Parameters of created virtual allocation to be passed to vmaVirtualAllocate().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1466</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_create_info_html_aae08752b86817abd0d944c6025dc603e"><div class="ttname"><a href="struct_vma_virtual_allocation_create_info.html#aae08752b86817abd0d944c6025dc603e">VmaVirtualAllocationCreateInfo::size</a></div><div class="ttdeci">VkDeviceSize size</div><div class="ttdoc">Size of the allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1471</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_create_info_html"><div class="ttname"><a href="struct_vma_virtual_allocation_create_info.html">VmaVirtualAllocationCreateInfo</a></div><div class="ttdoc">Parameters of created virtual allocation to be passed to vmaVirtualAllocate().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1514</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_create_info_html_aae08752b86817abd0d944c6025dc603e"><div class="ttname"><a href="struct_vma_virtual_allocation_create_info.html#aae08752b86817abd0d944c6025dc603e">VmaVirtualAllocationCreateInfo::size</a></div><div class="ttdeci">VkDeviceSize size</div><div class="ttdoc">Size of the allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1519</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_html"><div class="ttname"><a href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a></div><div class="ttdoc">Represents single memory allocation done inside VmaVirtualBlock.</div></div>
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_deallocation"></a>
Deallocation</h1>
@ -140,8 +140,8 @@ Allocation parameters</h1>
<div class="line"> </div>
<div class="line"><a class="code hl_function" href="group__group__virtual.html#ga09fc688c0c3653ff23723b037e5d5033">vmaVirtualFree</a>(block, alloc);</div>
<div class="ttc" id="agroup__group__virtual_html_ga8ee14ceb1fe033ec84d8aa29e1f75afa"><div class="ttname"><a href="group__group__virtual.html#ga8ee14ceb1fe033ec84d8aa29e1f75afa">vmaGetVirtualAllocationInfo</a></div><div class="ttdeci">void vmaGetVirtualAllocationInfo(VmaVirtualBlock virtualBlock, VmaVirtualAllocation allocation, VmaVirtualAllocationInfo *pVirtualAllocInfo)</div><div class="ttdoc">Returns information about a specific virtual allocation within a virtual block, like its size and pUs...</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_info_html"><div class="ttname"><a href="struct_vma_virtual_allocation_info.html">VmaVirtualAllocationInfo</a></div><div class="ttdoc">Parameters of an existing virtual allocation, returned by vmaGetVirtualAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1489</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_info_html_a41d5cb09357656411653d82fee436f45"><div class="ttname"><a href="struct_vma_virtual_allocation_info.html#a41d5cb09357656411653d82fee436f45">VmaVirtualAllocationInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom pointer associated with the allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1504</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_info_html"><div class="ttname"><a href="struct_vma_virtual_allocation_info.html">VmaVirtualAllocationInfo</a></div><div class="ttdoc">Parameters of an existing virtual allocation, returned by vmaGetVirtualAllocationInfo().</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1537</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_info_html_a41d5cb09357656411653d82fee436f45"><div class="ttname"><a href="struct_vma_virtual_allocation_info.html#a41d5cb09357656411653d82fee436f45">VmaVirtualAllocationInfo::pUserData</a></div><div class="ttdeci">void * pUserData</div><div class="ttdoc">Custom pointer associated with the allocation.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1552</div></div>
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_alignment_and_units"></a>
Alignment and units</h1>
<p >It feels natural to express sizes and offsets in bytes. If an offset of an allocation needs to be aligned to a multiply of some number (e.g. 4 bytes), you can fill optional member <a class="el" href="struct_vma_virtual_allocation_create_info.html#a9d19709872fc1904a105079e1c885821" title="Required alignment of the allocation. Optional.">VmaVirtualAllocationCreateInfo::alignment</a> to request it. Example:</p>
@ -151,7 +151,7 @@ Alignment and units</h1>
<div class="line"> </div>
<div class="line"><a class="code hl_struct" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a> alloc;</div>
<div class="line">res = <a class="code hl_function" href="group__group__virtual.html#ga6b7cdcc1c3e5103c323fedc4e1319e01">vmaVirtualAllocate</a>(block, &amp;allocCreateInfo, &amp;alloc, <span class="keyword">nullptr</span>);</div>
<div class="ttc" id="astruct_vma_virtual_allocation_create_info_html_a9d19709872fc1904a105079e1c885821"><div class="ttname"><a href="struct_vma_virtual_allocation_create_info.html#a9d19709872fc1904a105079e1c885821">VmaVirtualAllocationCreateInfo::alignment</a></div><div class="ttdeci">VkDeviceSize alignment</div><div class="ttdoc">Required alignment of the allocation. Optional.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1476</div></div>
<div class="ttc" id="astruct_vma_virtual_allocation_create_info_html_a9d19709872fc1904a105079e1c885821"><div class="ttname"><a href="struct_vma_virtual_allocation_create_info.html#a9d19709872fc1904a105079e1c885821">VmaVirtualAllocationCreateInfo::alignment</a></div><div class="ttdeci">VkDeviceSize alignment</div><div class="ttdoc">Required alignment of the allocation. Optional.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1524</div></div>
</div><!-- fragment --><p >Alignments of different allocations made from one block may vary. However, if all alignments and sizes are always multiply of some size e.g. 4 B or <code>sizeof(MyDataStruct)</code>, you can express all sizes, alignments, and offsets in multiples of that size instead of individual bytes. It might be more convenient, but you need to make sure to use this new unit consistently in all the places:</p>
<ul>
<li><a class="el" href="struct_vma_virtual_block_create_info.html#a670ab8c6a6e822f3c36781d79e8824e9" title="Total size of the virtual block.">VmaVirtualBlockCreateInfo::size</a></li>
@ -166,9 +166,9 @@ Statistics</h1>
<div class="line">printf(<span class="stringliteral">&quot;My virtual block has %llu bytes used by %u virtual allocations\n&quot;</span>,</div>
<div class="line"> statInfo.<a class="code hl_variable" href="struct_vma_stat_info.html#ab0c6c73837e5a70c749fbd4f6064895a">usedBytes</a>, statInfo.<a class="code hl_variable" href="struct_vma_stat_info.html#a537741e4d5cdddc1c0ab95ec650afaff">allocationCount</a>);</div>
<div class="ttc" id="agroup__group__virtual_html_ga95169b4730e94757897470086ec2768a"><div class="ttname"><a href="group__group__virtual.html#ga95169b4730e94757897470086ec2768a">vmaCalculateVirtualBlockStats</a></div><div class="ttdeci">void vmaCalculateVirtualBlockStats(VmaVirtualBlock virtualBlock, VmaStatInfo *pStatInfo)</div><div class="ttdoc">Calculates and returns statistics about virtual allocations and memory usage in given VmaVirtualBlock...</div></div>
<div class="ttc" id="astruct_vma_stat_info_html"><div class="ttname"><a href="struct_vma_stat_info.html">VmaStatInfo</a></div><div class="ttdoc">Calculated statistics of memory usage in entire allocator.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1052</div></div>
<div class="ttc" id="astruct_vma_stat_info_html_a537741e4d5cdddc1c0ab95ec650afaff"><div class="ttname"><a href="struct_vma_stat_info.html#a537741e4d5cdddc1c0ab95ec650afaff">VmaStatInfo::allocationCount</a></div><div class="ttdeci">uint32_t allocationCount</div><div class="ttdoc">Number of VmaAllocation allocation objects allocated.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1056</div></div>
<div class="ttc" id="astruct_vma_stat_info_html_ab0c6c73837e5a70c749fbd4f6064895a"><div class="ttname"><a href="struct_vma_stat_info.html#ab0c6c73837e5a70c749fbd4f6064895a">VmaStatInfo::usedBytes</a></div><div class="ttdeci">VkDeviceSize usedBytes</div><div class="ttdoc">Total number of bytes occupied by all allocations.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1060</div></div>
<div class="ttc" id="astruct_vma_stat_info_html"><div class="ttname"><a href="struct_vma_stat_info.html">VmaStatInfo</a></div><div class="ttdoc">Calculated statistics of memory usage in entire allocator.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1100</div></div>
<div class="ttc" id="astruct_vma_stat_info_html_a537741e4d5cdddc1c0ab95ec650afaff"><div class="ttname"><a href="struct_vma_stat_info.html#a537741e4d5cdddc1c0ab95ec650afaff">VmaStatInfo::allocationCount</a></div><div class="ttdeci">uint32_t allocationCount</div><div class="ttdoc">Number of VmaAllocation allocation objects allocated.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1104</div></div>
<div class="ttc" id="astruct_vma_stat_info_html_ab0c6c73837e5a70c749fbd4f6064895a"><div class="ttname"><a href="struct_vma_stat_info.html#ab0c6c73837e5a70c749fbd4f6064895a">VmaStatInfo::usedBytes</a></div><div class="ttdeci">VkDeviceSize usedBytes</div><div class="ttdoc">Total number of bytes occupied by all allocations.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:1108</div></div>
</div><!-- fragment --><p >You can also request a full list of allocations and free regions as a string in JSON format by calling <a class="el" href="group__group__stats.html#ga52d810e1222c592e5d80556ad005f1e6" title="Builds and returns a null-terminated string in JSON format with information about given VmaVirtualBlo...">vmaBuildVirtualBlockStatsString()</a>. Returned string must be later freed using <a class="el" href="group__group__stats.html#ga47fb8d8aa69df4a7c23a9719b4080623" title="Frees a string returned by vmaBuildVirtualBlockStatsString().">vmaFreeVirtualBlockStatsString()</a>. The format of this string differs from the one returned by the main Vulkan allocator, but it is similar.</p>
<h1><a class="anchor" id="virtual_allocator_additional_considerations"></a>
Additional considerations</h1>

View File

@ -137,8 +137,6 @@ Classes</h2></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a162894cbe84f7d76632eb9af1e4b3558"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a162894cbe84f7d76632eb9af1e4b3558">VK_ERROR_UNKNOWN</a>&#160;&#160;&#160;((VkResult)-13)</td></tr>
<tr class="separator:a162894cbe84f7d76632eb9af1e4b3558"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7b860e63b96d11e44ae8587ba06bbf4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#af7b860e63b96d11e44ae8587ba06bbf4">VMA_DEDICATED_ALLOCATION</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:af7b860e63b96d11e44ae8587ba06bbf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88bef97f86d70a34a4c0746e09a2680d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vk__mem__alloc_8h.html#a88bef97f86d70a34a4c0746e09a2680d">VMA_BIND_MEMORY2</a>&#160;&#160;&#160;0</td></tr>
@ -275,6 +273,10 @@ Enumerations</h2></td></tr>
&#160;&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca7b586d2fdaf82a463b58f581ed72be27">VMA_MEMORY_USAGE_GPU_TO_CPU</a> = 4
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca416a444d4d0fc20067c3f76f32ff2500">VMA_MEMORY_USAGE_CPU_COPY</a> = 5
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca835333d9072db63a653818030e17614d">VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED</a> = 6
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca27cde9026a84d34d525777baa41fce6e">VMA_MEMORY_USAGE_AUTO</a> = 7
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305ccae2adb696d6a73c18bb20c23666661327">VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE</a> = 8
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca9b422585242160b8ed3418310ee6664d">VMA_MEMORY_USAGE_AUTO_PREFER_HOST</a> = 9
, <a class="el" href="group__group__alloc.html#ggaa5846affa1e9da3800e3e78fae2305cca091e69437ef693e8d0d287f1c719ba6e">VMA_MEMORY_USAGE_MAX_ENUM</a> = 0x7FFFFFFF
<br />
}</td></tr>
@ -293,11 +295,15 @@ Enumerations</h2></td></tr>
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ab8b1764f3e9022368e440c057783b92d">VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT</a> = 0x00000100
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597afb0ee060cd733aaa5e249704ff589ad6">VMA_ALLOCATION_CREATE_CAN_ALIAS_BIT</a> = 0x00000200
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a9be224df3bfc1cfa06203aed689a30c5">VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT</a> = 0x00000400
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597add61238d98e20917b9a06c617763f492">VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT</a> = 0x00000800
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a11337f96eacf34c1016c339eac165cad">VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT</a> = 0x00001000
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8af1210cf591784afa026d94998f735d">VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT</a> = 0x00010000
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a0729e932b7ea170e3a128cad96c5cf6d">VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT</a> = 0x00020000
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d">VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT
, <br />
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a839826775c62319466441f86496f036d">VMA_ALLOCATION_CREATE_STRATEGY_BEST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777">VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT
&#160;&#160;<a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a33eb2052674f3ad92386c714a65fb777">VMA_ALLOCATION_CREATE_STRATEGY_FIRST_FIT_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a8e16845d81ae3d27c47106d4770d5c7e">VMA_ALLOCATION_CREATE_STRATEGY_MASK</a>
, <a class="el" href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882">VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF
<br />
@ -526,20 +532,6 @@ Functions</h2></td></tr>
<tr class="separator:ga3104eb30d8122c84dd8541063f145288"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a162894cbe84f7d76632eb9af1e4b3558" name="a162894cbe84f7d76632eb9af1e4b3558"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a162894cbe84f7d76632eb9af1e4b3558">&#9670;&nbsp;</a></span>VK_ERROR_UNKNOWN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define VK_ERROR_UNKNOWN&#160;&#160;&#160;((VkResult)-13)</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a88bef97f86d70a34a4c0746e09a2680d" name="a88bef97f86d70a34a4c0746e09a2680d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88bef97f86d70a34a4c0746e09a2680d">&#9670;&nbsp;</a></span>VMA_BIND_MEMORY2</h2>

View File

@ -83,7 +83,7 @@ Initialization</h1>
Usage</h1>
<p >After following steps described above, you can create VMA allocations and custom pools out of the special <code>DEVICE_COHERENT</code> and <code>DEVICE_UNCACHED</code> memory types on eligible devices. There are multiple ways to do it, for example:</p>
<ul>
<li>You can request or prefer to allocate out of such memory types by adding <code>VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD</code> to <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> or <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>. Those flags can be freely mixed with other ways of <a class="el" href="choosing_memory_type.html">Choosing memory type</a>, like setting <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory.">VmaAllocationCreateInfo::usage</a>.</li>
<li>You can request or prefer to allocate out of such memory types by adding <code>VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD</code> to <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> or <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>. Those flags can be freely mixed with other ways of <a class="el" href="choosing_memory_type.html">Choosing memory type</a>, like setting <a class="el" href="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910" title="Intended usage of memory.">VmaAllocationCreateInfo::usage</a>.</li>
<li>If you manually found memory type index to use for this purpose, force allocation from this specific index by setting <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> <code>= 1u &lt;&lt; index</code>.</li>
</ul>
<h1><a class="anchor" id="vk_amd_device_coherent_memory_more_information"></a>

View File

@ -69,23 +69,25 @@ $(function() {
<div class="headertitle"><div class="title">VK_KHR_dedicated_allocation </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p >VK_KHR_dedicated_allocation is a Vulkan extension which can be used to improve performance on some GPUs. It augments Vulkan API with possibility to query driver whether it prefers particular buffer or image to have its own, dedicated allocation (separate <code>VkDeviceMemory</code> block) for better efficiency - to be able to do some internal optimizations.</p>
<p >The extension is supported by this library. It will be used automatically when enabled. To enable it:</p>
<div class="textblock"><p >VK_KHR_dedicated_allocation is a Vulkan extension which can be used to improve performance on some GPUs. It augments Vulkan API with possibility to query driver whether it prefers particular buffer or image to have its own, dedicated allocation (separate <code>VkDeviceMemory</code> block) for better efficiency - to be able to do some internal optimizations. The extension is supported by this library. It will be used automatically when enabled.</p>
<p >It has been promoted to core Vulkan 1.1, so if you use eligible Vulkan version and inform VMA about it by setting <a class="el" href="struct_vma_allocator_create_info.html#ae0ffc55139b54520a6bb704b29ffc285" title="Optional. The highest version of Vulkan that the application is designed to use.">VmaAllocatorCreateInfo::vulkanApiVersion</a>, you are all set.</p>
<p >Otherwise, if you want to use it as an extension:</p>
<p >1 . When creating Vulkan device, check if following 2 device extensions are supported (call <code>vkEnumerateDeviceExtensionProperties()</code>). If yes, enable them (fill <code>VkDeviceCreateInfo::ppEnabledExtensionNames</code>).</p>
<ul>
<li>VK_KHR_get_memory_requirements2</li>
<li>VK_KHR_dedicated_allocation</li>
</ul>
<p >If you enabled these extensions:</p>
<p >2 . Use <a class="el" href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878" title="Enables usage of VK_KHR_dedicated_allocation extension.">VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</a> flag when creating your <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized.">VmaAllocator</a>`to inform the library that you enabled required extensions and you want the library to use them.</p>
<p >2 . Use <a class="el" href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878" title="Enables usage of VK_KHR_dedicated_allocation extension.">VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</a> flag when creating your <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized.">VmaAllocator</a> to inform the library that you enabled required extensions and you want the library to use them.</p>
<div class="fragment"><div class="line">allocatorInfo.flags |= <a class="code hl_enumvalue" href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878">VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</a>;</div>
<div class="line"> </div>
<div class="line"><a class="code hl_function" href="group__group__init.html#ga200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a>(&amp;allocatorInfo, &amp;allocator);</div>
<div class="ttc" id="agroup__group__init_html_ga200692051ddb34240248234f5f4c17bb"><div class="ttname"><a href="group__group__init.html#ga200692051ddb34240248234f5f4c17bb">vmaCreateAllocator</a></div><div class="ttdeci">VkResult vmaCreateAllocator(const VmaAllocatorCreateInfo *pCreateInfo, VmaAllocator *pAllocator)</div><div class="ttdoc">Creates VmaAllocator object.</div></div>
<div class="ttc" id="agroup__group__init_html_gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878"><div class="ttname"><a href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878">VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</div><div class="ttdoc">Enables usage of VK_KHR_dedicated_allocation extension.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:352</div></div>
<div class="ttc" id="agroup__group__init_html_gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878"><div class="ttname"><a href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878">VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</a></div><div class="ttdeci">@ VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT</div><div class="ttdoc">Enables usage of VK_KHR_dedicated_allocation extension.</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:346</div></div>
</div><!-- fragment --><p >That is all. The extension will be automatically used whenever you create a buffer using <a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a> or image using <a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>.</p>
<p >When using the extension together with Vulkan Validation Layer, you will receive warnings like this: </p><pre class="fragment">vkBindBufferMemory(): Binding memory to buffer 0x33 but vkGetBufferMemoryRequirements() has not been called on that buffer.
</pre><p> It is OK, you should just ignore it. It happens because you use function <code>vkGetBufferMemoryRequirements2KHR()</code> instead of standard <code>vkGetBufferMemoryRequirements()</code>, while the validation layer seems to be unaware of it.</p>
<p >When using the extension together with Vulkan Validation Layer, you will receive warnings like this:</p>
<p ><em>vkBindBufferMemory(): Binding memory to buffer 0x33 but vkGetBufferMemoryRequirements() has not been called on that buffer.</em></p>
<p >It is OK, you should just ignore it. It happens because you use function <code>vkGetBufferMemoryRequirements2KHR()</code> instead of standard <code>vkGetBufferMemoryRequirements()</code>, while the validation layer seems to be unaware of it.</p>
<p >To learn more about this extension, see:</p>
<ul>
<li><a href="https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/chap50.html#VK_KHR_dedicated_allocation">VK_KHR_dedicated_allocation in Vulkan specification</a></li>