Refactored virtual allocator. (COMPATIBILITY BREAKING!) Added TLSF algoritym.

Refactored virtual allocator: Added type VmaVirtualAllocation, member VmaVirtualAllocationInfo::offset, changed parameters of vmaVirtualAllocate, vmaVirtualFree, vmaSetVirtualAllocationUserData, vmaGetVirtualAllocationInfo.

Added TLSF algorithm: Added VMA_POOL_CREATE_TLSF_ALGORITHM_BIT, VMA_VIRTUAL_BLOCK_CREATE_TLSF_ALGORITHM_BIT.

Some internal refactoring.

Improved documentation: Grouped API elements into Doxygen modules.

Code mostly by @medranSolus.
This commit is contained in:
Adam Sawicki 2022-01-20 17:00:33 +01:00
parent c5870ad3c2
commit d3a85f0dc3
89 changed files with 7653 additions and 5225 deletions

View file

@ -65,7 +65,7 @@ $(function() {
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_vma_pool_create_info-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">VmaPoolCreateInfo Struct Reference</div></div>
<div class="headertitle"><div class="title">VmaPoolCreateInfo Struct Reference<div class="ingroups"><a class="el" href="group__group__alloc.html">Memory allocation</a></div></div></div>
</div><!--header-->
<div class="contents">
@ -79,8 +79,8 @@ Public Attributes</h2></td></tr>
<tr class="memitem:a596fa76b685d3f1f688f84a709a5b319"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a></td></tr>
<tr class="memdesc:a596fa76b685d3f1f688f84a709a5b319"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vulkan memory type index to allocate this pool from. <a href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">More...</a><br /></td></tr>
<tr class="separator:a596fa76b685d3f1f688f84a709a5b319"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8405139f63d078340ae74513a59f5446"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vk__mem__alloc_8h.html#a2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446">flags</a></td></tr>
<tr class="memdesc:a8405139f63d078340ae74513a59f5446"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use combination of <a class="el" href="vk__mem__alloc_8h.html#a4d4f2efc2509157a9e4ecd4fd7942303" title="Flags to be passed as VmaPoolCreateInfo::flags.">VmaPoolCreateFlagBits</a>. <a href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446">More...</a><br /></td></tr>
<tr class="memitem:a8405139f63d078340ae74513a59f5446"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__alloc.html#ga2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446">flags</a></td></tr>
<tr class="memdesc:a8405139f63d078340ae74513a59f5446"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use combination of <a class="el" href="group__group__alloc.html#ga4d4f2efc2509157a9e4ecd4fd7942303" title="Flags to be passed as VmaPoolCreateInfo::flags.">VmaPoolCreateFlagBits</a>. <a href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446">More...</a><br /></td></tr>
<tr class="separator:a8405139f63d078340ae74513a59f5446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4265160536cdb9be821b7686c16c676"><td class="memItemLeft" align="right" valign="top">VkDeviceSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html#aa4265160536cdb9be821b7686c16c676">blockSize</a></td></tr>
<tr class="memdesc:aa4265160536cdb9be821b7686c16c676"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of a single <code>VkDeviceMemory</code> block to be allocated as part of this pool, in bytes. Optional. <a href="struct_vma_pool_create_info.html#aa4265160536cdb9be821b7686c16c676">More...</a><br /></td></tr>
@ -129,12 +129,12 @@ Public Attributes</h2></td></tr>
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="vk__mem__alloc_8h.html#a2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a> VmaPoolCreateInfo::flags</td>
<td class="memname"><a class="el" href="group__group__alloc.html#ga2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a> VmaPoolCreateInfo::flags</td>
</tr>
</table>
</div><div class="memdoc">
<p>Use combination of <a class="el" href="vk__mem__alloc_8h.html#a4d4f2efc2509157a9e4ecd4fd7942303" title="Flags to be passed as VmaPoolCreateInfo::flags.">VmaPoolCreateFlagBits</a>. </p>
<p>Use combination of <a class="el" href="group__group__alloc.html#ga4d4f2efc2509157a9e4ecd4fd7942303" title="Flags to be passed as VmaPoolCreateInfo::flags.">VmaPoolCreateFlagBits</a>. </p>
</div>
</div>
@ -237,7 +237,7 @@ Public Attributes</h2></td></tr>
</div><div class="memdoc">
<p>A floating-point value between 0 and 1, indicating the priority of the allocations in this pool relative to other memory allocations. </p>
<p >It is used only when <a class="el" href="vk__mem__alloc_8h.html#a4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a">VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT</a> flag was used during creation of the <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized.">VmaAllocator</a> object. Otherwise, this variable is ignored. </p>
<p >It is used only when <a class="el" href="group__group__init.html#gga4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a">VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT</a> flag was used during creation of the <a class="el" href="struct_vma_allocator.html" title="Represents main object of this library initialized.">VmaAllocator</a> object. Otherwise, this variable is ignored. </p>
</div>
</div>