<p>API elements related to the initialization and management of the entire library, especially <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object.
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code>. <ahref="struct_vma_device_memory_callbacks.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Pointers to some Vulkan functions - a subset used by the library. <ahref="struct_vma_vulkan_functions.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Description of a Allocator to be created. <ahref="struct_vma_allocator_create_info.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Information about existing <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object. <ahref="struct_vma_allocator_info.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Represents main object of this library initialized. <ahref="struct_vma_allocator.html#details">More...</a><br/></td></tr>
<trclass="memdesc:gafd73b95e737ee7e76f827cb5472f559f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Flags for created <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a>. <ahref="group__group__init.html#gafd73b95e737ee7e76f827cb5472f559f">More...</a><br/></td></tr>
<trclass="memdesc:ga7e1ed85f7799600b03ad51a77acc21f3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Callback function called after successful vkAllocateMemory. <ahref="group__group__init.html#ga7e1ed85f7799600b03ad51a77acc21f3">More...</a><br/></td></tr>
<trclass="memdesc:ga154ccaaf53dc2c36378f80f0c4f3679b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Callback function called before vkFreeMemory. <ahref="group__group__init.html#ga154ccaaf53dc2c36378f80f0c4f3679b">More...</a><br/></td></tr>
<trclass="memdesc:ga77692d3c8770ea8882d573206bd27b2b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code>. <ahref="group__group__init.html#ga77692d3c8770ea8882d573206bd27b2b">More...</a><br/></td></tr>
<trclass="memdesc:gabb0a8e3b5040d847571cca6c7f9a8074"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Pointers to some Vulkan functions - a subset used by the library. <ahref="group__group__init.html#gabb0a8e3b5040d847571cca6c7f9a8074">More...</a><br/></td></tr>
<trclass="memdesc:gaad9652301d33759b83e52d4f3605a14a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Description of a Allocator to be created. <ahref="group__group__init.html#gaad9652301d33759b83e52d4f3605a14a">More...</a><br/></td></tr>
<trclass="memdesc:ga1988031b0223fdbd564250fa1edd942c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Information about existing <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object. <ahref="group__group__init.html#ga1988031b0223fdbd564250fa1edd942c">More...</a><br/></td></tr>
<trclass="memdesc:ga4f87c9100d154a65a4ad495f7763cf7c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Flags for created <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a>. <ahref="group__group__init.html#ga4f87c9100d154a65a4ad495f7763cf7c">More...</a><br/></td></tr>
<trclass="memdesc:ga200692051ddb34240248234f5f4c17bb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object. <ahref="group__group__init.html#ga200692051ddb34240248234f5f4c17bb">More...</a><br/></td></tr>
<trclass="memdesc:gafa02231a791b37255720d566a52683e7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns information about existing <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object - handle to Vulkan device etc. <ahref="group__group__init.html#gafa02231a791b37255720d566a52683e7">More...</a><br/></td></tr>
<trclass="memdesc:ga8701444752eb5de4464adb5a2b514bca"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Given Memory Type Index, returns Property Flags of this memory type. <ahref="group__group__init.html#ga8701444752eb5de4464adb5a2b514bca">More...</a><br/></td></tr>
<trclass="memdesc:gade56bf8dc9f5a5eaddf5f119ed525236"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets index of the current frame. <ahref="group__group__init.html#gade56bf8dc9f5a5eaddf5f119ed525236">More...</a><br/></td></tr>
<p>API elements related to the initialization and management of the entire library, especially <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object. </p>
<p>Information about existing <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object. </p>
<p>Set of callbacks that the library will call for <code>vkAllocateMemory</code> and <code>vkFreeMemory</code>. </p>
<p>Provided for informative purpose, e.g. to gather statistics about number of allocations or total amount of memory allocated in Vulkan.</p>
<p>Used in <aclass="el"href="struct_vma_allocator_create_info.html#af1380969b5e1ea4c3184a877892d260e"title="Informative callbacks for vkAllocateMemory, vkFreeMemory. Optional.">VmaAllocatorCreateInfo::pDeviceMemoryCallbacks</a>. </p>
<p>Pointers to some Vulkan functions - a subset used by the library. </p>
<p>Used in <aclass="el"href="struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd"title="Pointers to Vulkan functions. Can be null.">VmaAllocatorCreateInfo::pVulkanFunctions</a>. </p>
</div>
</div>
<h2class="groupheader">Enumeration Type Documentation</h2>
<p>Flags for created <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a>. </p>
<tableclass="fieldtable">
<tr><thcolspan="2">Enumerator</th></tr><tr><tdclass="fieldname"><aid="gga4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d"name="gga4f87c9100d154a65a4ad495f7763cf7ca4816ddaed324ba110172ca608a20f29d"></a>VMA_ALLOCATOR_CREATE_EXTERNALLY_SYNCHRONIZED_BIT </td><tdclass="fielddoc"><p>Allocator and all objects created from it will not be synchronized internally, so you must guarantee they are used from only one thread at a time or synchronized externally by you. </p>
<p>Using this flag may increase performance because internal mutexes are not used. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878"name="gga4f87c9100d154a65a4ad495f7763cf7cace7da7cc6e71a625dfa763c55a597878"></a>VMA_ALLOCATOR_CREATE_KHR_DEDICATED_ALLOCATION_BIT </td><tdclass="fielddoc"><p>Enables usage of VK_KHR_dedicated_allocation extension. </p>
<p>The flag works only if <aclass="el"href="struct_vma_allocator_create_info.html#ae0ffc55139b54520a6bb704b29ffc285"title="Optional. The highest version of Vulkan that the application is designed to use.">VmaAllocatorCreateInfo::vulkanApiVersion</a><code>== VK_API_VERSION_1_0</code>. When it is <code>VK_API_VERSION_1_1</code>, the flag is ignored because the extension has been promoted to Vulkan 1.1.</p>
<p>Using this extension will automatically allocate dedicated blocks of memory for some buffers and images instead of suballocating place for them out of bigger memory blocks (as if you explicitly used <aclass="el"href="group__group__alloc.html#ggad9889c10c798b040d59c92f257cae597a3fc311d855c2ff53f1090ef5c722b38f"title="Set this flag if the allocation should have its own memory block.">VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT</a> flag) when it is recommended by the driver. It may improve performance on some GPUs.</p>
<p>You may set this flag only if you found out that following device extensions are supported, you enabled them while creating Vulkan device passed as <aclass="el"href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500"title="Vulkan device.">VmaAllocatorCreateInfo::device</a>, and you want them to be used internally by this library:</p>
<p>When this flag is set, you can experience following warnings reported by Vulkan validation layer. You can ignore them.</p>
<blockquoteclass="doxtable">
<p>vkBindBufferMemory(): Binding memory to buffer 0x2d but vkGetBufferMemoryRequirements() has not been called on that buffer. </p>
</blockquote>
</td></tr>
<tr><tdclass="fieldname"><aid="gga4f87c9100d154a65a4ad495f7763cf7ca8fb75bf07cd184ab903596295e863dee"name="gga4f87c9100d154a65a4ad495f7763cf7ca8fb75bf07cd184ab903596295e863dee"></a>VMA_ALLOCATOR_CREATE_KHR_BIND_MEMORY2_BIT </td><tdclass="fielddoc"><p>Enables usage of VK_KHR_bind_memory2 extension.</p>
<p>The flag works only if <aclass="el"href="struct_vma_allocator_create_info.html#ae0ffc55139b54520a6bb704b29ffc285"title="Optional. The highest version of Vulkan that the application is designed to use.">VmaAllocatorCreateInfo::vulkanApiVersion</a><code>== VK_API_VERSION_1_0</code>. When it is <code>VK_API_VERSION_1_1</code>, the flag is ignored because the extension has been promoted to Vulkan 1.1.</p>
<p>You may set this flag only if you found out that this device extension is supported, you enabled it while creating Vulkan device passed as <aclass="el"href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500"title="Vulkan device.">VmaAllocatorCreateInfo::device</a>, and you want it to be used internally by this library.</p>
<p>The extension provides functions <code>vkBindBufferMemory2KHR</code> and <code>vkBindImageMemory2KHR</code>, which allow to pass a chain of <code>pNext</code> structures while binding. This flag is required if you use <code>pNext</code> parameter in <aclass="el"href="group__group__alloc.html#ga927c944f45e0f2941182abb6f608e64a"title="Binds buffer to allocation with additional parameters.">vmaBindBufferMemory2()</a> or <aclass="el"href="group__group__alloc.html#gaa8251ee81b0045a443e35b8e8aa021bc"title="Binds image to allocation with additional parameters.">vmaBindImageMemory2()</a>. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga4f87c9100d154a65a4ad495f7763cf7ca4d4687863f7bd4b418c6006dc04400b0"name="gga4f87c9100d154a65a4ad495f7763cf7ca4d4687863f7bd4b418c6006dc04400b0"></a>VMA_ALLOCATOR_CREATE_EXT_MEMORY_BUDGET_BIT </td><tdclass="fielddoc"><p>Enables usage of VK_EXT_memory_budget extension.</p>
<p>You may set this flag only if you found out that this device extension is supported, you enabled it while creating Vulkan device passed as <aclass="el"href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500"title="Vulkan device.">VmaAllocatorCreateInfo::device</a>, and you want it to be used internally by this library, along with another instance extension VK_KHR_get_physical_device_properties2, which is required by it (or Vulkan 1.1, where this extension is promoted).</p>
<p>The extension provides query for current memory usage and budget, which will probably be more accurate than an estimation used by the library otherwise. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga4f87c9100d154a65a4ad495f7763cf7ca2acce4886d8078552efa38878413970f"name="gga4f87c9100d154a65a4ad495f7763cf7ca2acce4886d8078552efa38878413970f"></a>VMA_ALLOCATOR_CREATE_AMD_DEVICE_COHERENT_MEMORY_BIT </td><tdclass="fielddoc"><p>Enables usage of VK_AMD_device_coherent_memory extension.</p>
<p>You may set this flag only if you:</p>
<ul>
<li>found out that this device extension is supported and enabled it while creating Vulkan device passed as <aclass="el"href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500"title="Vulkan device.">VmaAllocatorCreateInfo::device</a>,</li>
<li>checked that <code>VkPhysicalDeviceCoherentMemoryFeaturesAMD::deviceCoherentMemory</code> is true and set it while creating the Vulkan device,</li>
<li>want it to be used internally by this library.</li>
</ul>
<p>The extension and accompanying device feature provide access to memory types with <code>VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD</code> and <code>VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD</code> flags. They are useful mostly for writing breadcrumb markers - a common method for debugging GPU crash/hang/TDR.</p>
<p>When the extension is not enabled, such memory types are still enumerated, but their usage is illegal. To protect from this error, if you don't create the allocator with this flag, it will refuse to allocate any memory or create a custom pool in such memory type, returning <code>VK_ERROR_FEATURE_NOT_PRESENT</code>. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga4f87c9100d154a65a4ad495f7763cf7ca5f1b28b0414319d1687e1f2b30ab0089"name="gga4f87c9100d154a65a4ad495f7763cf7ca5f1b28b0414319d1687e1f2b30ab0089"></a>VMA_ALLOCATOR_CREATE_BUFFER_DEVICE_ADDRESS_BIT </td><tdclass="fielddoc"><p>Enables usage of "buffer device address" feature, which allows you to use function <code>vkGetBufferDeviceAddress*</code> to get raw GPU pointer to a buffer and pass it for usage inside a shader.</p>
<p>You may set this flag only if you:</p>
<oltype="1">
<li>(For Vulkan version < 1.2) Found as available and enabled device extension VK_KHR_buffer_device_address. This extension is promoted to core Vulkan 1.2.</li>
<li>Found as available and enabled device feature <code>VkPhysicalDeviceBufferDeviceAddressFeatures::bufferDeviceAddress</code>.</li>
</ol>
<p>When this flag is set, you can create buffers with <code>VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT</code> using VMA. The library automatically adds <code>VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT</code> to allocated memory blocks wherever it might be needed.</p>
<p>For more information, see documentation chapter <aclass="el"href="enabling_buffer_device_address.html">Enabling buffer device address</a>. </p>
</td></tr>
<tr><tdclass="fieldname"><aid="gga4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a"name="gga4f87c9100d154a65a4ad495f7763cf7caffdd7a5169be3dbd7cbf6b3619e4f78a"></a>VMA_ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BIT </td><tdclass="fielddoc"><p>Enables usage of VK_EXT_memory_priority extension in the library.</p>
<p>You may set this flag only if you found available and enabled this device extension, along with <code>VkPhysicalDeviceMemoryPriorityFeaturesEXT::memoryPriority == VK_TRUE</code>, while creating Vulkan device passed as <aclass="el"href="struct_vma_allocator_create_info.html#ad924ddd77b04039c88d0c09b0ffcd500"title="Vulkan device.">VmaAllocatorCreateInfo::device</a>.</p>
<p>When this flag is used, <aclass="el"href="struct_vma_allocation_create_info.html#a983d39e1a2e63649d78a960aa2fdd0f7"title="A floating-point value between 0 and 1, indicating the priority of the allocation relative to other m...">VmaAllocationCreateInfo::priority</a> and <aclass="el"href="struct_vma_pool_create_info.html#a16e686c688f6725f119ebf6e24ab5274"title="A floating-point value between 0 and 1, indicating the priority of the allocations in this pool relat...">VmaPoolCreateInfo::priority</a> are used to set priorities of allocated Vulkan memory. Without it, these variables are ignored.</p>
<p>A priority must be a floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations. Larger values are higher priority. The granularity of the priorities is implementation-dependent. It is automatically passed to every call to <code>vkAllocateMemory</code> done by the library using structure <code>VkMemoryPriorityAllocateInfoEXT</code>. The value to be used for default priority is 0.5. For more details, see the documentation of the VK_EXT_memory_priority extension. </p>
<p>Returns information about existing <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> object - handle to Vulkan device etc. </p>
<p>It might be useful if you want to keep just the <aclass="el"href="struct_vma_allocator.html"title="Represents main object of this library initialized.">VmaAllocator</a> handle and fetch other required handles to <code>VkPhysicalDevice</code>, <code>VkDevice</code> etc. every time using this function. </p>
<p>PhysicalDeviceMemoryProperties are fetched from physicalDevice by the allocator. You can access it here, without fetching it again on your own. </p>
<p>Given Memory Type Index, returns Property Flags of this memory type. </p>
<p>This is just a convenience function. Same information can be obtained using <aclass="el"href="group__group__init.html#gab88db292a17974f911182543fda52d19">vmaGetMemoryProperties()</a>. </p>