mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-26 00:24:35 +00:00
Minor fix in documentation.
This commit is contained in:
parent
4426bfbc19
commit
defbf3d975
@ -79,7 +79,7 @@ $(function() {
|
||||
<li>When making an allocation, set <a class="el" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150" title="Pool that this allocation should be created in. ">VmaAllocationCreateInfo::pool</a> to this handle. You don't need to specify any other parameters of this structure, like usage.</li>
|
||||
</ol>
|
||||
<p>Example:</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Create a pool that could have at most 2 blocks, 128 MB each.</span></div><div class="line"><a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> poolCreateInfo = {};</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a> = ...</div><div class="line">poolCreateInfo.blockSize = 128ull * 1024 * 1024;</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">maxBlockCount</a> = 2;</div><div class="line"></div><div class="line">VmaPool pool;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a>(allocator, &poolCreateInfo, &pool);</div><div class="line"></div><div class="line"><span class="comment">// Allocate a buffer out of it.</span></div><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = 1024;</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">pool</a> = pool;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line">VmaAllocation alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo);</div></div><!-- fragment --><p>You have to free all allocations made from this pool before destroying it.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Create a pool that could have at most 2 blocks, 128 MiB each.</span></div><div class="line"><a class="code" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> poolCreateInfo = {};</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">memoryTypeIndex</a> = ...</div><div class="line">poolCreateInfo.blockSize = 128ull * 1024 * 1024;</div><div class="line">poolCreateInfo.<a class="code" href="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">maxBlockCount</a> = 2;</div><div class="line"></div><div class="line">VmaPool pool;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a>(allocator, &poolCreateInfo, &pool);</div><div class="line"></div><div class="line"><span class="comment">// Allocate a buffer out of it.</span></div><div class="line">VkBufferCreateInfo bufCreateInfo = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO };</div><div class="line">bufCreateInfo.size = 1024;</div><div class="line">bufCreateInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;</div><div class="line"></div><div class="line"><a class="code" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> allocCreateInfo = {};</div><div class="line">allocCreateInfo.<a class="code" href="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">pool</a> = pool;</div><div class="line"></div><div class="line">VkBuffer buf;</div><div class="line">VmaAllocation alloc;</div><div class="line"><a class="code" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> allocInfo;</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer</a>(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allocInfo);</div></div><!-- fragment --><p>You have to free all allocations made from this pool before destroying it.</p>
|
||||
<div class="fragment"><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a>(allocator, buf, alloc);</div><div class="line"><a class="code" href="vk__mem__alloc_8h.html#a5485779c8f1948238fc4e92232fa65e1">vmaDestroyPool</a>(allocator, pool);</div></div><!-- fragment --> </div></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
@ -86,7 +86,7 @@ Public Attributes</h2></td></tr>
|
||||
<tr class="memdesc:a8e4714298e3121cdd8b214a1ae7a637a"><td class="mdescLeft"> </td><td class="mdescRight">Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps. <a href="#a8e4714298e3121cdd8b214a1ae7a637a">More...</a><br /></td></tr>
|
||||
<tr class="separator:a8e4714298e3121cdd8b214a1ae7a637a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab435423d84d5ab26e2c347c51771f90a"><td class="memItemLeft" align="right" valign="top">VkDeviceSize </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#ab435423d84d5ab26e2c347c51771f90a">preferredSmallHeapBlockSize</a></td></tr>
|
||||
<tr class="memdesc:ab435423d84d5ab26e2c347c51771f90a"><td class="mdescLeft"> </td><td class="mdescRight">Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from small heaps <= 512 MB. <a href="#ab435423d84d5ab26e2c347c51771f90a">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:ab435423d84d5ab26e2c347c51771f90a"><td class="mdescLeft"> </td><td class="mdescRight">Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from small heaps <= 512 MiB. <a href="#ab435423d84d5ab26e2c347c51771f90a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab435423d84d5ab26e2c347c51771f90a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6e409087e3be55400d0e4ccbe43c608d"><td class="memItemLeft" align="right" valign="top">const VkAllocationCallbacks * </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocator_create_info.html#a6e409087e3be55400d0e4ccbe43c608d">pAllocationCallbacks</a></td></tr>
|
||||
<tr class="memdesc:a6e409087e3be55400d0e4ccbe43c608d"><td class="mdescLeft"> </td><td class="mdescRight">Custom CPU memory allocation callbacks. <a href="#a6e409087e3be55400d0e4ccbe43c608d">More...</a><br /></td></tr>
|
||||
@ -247,7 +247,7 @@ Public Attributes</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps. </p>
|
||||
<p>Set to 0 to use default, which is currently 256 MB. </p>
|
||||
<p>Set to 0 to use default, which is currently 256 MiB. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -263,8 +263,8 @@ Public Attributes</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from small heaps <= 512 MB. </p>
|
||||
<p>Set to 0 to use default, which is currently 64 MB. </p>
|
||||
<p>Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from small heaps <= 512 MiB. </p>
|
||||
<p>Set to 0 to use default, which is currently 64 MiB. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -86,7 +86,7 @@ $(function() {
|
||||
<div class="ttc" id="vk__mem__alloc_8h_html_a333b61c1788cb23559177531e6a93ca3"><div class="ttname"><a href="vk__mem__alloc_8h.html#a333b61c1788cb23559177531e6a93ca3">vmaCalculateStats</a></div><div class="ttdeci">void vmaCalculateStats(VmaAllocator allocator, VmaStats *pStats)</div><div class="ttdoc">Retrieves statistics from current state of the Allocator. </div></div>
|
||||
<div class="ttc" id="struct_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 if you leave define VMA_STATIC_VULKAN_FUNCTIONS 1...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:848</div></div>
|
||||
<div class="ttc" id="struct_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:777</div></div>
|
||||
<div class="ttc" id="struct_vma_allocator_create_info_html_ab435423d84d5ab26e2c347c51771f90a"><div class="ttname"><a href="struct_vma_allocator_create_info.html#ab435423d84d5ab26e2c347c51771f90a">VmaAllocatorCreateInfo::preferredSmallHeapBlockSize</a></div><div class="ttdeci">VkDeviceSize preferredSmallHeapBlockSize</div><div class="ttdoc">Preferred size of a single VkDeviceMemory block to be allocated from small heaps <= 512 MB...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:792</div></div>
|
||||
<div class="ttc" id="struct_vma_allocator_create_info_html_ab435423d84d5ab26e2c347c51771f90a"><div class="ttname"><a href="struct_vma_allocator_create_info.html#ab435423d84d5ab26e2c347c51771f90a">VmaAllocatorCreateInfo::preferredSmallHeapBlockSize</a></div><div class="ttdeci">VkDeviceSize preferredSmallHeapBlockSize</div><div class="ttdoc">Preferred size of a single VkDeviceMemory block to be allocated from small heaps <= 512 MiB...</div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:792</div></div>
|
||||
<div class="ttc" id="vk__mem__alloc_8h_html_aa8d164061c88f22fb1fd3c8f3534bc1d"><div class="ttname"><a href="vk__mem__alloc_8h.html#aa8d164061c88f22fb1fd3c8f3534bc1d">vmaDestroyAllocator</a></div><div class="ttdeci">void vmaDestroyAllocator(VmaAllocator allocator)</div><div class="ttdoc">Destroys allocator object. </div></div>
|
||||
<div class="ttc" id="vk__mem__alloc_8h_html_ad9889c10c798b040d59c92f257cae597"><div class="ttname"><a href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597">VmaAllocationCreateFlagBits</a></div><div class="ttdeci">VmaAllocationCreateFlagBits</div><div class="ttdoc">Flags to be passed as VmaAllocationCreateInfo::flags. </div><div class="ttdef"><b>Definition:</b> vk_mem_alloc.h:993</div></div>
|
||||
<div class="ttc" id="vk__mem__alloc_8h_html_a86dd08aba8633bfa4ad0df2e76481d8b"><div class="ttname"><a href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b">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>
|
||||
|
@ -333,7 +333,7 @@ To use custom memory pools:
|
||||
Example:
|
||||
|
||||
\code
|
||||
// Create a pool that could have at most 2 blocks, 128 MB each.
|
||||
// Create a pool that could have at most 2 blocks, 128 MiB each.
|
||||
VmaPoolCreateInfo poolCreateInfo = {};
|
||||
poolCreateInfo.memoryTypeIndex = ...
|
||||
poolCreateInfo.blockSize = 128ull * 1024 * 1024;
|
||||
@ -785,10 +785,10 @@ typedef struct VmaAllocatorCreateInfo
|
||||
/** It must be valid throughout whole lifetime of created allocator. */
|
||||
VkDevice device;
|
||||
/// Preferred size of a single `VkDeviceMemory` block to be allocated from large heaps.
|
||||
/** Set to 0 to use default, which is currently 256 MB. */
|
||||
/** Set to 0 to use default, which is currently 256 MiB. */
|
||||
VkDeviceSize preferredLargeHeapBlockSize;
|
||||
/// Preferred size of a single `VkDeviceMemory` block to be allocated from small heaps <= 512 MB.
|
||||
/** Set to 0 to use default, which is currently 64 MB. */
|
||||
/// Preferred size of a single `VkDeviceMemory` block to be allocated from small heaps <= 512 MiB.
|
||||
/** Set to 0 to use default, which is currently 64 MiB. */
|
||||
VkDeviceSize preferredSmallHeapBlockSize;
|
||||
/// Custom CPU memory allocation callbacks.
|
||||
/** Optional, can be null. When specified, will also be used for all CPU-side memory allocations. */
|
||||
|
Loading…
Reference in New Issue
Block a user