Usage values VMA_MEMORY_USAGE_AUTO* are legal to use only when the library knows about the resource being created by having VkBufferCreateInfo / VkImageCreateInfo passed, so they work with functions like: vmaCreateBuffer(), vmaCreateImage(), vmaFindMemoryTypeIndexForBufferInfo() etc. If you allocate raw memory using function vmaAllocateMemory(), you have to use other means of selecting memory type, as described below.
Bitmask containing one bit set for every memory type acceptable for this allocation.
Definition vk_mem_alloc.h:1334
You can also use this parameter to exclude some memory types. If you inspect memory heaps and types available on the current physical device and you determine that for some reason you don't want to use a specific memory type for the allocation, you can enable automatic memory type selection but exclude certain memory type or types by setting all bits of memoryTypeBits to 1 except the ones you choose.
-Generated by 1.16.1
+Generated by 1.17.0
diff --git a/docs/html/clipboard.js b/docs/html/clipboard.js
index 9da9f3ca..6a0f42cd 100644
--- a/docs/html/clipboard.js
+++ b/docs/html/clipboard.js
@@ -32,7 +32,7 @@ let clipboard_icon = ``
let clipboard_successDuration = 1000
-$(function() {
+document.addEventListener('DOMContentLoaded', function() {
if(navigator.clipboard) {
const fragments = document.getElementsByClassName("fragment")
for(const fragment of fragments) {
@@ -40,7 +40,7 @@ $(function() {
clipboard_div.classList.add("clipboard")
clipboard_div.innerHTML = clipboard_icon
clipboard_div.title = clipboard_title
- $(clipboard_div).click(function() {
+ clipboard_div.addEventListener('click', function() {
const content = this.parentNode.cloneNode(true)
// filter out line number and folded fragments from file listings
content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() })
diff --git a/docs/html/codefolding.js b/docs/html/codefolding.js
new file mode 100644
index 00000000..5b55e8b6
--- /dev/null
+++ b/docs/html/codefolding.js
@@ -0,0 +1,143 @@
+/*
+ @licstart The following is the entire license notice for the JavaScript code in this file.
+
+ The MIT License (MIT)
+
+ Copyright (C) 1997-2026 by Dimitri van Heesch
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or
+ substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ @licend The above is the entire license notice for the JavaScript code in this file
+ */
+
+let codefold = {
+ opened : true,
+
+ show_plus : function(el) {
+ if (el) {
+ el.classList.remove('minus');
+ el.classList.add('plus');
+ }
+ },
+
+ show_minus : function(el) {
+ if (el) {
+ el.classList.add('minus');
+ el.classList.remove('plus');
+ }
+ },
+
+ // toggle all folding blocks
+ toggle_all : function() {
+ if (this.opened) {
+ const foldAll = document.getElementById('fold_all');
+ this.show_plus(foldAll);
+ document.querySelectorAll('div[id^=foldopen]').forEach(el => el.style.display = 'none');
+ document.querySelectorAll('div[id^=foldclosed]').forEach(el => el.style.display = '');
+ document.querySelectorAll('div[id^=foldclosed] span.fold').forEach(el => this.show_plus(el));
+ } else {
+ const foldAll = document.getElementById('fold_all');
+ this.show_minus(foldAll);
+ document.querySelectorAll('div[id^=foldopen]').forEach(el => el.style.display = '');
+ document.querySelectorAll('div[id^=foldclosed]').forEach(el => el.style.display = 'none');
+ }
+ this.opened=!this.opened;
+ },
+
+ // toggle single folding block
+ toggle : function(id) {
+ const openEl = document.getElementById('foldopen'+id);
+ const closedEl = document.getElementById('foldclosed'+id);
+ if (openEl) {
+ openEl.style.display = openEl.style.display === 'none' ? '' : 'none';
+ const nextEl = openEl.nextElementSibling;
+ if (nextEl) {
+ nextEl.querySelectorAll('span.fold').forEach(el => this.show_plus(el));
+ }
+ }
+ if (closedEl) {
+ closedEl.style.display = closedEl.style.display === 'none' ? '' : 'none';
+ }
+ },
+
+ init : function() {
+ // add code folding line and global control
+ document.querySelectorAll('span.lineno').forEach((el, index) => {
+ el.style.paddingRight = '4px';
+ el.style.marginRight = '2px';
+ el.style.display = 'inline-block';
+ el.style.width = '54px';
+ el.style.background = 'linear-gradient(var(--fold-line-color),var(--fold-line-color)) no-repeat 46px/2px 100%';
+ const span = document.createElement('span');
+ if (index === 0) { // add global toggle to first line
+ span.className = 'fold minus';
+ span.id = 'fold_all';
+ span.onclick = () => codefold.toggle_all();
+ } else { // add vertical lines to other rows
+ span.className = 'fold'
+ }
+ el.appendChild(span);
+ });
+ // add toggle controls to lines with fold divs
+ document.querySelectorAll('div.foldopen').forEach(el => {
+ // extract specific id to use
+ const id = el.getAttribute('id').replace('foldopen','');
+ // extract start and end foldable fragment attributes
+ const start = el.getAttribute('data-start');
+ const end = el.getAttribute('data-end');
+ // replace normal fold span with controls for the first line of a foldable fragment
+ const firstFold = el.querySelector('span.fold');
+ if (firstFold) {
+ const span = document.createElement('span');
+ span.className = 'fold minus';
+ span.onclick = () => codefold.toggle(id);
+ firstFold.replaceWith(span);
+ }
+ // append div for folded (closed) representation
+ const closedDiv = document.createElement('div');
+ closedDiv.id = 'foldclosed'+id;
+ closedDiv.className = 'foldclosed';
+ closedDiv.style.display = 'none';
+ el.after(closedDiv);
+ // extract the first line from the "open" section to represent closed content
+ const line = el.children[0] ? el.children[0].cloneNode(true) : null;
+ if (line) {
+ // remove any glow that might still be active on the original line
+ line.classList.remove('glow');
+ if (start) {
+ // if line already ends with a start marker (e.g. trailing {), remove it
+ line.innerHTML = line.innerHTML.replace(new RegExp('\\s*'+start+'\\s*$','g'),'');
+ }
+ // replace minus with plus symbol
+ line.querySelectorAll('span.fold').forEach(span => {
+ codefold.show_plus(span);
+ // re-apply click handler as it is not copied with cloneNode
+ span.onclick = () => codefold.toggle(id);
+ });
+ // append ellipsis
+ const ellipsisLink = document.createElement('a');
+ ellipsisLink.href = "javascript:codefold.toggle('"+id+"')";
+ ellipsisLink.innerHTML = '…';
+ line.appendChild(document.createTextNode(' '+start));
+ line.appendChild(ellipsisLink);
+ line.appendChild(document.createTextNode(end));
+ // insert constructed line into closed div
+ closedDiv.appendChild(line);
+ }
+ });
+ },
+};
+/* @license-end */
diff --git a/docs/html/configuration.html b/docs/html/configuration.html
index 546dad53..e5b15ee2 100644
--- a/docs/html/configuration.html
+++ b/docs/html/configuration.html
@@ -3,17 +3,21 @@
-
+
Vulkan Memory Allocator: Configuration
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
Array of moves to be performed by the user in the current defragmentation pass.
Definition vk_mem_alloc.h:1610
Although functions like vmaCreateBuffer(), vmaCreateImage(), vmaDestroyBuffer(), vmaDestroyImage() create/destroy an allocation and a buffer/image at once, these are just a shortcut for creating the resource, allocating memory, and binding them together. Defragmentation works on memory allocations only. You must handle the rest manually. Defragmentation is an iterative process that should repreat "passes" as long as related functions return VK_INCOMPLETE not VK_SUCCESS. In each pass:
Pointers to some Vulkan functions - a subset used by the library.
Definition vk_mem_alloc.h:1028
Internally in this function, pointers to functions related to the entire Vulkan instance are fetched using global function definitions, while pointers to functions related to the Vulkan device are fetched using volkLoadDeviceTable() for given pAllocatorCreateInfo->device.
-Generated by 1.16.1
+Generated by 1.17.0
diff --git a/docs/html/menu.js b/docs/html/menu.js
index 15f9c522..8172efef 100644
--- a/docs/html/menu.js
+++ b/docs/html/menu.js
@@ -22,11 +22,71 @@
@licend The above is the entire license notice for the JavaScript code in this file
*/
-function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) {
- function makeTree(data,relPath) {
+function initMenu(relPath,treeview) {
+
+ const SHOW_DELAY = 250; // 250ms delay before showing
+ const HIDE_DELAY = 500; // 500ms delay before hiding
+ const SLIDE_DELAY = 250; // 250ms slide up/down delay
+ const WHEEL_STEP = 30; // 30 pixel per mouse wheel tick
+ const ARROW_STEP = 5; // 5 pixel when hovering arrow up/down
+ const ARROW_POLL_INTERVAL = 20; // 20ms per arrow up/down check
+ const MOBILE_WIDTH = 768; // switch point for mobile/desktop mode
+
+ // Helper function for slideDown animation
+ function slideDown(element, duration, callback) {
+ if (element.dataset.animating) return;
+ element.dataset.animating = 'true';
+
+ element.style.removeProperty('display');
+ let display = window.getComputedStyle(element).display;
+ if (display === 'none') display = 'block';
+ element.style.display = display;
+ const height = element.offsetHeight;
+ element.style.overflow = 'hidden';
+ element.style.height = 0;
+ element.offsetHeight; // force reflow
+ element.style.transitionProperty = 'height';
+ element.style.transitionDuration = duration + 'ms';
+ element.style.height = height + 'px';
+ window.setTimeout(() => {
+ element.style.removeProperty('height');
+ element.style.removeProperty('overflow');
+ element.style.removeProperty('transition-duration');
+ element.style.removeProperty('transition-property');
+ delete element.dataset.animating;
+ if (callback) callback();
+ }, duration);
+ }
+
+ // Helper function for slideUp animation
+ function slideUp(element, duration, callback) {
+ if (element.dataset.animating) return;
+ element.dataset.animating = 'true';
+
+ element.style.transitionProperty = 'height';
+ element.style.transitionDuration = duration + 'ms';
+ element.style.height = element.offsetHeight + 'px';
+ element.offsetHeight; // force reflow
+ element.style.overflow = 'hidden';
+ element.style.height = 0;
+ window.setTimeout(() => {
+ element.style.display = 'none';
+ element.style.removeProperty('height');
+ element.style.removeProperty('overflow');
+ element.style.removeProperty('transition-duration');
+ element.style.removeProperty('transition-property');
+ delete element.dataset.animating;
+ if (callback) callback();
+ }, duration);
+ }
+
+ // Helper to create the menu tree structure
+ function makeTree(data,relPath,topLevel=false) {
let result='';
if ('children' in data) {
- result+='
';
+ if (!topLevel) {
+ result+='
';
+ }
for (let i in data.children) {
let url;
const link = data.children[i].url;
@@ -39,93 +99,471 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) {
data.children[i].text+'
'+
makeTree(data.children[i],relPath)+'
';
}
- result+='';
+ if (!topLevel) {
+ result+='';
+ }
}
return result;
}
- let searchBoxHtml;
- if (searchEnabled) {
- if (serverSide) {
- searchBoxHtml='
Note that the structure passed as VmaPoolCreateInfo::pMemoryAllocateNext must remain alive and unchanged for the whole lifetime of the custom pool, because it will be used when the pool allocates a new device memory block. No copy is made internally. This is why variable exportMemAllocInfo is defined as static.
If you want to export all memory allocated by VMA from certain memory types, including dedicated allocations and allocations made from default pools, an alternative solution is to fill in VmaAllocatorCreateInfo::pTypeExternalMemoryHandleTypes. It should point to an array with VkExternalMemoryHandleTypeFlagsKHR to be automatically passed by the library through VkExportMemoryAllocateInfoKHR on each allocation made from a specific memory type. You should not mix these two methods in a way that allows to apply both to the same memory type. Otherwise, VkExportMemoryAllocateInfoKHR structure would be attached twice to the pNext chain of VkMemoryAllocateInfo.
If you need each allocation to have its own device memory block and start at offset 0, you can still do by using VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT flag. It works also with custom pools.
Alternatively, you can use convenient functions vmaCreateDedicatedBuffer(), vmaCreateDedicatedImage() that always allocate dedicated memory for the buffer/image created, and also allow specifying custom pNext chain for the VkMemoryAllocateInfo structure.
@@ -237,7 +264,7 @@
-Generated by 1.16.1
+Generated by 1.17.0
diff --git a/docs/html/pages.html b/docs/html/pages.html
index ff608a58..df0fb97d 100644
--- a/docs/html/pages.html
+++ b/docs/html/pages.html
@@ -3,17 +3,21 @@
-
+
Vulkan Memory Allocator: Related Pages
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
Remember that using resources that alias in memory requires proper synchronization. You need to issue a memory barrier to make sure commands that use img1 and img2 don't overlap on GPU timeline. You also need to treat a resource after aliasing as uninitialized - containing garbage data. For example, if you use img1 and then want to use img2, you need to issue an image memory barrier for img2 with oldLayout = VK_IMAGE_LAYOUT_UNDEFINED.
Fetch from "vkGetPhysicalDeviceMemoryProperties2" on Vulkan >= 1.1, but you can also fetch it from "vkGetPhysicalDeviceMemoryProperties2KHR" if you enabled extension VK_KHR_get_physical_device_properties2.
Fetch from "vkGetDeviceBufferMemoryRequirements" on Vulkan >= 1.3, but you can also fetch it from "vkGetDeviceBufferMemoryRequirementsKHR" if you enabled extension VK_KHR_maintenance4.
Fetch from "vkGetPhysicalDeviceMemoryProperties2" on Vulkan >= 1.1, but you can also fetch it from "vkGetPhysicalDeviceMemoryProperties2KHR" if you enabled extension VK_KHR_get_physical_device_properties2.
-
@@ -526,7 +535,7 @@
-Generated by 1.16.1
+Generated by 1.17.0
diff --git a/docs/html/tabs.css b/docs/html/tabs.css
index 84f33ae7..5b84c153 100644
--- a/docs/html/tabs.css
+++ b/docs/html/tabs.css
@@ -1 +1,482 @@
-.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-color:var(--nav-menu-background-color)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;line-height:36px;text-decoration:none;color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-color:var(--nav-menu-background-color);line-height:36px}.sm-dox a span.sub-arrow{top:15px;right:10px;box-sizing:content-box;padding:0;margin:0;display:inline-block;width:5px;height:5px;background-color:var(--nav-menu-background-color);border-right:2px solid var(--nav-arrow-color);border-bottom:2px solid var(--nav-arrow-color);transform:rotate(45deg);-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 6px}.sm-dox a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px !important}.sm-dox a:hover span.sub-arrow{background-color:var(--nav-menu-active-bg);border-right:2px solid var(--nav-arrow-selected-color);border-bottom:2px solid var(--nav-arrow-selected-color)}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0;padding:3px}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{transform:rotate(-45deg)}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-color:var(--nav-menu-active-bg);border-radius:5px}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:6px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:6px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}}
+.sm {
+ position: relative;
+ z-index: 9999
+}
+
+.sm,.sm li,.sm ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ line-height: normal;
+ direction: ltr;
+ text-align: left;
+ -webkit-tap-highlight-color: transparent
+}
+
+.sm,.sm li {
+ display: block
+}
+
+.sm-rtl,.sm-rtl li,.sm-rtl ul {
+ direction: rtl;
+ text-align: right
+}
+
+.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6 {
+ margin: 0;
+ padding: 0
+}
+
+.sm ul {
+ display: none
+}
+
+.sm a,.sm li {
+ position: relative
+}
+
+.sm a,.sm:after {
+ display: block
+}
+
+.sm a.disabled {
+ cursor: not-allowed
+}
+
+.sm:after {
+ content: " ";
+ height: 0;
+ font: 0/0 serif;
+ clear: both;
+ visibility: hidden;
+ overflow: hidden
+}
+
+.sm,.sm *,.sm :after,.sm :before {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box
+}
+
+.main-menu-btn {
+ position: relative;
+ display: inline-block;
+ width: 36px;
+ height: 36px;
+ text-indent: 36px;
+ margin-left: 8px;
+ white-space: nowrap;
+ overflow: hidden;
+ cursor: pointer;
+ -webkit-tap-highlight-color: transparent
+}
+
+.main-menu-btn-icon {
+ top: 50%;
+ left: 2px
+}
+
+.main-menu-btn-icon,.main-menu-btn-icon:after,.main-menu-btn-icon:before {
+ position: absolute;
+ height: 2px;
+ width: 24px;
+ background: var(--nav-menu-button-color);
+ -webkit-transition: all .25s;
+ transition: all .25s
+}
+
+.main-menu-btn-icon:before {
+ content: "";
+ top: -7px;
+ left: 0
+}
+
+.main-menu-btn-icon:after {
+ content: "";
+ top: 7px;
+ left: 0
+}
+
+#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon {
+ height: 0
+}
+
+#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:before {
+ top: 0;
+ -webkit-transform: rotate(-45deg);
+ transform: rotate(-45deg)
+}
+
+#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:after {
+ top: 0;
+ -webkit-transform: rotate(45deg);
+ transform: rotate(45deg)
+}
+
+#main-menu-state {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ margin: -1px;
+ border: 0;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(1px,1px,1px,1px)
+}
+
+#main-menu-state:not(:checked)~#main-menu {
+ display: none
+}
+
+#main-menu-state:checked~#main-menu {
+ display: block
+}
+
+@media (min-width:768px) {
+ .main-menu-btn {
+ position: absolute;
+ top: -99999px
+ }
+
+ #main-menu-state:not(:checked)~#main-menu {
+ display: block
+ }
+}
+
+.sm-dox {
+ background-color: var(--nav-menu-background-color)
+}
+
+.sm-dox a,.sm-dox a:active,.sm-dox a:focus,.sm-dox a:hover {
+ padding: 0 43px 0 12px;
+ font-family: var(--font-family-nav);
+ font-size: 13px;
+ line-height: 36px;
+ text-decoration: none;
+ color: var(--nav-text-normal-color);
+ outline: 0
+}
+
+.sm-dox a:hover {
+ background-color: var(--nav-menu-active-bg);
+ border-radius: 5px
+}
+
+.sm-dox a.current {
+ color: #d23600
+}
+
+.sm-dox a.disabled {
+ color: #bbb
+}
+
+.sm-dox a span.sub-arrow {
+ position: absolute;
+ top: 50%;
+ margin-top: -14px;
+ left: auto;
+ right: 3px;
+ width: 28px;
+ height: 28px;
+ overflow: hidden;
+ font: 700 12px/28px monospace!important;
+ text-align: center;
+ text-shadow: none;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px
+}
+
+.sm-dox a span.sub-arrow:before {
+ display: block;
+ content: "+"
+}
+
+.sm-dox a.highlighted span.sub-arrow:before {
+ display: block;
+ content: "-"
+}
+
+.sm-dox>li:first-child>:not(ul) a,.sm-dox>li:first-child>a {
+ -moz-border-radius: 5px 5px 0 0;
+ -webkit-border-radius: 5px;
+ border-radius: 5px 5px 0 0
+}
+
+.sm-dox>li:last-child>:not(ul) a,.sm-dox>li:last-child>a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul {
+ -moz-border-radius: 0 0 5px 5px;
+ -webkit-border-radius: 0;
+ border-radius: 0 0 5px 5px
+}
+
+.sm-dox>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted {
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0
+}
+
+.sm-dox ul {
+ background: var(--nav-menu-background-color)
+}
+
+.sm-dox ul a,.sm-dox ul a:active,.sm-dox ul a:focus,.sm-dox ul a:hover {
+ font-size: 12px;
+ border-left: 8px solid transparent;
+ line-height: 36px;
+ text-shadow: none;
+ background-color: var(--nav-menu-background-color);
+ background-image: none
+}
+
+.sm-dox ul a:hover {
+ background-color: var(--nav-menu-active-bg);
+ border-radius: 5px
+}
+
+.sm-dox ul ul a,.sm-dox ul ul a:active,.sm-dox ul ul a:focus,.sm-dox ul ul a:hover {
+ border-left: 16px solid transparent
+}
+
+.sm-dox ul ul ul a,.sm-dox ul ul ul a:active,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:hover {
+ border-left: 24px solid transparent
+}
+
+.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:active,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:hover {
+ border-left: 32px solid transparent
+}
+
+.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:active,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:hover {
+ border-left: 40px solid transparent
+}
+
+@media (min-width:768px) {
+.sm-dox ul {
+ position: absolute;
+ width: 12em;
+ border: 1px solid #bbb;
+ padding: 5px 0;
+ background: var(--nav-menu-background-color);
+ -moz-border-radius: 5px!important;
+ -webkit-border-radius: 5px;
+ border-radius: 5px!important;
+ -moz-box-shadow: 0 5px 9px rgba(0,0,0,.2);
+ -webkit-box-shadow: 0 5px 9px rgba(0,0,0,.2);
+ box-shadow: 0 5px 9px rgba(0,0,0,.2)
+}
+
+.sm-dox li {
+ float: left;
+ border-top: 0;
+ padding: 3px
+}
+
+.sm-dox.sm-rtl li {
+ float: right
+}
+
+.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li {
+ float: none
+}
+
+.sm-dox a {
+ white-space: nowrap
+}
+
+.sm-dox ul a,.sm-dox.sm-vertical a {
+ white-space: normal
+}
+
+.sm-dox .sm-nowrap>li>:not(ul) a,.sm-dox .sm-nowrap>li>a {
+ white-space: nowrap
+}
+
+.sm-dox,.sm-dox a span.sub-arrow {
+ background-color: var(--nav-menu-background-color)
+}
+
+.sm-dox {
+ padding: 0 10px;
+ line-height: 36px
+}
+
+.sm-dox a span.sub-arrow {
+ top: 15px;
+ right: 10px;
+ box-sizing: content-box;
+ padding: 0;
+ margin: 0;
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-right: 2px solid var(--nav-arrow-color);
+ border-bottom: 2px solid var(--nav-arrow-color);
+ transform: rotate(45deg);
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0
+}
+
+.sm-dox a,.sm-dox a.highlighted,.sm-dox a:active,.sm-dox a:focus,.sm-dox a:hover {
+ padding: 0 6px
+}
+
+.sm-dox a:hover {
+ background-color: var(--nav-menu-active-bg);
+ border-radius: 5px!important
+}
+
+.sm-dox a:hover span.sub-arrow {
+ background-color: var(--nav-menu-active-bg);
+ border-right: 2px solid var(--nav-arrow-selected-color);
+ border-bottom: 2px solid var(--nav-arrow-selected-color)
+}
+
+.sm-dox a.has-submenu {
+ padding-right: 24px
+}
+
+.sm-dox>li>ul:after,.sm-dox>li>ul:before {
+ content: "";
+ position: absolute;
+ top: -18px;
+ left: 30px;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+ border-width: 9px;
+ border-style: dashed dashed solid;
+ border-color: transparent transparent #bbb
+}
+
+.sm-dox>li>ul:after {
+ top: -16px;
+ left: 31px;
+ border-width: 8px;
+ border-color: transparent transparent var(--nav-menu-background-color) transparent
+}
+
+.sm-dox ul a span.sub-arrow {
+ transform: rotate(-45deg);
+ top: 3px;
+}
+
+.sm-dox ul a,.sm-dox ul a.highlighted,.sm-dox ul a:active,.sm-dox ul a:focus,.sm-dox ul a:hover {
+ color: var(--nav-menu-foreground-color);
+ background-image: none;
+ line-height: normal;
+ border: 0!important
+}
+
+.sm-dox ul a:hover {
+ background-color: var(--nav-menu-active-bg);
+ border-radius: 5px
+}
+
+.sm-dox span.scroll-down,.sm-dox span.scroll-up {
+ position: absolute;
+ display: none;
+ visibility: hidden;
+ overflow: hidden;
+ background: var(--nav-menu-background-color);
+ height: 36px
+}
+
+.sm-dox span.scroll-down:hover,.sm-dox span.scroll-up:hover {
+ background: #eee
+}
+
+.sm-dox span.scroll-up:hover span.scroll-down-arrow,.sm-dox span.scroll-up:hover span.scroll-up-arrow {
+ border-color: transparent transparent #d23600
+}
+
+.sm-dox span.scroll-down:hover span.scroll-down-arrow {
+ border-color: #d23600 transparent transparent
+}
+
+.sm-dox span.scroll-down-arrow,.sm-dox span.scroll-up-arrow {
+ position: absolute;
+ top: 0;
+ left: 50%;
+ margin-left: -6px;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+ border-width: 6px;
+ border-style: dashed dashed solid;
+ border-color: transparent transparent var(--nav-menu-foreground-color) transparent
+}
+
+.sm-dox span.scroll-down-arrow {
+ top: 8px;
+ border-style: solid dashed dashed;
+ border-color: var(--nav-menu-foreground-color) transparent transparent transparent
+}
+
+.sm-dox.sm-rtl a.has-submenu {
+ padding-right: 6px;
+ padding-left: 24px
+}
+
+.sm-dox.sm-rtl a span.sub-arrow {
+ right: auto;
+ left: 6px
+}
+
+.sm-dox.sm-rtl.sm-vertical a.has-submenu,.sm-dox.sm-vertical a,.sm-dox.sm-vertical ul a {
+ padding: 10px 20px
+}
+
+.sm-dox.sm-rtl ul a span.sub-arrow,.sm-dox.sm-rtl.sm-vertical a span.sub-arrow {
+ right: auto;
+ left: 8px;
+ border-style: dashed solid dashed dashed;
+ border-color: transparent #555 transparent transparent
+}
+
+.sm-dox.sm-rtl>li>ul:before {
+ left: auto;
+ right: 30px
+}
+
+.sm-dox.sm-rtl>li>ul:after {
+ left: auto;
+ right: 31px
+}
+
+.sm-dox.sm-rtl ul a.has-submenu {
+ padding: 10px 20px!important
+}
+
+.sm-dox.sm-vertical {
+ padding: 10px 0;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px
+}
+
+.sm-dox.sm-vertical a.highlighted,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:hover {
+ background: #fff
+}
+
+.sm-dox.sm-vertical a span.sub-arrow {
+ right: 8px;
+ top: 50%;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: dashed dashed dashed solid;
+ border-color: transparent transparent transparent #555
+}
+
+.sm-dox.sm-vertical>li>ul:after,.sm-dox.sm-vertical>li>ul:before {
+ display: none
+}
+
+.sm-dox.sm-vertical ul a.highlighted,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:hover {
+ background: #eee
+}
+
+.sm-dox.sm-vertical ul a.disabled {
+ background: var(--nav-menu-background-color)
+}
+}
+
diff --git a/docs/html/topics.html b/docs/html/topics.html
index 6abff124..55386895 100644
--- a/docs/html/topics.html
+++ b/docs/html/topics.html
@@ -3,17 +3,21 @@
-
+
Vulkan Memory Allocator: Topics
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
Also consider: Consider creating them as dedicated allocations using VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT, especially if they are large or if you plan to destroy and recreate them with different sizes e.g. when display resolution changes. Prefer to create such resources first and all other GPU resources (like textures and vertex buffers) later. When VK_EXT_memory_priority extension is enabled, it is also worth setting high priority to such allocation to decrease chances to be evicted to system memory by the operating system.
For resources that you frequently write on CPU via mapped pointer and frequently read on GPU e.g. as a uniform buffer (also called "dynamic"), multiple options are possible:
It feels natural to express sizes and offsets in bytes. If an offset of an allocation needs to be aligned to a multiply of some number (e.g. 4 bytes), you can fill optional member VmaVirtualAllocationCreateInfo::alignment to request it. Example:
Alignments of different allocations made from one block may vary. However, if all alignments and sizes are always multiply of some size e.g. 4 B or sizeof(MyDataStruct), you can express all sizes, alignments, and offsets in multiples of that size instead of individual bytes. It might be more convenient, but you need to make sure to use this new unit consistently in all the places:
You can also request a full list of allocations and free regions as a string in JSON format by calling vmaBuildVirtualBlockStatsString(). Returned string must be later freed using vmaFreeVirtualBlockStatsString(). The format of this string differs from the one returned by the main Vulkan allocator, but it is similar.