mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 09:18:34 +00:00
Rebuilt the documentation
This commit is contained in:
parent
fc2cea529d
commit
1ea5f2fd8d
12 changed files with 33 additions and 33 deletions
|
@ -294,9 +294,9 @@ Functions</h2></td></tr>
|
|||
<tr class="memitem:ga0faa3f9e5fb233d29d1e00390650febb" id="r_ga0faa3f9e5fb233d29d1e00390650febb"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0faa3f9e5fb233d29d1e00390650febb">vmaAllocateMemoryForImage</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, VkImage image, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
||||
<tr class="memdesc:ga0faa3f9e5fb233d29d1e00390650febb"><td class="mdescLeft"> </td><td class="mdescRight">Allocates memory suitable for given <code>VkImage</code>. <br /></td></tr>
|
||||
<tr class="separator:ga0faa3f9e5fb233d29d1e00390650febb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5fea5518972ae9094b1526cbcb19b05f" id="r_ga5fea5518972ae9094b1526cbcb19b05f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5fea5518972ae9094b1526cbcb19b05f">vmaFreeMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
|
||||
<tr class="memdesc:ga5fea5518972ae9094b1526cbcb19b05f"><td class="mdescLeft"> </td><td class="mdescRight">Frees memory previously allocated using <a class="el" href="#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation.">vmaAllocateMemory()</a>, <a class="el" href="#ga7fdf64415b6c3d83c454f28d2c53df7b" title="Allocates memory suitable for given VkBuffer.">vmaAllocateMemoryForBuffer()</a>, or <a class="el" href="#ga0faa3f9e5fb233d29d1e00390650febb" title="Allocates memory suitable for given VkImage.">vmaAllocateMemoryForImage()</a>. <br /></td></tr>
|
||||
<tr class="separator:ga5fea5518972ae9094b1526cbcb19b05f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga11f0fbc034fa81a4efedd73d61ce7568" id="r_ga11f0fbc034fa81a4efedd73d61ce7568"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
|
||||
<tr class="memdesc:ga11f0fbc034fa81a4efedd73d61ce7568"><td class="mdescLeft"> </td><td class="mdescRight">Frees memory previously allocated using <a class="el" href="#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation.">vmaAllocateMemory()</a>, <a class="el" href="#ga7fdf64415b6c3d83c454f28d2c53df7b" title="Allocates memory suitable for given VkBuffer.">vmaAllocateMemoryForBuffer()</a>, or <a class="el" href="#ga0faa3f9e5fb233d29d1e00390650febb" title="Allocates memory suitable for given VkImage.">vmaAllocateMemoryForImage()</a>. <br /></td></tr>
|
||||
<tr class="separator:ga11f0fbc034fa81a4efedd73d61ce7568"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga834b1e4aef395c0a1d56a28e69a4a17e" id="r_ga834b1e4aef395c0a1d56a28e69a4a17e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga834b1e4aef395c0a1d56a28e69a4a17e">vmaFreeMemoryPages</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, size_t allocationCount, const <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocations)</td></tr>
|
||||
<tr class="memdesc:ga834b1e4aef395c0a1d56a28e69a4a17e"><td class="mdescLeft"> </td><td class="mdescRight">Frees memory and destroys multiple allocations. <br /></td></tr>
|
||||
<tr class="separator:ga834b1e4aef395c0a1d56a28e69a4a17e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
@ -924,7 +924,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>You should free the memory using <a class="el" href="#ga5fea5518972ae9094b1526cbcb19b05f" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> or <a class="el" href="#ga834b1e4aef395c0a1d56a28e69a4a17e" title="Frees memory and destroys multiple allocations.">vmaFreeMemoryPages()</a>.</p>
|
||||
<p>You should free the memory using <a class="el" href="#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> or <a class="el" href="#ga834b1e4aef395c0a1d56a28e69a4a17e" title="Frees memory and destroys multiple allocations.">vmaFreeMemoryPages()</a>.</p>
|
||||
<p>It is recommended to use <a class="el" href="#ga7fdf64415b6c3d83c454f28d2c53df7b" title="Allocates memory suitable for given VkBuffer.">vmaAllocateMemoryForBuffer()</a>, <a class="el" href="#ga0faa3f9e5fb233d29d1e00390650febb" title="Allocates memory suitable for given VkImage.">vmaAllocateMemoryForImage()</a>, <a class="el" href="#gac72ee55598617e8eecca384e746bab51" title="Creates a new VkBuffer, allocates and binds memory for it.">vmaCreateBuffer()</a>, <a class="el" href="#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a> instead whenever possible. </p>
|
||||
|
||||
</div>
|
||||
|
@ -976,7 +976,7 @@ Functions</h2></td></tr>
|
|||
</dl>
|
||||
<p>It only creates <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation.">VmaAllocation</a>. To bind the memory to the buffer, use <a class="el" href="#ga6b0929b914b60cf2d45cac4bf3547470" title="Binds buffer to allocation.">vmaBindBufferMemory()</a>.</p>
|
||||
<p>This is a special-purpose function. In most cases you should use <a class="el" href="#gac72ee55598617e8eecca384e746bab51" title="Creates a new VkBuffer, allocates and binds memory for it.">vmaCreateBuffer()</a>.</p>
|
||||
<p>You must free the allocation using <a class="el" href="#ga5fea5518972ae9094b1526cbcb19b05f" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> when no longer needed. </p>
|
||||
<p>You must free the allocation using <a class="el" href="#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> when no longer needed. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1027,7 +1027,7 @@ Functions</h2></td></tr>
|
|||
</dl>
|
||||
<p>It only creates <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation.">VmaAllocation</a>. To bind the memory to the buffer, use <a class="el" href="#ga3d3ca45799923aa5d138e9e5f9eb2da5" title="Binds image to allocation.">vmaBindImageMemory()</a>.</p>
|
||||
<p>This is a special-purpose function. In most cases you should use <a class="el" href="#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>.</p>
|
||||
<p>You must free the allocation using <a class="el" href="#ga5fea5518972ae9094b1526cbcb19b05f" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> when no longer needed. </p>
|
||||
<p>You must free the allocation using <a class="el" href="#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> when no longer needed. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1082,7 +1082,7 @@ Functions</h2></td></tr>
|
|||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>You should free the memory using <a class="el" href="#ga5fea5518972ae9094b1526cbcb19b05f" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> or <a class="el" href="#ga834b1e4aef395c0a1d56a28e69a4a17e" title="Frees memory and destroys multiple allocations.">vmaFreeMemoryPages()</a>.</p>
|
||||
<p>You should free the memory using <a class="el" href="#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> or <a class="el" href="#ga834b1e4aef395c0a1d56a28e69a4a17e" title="Frees memory and destroys multiple allocations.">vmaFreeMemoryPages()</a>.</p>
|
||||
<p>Word "pages" is just a suggestion to use this function to allocate pieces of memory needed for sparse binding. It is just a general purpose allocation function able to make multiple allocations at once. It may be internally optimized to be more efficient than calling <a class="el" href="#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation.">vmaAllocateMemory()</a> <code>allocationCount</code> times.</p>
|
||||
<p>All allocations are made using same parameters. All of them are created out of the same memory pool and type. If any allocation fails, all allocations already made within this function call are also freed, so that when returned result is not <code>VK_SUCCESS</code>, <code>pAllocation</code> array is always entirely filled with <code>VK_NULL_HANDLE</code>. </p>
|
||||
|
||||
|
@ -1737,7 +1737,7 @@ Functions</h2></td></tr>
|
|||
<li>Binds the buffer with the memory.</li>
|
||||
</ol>
|
||||
<p>If any of these operations fail, buffer and allocation are not created, returned value is negative error code, <code>*pBuffer</code> and <code>*pAllocation</code> are null.</p>
|
||||
<p>If the function succeeded, you must destroy both buffer and allocation when you no longer need them using either convenience function <a class="el" href="#ga0d9f4e4ba5bf9aab1f1c746387753d77" title="Destroys Vulkan buffer and frees allocated memory.">vmaDestroyBuffer()</a> or separately, using <code>vkDestroyBuffer()</code> and <a class="el" href="#ga5fea5518972ae9094b1526cbcb19b05f" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a>.</p>
|
||||
<p>If the function succeeded, you must destroy both buffer and allocation when you no longer need them using either convenience function <a class="el" href="#ga0d9f4e4ba5bf9aab1f1c746387753d77" title="Destroys Vulkan buffer and frees allocated memory.">vmaDestroyBuffer()</a> or separately, using <code>vkDestroyBuffer()</code> and <a class="el" href="#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a>.</p>
|
||||
<p>If <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 was used, VK_KHR_dedicated_allocation extension is used internally to query driver whether it requires or prefers the new buffer to have dedicated allocation. If yes, and if dedicated allocation is possible (<a class="el" href="#ggad9889c10c798b040d59c92f257cae597a89759603401014eb325eb22a3839f2ff" title="Set this flag to only try to allocate from existing VkDeviceMemory blocks and never create new such b...">VMA_ALLOCATION_CREATE_NEVER_ALLOCATE_BIT</a> is not used), it creates dedicated allocation for this buffer, just like when using <a class="el" href="#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>This function creates a new <code>VkBuffer</code>. Sub-allocation of parts of one large buffer, although recommended as a good practice, is out of scope of this library and could be implemented by the user as a higher-level logic on top of VMA. </dd></dl>
|
||||
|
||||
|
@ -1898,8 +1898,8 @@ Functions</h2></td></tr>
|
|||
<p>Destroys Vulkan buffer and frees allocated memory. </p>
|
||||
<p>This is just a convenience function equivalent to:</p>
|
||||
<div class="fragment"><div class="line">vkDestroyBuffer(device, buffer, allocationCallbacks);</div>
|
||||
<div class="line"><a class="code hl_function" href="#ga5fea5518972ae9094b1526cbcb19b05f">vmaFreeMemory</a>(allocator, allocation);</div>
|
||||
<div class="ttc" id="agroup__group__alloc_html_ga5fea5518972ae9094b1526cbcb19b05f"><div class="ttname"><a href="#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="line"><a class="code hl_function" href="#ga11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a>(allocator, allocation);</div>
|
||||
<div class="ttc" id="agroup__group__alloc_html_ga11f0fbc034fa81a4efedd73d61ce7568"><div class="ttname"><a href="#ga11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a></div><div class="ttdeci">void vmaFreeMemory(VmaAllocator allocator, VmaAllocation allocation)</div><div class="ttdoc">Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...</div></div>
|
||||
</div><!-- fragment --><p>It is safe to pass null as buffer and/or allocation. </p>
|
||||
|
||||
</div>
|
||||
|
@ -1931,7 +1931,7 @@ Functions</h2></td></tr>
|
|||
<p>Destroys Vulkan image and frees allocated memory. </p>
|
||||
<p>This is just a convenience function equivalent to:</p>
|
||||
<div class="fragment"><div class="line">vkDestroyImage(device, image, allocationCallbacks);</div>
|
||||
<div class="line"><a class="code hl_function" href="#ga5fea5518972ae9094b1526cbcb19b05f">vmaFreeMemory</a>(allocator, allocation);</div>
|
||||
<div class="line"><a class="code hl_function" href="#ga11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a>(allocator, allocation);</div>
|
||||
</div><!-- fragment --><p>It is safe to pass null as image and/or allocation. </p>
|
||||
|
||||
</div>
|
||||
|
@ -2241,8 +2241,8 @@ Functions</h2></td></tr>
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga5fea5518972ae9094b1526cbcb19b05f" name="ga5fea5518972ae9094b1526cbcb19b05f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5fea5518972ae9094b1526cbcb19b05f">◆ </a></span>vmaFreeMemory()</h2>
|
||||
<a id="ga11f0fbc034fa81a4efedd73d61ce7568" name="ga11f0fbc034fa81a4efedd73d61ce7568"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga11f0fbc034fa81a4efedd73d61ce7568">◆ </a></span>vmaFreeMemory()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
|
@ -2255,7 +2255,7 @@ Functions</h2></td></tr>
|
|||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const <a class="el" href="struct_vma_allocation.html">VmaAllocation</a></td> <td class="paramname"><span class="paramname"><em>allocation</em></span> )</td>
|
||||
<td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a></td> <td class="paramname"><span class="paramname"><em>allocation</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
@ -2290,7 +2290,7 @@ Functions</h2></td></tr>
|
|||
</div><div class="memdoc">
|
||||
|
||||
<p>Frees memory and destroys multiple allocations. </p>
|
||||
<p>Word "pages" is just a suggestion to use this function to free pieces of memory used for sparse binding. It is just a general purpose function to free memory and destroy allocations made using e.g. <a class="el" href="#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation.">vmaAllocateMemory()</a>, <a class="el" href="#gad37e82e492b3de38fc3f4cffd9ad0ae1" title="General purpose memory allocation for multiple allocation objects at once.">vmaAllocateMemoryPages()</a> and other functions. It may be internally optimized to be more efficient than calling <a class="el" href="#ga5fea5518972ae9094b1526cbcb19b05f" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> <code>allocationCount</code> times.</p>
|
||||
<p>Word "pages" is just a suggestion to use this function to free pieces of memory used for sparse binding. It is just a general purpose function to free memory and destroy allocations made using e.g. <a class="el" href="#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation.">vmaAllocateMemory()</a>, <a class="el" href="#gad37e82e492b3de38fc3f4cffd9ad0ae1" title="General purpose memory allocation for multiple allocation objects at once.">vmaAllocateMemoryPages()</a> and other functions. It may be internally optimized to be more efficient than calling <a class="el" href="#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(),...">vmaFreeMemory()</a> <code>allocationCount</code> times.</p>
|
||||
<p>Allocations in <code>pAllocations</code> array can come from any memory pools and types. Passing <code>VK_NULL_HANDLE</code> as elements of <code>pAllocations</code> array is valid. Such entries are just skipped. </p>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue