You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/html/custom_memory_pools.html
+24-10Lines changed: 24 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -86,14 +86,28 @@
86
86
<li>When making an allocation, set <aclass="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 <code>usage</code>.</li>
87
87
</ol>
88
88
<p>Example:</p>
89
-
<divclass="fragment"><divclass="line"><spanclass="comment">// Create a pool that can have at most 2 blocks, 128 MiB each.</span></div>
89
+
<divclass="fragment"><divclass="line"><spanclass="comment">// Find memoryTypeIndex for the pool.</span></div>
<divclass="ttc" id="astruct_vma_allocation_create_info_html_a6272c0555cfd1fe28bff1afeb6190150"><divclass="ttname"><ahref="struct_vma_allocation_create_info.html#a6272c0555cfd1fe28bff1afeb6190150">VmaAllocationCreateInfo::pool</a></div><divclass="ttdeci">VmaPool pool</div><divclass="ttdoc">Pool that this allocation should be created in.</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1244</div></div>
130
+
<divclass="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><divclass="ttname"><ahref="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><divclass="ttdeci">VmaMemoryUsage usage</div><divclass="ttdoc">Intended usage of memory.</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1220</div></div>
114
131
<divclass="ttc" id="astruct_vma_allocation_html"><divclass="ttname"><ahref="struct_vma_allocation.html">VmaAllocation</a></div><divclass="ttdoc">Represents single memory allocation.</div></div>
115
-
<divclass="ttc" id="astruct_vma_allocation_info_html"><divclass="ttname"><ahref="struct_vma_allocation_info.html">VmaAllocationInfo</a></div><divclass="ttdoc">Parameters of VmaAllocation objects, that can be retrieved using function vmaGetAllocationInfo().</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1327</div></div>
116
132
<divclass="ttc" id="astruct_vma_pool_create_info_html"><divclass="ttname"><ahref="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a></div><divclass="ttdoc">Describes parameter of created VmaPool.</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1263</div></div>
117
133
<divclass="ttc" id="astruct_vma_pool_create_info_html_a596fa76b685d3f1f688f84a709a5b319"><divclass="ttname"><ahref="struct_vma_pool_create_info.html#a596fa76b685d3f1f688f84a709a5b319">VmaPoolCreateInfo::memoryTypeIndex</a></div><divclass="ttdeci">uint32_t memoryTypeIndex</div><divclass="ttdoc">Vulkan memory type index to allocate this pool from.</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1266</div></div>
134
+
<divclass="ttc" id="astruct_vma_pool_create_info_html_aa4265160536cdb9be821b7686c16c676"><divclass="ttname"><ahref="struct_vma_pool_create_info.html#aa4265160536cdb9be821b7686c16c676">VmaPoolCreateInfo::blockSize</a></div><divclass="ttdeci">VkDeviceSize blockSize</div><divclass="ttdoc">Size of a single VkDeviceMemory block to be allocated as part of this pool, in bytes....</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1279</div></div>
118
135
<divclass="ttc" id="astruct_vma_pool_create_info_html_ae41142f2834fcdc82baa4883c187b75c"><divclass="ttname"><ahref="struct_vma_pool_create_info.html#ae41142f2834fcdc82baa4883c187b75c">VmaPoolCreateInfo::maxBlockCount</a></div><divclass="ttdeci">size_t maxBlockCount</div><divclass="ttdoc">Maximum number of blocks that can be allocated in this pool. Optional.</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1292</div></div>
<divclass="ttc" id="astruct_vma_allocation_create_info_html_accb8b06b1f677d858cb9af20705fa910"><divclass="ttname"><ahref="struct_vma_allocation_create_info.html#accb8b06b1f677d858cb9af20705fa910">VmaAllocationCreateInfo::usage</a></div><divclass="ttdeci">VmaMemoryUsage usage</div><divclass="ttdoc">Intended usage of memory.</div><divclass="ttdef"><b>Definition:</b> vk_mem_alloc.h:1220</div></div>
146
160
</div><!-- fragment --><p>When creating buffers/images allocated in that pool, provide following parameters:</p>
147
161
<ul>
148
162
<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>
0 commit comments