mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 01:08:31 +00:00
Small but important fix in the documentation
This commit is contained in:
parent
fadfc3fd13
commit
6b098e457e
140 changed files with 731 additions and 595 deletions
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Vulkan Memory Allocator: Memory allocation</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
|
@ -19,8 +19,8 @@
|
|||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Vulkan Memory Allocator
|
||||
</div>
|
||||
</td>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
|
@ -335,12 +335,18 @@ Functions</h2></td></tr>
|
|||
<tr class="memitem:gaa06a690013a0d01e60894ac378083834"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__alloc.html#gaa06a690013a0d01e60894ac378083834">vmaCreateBufferWithAlignment</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkBufferCreateInfo *pBufferCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, VkDeviceSize minAlignment, VkBuffer *pBuffer, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
||||
<tr class="memdesc:gaa06a690013a0d01e60894ac378083834"><td class="mdescLeft"> </td><td class="mdescRight">Creates a buffer with additional minimum alignment. <a href="group__group__alloc.html#gaa06a690013a0d01e60894ac378083834">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa06a690013a0d01e60894ac378083834"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga60d5d4803e3c82505a2bfddb929adb03"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__alloc.html#ga60d5d4803e3c82505a2bfddb929adb03">vmaCreateAliasingBuffer</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation, const VkBufferCreateInfo *pBufferCreateInfo, VkBuffer *pBuffer)</td></tr>
|
||||
<tr class="memdesc:ga60d5d4803e3c82505a2bfddb929adb03"><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <code>VkBuffer</code>, binds already created memory for it. <a href="group__group__alloc.html#ga60d5d4803e3c82505a2bfddb929adb03">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga60d5d4803e3c82505a2bfddb929adb03"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0d9f4e4ba5bf9aab1f1c746387753d77"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, VkBuffer buffer, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
|
||||
<tr class="memdesc:ga0d9f4e4ba5bf9aab1f1c746387753d77"><td class="mdescLeft"> </td><td class="mdescRight">Destroys Vulkan buffer and frees allocated memory. <a href="group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga0d9f4e4ba5bf9aab1f1c746387753d77"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga02a94f25679275851a53e82eacbcfc73"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73">vmaCreateImage</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, const VkImageCreateInfo *pImageCreateInfo, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pAllocationCreateInfo, VkImage *pImage, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
||||
<tr class="memdesc:ga02a94f25679275851a53e82eacbcfc73"><td class="mdescLeft"> </td><td class="mdescRight">Function similar to <a class="el" href="group__group__alloc.html#gac72ee55598617e8eecca384e746bab51" title="Creates a new VkBuffer, allocates and binds memory for it.">vmaCreateBuffer()</a>. <a href="group__group__alloc.html#ga02a94f25679275851a53e82eacbcfc73">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga02a94f25679275851a53e82eacbcfc73"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaebc4db1f94b53dba2338b4c0fd80d0dc"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__alloc.html#gaebc4db1f94b53dba2338b4c0fd80d0dc">vmaCreateAliasingImage</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation, const VkImageCreateInfo *pImageCreateInfo, VkImage *pImage)</td></tr>
|
||||
<tr class="memdesc:gaebc4db1f94b53dba2338b4c0fd80d0dc"><td class="mdescLeft"> </td><td class="mdescRight">Function similar to <a class="el" href="group__group__alloc.html#ga60d5d4803e3c82505a2bfddb929adb03" title="Creates a new VkBuffer, binds already created memory for it.">vmaCreateAliasingBuffer()</a>. <a href="group__group__alloc.html#gaebc4db1f94b53dba2338b4c0fd80d0dc">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaebc4db1f94b53dba2338b4c0fd80d0dc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__alloc.html#gae50d2cb3b4a3bfd4dd40987234e50e7e">vmaDestroyImage</a> (<a class="el" href="struct_vma_allocator.html">VmaAllocator</a> allocator, VkImage image, <a class="el" href="struct_vma_allocation.html">VmaAllocation</a> allocation)</td></tr>
|
||||
<tr class="memdesc:gae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="mdescLeft"> </td><td class="mdescRight">Destroys Vulkan image and frees allocated memory. <a href="group__group__alloc.html#gae50d2cb3b4a3bfd4dd40987234e50e7e">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
@ -1420,6 +1426,106 @@ Functions</h2></td></tr>
|
|||
<li>Other value: Error returned by Vulkan, e.g. memory mapping failure. </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga60d5d4803e3c82505a2bfddb929adb03" name="ga60d5d4803e3c82505a2bfddb929adb03"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga60d5d4803e3c82505a2bfddb929adb03">◆ </a></span>vmaCreateAliasingBuffer()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">VkResult vmaCreateAliasingBuffer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a> </td>
|
||||
<td class="paramname"><em>allocator</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> </td>
|
||||
<td class="paramname"><em>allocation</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const VkBufferCreateInfo * </td>
|
||||
<td class="paramname"><em>pBufferCreateInfo</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">VkBuffer * </td>
|
||||
<td class="paramname"><em>pBuffer</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Creates a new <code>VkBuffer</code>, binds already created memory for it. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir"></td><td class="paramname">allocator</td><td></td></tr>
|
||||
<tr><td class="paramdir"></td><td class="paramname">allocation</td><td>Allocation that provides memory to be used for binding new buffer to it. </td></tr>
|
||||
<tr><td class="paramdir"></td><td class="paramname">pBufferCreateInfo</td><td></td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">pBuffer</td><td>Buffer that was created.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>This function automatically:</p>
|
||||
<ol type="1">
|
||||
<li>Creates buffer.</li>
|
||||
<li>Binds the buffer with the supplied memory.</li>
|
||||
</ol>
|
||||
<p >If any of these operations fail, buffer is not created, returned value is negative error code and <code>*pBuffer</code> is null.</p>
|
||||
<p >If the function succeeded, you must destroy the buffer when you no longer need it using <code>vkDestroyBuffer()</code>. If you want to also destroy the corresponding allocation you can use convenience function <a class="el" href="group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77" title="Destroys Vulkan buffer and frees allocated memory.">vmaDestroyBuffer()</a>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaebc4db1f94b53dba2338b4c0fd80d0dc" name="gaebc4db1f94b53dba2338b4c0fd80d0dc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaebc4db1f94b53dba2338b4c0fd80d0dc">◆ </a></span>vmaCreateAliasingImage()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">VkResult vmaCreateAliasingImage </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="struct_vma_allocator.html">VmaAllocator</a> </td>
|
||||
<td class="paramname"><em>allocator</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="struct_vma_allocation.html">VmaAllocation</a> </td>
|
||||
<td class="paramname"><em>allocation</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const VkImageCreateInfo * </td>
|
||||
<td class="paramname"><em>pImageCreateInfo</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">VkImage * </td>
|
||||
<td class="paramname"><em>pImage</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Function similar to <a class="el" href="group__group__alloc.html#ga60d5d4803e3c82505a2bfddb929adb03" title="Creates a new VkBuffer, binds already created memory for it.">vmaCreateAliasingBuffer()</a>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac72ee55598617e8eecca384e746bab51" name="gac72ee55598617e8eecca384e746bab51"></a>
|
||||
|
@ -1490,7 +1596,7 @@ Functions</h2></td></tr>
|
|||
<li>Allocates appropriate memory for it.</li>
|
||||
<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, *pBuffer and *pAllocation are null.</p>
|
||||
<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="group__group__alloc.html#ga0d9f4e4ba5bf9aab1f1c746387753d77" title="Destroys Vulkan buffer and frees allocated memory.">vmaDestroyBuffer()</a> or separately, using <code>vkDestroyBuffer()</code> and <a class="el" href="group__group__alloc.html#ga5fea5518972ae9094b1526cbcb19b05f" 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="group__group__alloc.html#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="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>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>
|
||||
|
@ -2594,7 +2700,7 @@ Functions</h2></td></tr>
|
|||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue