mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-22 23:04:35 +00:00
5db51b1264
Implemented usage of VK_KHR_dedicated_allocation. Renamed "own allocation" to "dedicated allocation" everywhere.
989 lines
64 KiB
HTML
989 lines
64 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.13"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Vulkan Memory Allocator: Layer 2 Allocating Memory</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Vulkan Memory Allocator
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#typedef-members">Typedefs</a> |
|
|
<a href="#enum-members">Enumerations</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Layer 2 Allocating Memory</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Describes parameter of created <code>VmaPool</code>. <a href="struct_vma_pool_create_info.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Describes parameter of existing <code>VmaPool</code>. <a href="struct_vma_pool_stats.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>. <a href="struct_vma_allocation_info.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Optional configuration parameters to be passed to function <a class="el" href="group__layer2.html#ga6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>. <a href="struct_vma_defragmentation_info.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Statistics returned by function <a class="el" href="group__layer2.html#ga6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>. <a href="struct_vma_defragmentation_stats.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
|
Typedefs</h2></td></tr>
|
|
<tr class="memitem:ga8f93195158e0e2ac80ca352064e71c1f"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="group__layer2.html#ga9a7c45f9c863695d98c83fa5ac940fe7">VmaPoolCreateFlagBits</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga8f93195158e0e2ac80ca352064e71c1f">VmaPoolCreateFlagBits</a></td></tr>
|
|
<tr class="memdesc:ga8f93195158e0e2ac80ca352064e71c1f"><td class="mdescLeft"> </td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446" title="Use combination of VmaPoolCreateFlagBits. ">VmaPoolCreateInfo::flags</a>. <a href="#ga8f93195158e0e2ac80ca352064e71c1f">More...</a><br /></td></tr>
|
|
<tr class="separator:ga8f93195158e0e2ac80ca352064e71c1f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga2770e325ea42e087c1b91fdf46d0292a"><td class="memItemLeft" align="right" valign="top">typedef VkFlags </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a></td></tr>
|
|
<tr class="separator:ga2770e325ea42e087c1b91fdf46d0292a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga211706e9348dcee25a843ed4ea69bce7"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga211706e9348dcee25a843ed4ea69bce7">VmaPoolCreateInfo</a></td></tr>
|
|
<tr class="memdesc:ga211706e9348dcee25a843ed4ea69bce7"><td class="mdescLeft"> </td><td class="mdescRight">Describes parameter of created <code>VmaPool</code>. <a href="#ga211706e9348dcee25a843ed4ea69bce7">More...</a><br /></td></tr>
|
|
<tr class="separator:ga211706e9348dcee25a843ed4ea69bce7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga2e5612d871d64c5624087b837a338c34"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga2e5612d871d64c5624087b837a338c34">VmaPoolStats</a></td></tr>
|
|
<tr class="memdesc:ga2e5612d871d64c5624087b837a338c34"><td class="mdescLeft"> </td><td class="mdescRight">Describes parameter of existing <code>VmaPool</code>. <a href="#ga2e5612d871d64c5624087b837a338c34">More...</a><br /></td></tr>
|
|
<tr class="separator:ga2e5612d871d64c5624087b837a338c34"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga795e6ff02a21d5486c0565f403dd9255"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga795e6ff02a21d5486c0565f403dd9255">VmaAllocationInfo</a></td></tr>
|
|
<tr class="memdesc:ga795e6ff02a21d5486c0565f403dd9255"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>. <a href="#ga795e6ff02a21d5486c0565f403dd9255">More...</a><br /></td></tr>
|
|
<tr class="separator:ga795e6ff02a21d5486c0565f403dd9255"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae67f8573a0cf20f16f0a1eecbca566a0"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#gae67f8573a0cf20f16f0a1eecbca566a0">VmaDefragmentationInfo</a></td></tr>
|
|
<tr class="memdesc:gae67f8573a0cf20f16f0a1eecbca566a0"><td class="mdescLeft"> </td><td class="mdescRight">Optional configuration parameters to be passed to function <a class="el" href="group__layer2.html#ga6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>. <a href="#gae67f8573a0cf20f16f0a1eecbca566a0">More...</a><br /></td></tr>
|
|
<tr class="separator:gae67f8573a0cf20f16f0a1eecbca566a0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gab0f9b06441c840fee560de4a2967f8c9"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#gab0f9b06441c840fee560de4a2967f8c9">VmaDefragmentationStats</a></td></tr>
|
|
<tr class="memdesc:gab0f9b06441c840fee560de4a2967f8c9"><td class="mdescLeft"> </td><td class="mdescRight">Statistics returned by function <a class="el" href="group__layer2.html#ga6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>. <a href="#gab0f9b06441c840fee560de4a2967f8c9">More...</a><br /></td></tr>
|
|
<tr class="separator:gab0f9b06441c840fee560de4a2967f8c9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
|
Enumerations</h2></td></tr>
|
|
<tr class="memitem:ga9a7c45f9c863695d98c83fa5ac940fe7"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga9a7c45f9c863695d98c83fa5ac940fe7">VmaPoolCreateFlagBits</a> { <a class="el" href="group__layer2.html#gga9a7c45f9c863695d98c83fa5ac940fe7a918441f7b40dca90481b114f5d224fe9">VMA_POOL_CREATE_PERSISTENT_MAP_BIT</a> = 0x00000001,
|
|
<a class="el" href="group__layer2.html#gga9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2">VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT</a> = 0x00000002,
|
|
<a class="el" href="group__layer2.html#gga9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec">VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF
|
|
}<tr class="memdesc:ga9a7c45f9c863695d98c83fa5ac940fe7"><td class="mdescLeft"> </td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446" title="Use combination of VmaPoolCreateFlagBits. ">VmaPoolCreateInfo::flags</a>. <a href="group__layer2.html#ga9a7c45f9c863695d98c83fa5ac940fe7">More...</a><br /></td></tr>
|
|
</td></tr>
|
|
<tr class="separator:ga9a7c45f9c863695d98c83fa5ac940fe7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:ga5c8770ded7c59c8caac6de0c2cb00b50"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga5c8770ded7c59c8caac6de0c2cb00b50">vmaCreatePool</a> (VmaAllocator allocator, const <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> *pCreateInfo, VmaPool *pPool)</td></tr>
|
|
<tr class="memdesc:ga5c8770ded7c59c8caac6de0c2cb00b50"><td class="mdescLeft"> </td><td class="mdescRight">Allocates Vulkan device memory and creates <code>VmaPool</code> object. <a href="#ga5c8770ded7c59c8caac6de0c2cb00b50">More...</a><br /></td></tr>
|
|
<tr class="separator:ga5c8770ded7c59c8caac6de0c2cb00b50"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga5485779c8f1948238fc4e92232fa65e1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga5485779c8f1948238fc4e92232fa65e1">vmaDestroyPool</a> (VmaAllocator allocator, VmaPool pool)</td></tr>
|
|
<tr class="memdesc:ga5485779c8f1948238fc4e92232fa65e1"><td class="mdescLeft"> </td><td class="mdescRight">Destroys VmaPool object and frees Vulkan device memory. <a href="#ga5485779c8f1948238fc4e92232fa65e1">More...</a><br /></td></tr>
|
|
<tr class="separator:ga5485779c8f1948238fc4e92232fa65e1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae8bf76997b234ef68aad922616df4153"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#gae8bf76997b234ef68aad922616df4153">vmaGetPoolStats</a> (VmaAllocator allocator, VmaPool pool, <a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a> *pPoolStats)</td></tr>
|
|
<tr class="memdesc:gae8bf76997b234ef68aad922616df4153"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves statistics of existing VmaPool object. <a href="#gae8bf76997b234ef68aad922616df4153">More...</a><br /></td></tr>
|
|
<tr class="separator:gae8bf76997b234ef68aad922616df4153"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga736bd6cbda886f36c891727e73bd4024"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga736bd6cbda886f36c891727e73bd4024">vmaMakePoolAllocationsLost</a> (VmaAllocator allocator, VmaPool pool, size_t *pLostAllocationCount)</td></tr>
|
|
<tr class="memdesc:ga736bd6cbda886f36c891727e73bd4024"><td class="mdescLeft"> </td><td class="mdescRight">Marks all allocations in given pool as lost if they are not used in current frame or <a class="el" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaPoolCreateInfo::frameInUseCount</a> back from now. <a href="#ga736bd6cbda886f36c891727e73bd4024">More...</a><br /></td></tr>
|
|
<tr class="separator:ga736bd6cbda886f36c891727e73bd4024"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gabf28077dbf82d0908b8acbe8ee8dd9b8"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#gabf28077dbf82d0908b8acbe8ee8dd9b8">vmaAllocateMemory</a> (VmaAllocator allocator, const VkMemoryRequirements *pVkMemoryRequirements, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
|
<tr class="memdesc:gabf28077dbf82d0908b8acbe8ee8dd9b8"><td class="mdescLeft"> </td><td class="mdescRight">General purpose memory allocation. <a href="#gabf28077dbf82d0908b8acbe8ee8dd9b8">More...</a><br /></td></tr>
|
|
<tr class="separator:gabf28077dbf82d0908b8acbe8ee8dd9b8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga7fdf64415b6c3d83c454f28d2c53df7b"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer</a> (VmaAllocator allocator, VkBuffer buffer, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
|
<tr class="separator:ga7fdf64415b6c3d83c454f28d2c53df7b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga0faa3f9e5fb233d29d1e00390650febb"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga0faa3f9e5fb233d29d1e00390650febb">vmaAllocateMemoryForImage</a> (VmaAllocator allocator, VkImage image, const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> *pCreateInfo, VmaAllocation *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">Function similar to <a class="el" href="group__layer2.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>. <a href="#ga0faa3f9e5fb233d29d1e00390650febb">More...</a><br /></td></tr>
|
|
<tr class="separator:ga0faa3f9e5fb233d29d1e00390650febb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga11f0fbc034fa81a4efedd73d61ce7568"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga11f0fbc034fa81a4efedd73d61ce7568">vmaFreeMemory</a> (VmaAllocator allocator, VmaAllocation allocation)</td></tr>
|
|
<tr class="memdesc:ga11f0fbc034fa81a4efedd73d61ce7568"><td class="mdescLeft"> </td><td class="mdescRight">Frees memory previously allocated using <a class="el" href="group__layer2.html#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation. ">vmaAllocateMemory()</a>, <a class="el" href="group__layer2.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, or <a class="el" href="group__layer2.html#ga0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer(). ">vmaAllocateMemoryForImage()</a>. <a href="#ga11f0fbc034fa81a4efedd73d61ce7568">More...</a><br /></td></tr>
|
|
<tr class="separator:ga11f0fbc034fa81a4efedd73d61ce7568"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga86dd08aba8633bfa4ad0df2e76481d8b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b">vmaGetAllocationInfo</a> (VmaAllocator allocator, VmaAllocation allocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
|
<tr class="memdesc:ga86dd08aba8633bfa4ad0df2e76481d8b"><td class="mdescLeft"> </td><td class="mdescRight">Returns current information about specified allocation. <a href="#ga86dd08aba8633bfa4ad0df2e76481d8b">More...</a><br /></td></tr>
|
|
<tr class="separator:ga86dd08aba8633bfa4ad0df2e76481d8b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaf9147d31ffc11d62fc187bde283ed14f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#gaf9147d31ffc11d62fc187bde283ed14f">vmaSetAllocationUserData</a> (VmaAllocator allocator, VmaAllocation allocation, void *pUserData)</td></tr>
|
|
<tr class="memdesc:gaf9147d31ffc11d62fc187bde283ed14f"><td class="mdescLeft"> </td><td class="mdescRight">Sets pUserData in given allocation to new value. <a href="#gaf9147d31ffc11d62fc187bde283ed14f">More...</a><br /></td></tr>
|
|
<tr class="separator:gaf9147d31ffc11d62fc187bde283ed14f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae5c9657d9e94756269145b01c05d16f1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#gae5c9657d9e94756269145b01c05d16f1">vmaCreateLostAllocation</a> (VmaAllocator allocator, VmaAllocation *pAllocation)</td></tr>
|
|
<tr class="memdesc:gae5c9657d9e94756269145b01c05d16f1"><td class="mdescLeft"> </td><td class="mdescRight">Creates new allocation that is in lost state from the beginning. <a href="#gae5c9657d9e94756269145b01c05d16f1">More...</a><br /></td></tr>
|
|
<tr class="separator:gae5c9657d9e94756269145b01c05d16f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gad5bd1243512d099706de88168992f069"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#gad5bd1243512d099706de88168992f069">vmaMapMemory</a> (VmaAllocator allocator, VmaAllocation allocation, void **ppData)</td></tr>
|
|
<tr class="separator:gad5bd1243512d099706de88168992f069"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9bc268595cb33f6ec4d519cfce81ff45"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory</a> (VmaAllocator allocator, VmaAllocation allocation)</td></tr>
|
|
<tr class="separator:ga9bc268595cb33f6ec4d519cfce81ff45"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga26b87244491c1fe77f11fe9ab5779c27"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga26b87244491c1fe77f11fe9ab5779c27">vmaUnmapPersistentlyMappedMemory</a> (VmaAllocator allocator)</td></tr>
|
|
<tr class="memdesc:ga26b87244491c1fe77f11fe9ab5779c27"><td class="mdescLeft"> </td><td class="mdescRight">Unmaps persistently mapped memory of types that are <code>HOST_COHERENT</code> and <code>DEVICE_LOCAL</code>. <a href="#ga26b87244491c1fe77f11fe9ab5779c27">More...</a><br /></td></tr>
|
|
<tr class="separator:ga26b87244491c1fe77f11fe9ab5779c27"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga03366170bb8e186605518d2f5d65b85a"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga03366170bb8e186605518d2f5d65b85a">vmaMapPersistentlyMappedMemory</a> (VmaAllocator allocator)</td></tr>
|
|
<tr class="memdesc:ga03366170bb8e186605518d2f5d65b85a"><td class="mdescLeft"> </td><td class="mdescRight">Maps back persistently mapped memory of types that are <code>HOST_COHERENT</code> and <code>DEVICE_LOCAL</code>. <a href="#ga03366170bb8e186605518d2f5d65b85a">More...</a><br /></td></tr>
|
|
<tr class="separator:ga03366170bb8e186605518d2f5d65b85a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga6aced90fcc7b39882b6654a740a0b9bb"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer2.html#ga6aced90fcc7b39882b6654a740a0b9bb">vmaDefragment</a> (VmaAllocator allocator, VmaAllocation *pAllocations, size_t allocationCount, VkBool32 *pAllocationsChanged, const <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> *pDefragmentationInfo, <a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a> *pDefragmentationStats)</td></tr>
|
|
<tr class="memdesc:ga6aced90fcc7b39882b6654a740a0b9bb"><td class="mdescLeft"> </td><td class="mdescRight">Compacts memory by moving allocations. <a href="#ga6aced90fcc7b39882b6654a740a0b9bb">More...</a><br /></td></tr>
|
|
<tr class="separator:ga6aced90fcc7b39882b6654a740a0b9bb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<h2 class="groupheader">Typedef Documentation</h2>
|
|
<a id="ga795e6ff02a21d5486c0565f403dd9255"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga795e6ff02a21d5486c0565f403dd9255">◆ </a></span>VmaAllocationInfo</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Parameters of <code>VmaAllocation</code> objects, that can be retrieved using function <a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gae67f8573a0cf20f16f0a1eecbca566a0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gae67f8573a0cf20f16f0a1eecbca566a0">◆ </a></span>VmaDefragmentationInfo</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Optional configuration parameters to be passed to function <a class="el" href="group__layer2.html#ga6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gab0f9b06441c840fee560de4a2967f8c9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gab0f9b06441c840fee560de4a2967f8c9">◆ </a></span>VmaDefragmentationStats</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct <a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a> <a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Statistics returned by function <a class="el" href="group__layer2.html#ga6aced90fcc7b39882b6654a740a0b9bb" title="Compacts memory by moving allocations. ">vmaDefragment()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga8f93195158e0e2ac80ca352064e71c1f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga8f93195158e0e2ac80ca352064e71c1f">◆ </a></span>VmaPoolCreateFlagBits</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef enum <a class="el" href="group__layer2.html#ga9a7c45f9c863695d98c83fa5ac940fe7">VmaPoolCreateFlagBits</a> <a class="el" href="group__layer2.html#ga9a7c45f9c863695d98c83fa5ac940fe7">VmaPoolCreateFlagBits</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Flags to be passed as <a class="el" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446" title="Use combination of VmaPoolCreateFlagBits. ">VmaPoolCreateInfo::flags</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga2770e325ea42e087c1b91fdf46d0292a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga2770e325ea42e087c1b91fdf46d0292a">◆ </a></span>VmaPoolCreateFlags</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef VkFlags <a class="el" href="group__layer2.html#ga2770e325ea42e087c1b91fdf46d0292a">VmaPoolCreateFlags</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga211706e9348dcee25a843ed4ea69bce7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga211706e9348dcee25a843ed4ea69bce7">◆ </a></span>VmaPoolCreateInfo</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Describes parameter of created <code>VmaPool</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga2e5612d871d64c5624087b837a338c34"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga2e5612d871d64c5624087b837a338c34">◆ </a></span>VmaPoolStats</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">typedef struct <a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a> <a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Describes parameter of existing <code>VmaPool</code>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Enumeration Type Documentation</h2>
|
|
<a id="ga9a7c45f9c863695d98c83fa5ac940fe7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga9a7c45f9c863695d98c83fa5ac940fe7">◆ </a></span>VmaPoolCreateFlagBits</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="group__layer2.html#ga9a7c45f9c863695d98c83fa5ac940fe7">VmaPoolCreateFlagBits</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Flags to be passed as <a class="el" href="struct_vma_pool_create_info.html#a8405139f63d078340ae74513a59f5446" title="Use combination of VmaPoolCreateFlagBits. ">VmaPoolCreateInfo::flags</a>. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga9a7c45f9c863695d98c83fa5ac940fe7a918441f7b40dca90481b114f5d224fe9"></a>VMA_POOL_CREATE_PERSISTENT_MAP_BIT </td><td class="fielddoc"><p>Set this flag to use a memory that will be persistently mapped.</p>
|
|
<p>Each allocation made from this pool will have <a class="el" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2" title="Pointer to the beginning of this allocation as mapped data. Null if this alloaction is not persistent...">VmaAllocationInfo::pMappedData</a> available.</p>
|
|
<p>Usage of this flag must match usage of VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT flag for every allocation made from this pool. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="gga9a7c45f9c863695d98c83fa5ac940fe7a9f1a499508a8edb4e8ba40aa0290a3d2"></a>VMA_POOL_CREATE_IGNORE_BUFFER_IMAGE_GRANULARITY_BIT </td><td class="fielddoc"><p>Use this flag if you always allocate only buffers and linear images or only optimal images out of this pool and so Buffer-Image Granularity can be ignored. </p>
|
|
<p>This is na optional optimization flag.</p>
|
|
<p>If you always allocate using <a class="el" href="group__layer3.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__layer3.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a>, <a class="el" href="group__layer2.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, then you don't need to use it because allocator knows exact type of your allocations so it can handle Buffer-Image Granularity in the optimal way.</p>
|
|
<p>If you also allocate using <a class="el" href="group__layer2.html#ga0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer(). ">vmaAllocateMemoryForImage()</a> or <a class="el" href="group__layer2.html#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation. ">vmaAllocateMemory()</a>, exact type of such allocations is not known, so allocator must be conservative in handling Buffer-Image Granularity, which can lead to suboptimal allocation (wasted memory). In that case, if you can make sure you always allocate only buffers and linear images or only optimal images out of this pool, use this flag to make allocator disregard Buffer-Image Granularity and so make allocations more optimal. </p>
|
|
</td></tr>
|
|
<tr><td class="fieldname"><a id="gga9a7c45f9c863695d98c83fa5ac940fe7a1c7312bea9ea246846b9054fd6bd6aec"></a>VMA_POOL_CREATE_FLAG_BITS_MAX_ENUM </td><td class="fielddoc"></td></tr>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="gabf28077dbf82d0908b8acbe8ee8dd9b8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gabf28077dbf82d0908b8acbe8ee8dd9b8">◆ </a></span>vmaAllocateMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">VkResult vmaAllocateMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const VkMemoryRequirements * </td>
|
|
<td class="paramname"><em>pVkMemoryRequirements</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> * </td>
|
|
<td class="paramname"><em>pCreateInfo</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation * </td>
|
|
<td class="paramname"><em>pAllocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> * </td>
|
|
<td class="paramname"><em>pAllocationInfo</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>General purpose memory allocation. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocation</td><td>Handle to allocated memory. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>You should free the memory using <a class="el" href="group__layer2.html#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(), or vmaAllocateMemoryForImage(). ">vmaFreeMemory()</a>.</p>
|
|
<p>It is recommended to use <a class="el" href="group__layer2.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, <a class="el" href="group__layer2.html#ga0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer(). ">vmaAllocateMemoryForImage()</a>, <a class="el" href="group__layer3.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__layer3.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a> instead whenever possible. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga7fdf64415b6c3d83c454f28d2c53df7b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga7fdf64415b6c3d83c454f28d2c53df7b">◆ </a></span>vmaAllocateMemoryForBuffer()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">VkResult vmaAllocateMemoryForBuffer </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VkBuffer </td>
|
|
<td class="paramname"><em>buffer</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> * </td>
|
|
<td class="paramname"><em>pCreateInfo</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation * </td>
|
|
<td class="paramname"><em>pAllocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> * </td>
|
|
<td class="paramname"><em>pAllocationInfo</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocation</td><td>Handle to allocated memory. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>You should free the memory using <a class="el" href="group__layer2.html#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(), or vmaAllocateMemoryForImage(). ">vmaFreeMemory()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga0faa3f9e5fb233d29d1e00390650febb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga0faa3f9e5fb233d29d1e00390650febb">◆ </a></span>vmaAllocateMemoryForImage()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">VkResult vmaAllocateMemoryForImage </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VkImage </td>
|
|
<td class="paramname"><em>image</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="struct_vma_allocation_create_info.html">VmaAllocationCreateInfo</a> * </td>
|
|
<td class="paramname"><em>pCreateInfo</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation * </td>
|
|
<td class="paramname"><em>pAllocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> * </td>
|
|
<td class="paramname"><em>pAllocationInfo</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__layer2.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gae5c9657d9e94756269145b01c05d16f1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gae5c9657d9e94756269145b01c05d16f1">◆ </a></span>vmaCreateLostAllocation()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaCreateLostAllocation </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation * </td>
|
|
<td class="paramname"><em>pAllocation</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Creates new allocation that is in lost state from the beginning. </p>
|
|
<p>It can be useful if you need a dummy, non-null allocation.</p>
|
|
<p>You still need to destroy created object using <a class="el" href="group__layer2.html#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(), or vmaAllocateMemoryForImage(). ">vmaFreeMemory()</a>.</p>
|
|
<p>Returned allocation is not tied to any specific memory pool or memory type and not bound to any image or buffer. It has size = 0. It cannot be turned into a real, non-empty allocation. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga5c8770ded7c59c8caac6de0c2cb00b50"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga5c8770ded7c59c8caac6de0c2cb00b50">◆ </a></span>vmaCreatePool()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">VkResult vmaCreatePool </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="struct_vma_pool_create_info.html">VmaPoolCreateInfo</a> * </td>
|
|
<td class="paramname"><em>pCreateInfo</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaPool * </td>
|
|
<td class="paramname"><em>pPool</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Allocates Vulkan device memory and creates <code>VmaPool</code> object. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">allocator</td><td>Allocator object. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">pCreateInfo</td><td>Parameters of pool to create. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pPool</td><td>Handle to created pool. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga6aced90fcc7b39882b6654a740a0b9bb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga6aced90fcc7b39882b6654a740a0b9bb">◆ </a></span>vmaDefragment()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">VkResult vmaDefragment </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation * </td>
|
|
<td class="paramname"><em>pAllocations</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>allocationCount</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VkBool32 * </td>
|
|
<td class="paramname"><em>pAllocationsChanged</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="struct_vma_defragmentation_info.html">VmaDefragmentationInfo</a> * </td>
|
|
<td class="paramname"><em>pDefragmentationInfo</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_defragmentation_stats.html">VmaDefragmentationStats</a> * </td>
|
|
<td class="paramname"><em>pDefragmentationStats</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Compacts memory by moving allocations. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">pAllocations</td><td>Array of allocations that can be moved during this compation. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">allocationCount</td><td>Number of elements in pAllocations and pAllocationsChanged arrays. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocationsChanged</td><td>Array of boolean values that will indicate whether matching allocation in pAllocations array has been moved. This parameter is optional. Pass null if you don't need this information. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">pDefragmentationInfo</td><td>Configuration parameters. Optional - pass null to use default values. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pDefragmentationStats</td><td>Statistics returned by the function. Optional - pass null if you don't need this information. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>VK_SUCCESS if completed, VK_INCOMPLETE if succeeded but didn't make all possible optimizations because limits specified in pDefragmentationInfo have been reached, negative error code in case of error.</dd></dl>
|
|
<p>This function works by moving allocations to different places (different <code>VkDeviceMemory</code> objects and/or different offsets) in order to optimize memory usage. Only allocations that are in pAllocations array can be moved. All other allocations are considered nonmovable in this call. Basic rules:</p>
|
|
<ul>
|
|
<li>Only allocations made in memory types that have <code>VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT</code> flag can be compacted. You may pass other allocations but it makes no sense - these will never be moved.</li>
|
|
<li>You may pass allocations made with <code>VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</code> but it makes no sense - they will never be moved.</li>
|
|
<li>Both allocations made with or without <code>VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT</code> flag can be compacted. If not persistently mapped, memory will be mapped temporarily inside this function if needed, so it shouldn't be mapped by you for the time of this call.</li>
|
|
<li>You must not pass same <code>VmaAllocation</code> object multiple times in pAllocations array.</li>
|
|
</ul>
|
|
<p>The function also frees empty <code>VkDeviceMemory</code> blocks.</p>
|
|
<p>After allocation has been moved, its <a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67" title="Handle to Vulkan memory object. ">VmaAllocationInfo::deviceMemory</a> and/or <a class="el" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268" title="Offset into deviceMemory object to the beginning of this allocation, in bytes. (deviceMemory, offset) pair is unique to this allocation. ">VmaAllocationInfo::offset</a> changes. You must query them again using <a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a> if you need them.</p>
|
|
<p>If an allocation has been moved, data in memory is copied to new place automatically, but if it was bound to a buffer or an image, you must destroy that object yourself, create new one and bind it to the new memory pointed by the allocation. You must use <code>vkDestroyBuffer()</code>, <code>vkDestroyImage()</code>, <code>vkCreateBuffer()</code>, <code>vkCreateImage()</code> for that purpose and NOT <a class="el" href="group__layer3.html#ga0d9f4e4ba5bf9aab1f1c746387753d77" title="Destroys Vulkan buffer and frees allocated memory. ">vmaDestroyBuffer()</a>, <a class="el" href="group__layer3.html#gae50d2cb3b4a3bfd4dd40987234e50e7e" title="Destroys Vulkan image and frees allocated memory. ">vmaDestroyImage()</a>, <a class="el" href="group__layer3.html#gac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="group__layer3.html#ga02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a>! Example:</p>
|
|
<pre class="fragment">VkDevice device = ...;
|
|
VmaAllocator allocator = ...;
|
|
std::vector<VkBuffer> buffers = ...;
|
|
std::vector<VmaAllocation> allocations = ...;
|
|
|
|
std::vector<VkBool32> allocationsChanged(allocations.size());
|
|
vmaDefragment(allocator, allocations.data(), allocations.size(), allocationsChanged.data(), nullptr, nullptr);
|
|
|
|
for(size_t i = 0; i < allocations.size(); ++i)
|
|
{
|
|
if(allocationsChanged[i])
|
|
{
|
|
VmaAllocationInfo allocInfo;
|
|
vmaGetAllocationInfo(allocator, allocations[i], &allocInfo);
|
|
|
|
vkDestroyBuffer(device, buffers[i], nullptr);
|
|
|
|
VkBufferCreateInfo bufferInfo = ...;
|
|
vkCreateBuffer(device, &bufferInfo, nullptr, &buffers[i]);
|
|
|
|
.// You can make dummy call to vkGetBufferMemoryRequirements here to silence validation layer warning.
|
|
|
|
vkBindBufferMemory(device, buffers[i], allocInfo.deviceMemory, allocInfo.offset);
|
|
}
|
|
}
|
|
</pre><p>This function may be time-consuming, so you shouldn't call it too often (like every frame or after every resource creation/destruction), but rater you can call it on special occasions (like when reloading a game level, when you just destroyed a lot of objects). </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga5485779c8f1948238fc4e92232fa65e1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga5485779c8f1948238fc4e92232fa65e1">◆ </a></span>vmaDestroyPool()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaDestroyPool </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaPool </td>
|
|
<td class="paramname"><em>pool</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Destroys VmaPool object and frees Vulkan device memory. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga11f0fbc034fa81a4efedd73d61ce7568"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga11f0fbc034fa81a4efedd73d61ce7568">◆ </a></span>vmaFreeMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaFreeMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation </td>
|
|
<td class="paramname"><em>allocation</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Frees memory previously allocated using <a class="el" href="group__layer2.html#gabf28077dbf82d0908b8acbe8ee8dd9b8" title="General purpose memory allocation. ">vmaAllocateMemory()</a>, <a class="el" href="group__layer2.html#ga7fdf64415b6c3d83c454f28d2c53df7b">vmaAllocateMemoryForBuffer()</a>, or <a class="el" href="group__layer2.html#ga0faa3f9e5fb233d29d1e00390650febb" title="Function similar to vmaAllocateMemoryForBuffer(). ">vmaAllocateMemoryForImage()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga86dd08aba8633bfa4ad0df2e76481d8b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga86dd08aba8633bfa4ad0df2e76481d8b">◆ </a></span>vmaGetAllocationInfo()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaGetAllocationInfo </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation </td>
|
|
<td class="paramname"><em>allocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> * </td>
|
|
<td class="paramname"><em>pAllocationInfo</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns current information about specified allocation. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gae8bf76997b234ef68aad922616df4153"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gae8bf76997b234ef68aad922616df4153">◆ </a></span>vmaGetPoolStats()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaGetPoolStats </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaPool </td>
|
|
<td class="paramname"><em>pool</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_pool_stats.html">VmaPoolStats</a> * </td>
|
|
<td class="paramname"><em>pPoolStats</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Retrieves statistics of existing VmaPool object. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">allocator</td><td>Allocator object. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">pool</td><td>Pool object. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pPoolStats</td><td>Statistics of specified pool. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga736bd6cbda886f36c891727e73bd4024"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga736bd6cbda886f36c891727e73bd4024">◆ </a></span>vmaMakePoolAllocationsLost()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaMakePoolAllocationsLost </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaPool </td>
|
|
<td class="paramname"><em>pool</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t * </td>
|
|
<td class="paramname"><em>pLostAllocationCount</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Marks all allocations in given pool as lost if they are not used in current frame or <a class="el" href="struct_vma_pool_create_info.html#a9437e43ffbb644dbbf7fc4e50cfad6aa" title="Maximum number of additional frames that are in use at the same time as current frame. ">VmaPoolCreateInfo::frameInUseCount</a> back from now. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir"></td><td class="paramname">allocator</td><td>Allocator object. </td></tr>
|
|
<tr><td class="paramdir"></td><td class="paramname">pool</td><td>Pool. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pLostAllocationCount</td><td>Number of allocations marked as lost. Optional - pass null if you don't need this information. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gad5bd1243512d099706de88168992f069"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gad5bd1243512d099706de88168992f069">◆ </a></span>vmaMapMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">VkResult vmaMapMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation </td>
|
|
<td class="paramname"><em>allocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void ** </td>
|
|
<td class="paramname"><em>ppData</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Feel free to use vkMapMemory on these memory blocks on you own if you want, but just for convenience and to make sure correct offset and size is always specified, usage of <a class="el" href="group__layer2.html#gad5bd1243512d099706de88168992f069">vmaMapMemory()</a> / <a class="el" href="group__layer2.html#ga9bc268595cb33f6ec4d519cfce81ff45">vmaUnmapMemory()</a> is recommended.</p>
|
|
<p>Do not use it on memory allocated with <code>VMA_ALLOCATION_CREATE_PERSISTENT_MAP_BIT</code> as multiple maps to same <code>VkDeviceMemory</code> is illegal. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga03366170bb8e186605518d2f5d65b85a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga03366170bb8e186605518d2f5d65b85a">◆ </a></span>vmaMapPersistentlyMappedMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">VkResult vmaMapPersistentlyMappedMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Maps back persistently mapped memory of types that are <code>HOST_COHERENT</code> and <code>DEVICE_LOCAL</code>. </p>
|
|
<p>See <a class="el" href="group__layer2.html#ga26b87244491c1fe77f11fe9ab5779c27" title="Unmaps persistently mapped memory of types that are HOST_COHERENT and DEVICE_LOCAL. ">vmaUnmapPersistentlyMappedMemory()</a>.</p>
|
|
<p>After this call <a class="el" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2" title="Pointer to the beginning of this allocation as mapped data. Null if this alloaction is not persistent...">VmaAllocationInfo::pMappedData</a> of some allocation may have value different than before calling <a class="el" href="group__layer2.html#ga26b87244491c1fe77f11fe9ab5779c27" title="Unmaps persistently mapped memory of types that are HOST_COHERENT and DEVICE_LOCAL. ">vmaUnmapPersistentlyMappedMemory()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gaf9147d31ffc11d62fc187bde283ed14f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaf9147d31ffc11d62fc187bde283ed14f">◆ </a></span>vmaSetAllocationUserData()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaSetAllocationUserData </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation </td>
|
|
<td class="paramname"><em>allocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"><em>pUserData</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets pUserData in given allocation to new value. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga9bc268595cb33f6ec4d519cfce81ff45"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga9bc268595cb33f6ec4d519cfce81ff45">◆ </a></span>vmaUnmapMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaUnmapMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation </td>
|
|
<td class="paramname"><em>allocation</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga26b87244491c1fe77f11fe9ab5779c27"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga26b87244491c1fe77f11fe9ab5779c27">◆ </a></span>vmaUnmapPersistentlyMappedMemory()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void vmaUnmapPersistentlyMappedMemory </td>
|
|
<td>(</td>
|
|
<td class="paramtype">VmaAllocator </td>
|
|
<td class="paramname"><em>allocator</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Unmaps persistently mapped memory of types that are <code>HOST_COHERENT</code> and <code>DEVICE_LOCAL</code>. </p>
|
|
<p>This is optional performance optimization. On AMD GPUs on Windows, Vulkan memory from the type that has both <code>DEVICE_LOCAL</code> and <code>HOST_VISIBLE</code> flags should not be mapped for the time of any call to <code>vkQueueSubmit()</code> or <code>vkQueuePresent()</code>. Although legal, that would cause performance degradation because WDDM migrates such memory to system RAM. To ensure this, you can unmap all persistently mapped memory using this function. Example:</p>
|
|
<pre class="fragment">vmaUnmapPersistentlyMappedMemory(allocator);
|
|
vkQueueSubmit(...)
|
|
vmaMapPersistentlyMappedMemory(allocator);
|
|
</pre><p>After this call <a class="el" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2" title="Pointer to the beginning of this allocation as mapped data. Null if this alloaction is not persistent...">VmaAllocationInfo::pMappedData</a> of some allocations may become null.</p>
|
|
<p>This call is reference-counted. Memory is mapped again after you call <a class="el" href="group__layer2.html#ga03366170bb8e186605518d2f5d65b85a" title="Maps back persistently mapped memory of types that are HOST_COHERENT and DEVICE_LOCAL. ">vmaMapPersistentlyMappedMemory()</a> same number of times that you called <a class="el" href="group__layer2.html#ga26b87244491c1fe77f11fe9ab5779c27" title="Unmaps persistently mapped memory of types that are HOST_COHERENT and DEVICE_LOCAL. ">vmaUnmapPersistentlyMappedMemory()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|