blob: 69171aac10d17b0fd02947ac5538078b0465e2f0 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<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.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Vulkan Memory Allocator: VmaAllocatorCreateInfo Struct Reference</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>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.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 id="projectrow">
<td id="projectalign">
<div id="projectname">Vulkan Memory Allocator
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- 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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_vma_allocator_create_info-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">VmaAllocatorCreateInfo Struct Reference<div class="ingroups"><a class="el" href="group__group__init.html">Library initialization</a></div></div></div>
</div><!--header-->
<div class="contents">
<p>Description of a Allocator to be created.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a392ea2ecbaff93f91a7c49f735ad4346" id="r_a392ea2ecbaff93f91a7c49f735ad4346"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__init.html#gacfe6863e160722c2c1bbcf7573fddc4d">VmaAllocatorCreateFlags</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a392ea2ecbaff93f91a7c49f735ad4346">flags</a></td></tr>
<tr class="memdesc:a392ea2ecbaff93f91a7c49f735ad4346"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags for created allocator. Use <a class="el" href="group__group__init.html#ga4f87c9100d154a65a4ad495f7763cf7c" title="Flags for created VmaAllocator.">VmaAllocatorCreateFlagBits</a> enum. <br /></td></tr>
<tr class="separator:a392ea2ecbaff93f91a7c49f735ad4346"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08230f04ae6ccf8a78150a9e829a7156" id="r_a08230f04ae6ccf8a78150a9e829a7156"><td class="memItemLeft" align="right" valign="top">VkPhysicalDevice&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a08230f04ae6ccf8a78150a9e829a7156">physicalDevice</a></td></tr>
<tr class="memdesc:a08230f04ae6ccf8a78150a9e829a7156"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vulkan physical device. <br /></td></tr>
<tr class="separator:a08230f04ae6ccf8a78150a9e829a7156"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad924ddd77b04039c88d0c09b0ffcd500" id="r_ad924ddd77b04039c88d0c09b0ffcd500"><td class="memItemLeft" align="right" valign="top">VkDevice&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad924ddd77b04039c88d0c09b0ffcd500">device</a></td></tr>
<tr class="memdesc:ad924ddd77b04039c88d0c09b0ffcd500"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vulkan device. <br /></td></tr>
<tr class="separator:ad924ddd77b04039c88d0c09b0ffcd500"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e4714298e3121cdd8b214a1ae7a637a" id="r_a8e4714298e3121cdd8b214a1ae7a637a"><td class="memItemLeft" align="right" valign="top">VkDeviceSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8e4714298e3121cdd8b214a1ae7a637a">preferredLargeHeapBlockSize</a></td></tr>
<tr class="memdesc:a8e4714298e3121cdd8b214a1ae7a637a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps &gt; 1 GiB. Optional. <br /></td></tr>
<tr class="separator:a8e4714298e3121cdd8b214a1ae7a637a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e409087e3be55400d0e4ccbe43c608d" id="r_a6e409087e3be55400d0e4ccbe43c608d"><td class="memItemLeft" align="right" valign="top">const VkAllocationCallbacks *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6e409087e3be55400d0e4ccbe43c608d">pAllocationCallbacks</a></td></tr>
<tr class="memdesc:a6e409087e3be55400d0e4ccbe43c608d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom CPU memory allocation callbacks. Optional. <br /></td></tr>
<tr class="separator:a6e409087e3be55400d0e4ccbe43c608d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1380969b5e1ea4c3184a877892d260e" id="r_af1380969b5e1ea4c3184a877892d260e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af1380969b5e1ea4c3184a877892d260e">pDeviceMemoryCallbacks</a></td></tr>
<tr class="memdesc:af1380969b5e1ea4c3184a877892d260e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Informative callbacks for <code>vkAllocateMemory</code>, <code>vkFreeMemory</code>. Optional. <br /></td></tr>
<tr class="separator:af1380969b5e1ea4c3184a877892d260e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31c192aa6cbffa33279f6d9f0c47c44b" id="r_a31c192aa6cbffa33279f6d9f0c47c44b"><td class="memItemLeft" align="right" valign="top">const VkDeviceSize *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a31c192aa6cbffa33279f6d9f0c47c44b">pHeapSizeLimit</a></td></tr>
<tr class="memdesc:a31c192aa6cbffa33279f6d9f0c47c44b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Either null or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap. <br /></td></tr>
<tr class="separator:a31c192aa6cbffa33279f6d9f0c47c44b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dc197be3227da7338b1643f70db36bd" id="r_a3dc197be3227da7338b1643f70db36bd"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3dc197be3227da7338b1643f70db36bd">pVulkanFunctions</a></td></tr>
<tr class="memdesc:a3dc197be3227da7338b1643f70db36bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointers to Vulkan functions. Can be null. <br /></td></tr>
<tr class="separator:a3dc197be3227da7338b1643f70db36bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70dd42e29b1df1d1b9b61532ae0b370b" id="r_a70dd42e29b1df1d1b9b61532ae0b370b"><td class="memItemLeft" align="right" valign="top">VkInstance&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a70dd42e29b1df1d1b9b61532ae0b370b">instance</a></td></tr>
<tr class="memdesc:a70dd42e29b1df1d1b9b61532ae0b370b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle to Vulkan instance object. <br /></td></tr>
<tr class="separator:a70dd42e29b1df1d1b9b61532ae0b370b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0ffc55139b54520a6bb704b29ffc285" id="r_ae0ffc55139b54520a6bb704b29ffc285"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae0ffc55139b54520a6bb704b29ffc285">vulkanApiVersion</a></td></tr>
<tr class="memdesc:ae0ffc55139b54520a6bb704b29ffc285"><td class="mdescLeft">&#160;</td><td class="mdescRight">Optional. Vulkan version that the application uses. <br /></td></tr>
<tr class="separator:ae0ffc55139b54520a6bb704b29ffc285"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8f0db05e5cb4c43d7713bf4a49a736b" id="r_ae8f0db05e5cb4c43d7713bf4a49a736b"><td class="memItemLeft" align="right" valign="top">const VkExternalMemoryHandleTypeFlagsKHR *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae8f0db05e5cb4c43d7713bf4a49a736b">pTypeExternalMemoryHandleTypes</a></td></tr>
<tr class="memdesc:ae8f0db05e5cb4c43d7713bf4a49a736b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Either null or a pointer to an array of external memory handle types for each Vulkan memory type. <br /></td></tr>
<tr class="separator:ae8f0db05e5cb4c43d7713bf4a49a736b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Description of a Allocator to be created. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="ad924ddd77b04039c88d0c09b0ffcd500" name="ad924ddd77b04039c88d0c09b0ffcd500"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad924ddd77b04039c88d0c09b0ffcd500">&#9670;&#160;</a></span>device</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkDevice VmaAllocatorCreateInfo::device</td>
</tr>
</table>
</div><div class="memdoc">
<p>Vulkan device. </p>
<p>It must be valid throughout whole lifetime of created allocator. </p>
</div>
</div>
<a id="a392ea2ecbaff93f91a7c49f735ad4346" name="a392ea2ecbaff93f91a7c49f735ad4346"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a392ea2ecbaff93f91a7c49f735ad4346">&#9670;&#160;</a></span>flags</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__group__init.html#gacfe6863e160722c2c1bbcf7573fddc4d">VmaAllocatorCreateFlags</a> VmaAllocatorCreateInfo::flags</td>
</tr>
</table>
</div><div class="memdoc">
<p>Flags for created allocator. Use <a class="el" href="group__group__init.html#ga4f87c9100d154a65a4ad495f7763cf7c" title="Flags for created VmaAllocator.">VmaAllocatorCreateFlagBits</a> enum. </p>
</div>
</div>
<a id="a70dd42e29b1df1d1b9b61532ae0b370b" name="a70dd42e29b1df1d1b9b61532ae0b370b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70dd42e29b1df1d1b9b61532ae0b370b">&#9670;&#160;</a></span>instance</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkInstance VmaAllocatorCreateInfo::instance</td>
</tr>
</table>
</div><div class="memdoc">
<p>Handle to Vulkan instance object. </p>
<p>Starting from version 3.0.0 this member is no longer optional, it must be set! </p>
</div>
</div>
<a id="a6e409087e3be55400d0e4ccbe43c608d" name="a6e409087e3be55400d0e4ccbe43c608d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e409087e3be55400d0e4ccbe43c608d">&#9670;&#160;</a></span>pAllocationCallbacks</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const VkAllocationCallbacks* VmaAllocatorCreateInfo::pAllocationCallbacks</td>
</tr>
</table>
</div><div class="memdoc">
<p>Custom CPU memory allocation callbacks. Optional. </p>
<p>Optional, can be null. When specified, will also be used for all CPU-side memory allocations. </p>
</div>
</div>
<a id="af1380969b5e1ea4c3184a877892d260e" name="af1380969b5e1ea4c3184a877892d260e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1380969b5e1ea4c3184a877892d260e">&#9670;&#160;</a></span>pDeviceMemoryCallbacks</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="struct_vma_device_memory_callbacks.html">VmaDeviceMemoryCallbacks</a>* VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</td>
</tr>
</table>
</div><div class="memdoc">
<p>Informative callbacks for <code>vkAllocateMemory</code>, <code>vkFreeMemory</code>. Optional. </p>
<p>Optional, can be null. </p>
</div>
</div>
<a id="a31c192aa6cbffa33279f6d9f0c47c44b" name="a31c192aa6cbffa33279f6d9f0c47c44b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31c192aa6cbffa33279f6d9f0c47c44b">&#9670;&#160;</a></span>pHeapSizeLimit</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const VkDeviceSize* VmaAllocatorCreateInfo::pHeapSizeLimit</td>
</tr>
</table>
</div><div class="memdoc">
<p>Either null or a pointer to an array of limits on maximum number of bytes that can be allocated out of particular Vulkan memory heap. </p>
<p>If not NULL, it must be a pointer to an array of <code>VkPhysicalDeviceMemoryProperties::memoryHeapCount</code> elements, defining limit on maximum number of bytes that can be allocated out of particular Vulkan memory heap.</p>
<p>Any of the elements may be equal to <code>VK_WHOLE_SIZE</code>, which means no limit on that heap. This is also the default in case of <code>pHeapSizeLimit</code> = NULL.</p>
<p>If there is a limit defined for a heap:</p>
<ul>
<li>If user tries to allocate more memory from that heap using this allocator, the allocation fails with <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code>.</li>
<li>If the limit is smaller than heap size reported in <code>VkMemoryHeap::size</code>, the value of this limit will be reported instead when using <a class="el" href="group__group__init.html#gab88db292a17974f911182543fda52d19">vmaGetMemoryProperties()</a>.</li>
</ul>
<p>Warning! Using this feature may not be equivalent to installing a GPU with smaller amount of memory, because graphics driver doesn't necessary fail new allocations with <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code> result when memory capacity is exceeded. It may return success and just silently migrate some device memory blocks to system RAM. This driver behavior can also be controlled using VK_AMD_memory_overallocation_behavior extension. </p>
</div>
</div>
<a id="a08230f04ae6ccf8a78150a9e829a7156" name="a08230f04ae6ccf8a78150a9e829a7156"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08230f04ae6ccf8a78150a9e829a7156">&#9670;&#160;</a></span>physicalDevice</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkPhysicalDevice VmaAllocatorCreateInfo::physicalDevice</td>
</tr>
</table>
</div><div class="memdoc">
<p>Vulkan physical device. </p>
<p>It must be valid throughout whole lifetime of created allocator. </p>
</div>
</div>
<a id="a8e4714298e3121cdd8b214a1ae7a637a" name="a8e4714298e3121cdd8b214a1ae7a637a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e4714298e3121cdd8b214a1ae7a637a">&#9670;&#160;</a></span>preferredLargeHeapBlockSize</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkDeviceSize VmaAllocatorCreateInfo::preferredLargeHeapBlockSize</td>
</tr>
</table>
</div><div class="memdoc">
<p>Preferred size of a single <code>VkDeviceMemory</code> block to be allocated from large heaps &gt; 1 GiB. Optional. </p>
<p>Set to 0 to use default, which is currently 256 MiB. </p>
</div>
</div>
<a id="ae8f0db05e5cb4c43d7713bf4a49a736b" name="ae8f0db05e5cb4c43d7713bf4a49a736b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8f0db05e5cb4c43d7713bf4a49a736b">&#9670;&#160;</a></span>pTypeExternalMemoryHandleTypes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const VkExternalMemoryHandleTypeFlagsKHR* VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Either null or a pointer to an array of external memory handle types for each Vulkan memory type. </p>
<p>If not NULL, it must be a pointer to an array of <code>VkPhysicalDeviceMemoryProperties::memoryTypeCount</code> elements, defining external memory handle types of particular Vulkan memory type, to be passed using <code>VkExportMemoryAllocateInfoKHR</code>.</p>
<p>Any of the elements may be equal to 0, which means not to use <code>VkExportMemoryAllocateInfoKHR</code> on this memory type. This is also the default in case of <code>pTypeExternalMemoryHandleTypes</code> = NULL. </p>
</div>
</div>
<a id="a3dc197be3227da7338b1643f70db36bd" name="a3dc197be3227da7338b1643f70db36bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3dc197be3227da7338b1643f70db36bd">&#9670;&#160;</a></span>pVulkanFunctions</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="struct_vma_vulkan_functions.html">VmaVulkanFunctions</a>* VmaAllocatorCreateInfo::pVulkanFunctions</td>
</tr>
</table>
</div><div class="memdoc">
<p>Pointers to Vulkan functions. Can be null. </p>
<p>For details see <a class="el" href="configuration.html#config_Vulkan_functions">Pointers to Vulkan functions</a>. </p>
</div>
</div>
<a id="ae0ffc55139b54520a6bb704b29ffc285" name="ae0ffc55139b54520a6bb704b29ffc285"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0ffc55139b54520a6bb704b29ffc285">&#9670;&#160;</a></span>vulkanApiVersion</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t VmaAllocatorCreateInfo::vulkanApiVersion</td>
</tr>
</table>
</div><div class="memdoc">
<p>Optional. Vulkan version that the application uses. </p>
<p>It must be a value in the format as created by macro <code>VK_MAKE_VERSION</code> or a constant like: <code>VK_API_VERSION_1_1</code>, <code>VK_API_VERSION_1_0</code>. The patch version number specified is ignored. Only the major and minor versions are considered. Only versions 1.0, 1.1, 1.2, 1.3 are supported by the current implementation. Leaving it initialized to zero is equivalent to <code>VK_API_VERSION_1_0</code>. It must match the Vulkan version used by the application and supported on the selected physical device, so it must be no higher than <code>VkApplicationInfo::apiVersion</code> passed to <code>vkCreateInstance</code> and no higher than <code>VkPhysicalDeviceProperties::apiVersion</code> found on the physical device used. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>D:/PROJECTS/Vulkan Memory Allocator/REPO/include/<a class="el" href="vk__mem__alloc_8h.html">vk_mem_alloc.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
</small></address>
</body>
</html>