diff --git a/CHANGELOG.md b/CHANGELOG.md
index 612b1c4..d5912f5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 3.2.0 (2026-??-??)
+
+- Added `POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT` (#91).
+- Further improvements in the algorithm deciding when to use small alignment or tight alignment, including added support for `D3D12_FEATURE_DATA_D3D12_OPTIONS4::MSAA64KBAlignedTextureSupported`.
+
# 3.1.0 (2026-02-23)
- Added support for resource tight alignment (feature added in Agility SDK 1.618.1). It is used automatically when available.
diff --git a/docs/html/_d3_d12_mem_alloc_8h.html b/docs/html/_d3_d12_mem_alloc_8h.html
index 2a34c7a..1570785 100644
--- a/docs/html/_d3_d12_mem_alloc_8h.html
+++ b/docs/html/_d3_d12_mem_alloc_8h.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: C:/Code/D3D12MemoryAllocator/REPO/include/D3D12MemAlloc.h File Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/annotated.html b/docs/html/annotated.html
index 7b7e1fd..dfcd993 100644
--- a/docs/html/annotated.html
+++ b/docs/html/annotated.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Class List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -75,8 +102,8 @@
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 1 2 ]
- N D3D12MA
+
+ N D3D12MA
C ALLOCATION_CALLBACKS Custom callbacks to CPU memory allocation functions
C ALLOCATION_DESC Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource
C Statistics Calculated statistics of memory usage e.g. in a specific memory heap type, memory segment group, custom pool, or total
@@ -107,7 +134,7 @@
diff --git a/docs/html/class_d3_d12_m_a_1_1_allocation-members.html b/docs/html/class_d3_d12_m_a_1_1_allocation-members.html
index d4f8f83..47d39a3 100644
--- a/docs/html/class_d3_d12_m_a_1_1_allocation-members.html
+++ b/docs/html/class_d3_d12_m_a_1_1_allocation-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_allocation.html b/docs/html/class_d3_d12_m_a_1_1_allocation.html
index fe7e28e..d62239b 100644
--- a/docs/html/class_d3_d12_m_a_1_1_allocation.html
+++ b/docs/html/class_d3_d12_m_a_1_1_allocation.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::Allocation Class Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_allocator-members.html b/docs/html/class_d3_d12_m_a_1_1_allocator-members.html
index 032e349..edac74e 100644
--- a/docs/html/class_d3_d12_m_a_1_1_allocator-members.html
+++ b/docs/html/class_d3_d12_m_a_1_1_allocator-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_allocator.html b/docs/html/class_d3_d12_m_a_1_1_allocator.html
index 6263297..7aab5ab 100644
--- a/docs/html/class_d3_d12_m_a_1_1_allocator.html
+++ b/docs/html/class_d3_d12_m_a_1_1_allocator.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::Allocator Class Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html
index 38e4511..be64564 100644
--- a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html
+++ b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html
index 067d8ba..801d483 100644
--- a/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html
+++ b/docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::DefragmentationContext Class Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_pool-members.html b/docs/html/class_d3_d12_m_a_1_1_pool-members.html
index 7a7ad20..151ee31 100644
--- a/docs/html/class_d3_d12_m_a_1_1_pool-members.html
+++ b/docs/html/class_d3_d12_m_a_1_1_pool-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_pool.html b/docs/html/class_d3_d12_m_a_1_1_pool.html
index 2caed56..785ac8b 100644
--- a/docs/html/class_d3_d12_m_a_1_1_pool.html
+++ b/docs/html/class_d3_d12_m_a_1_1_pool.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::Pool Class Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html b/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html
index 968aeb2..229789d 100644
--- a/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html
+++ b/docs/html/class_d3_d12_m_a_1_1_virtual_block-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/class_d3_d12_m_a_1_1_virtual_block.html b/docs/html/class_d3_d12_m_a_1_1_virtual_block.html
index de58557..d8e0310 100644
--- a/docs/html/class_d3_d12_m_a_1_1_virtual_block.html
+++ b/docs/html/class_d3_d12_m_a_1_1_virtual_block.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::VirtualBlock Class Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/classes.html b/docs/html/classes.html
index 7988851..399871e 100644
--- a/docs/html/classes.html
+++ b/docs/html/classes.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Class Index
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -74,7 +101,7 @@
diff --git a/docs/html/clipboard.js b/docs/html/clipboard.js
index 9da9f3c..6a0f42c 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 0000000..5b55e8b
--- /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 b5c3d39..661d3bc 100644
--- a/docs/html/configuration.html
+++ b/docs/html/configuration.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Configuration
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
#define D3D12MA_RECOMMENDED_ALLOCATOR_FLAGS
Set of flags recommended for use in D3D12MA::ALLOCATOR_DESC::Flags for optimal performance.
Definition D3D12MemAlloc.h:128
-
Represents main object of this library initialized for particular ID3D12Device.
Definition D3D12MemAlloc.h:1174
+
Represents main object of this library initialized for particular ID3D12Device.
Definition D3D12MemAlloc.h:1182
D3D12MA_API HRESULT CreateAllocator(const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)
Creates new main D3D12MA::Allocator object and returns it through ppAllocator.
-
Parameters of created Allocator object. To be used with CreateAllocator().
Definition D3D12MemAlloc.h:1132
-
const ALLOCATION_CALLBACKS * pAllocationCallbacks
Custom CPU memory allocation callbacks. Optional.
Definition D3D12MemAlloc.h:1155
-
IDXGIAdapter * pAdapter
Definition D3D12MemAlloc.h:1161
-
ALLOCATOR_FLAGS Flags
Flags for the entire allocator.
Definition D3D12MemAlloc.h:1137
-
ID3D12Device * pDevice
Definition D3D12MemAlloc.h:1143
+
Parameters of created Allocator object. To be used with CreateAllocator().
Definition D3D12MemAlloc.h:1140
+
const ALLOCATION_CALLBACKS * pAllocationCallbacks
Custom CPU memory allocation callbacks. Optional.
Definition D3D12MemAlloc.h:1163
+
IDXGIAdapter * pAdapter
Definition D3D12MemAlloc.h:1169
+
ALLOCATOR_FLAGS Flags
Flags for the entire allocator.
Definition D3D12MemAlloc.h:1145
+
ID3D12Device * pDevice
Definition D3D12MemAlloc.h:1151
Debug margins
By default, allocations are laid out in memory blocks next to each other if possible (considering required alignment returned by ID3D12Device::GetResourceAllocationInfo ).
@@ -136,7 +163,7 @@
diff --git a/docs/html/custom_pools.html b/docs/html/custom_pools.html
index d02565b..8d309f6 100644
--- a/docs/html/custom_pools.html
+++ b/docs/html/custom_pools.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Custom memory pools
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/defragmentation.html b/docs/html/defragmentation.html
index 25cabdd..5f083cf 100644
--- a/docs/html/defragmentation.html
+++ b/docs/html/defragmentation.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Defragmentation
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html b/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
index b66498a..9baf289 100644
--- a/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
+++ b/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: C:/Code/D3D12MemoryAllocator/REPO/include Directory Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css
index 788923a..2990034 100644
--- a/docs/html/doxygen.css
+++ b/docs/html/doxygen.css
@@ -1,4 +1,4 @@
-/* The standard CSS for doxygen 1.16.1*/
+/* The standard CSS for doxygen 1.17.0*/
html {
/* page base colors */
@@ -542,6 +542,19 @@ td.navtabHL {
background-color: var(--nav-menu-active-bg);
}
+div.alphasepar:before{
+ content: " | " ;
+ width: 14px;
+ display: inline-block;
+ text-align: center;
+ line-height: 140%;
+ font-size: 130%;
+}
+
+div.alphasepar{
+ display: inline-block;
+}
+
div.qindex{
text-align: center;
width: 100%;
@@ -2508,22 +2521,29 @@ details > summary::-webkit-details-marker {
}
details>summary::before {
- content: "\25ba";
- padding-right:4px;
- font-size: 80%;
+ content: "\25bc";
+ padding-right:4px;
+ font-size: 80%;
+ display: inline-block;
+ transform: rotate(-90deg);
}
details[open]>summary::before {
- content: "\25bc";
- padding-right:4px;
- font-size: 80%;
+ content: "\25bc";
+ padding-right:4px;
+ font-size: 80%;
+ display: inline-block;
+ transform: rotate(0deg);
}
-
:root {
scrollbar-width: thin;
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color);
}
+:root.dark-mode {
+ color-scheme: dark;
+}
+
::-webkit-scrollbar {
background-color: var(--scrollbar-background-color);
height: 12px;
diff --git a/docs/html/doxygen_crawl.html b/docs/html/doxygen_crawl.html
index 6f07608..ab74f1e 100644
--- a/docs/html/doxygen_crawl.html
+++ b/docs/html/doxygen_crawl.html
@@ -4,7 +4,7 @@
Validator / crawler helper
-
+
@@ -158,6 +158,7 @@
+
diff --git a/docs/html/faq.html b/docs/html/faq.html
index ec4be52..12db9bc 100644
--- a/docs/html/faq.html
+++ b/docs/html/faq.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Frequently asked questions
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/files.html b/docs/html/files.html
index 0dd807c..7560b04 100644
--- a/docs/html/files.html
+++ b/docs/html/files.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: File List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -75,15 +102,15 @@
Here is a list of all files with brief descriptions:
-
[detail level 1 2 ]
-
include
+
diff --git a/docs/html/functions.html b/docs/html/functions.html
index f3f3f9d..dc647ae 100644
--- a/docs/html/functions.html
+++ b/docs/html/functions.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Class Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -71,7 +98,9 @@
-
Here is a list of all class members with links to the classes they belong to:
+
Here is a list of all class members with links to the classes they belong to:
+
+
- a -
diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html
index 5ec93e3..4fd6f06 100644
--- a/docs/html/functions_func.html
+++ b/docs/html/functions_func.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Class Members - Functions
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -71,7 +98,9 @@
-
Here is a list of all functions with links to the classes they belong to:
+
Here is a list of all functions with links to the classes they belong to:
+
+
- a -
diff --git a/docs/html/functions_rela.html b/docs/html/functions_rela.html
index 4920bfa..1b1f6f7 100644
--- a/docs/html/functions_rela.html
+++ b/docs/html/functions_rela.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Class Members - Related Symbols
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -71,7 +98,9 @@
-
Here is a list of all related symbols with links to the classes they belong to:
diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html
index 0c1a6ea..62a8dcb 100644
--- a/docs/html/functions_vars.html
+++ b/docs/html/functions_vars.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Class Members - Variables
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -71,7 +98,9 @@
-
Here is a list of all variables with links to the classes they belong to:
+
Here is a list of all variables with links to the classes they belong to:
+
+
- a -
diff --git a/docs/html/general_considerations.html b/docs/html/general_considerations.html
index 39a4dd9..7651881 100644
--- a/docs/html/general_considerations.html
+++ b/docs/html/general_considerations.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: General considerations
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/globals.html b/docs/html/globals.html
index 40eb6d9..fb24ca2 100644
--- a/docs/html/globals.html
+++ b/docs/html/globals.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: File Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -71,7 +98,9 @@
-
Here is a list of all file members with links to the files they belong to:
diff --git a/docs/html/globals_defs.html b/docs/html/globals_defs.html
index 4d32b9b..37b359c 100644
--- a/docs/html/globals_defs.html
+++ b/docs/html/globals_defs.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: File Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -71,7 +98,9 @@
-
Here is a list of all macros with links to the files they belong to:
diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html
index 88b596e..8d90a45 100644
--- a/docs/html/hierarchy.html
+++ b/docs/html/hierarchy.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Class Hierarchy
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -75,9 +102,9 @@
This inheritance list is sorted roughly, but not completely, alphabetically:
-
[detail level 1 2 ]
+
@@ -107,7 +134,7 @@
diff --git a/docs/html/index.html b/docs/html/index.html
index c11d82c..85d770a 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12 Memory Allocator
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/linear_algorithm.html b/docs/html/linear_algorithm.html
index 93f913c..9b47dc3 100644
--- a/docs/html/linear_algorithm.html
+++ b/docs/html/linear_algorithm.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Linear allocation algorithm
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/menu.js b/docs/html/menu.js
index 15f9c52..8172efe 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=''+
- '
'+
- ''+
- '
'+
- '
'+
- '
';
- } else {
- searchBoxHtml=''+
- '
'+
- ' '+
- ' '+
- ' '+
- '
'+
- '
'+
- ''+
- '
';
- }
+
+ const mainNav = document.getElementById('main-nav');
+ if (mainNav && mainNav.children.length > 0) {
+ const firstChild = mainNav.children[0];
+ firstChild.insertAdjacentHTML('afterbegin', makeTree(menudata, relPath, true));
}
- $('#main-nav').before(' '+
- ''+
- ' '+
- 'Toggle main menu visibility '+
- ' '+
- '
');
- $('#main-nav').append(makeTree(menudata,relPath));
- $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
- $('#main-menu').append(' ');
- const $mainMenuState = $('#main-menu-state');
+ const searchBoxPos2 = document.getElementById('searchBoxPos2');
+ let searchBoxContents = searchBoxPos2 ? searchBoxPos2.innerHTML : '';
+ const mainMenuState = document.getElementById('main-menu-state');
let prevWidth = 0;
- if ($mainMenuState.length) {
- const initResizableIfExists = function() {
- if (typeof initResizable==='function') initResizable(treeview);
- }
- // animate mobile menu
- $mainMenuState.change(function() {
- const $menu = $('#main-menu');
- let options = { duration: 250, step: initResizableIfExists };
+
+ const initResizableIfExists = function() {
+ if (typeof initResizableFunc === 'function') initResizableFunc(treeview);
+ }
+
+ // Dropdown menu functionality to replace smartmenus
+ let closeAllDropdowns = null; // Will be set by initDropdownMenu
+
+ const isMobile = () => window.innerWidth < MOBILE_WIDTH;
+
+ if (mainMenuState) {
+ const mainMenu = document.getElementById('main-menu');
+ const searchBoxPos1 = document.getElementById('searchBoxPos1');
+
+ // animate mobile main menu
+ mainMenuState.addEventListener('change', function() {
if (this.checked) {
- options['complete'] = () => $menu.css('display', 'block');
- $menu.hide().slideDown(options);
+ slideDown(mainMenu, SLIDE_DELAY, () => {
+ mainMenu.style.display = 'block';
+ initResizableIfExists();
+ });
} else {
- options['complete'] = () => $menu.css('display', 'none');
- $menu.show().slideUp(options);
+ slideUp(mainMenu, SLIDE_DELAY, () => {
+ mainMenu.style.display = 'none';
+ });
}
});
+
// set default menu visibility
const resetState = function() {
- const $menu = $('#main-menu');
- const newWidth = $(window).outerWidth();
- if (newWidth!=prevWidth) {
- if ($(window).outerWidth()<768) {
- $mainMenuState.prop('checked',false); $menu.hide();
- $('#searchBoxPos1').html(searchBoxHtml);
- $('#searchBoxPos2').hide();
+ const newWidth = window.innerWidth;
+ if (newWidth !== prevWidth) {
+ // Close all open dropdown menus when switching between mobile/desktop modes
+ if (closeAllDropdowns) {
+ closeAllDropdowns();
+ }
+
+ if (newWidth < MOBILE_WIDTH) {
+ mainMenuState.checked = false;
+ mainMenu.style.display = 'none';
+ if (searchBoxPos2) {
+ searchBoxPos2.innerHTML = '';
+ searchBoxPos2.style.display = 'none';
+ }
+ if (searchBoxPos1) {
+ searchBoxPos1.innerHTML = searchBoxContents;
+ searchBoxPos1.style.display = '';
+ }
} else {
- $menu.show();
- $('#searchBoxPos1').empty();
- $('#searchBoxPos2').html(searchBoxHtml);
- $('#searchBoxPos2').show();
+ mainMenu.style.display = '';
+ if (searchBoxPos1) {
+ searchBoxPos1.innerHTML = '';
+ searchBoxPos1.style.display = 'none';
+ }
+ if (searchBoxPos2) {
+ searchBoxPos2.innerHTML = searchBoxContents;
+ searchBoxPos2.style.display = '';
+ }
}
- if (typeof searchBox!=='undefined') {
+ if (typeof searchBox !== 'undefined') {
searchBox.CloseResultsWindow();
}
prevWidth = newWidth;
}
}
- $(window).ready(function() { resetState(); initResizableIfExists(); });
- $(window).resize(resetState);
+
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', function() {
+ resetState();
+ initResizableIfExists();
+ });
+ } else {
+ resetState();
+ initResizableIfExists();
+ }
+ window.addEventListener('resize', resetState);
+ } else {
+ initResizableIfExists();
}
- $('#main-menu').smartmenus();
+
+ function initDropdownMenu() {
+ const mainMenu = document.getElementById('main-menu');
+ if (!mainMenu) return;
+
+ const menuItems = mainMenu.querySelectorAll('li');
+
+ // Helper function to position nested submenu with viewport checking
+ function positionNestedSubmenu(submenu, link) {
+ const viewport = {
+ height: window.innerHeight,
+ scrollY: window.scrollY
+ };
+
+ // Set initial position - top aligned with parent (next to arrow)
+ submenu.style.top = '0';
+ if (isMobile()) {
+ submenu.style.marginLeft = 0;
+ } else {
+ submenu.style.marginLeft = link.offsetWidth + 'px';
+ }
+
+ // Get submenu dimensions and position
+ const submenuRect = submenu.getBoundingClientRect();
+ const submenuHeight = submenuRect.height;
+ const submenuTop = submenuRect.top;
+ const submenuBottom = submenuRect.bottom+1; // add space for border
+
+ // Check if submenu fits in viewport
+ const fitsAbove = submenuTop >= 0;
+ const fitsBelow = submenuBottom <= viewport.height;
+
+ if (!fitsAbove || !fitsBelow) {
+ // Submenu doesn't fit - try to adjust position
+ // Overflows bottom, try to shift up
+ const overflow = submenuBottom - viewport.height;
+ const newTop = Math.max(0, submenuTop-overflow)-submenuTop;
+ submenu.style.top = newTop + 'px';
+
+ // Re-check after adjustment
+ const adjustedRect = submenu.getBoundingClientRect();
+ if (adjustedRect.height > viewport.height) {
+ // Still doesn't fit - enable scrolling
+ enableSubmenuScrolling(submenu, link);
+ }
+ }
+ }
+
+ // Helper function to enable scrolling for tall submenus
+ function enableSubmenuScrolling(submenu, link) {
+ // Check if scroll arrows already exist
+ if (submenu.dataset.scrollEnabled) return;
+
+ submenu.dataset.scrollEnabled = 'true';
+
+ const viewport = {
+ height: window.innerHeight,
+ scrollY: window.scrollY
+ };
+
+ // Position submenu to fill available viewport space
+ const parentRect = link.getBoundingClientRect();
+ const availableHeight = viewport.height - 2; // Leave some margin
+
+ submenu.style.maxHeight = availableHeight + 'px';
+ submenu.style.overflow = 'hidden';
+ submenu.style.position = 'absolute';
+
+ // Create scroll arrows
+ const scrollUpArrow = document.createElement('div');
+ scrollUpArrow.className = 'submenu-scroll-arrow submenu-scroll-up';
+ scrollUpArrow.innerHTML = ' ';//'â–² ';
+ scrollUpArrow.style.cssText = 'position:absolute;top:0;left:0;right:0;height:30px;background:transparent;text-align:center;line-height:30px;color:#fff;cursor:pointer;z-index:1000;display:none;';
+
+ const scrollDownArrow = document.createElement('div');
+ scrollDownArrow.className = 'submenu-scroll-arrow submenu-scroll-down';
+ scrollDownArrow.innerHTML = ' ';
+ scrollDownArrow.style.cssText = 'position:absolute;bottom:0;left:0;right:0;height:30px;background:transparent;text-align:center;line-height:30px;color:#fff;cursor:pointer;z-index:1000;';
+
+ // Create wrapper for submenu content
+ const scrollWrapper = document.createElement('div');
+ scrollWrapper.className = 'submenu-scroll-wrapper';
+ scrollWrapper.style.cssText = 'height:100vh;overflow:hidden;position:relative;';
+
+ // Move submenu children to wrapper
+ while (submenu.firstChild) {
+ scrollWrapper.appendChild(submenu.firstChild);
+ }
+
+ submenu.appendChild(scrollUpArrow);
+ submenu.appendChild(scrollWrapper);
+ submenu.appendChild(scrollDownArrow);
+
+ let scrollPosition = 0;
+ let scrollInterval = null;
+
+ function updateScrollArrows() {
+ const maxScroll = scrollWrapper.scrollHeight - availableHeight;
+ scrollUpArrow.style.display = scrollPosition > 0 ? 'block' : 'none';
+ scrollDownArrow.style.display = scrollPosition < maxScroll ? 'block' : 'none';
+ }
+
+ function startScrolling(direction) {
+ if (scrollInterval) return;
+
+ scrollInterval = setInterval(() => {
+ const maxScroll = scrollWrapper.scrollHeight - availableHeight;
+
+ if (direction === 'up') {
+ scrollPosition = Math.max(0, scrollPosition - ARROW_STEP);
+ } else {
+ scrollPosition = Math.min(maxScroll, scrollPosition + ARROW_STEP);
+ }
+
+ scrollWrapper.scrollTop = scrollPosition;
+ updateScrollArrows();
+
+ if ((direction === 'up' && scrollPosition === 0) ||
+ (direction === 'down' && scrollPosition === maxScroll)) {
+ stopScrolling();
+ }
+ }, ARROW_POLL_INTERVAL);
+ }
+
+ function stopScrolling() {
+ if (scrollInterval) {
+ clearInterval(scrollInterval);
+ scrollInterval = null;
+ }
+ }
+
+ scrollUpArrow.addEventListener('mouseenter', () => startScrolling('up'));
+ scrollUpArrow.addEventListener('mouseleave', stopScrolling);
+ scrollDownArrow.addEventListener('mouseenter', () => startScrolling('down'));
+ scrollDownArrow.addEventListener('mouseleave', stopScrolling);
+
+ function wheelEvent(e) {
+ e.preventDefault();
+ e.stopPropagation();
+
+ const maxScroll = scrollWrapper.scrollHeight - availableHeight;
+ const wheelDelta = e.deltaY;
+ const scrollAmount = wheelDelta > 0 ? WHEEL_STEP : -WHEEL_STEP; // Scroll 30px per wheel tick
+
+ scrollPosition = Math.max(0, Math.min(maxScroll, scrollPosition + scrollAmount));
+ scrollWrapper.scrollTop = scrollPosition;
+ updateScrollArrows();
+ }
+
+ // Add mouse wheel scrolling support
+ scrollWrapper.addEventListener('wheel', (e) => wheelEvent(e));
+
+ // Also add wheel event to submenu itself to catch events
+ submenu.addEventListener('wheel', function(e) {
+ // Only handle if scrolling is enabled
+ if (submenu.dataset.scrollEnabled) {
+ wheelEvent(e);
+ }
+ });
+
+ // Initial arrow state
+ updateScrollArrows();
+ }
+
+ // Helper function to clean up scroll arrows
+ function disableSubmenuScrolling(submenu) {
+ if (!submenu.dataset.scrollEnabled) return;
+
+ delete submenu.dataset.scrollEnabled;
+
+ // Find and remove scroll elements
+ const scrollArrows = submenu.querySelectorAll('.submenu-scroll-arrow');
+ const scrollWrapper = submenu.querySelector('.submenu-scroll-wrapper');
+
+ if (scrollWrapper) {
+ // Move children back to submenu
+ while (scrollWrapper.firstChild) {
+ submenu.appendChild(scrollWrapper.firstChild);
+ }
+ scrollWrapper.remove();
+ }
+
+ scrollArrows.forEach(arrow => arrow.remove());
+
+ // Reset styles
+ submenu.style.maxHeight = '';
+ submenu.style.overflow = '';
+ }
+
+ menuItems.forEach(item => {
+ const submenu = item.querySelector('ul');
+ if (submenu) {
+ const link = item.querySelector('a');
+ if (link) {
+ // Add class and ARIA attributes for accessibility
+ link.classList.add('has-submenu');
+ link.setAttribute('aria-haspopup', 'true');
+ link.setAttribute('aria-expanded', 'false');
+
+ // Add sub-arrow indicator
+ const span = document.createElement('span');
+ span.classList.add('sub-arrow');
+ link.append(span);
+
+ // Calculate nesting level for z-index
+ // Root menu (main-menu) is level 200 (above the search box at 102),
+ // first submenus are level 201, etc.
+ let nestingLevel = 200;
+ let currentElement = item.parentElement;
+ while (currentElement && currentElement.id !== 'main-menu') {
+ if (currentElement.tagName === 'UL') {
+ nestingLevel++;
+ }
+ currentElement = currentElement.parentElement;
+ }
+
+ // Apply z-index based on nesting level
+ // This ensures child menus with shadows appear above parent menus
+ submenu.style.zIndex = nestingLevel + 1;
+
+ // Check if this is a level 2+ submenu (nested within another dropdown)
+ const isNestedSubmenu = item.parentElement && item.parentElement.id !== 'main-menu';
+
+ // Timeout management for smooth menu navigation
+ let showTimeout = null;
+ let hideTimeout = null;
+
+ // Desktop: show on hover
+ item.addEventListener('mouseenter', function() {
+ if (!isMobile()) {
+ // Clear any pending hide timeout
+ if (hideTimeout) {
+ clearTimeout(hideTimeout);
+ hideTimeout = null;
+ }
+
+ // Set show timeout
+ showTimeout = setTimeout(() => {
+ // Hide all sibling menus at the same level before showing this one
+ const parentElement = item.parentElement;
+ if (parentElement) {
+ const siblings = parentElement.querySelectorAll(':scope > li');
+ siblings.forEach(sibling => {
+ if (sibling !== item) {
+ const siblingSubmenu = sibling.querySelector('ul');
+ const siblingLink = sibling.querySelector('a');
+ if (siblingSubmenu && siblingLink) {
+ siblingSubmenu.style.display = 'none';
+ siblingLink.setAttribute('aria-expanded', 'false');
+ disableSubmenuScrolling(siblingSubmenu);
+ }
+ }
+ });
+ }
+
+ submenu.style.display = 'block';
+ // Only apply positioning for nested submenus (level 2+)
+ if (isNestedSubmenu) {
+ positionNestedSubmenu(submenu, link);
+ }
+ link.setAttribute('aria-expanded', 'true');
+ showTimeout = null;
+ }, SHOW_DELAY);
+ }
+ });
+
+ item.addEventListener('mouseleave', function() {
+ if (!isMobile()) {
+ // Clear any pending show timeout
+ if (showTimeout) {
+ clearTimeout(showTimeout);
+ showTimeout = null;
+ }
+
+ // Set hide timeout
+ hideTimeout = setTimeout(() => {
+ submenu.style.display = 'none';
+ link.setAttribute('aria-expanded', 'false');
+ // Clean up scrolling if enabled
+ disableSubmenuScrolling(submenu);
+ hideTimeout = null;
+ }, HIDE_DELAY);
+ }
+ });
+
+ if (isMobile() && isNestedSubmenu) {
+ positionNestedSubmenu(submenu, link);
+ }
+
+ function toggleMenu() {
+ const isExpanded = link.getAttribute('aria-expanded') === 'true';
+ if (isExpanded) {
+ slideUp(submenu, SLIDE_DELAY, () => {
+ submenu.style.display = 'none';
+ link.setAttribute('aria-expanded', 'false');
+ link.classList.remove('highlighted')
+ disableSubmenuScrolling(submenu);
+ });
+ } else {
+ slideDown(submenu, SLIDE_DELAY, () => {
+ submenu.style.display = 'block';
+ link.classList.add('highlighted')
+ link.setAttribute('aria-expanded', 'true');
+ });
+ }
+ }
+
+ // Mobile/Touch: toggle on click
+ link.addEventListener('click', function(e) {
+ if (isMobile()) {
+ e.preventDefault();
+ toggleMenu();
+ }
+ });
+
+ // Keyboard navigation
+ link.addEventListener('keydown', function(e) {
+ if (e.key === 'Enter' || e.key === ' ') {
+ e.preventDefault();
+ toggleMenu();
+ } else if (e.key === 'Escape') {
+ submenu.style.display = 'none';
+ link.setAttribute('aria-expanded', 'false');
+ disableSubmenuScrolling(submenu);
+ link.focus();
+ }
+ });
+ }
+ }
+ });
+
+ // Helper function to close all open dropdown menus
+ closeAllDropdowns = function() {
+ menuItems.forEach(item => {
+ const submenu = item.querySelector('ul');
+ const link = item.querySelector('a.has-submenu');
+ if (submenu && link) {
+ disableSubmenuScrolling(submenu);
+ submenu.style.display = 'none';
+ submenu.style.marginLeft = 0;
+ link.setAttribute('aria-expanded', 'false');
+ link.classList.remove('highlighted');
+ }
+ });
+ };
+
+ // Close all dropdown menus when clicking a link (navigation to new page or anchor)
+ const allLinks = mainMenu.querySelectorAll('a');
+ allLinks.forEach(link => {
+ link.addEventListener('click', function() {
+ // Close dropdowns when navigating (unless it's a has-submenu link in mobile mode)
+ if (!link.classList.contains('has-submenu') || !isMobile()) {
+ if (closeAllDropdowns) {
+ closeAllDropdowns();
+ }
+ }
+ });
+ });
+ }
+
+ // Initialize dropdown menu behavior
+ initDropdownMenu();
+
+ // Close all open menus when browser back button is pressed
+ window.addEventListener('popstate', function() {
+ if (closeAllDropdowns) {
+ closeAllDropdowns();
+ }
+ });
}
+
/* @license-end */
diff --git a/docs/html/namespace_d3_d12_m_a.html b/docs/html/namespace_d3_d12_m_a.html
index 3d028a6..4ce3b6c 100644
--- a/docs/html/namespace_d3_d12_m_a.html
+++ b/docs/html/namespace_d3_d12_m_a.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA Namespace Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED = 0x2
,
POOL_FLAG_ALWAYS_COMMITTED = 0x4
,
-
POOL_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_LINEAR
+
POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT = 0x8
+,
POOL_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_LINEAR
}
Bit flags to be used with POOL_DESC::Flags . More...
@@ -354,7 +382,7 @@
ALLOCATOR_FLAG_DONT_PREFER_SMALL_BUFFERS_COMMITTED Disable optimization that prefers creating small buffers as committed to avoid 64 KB alignment.
By default, the library prefers creating small buffers <= 32 KB as committed, because drivers tend to pack them better, while placed buffers require 64 KB alignment. This, however, may decrease performance, as creating committed resources involves allocation of implicit heaps, which may take longer than creating placed resources in existing heaps. Passing this flag will disable this committed preference globally for the allocator. It can also be disabled for a single allocation by using ALLOCATION_FLAG_STRATEGY_MIN_TIME .
-If the tight resource alignment feature is used by the library (which happens automatically whenever supported, unless you use flag ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT ), then small buffers are not preferred as committed. Long story short, you don't need to specify any of these flags. The library chooses the most optimal method automatically.
+If the tight resource alignment feature is used by the library (which happens automatically whenever supported, unless you use flag ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT or POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT on a custom pool), then small buffers are not preferred as committed. Long story short, you don't need to specify any of these flags. The library chooses the most optimal method automatically.
ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT Disables the use of the tight alignment feature even when it is supported on the current system. By default, the feature is used whenever available.
Support can be checked by D3D12MA::Allocator::IsTightAlignmentSupported() regardless of using this flag.
@@ -440,6 +468,9 @@ POOL_FLAG_ALWAYS_COMMITTED Every allocation made in this pool will be created as a committed resource - will have its own memory block.
There is also an equivalent flag for the entire allocator: D3D12MA::ALLOCATOR_FLAG_ALWAYS_COMMITTED .
+ POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT Disables tight resource alignment for all resources created from this pool.
+When tight alignment is supported and enabled for the allocator, resources created from custom pools normally use it automatically. Specify this flag to restore pre-tight-alignment behavior for this pool: tight alignment won't be requested and small buffers may again be preferred as committed resources.
+
POOL_FLAG_ALGORITHM_MASK
@@ -554,7 +585,7 @@
diff --git a/docs/html/namespacemembers.html b/docs/html/namespacemembers.html
index d78273a..1b48ae4 100644
--- a/docs/html/namespacemembers.html
+++ b/docs/html/namespacemembers.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Namespace Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -128,6 +155,7 @@
- p -
POOL_FLAG_ALGORITHM_LINEAR : D3D12MA
POOL_FLAG_ALGORITHM_MASK : D3D12MA
POOL_FLAG_ALWAYS_COMMITTED : D3D12MA
+POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT : D3D12MA
POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED : D3D12MA
POOL_FLAG_NONE : D3D12MA
POOL_FLAGS : D3D12MA
@@ -150,7 +178,7 @@ - v -
diff --git a/docs/html/namespacemembers_enum.html b/docs/html/namespacemembers_enum.html
index c25155b..9ea8afb 100644
--- a/docs/html/namespacemembers_enum.html
+++ b/docs/html/namespacemembers_enum.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Namespace Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -83,7 +110,7 @@
diff --git a/docs/html/namespacemembers_eval.html b/docs/html/namespacemembers_eval.html
index 367f733..450c0bd 100644
--- a/docs/html/namespacemembers_eval.html
+++ b/docs/html/namespacemembers_eval.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Namespace Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -111,6 +138,7 @@
- p -
POOL_FLAG_ALGORITHM_LINEAR : D3D12MA
POOL_FLAG_ALGORITHM_MASK : D3D12MA
POOL_FLAG_ALWAYS_COMMITTED : D3D12MA
+POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT : D3D12MA
POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED : D3D12MA
POOL_FLAG_NONE : D3D12MA
@@ -130,7 +158,7 @@
- v -
diff --git a/docs/html/namespacemembers_func.html b/docs/html/namespacemembers_func.html
index 0630659..901ddd9 100644
--- a/docs/html/namespacemembers_func.html
+++ b/docs/html/namespacemembers_func.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Namespace Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -78,7 +105,7 @@
diff --git a/docs/html/namespacemembers_type.html b/docs/html/namespacemembers_type.html
index 0a74048..7009f2a 100644
--- a/docs/html/namespacemembers_type.html
+++ b/docs/html/namespacemembers_type.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Namespace Members
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -79,7 +106,7 @@
diff --git a/docs/html/namespaces.html b/docs/html/namespaces.html
index e9fd824..a16dc45 100644
--- a/docs/html/namespaces.html
+++ b/docs/html/namespaces.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Namespace List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
@@ -82,7 +109,7 @@
diff --git a/docs/html/optimal_allocation.html b/docs/html/optimal_allocation.html
index 1c3a4ea..3180b5a 100644
--- a/docs/html/optimal_allocation.html
+++ b/docs/html/optimal_allocation.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Optimal resource allocation
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
#define D3D12MA_RECOMMENDED_HEAP_FLAGS
Set of flags recommended for use in D3D12MA::POOL_DESC::HeapFlags for optimal performance.
Definition D3D12MemAlloc.h:136
Represents single memory allocation.
Definition D3D12MemAlloc.h:523
-Custom memory pool.
Definition D3D12MemAlloc.h:992
-Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC...
Definition D3D12MemAlloc.h:1676
-Helper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC struc...
Definition D3D12MemAlloc.h:1712
-D3D12_RESIDENCY_PRIORITY ResidencyPriority
Residency priority to be set for all allocations made in this pool. Optional.
Definition D3D12MemAlloc.h:980
+Custom memory pool.
Definition D3D12MemAlloc.h:999
+Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC...
Definition D3D12MemAlloc.h:1684
+Helper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC struc...
Definition D3D12MemAlloc.h:1720
+D3D12_RESIDENCY_PRIORITY ResidencyPriority
Residency priority to be set for all allocations made in this pool. Optional.
Definition D3D12MemAlloc.h:987
When you have a committed allocation created, you can also set the residency priority of its resource using the D3D12 function:
ID3D12Heap * GetHeap() const
Returns memory heap that the resource is created in.
-UINT64 BlockSize
Size of a single heap (memory block) to be allocated as part of this pool, in bytes....
Definition D3D12MemAlloc.h:933
+UINT64 BlockSize
Size of a single heap (memory block) to be allocated as part of this pool, in bytes....
Definition D3D12MemAlloc.h:940
You can request a new resource to be created as placed by using D3D12MA::ALLOCATION_FLAG_CAN_ALIAS . This is required especially if you plan to create another resource in the same region of memory, aliasing with your resource - hence the name of this flag.
Note D3D12MA::ALLOCATION_FLAG_CAN_ALIAS can be even combined with D3D12MA::ALLOCATION_FLAG_COMMITTED . In this case, the resource is not created as committed, but it is also not placed as part of a larger heap. What happens instead is that a new heap is created with the exact size required for the resource, and the resource is created in it, placed at offset 0.
D3D12 also has a concept of alignment of the entire heap , passed through D3D12_HEAP_DESC::Alignment . This library automatically sets the alignment as small as possible. Unfortunately, any heap that has a chance of hosting an MSAA texture needs to have the alignment set to 4 MB. This problem can be overcome by passing D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED on the creation of the main allocator object and D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED on the creation of any custom heap that supports textures, not only buffers. With those flags, the alignment of the heaps created by D3D12MA can be lower, but any MSAA textures are created as committed. You should always use these flags in your code unless you really need to create some MSAA textures as placed.
With DirectX 12 Agility SDK 1.618.1, Microsoft added a new feature called "tight alignment" . Note this is a separate feature than the "small alignment" described earlier. When using this new SDK and a compatible graphics driver, the API exposes support for this new feature. Then, a new flag D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT can be added when creating a resource. D3D12 can then return the alignment required for the resource smaller than the default ones described above. This library automatically makes use of the tight alignment feature when available and adds that new resource flag. When the tight alignment is enabled, the heuristics that creates small buffers as committed described above is deactivated, as it is no longer needed.
-You can check if the tight alignment it is available in the current system by calling D3D12MA::Allocator::IsTightAlignmentSupported() . You can tell the library to not use it by specifying D3D12MA::ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT . Typically, you don't need to do any of those.
+You can check if the tight alignment it is available in the current system by calling D3D12MA::Allocator::IsTightAlignmentSupported() . You can tell the library to not use it by specifying D3D12MA::ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT . Custom pools can opt out independently by specifying D3D12MA::POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT . Typically, you don't need to do any of those.
The library automatically aligns all buffers to at least 256 B, even when the system supports smaller alignment. This is the alignment required for constant buffers, expressed by D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT constant. You can override this logic for Custom memory pools with a specific D3D12MA::POOL_DESC::MinAllocationAlignment .
diff --git a/docs/html/quick_start.html b/docs/html/quick_start.html
index 9a3baef..ab6b441 100644
--- a/docs/html/quick_start.html
+++ b/docs/html/quick_start.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Quick start
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
#define D3D12MA_RECOMMENDED_ALLOCATOR_FLAGS
Set of flags recommended for use in D3D12MA::ALLOCATOR_DESC::Flags for optimal performance.
Definition D3D12MemAlloc.h:128
-Represents main object of this library initialized for particular ID3D12Device.
Definition D3D12MemAlloc.h:1174
+Represents main object of this library initialized for particular ID3D12Device.
Definition D3D12MemAlloc.h:1182
D3D12MA_API HRESULT CreateAllocator(const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)
Creates new main D3D12MA::Allocator object and returns it through ppAllocator.
(5.) Right before destroying the D3D12 device, destroy the allocator object.
allocator->Release();
@@ -273,12 +300,12 @@
D3D12_RESOURCE_STATE_COMMON, NULL, &alloc, IID_PPV_ARGS(&res));
-Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC...
Definition D3D12MemAlloc.h:1676
+Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC...
Definition D3D12MemAlloc.h:1684
diff --git a/docs/html/resource_aliasing.html b/docs/html/resource_aliasing.html
index 6ab41d4..203c6b0 100644
--- a/docs/html/resource_aliasing.html
+++ b/docs/html/resource_aliasing.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Resource aliasing (overlap)
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js
index dc7f629..ac24685 100644
--- a/docs/html/search/all_e.js
+++ b/docs/html/search/all_e.js
@@ -15,15 +15,16 @@ var searchData=
['pool_5fflag_5falgorithm_5flinear_12',['POOL_FLAG_ALGORITHM_LINEAR',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aa37a0103f511954ea42a1d0bba286b6a',1,'D3D12MA']]],
['pool_5fflag_5falgorithm_5fmask_13',['POOL_FLAG_ALGORITHM_MASK',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aec9d4939b8cc5438545b9df840b5f5f7',1,'D3D12MA']]],
['pool_5fflag_5falways_5fcommitted_14',['POOL_FLAG_ALWAYS_COMMITTED',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a15b7a6f8bfb6e4d534143f8adb6ac7ba',1,'D3D12MA']]],
- ['pool_5fflag_5fmsaa_5ftextures_5falways_5fcommitted_15',['POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1acc379a89755438c0f76667783b778baa',1,'D3D12MA']]],
- ['pool_5fflag_5fnone_16',['POOL_FLAG_NONE',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a5d8dc91add3423140809a550c7224d02',1,'D3D12MA']]],
- ['pool_5fflags_17',['POOL_FLAGS',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1',1,'D3D12MA']]],
- ['pools_18',['Custom memory pools',['../custom_pools.html',1,'optimal_allocation']]],
- ['pprivatedata_19',['pPrivateData',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html#a98173cc9e239a84c2ce369854966e1e3',1,'D3D12MA::ALLOCATION_CALLBACKS::pPrivateData'],['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ac638dd987f1326e2fdab91892d994d35',1,'D3D12MA::ALLOCATION_DESC::pPrivateData'],['../struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa1281297154e3823e98a7cc7e23b5d6b',1,'D3D12MA::VIRTUAL_ALLOCATION_DESC::pPrivateData'],['../struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html#a05c258ea40ea47667ddcc395b13a47a5',1,'D3D12MA::VIRTUAL_ALLOCATION_INFO::pPrivateData']]],
- ['pprotectedsession_20',['pProtectedSession',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4',1,'D3D12MA::POOL_DESC']]],
- ['preferredblocksize_21',['PreferredBlockSize',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a97149c9559deae943c2cfa49aeeff8a6',1,'D3D12MA::ALLOCATOR_DESC']]],
- ['prev_22',['prev',['../class_d3_d12_m_a_1_1_allocation.html#adc3ac89758a915a409e047f9b89aa160',1,'D3D12MA::Allocation']]],
- ['priority_23',['Residency priority',['../optimal_allocation.html#optimal_allocation_residency_priority',1,'']]],
- ['project_20setup_20and_20initialization_24',['Project setup and initialization',['../quick_start.html#quick_start_project_setup',1,'']]],
- ['psrcallocation_25',['pSrcAllocation',['../struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7',1,'D3D12MA::DEFRAGMENTATION_MOVE']]]
+ ['pool_5fflag_5fdont_5fuse_5ftight_5falignment_15',['POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a699b1937106235ed0a6e81a39ce0d50f',1,'D3D12MA']]],
+ ['pool_5fflag_5fmsaa_5ftextures_5falways_5fcommitted_16',['POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1acc379a89755438c0f76667783b778baa',1,'D3D12MA']]],
+ ['pool_5fflag_5fnone_17',['POOL_FLAG_NONE',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a5d8dc91add3423140809a550c7224d02',1,'D3D12MA']]],
+ ['pool_5fflags_18',['POOL_FLAGS',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1',1,'D3D12MA']]],
+ ['pools_19',['Custom memory pools',['../custom_pools.html',1,'optimal_allocation']]],
+ ['pprivatedata_20',['pPrivateData',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html#a98173cc9e239a84c2ce369854966e1e3',1,'D3D12MA::ALLOCATION_CALLBACKS::pPrivateData'],['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ac638dd987f1326e2fdab91892d994d35',1,'D3D12MA::ALLOCATION_DESC::pPrivateData'],['../struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa1281297154e3823e98a7cc7e23b5d6b',1,'D3D12MA::VIRTUAL_ALLOCATION_DESC::pPrivateData'],['../struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html#a05c258ea40ea47667ddcc395b13a47a5',1,'D3D12MA::VIRTUAL_ALLOCATION_INFO::pPrivateData']]],
+ ['pprotectedsession_21',['pProtectedSession',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4',1,'D3D12MA::POOL_DESC']]],
+ ['preferredblocksize_22',['PreferredBlockSize',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a97149c9559deae943c2cfa49aeeff8a6',1,'D3D12MA::ALLOCATOR_DESC']]],
+ ['prev_23',['prev',['../class_d3_d12_m_a_1_1_allocation.html#adc3ac89758a915a409e047f9b89aa160',1,'D3D12MA::Allocation']]],
+ ['priority_24',['Residency priority',['../optimal_allocation.html#optimal_allocation_residency_priority',1,'']]],
+ ['project_20setup_20and_20initialization_25',['Project setup and initialization',['../quick_start.html#quick_start_project_setup',1,'']]],
+ ['psrcallocation_26',['pSrcAllocation',['../struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7',1,'D3D12MA::DEFRAGMENTATION_MOVE']]]
];
diff --git a/docs/html/search/enumvalues_2.js b/docs/html/search/enumvalues_2.js
index 075de46..0344f64 100644
--- a/docs/html/search/enumvalues_2.js
+++ b/docs/html/search/enumvalues_2.js
@@ -3,6 +3,7 @@ var searchData=
['pool_5fflag_5falgorithm_5flinear_0',['POOL_FLAG_ALGORITHM_LINEAR',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aa37a0103f511954ea42a1d0bba286b6a',1,'D3D12MA']]],
['pool_5fflag_5falgorithm_5fmask_1',['POOL_FLAG_ALGORITHM_MASK',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aec9d4939b8cc5438545b9df840b5f5f7',1,'D3D12MA']]],
['pool_5fflag_5falways_5fcommitted_2',['POOL_FLAG_ALWAYS_COMMITTED',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a15b7a6f8bfb6e4d534143f8adb6ac7ba',1,'D3D12MA']]],
- ['pool_5fflag_5fmsaa_5ftextures_5falways_5fcommitted_3',['POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1acc379a89755438c0f76667783b778baa',1,'D3D12MA']]],
- ['pool_5fflag_5fnone_4',['POOL_FLAG_NONE',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a5d8dc91add3423140809a550c7224d02',1,'D3D12MA']]]
+ ['pool_5fflag_5fdont_5fuse_5ftight_5falignment_3',['POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a699b1937106235ed0a6e81a39ce0d50f',1,'D3D12MA']]],
+ ['pool_5fflag_5fmsaa_5ftextures_5falways_5fcommitted_4',['POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1acc379a89755438c0f76667783b778baa',1,'D3D12MA']]],
+ ['pool_5fflag_5fnone_5',['POOL_FLAG_NONE',['../namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a5d8dc91add3423140809a550c7224d02',1,'D3D12MA']]]
];
diff --git a/docs/html/statistics.html b/docs/html/statistics.html
index da8e8db..82a82db 100644
--- a/docs/html/statistics.html
+++ b/docs/html/statistics.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Statistics
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html
index e514f50..548e0c6 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html
index 548019b..d84e7ab 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::ALLOCATION_CALLBACKS Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
index 56c750c..f59ed45 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
index f22a527..99a7321 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::ALLOCATION_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html
index 2a6e5e4..f1eed09 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html
index 7efa4f9..cb3d692 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::ALLOCATOR_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_budget-members.html b/docs/html/struct_d3_d12_m_a_1_1_budget-members.html
index 778b089..e3519f9 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_budget-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_budget-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_budget.html b/docs/html/struct_d3_d12_m_a_1_1_budget.html
index 2c66324..4f916dd 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_budget.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_budget.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::Budget Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
index 589c0fa..7ff1b30 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
index 4a00c93..8acaca9 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::CALLOCATION_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
Helper structure that helps with complete and conscise initialization of the D3D12MA::ALLOCATION_DESC structure.
@@ -261,7 +288,7 @@
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html
index 9422750..20e6b5c 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html
index 2a4c181..61dce69 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::CPOOL_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
-
-POOL_FLAGS Flags
- Flags for the heap.
-D3D12_HEAP_PROPERTIES HeapProperties
- The parameters of memory heap where allocations of this pool should be placed.
-D3D12_HEAP_FLAGS HeapFlags
- Heap flags to be used when allocating heaps of this pool.
-UINT64 BlockSize
- Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional.
-UINT MinBlockCount
- Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional.
-UINT MaxBlockCount
- Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional.
-UINT64 MinAllocationAlignment
- Additional minimum alignment to be used for all allocations created from this pool. Can be 0.
-ID3D12ProtectedResourceSession * pProtectedSession
- Additional parameter allowing pool to create resources with passed protected session.
-D3D12_RESIDENCY_PRIORITY ResidencyPriority
- Residency priority to be set for all allocations made in this pool. Optional.
+
+POOL_FLAGS Flags
+ Flags for the heap.
+D3D12_HEAP_PROPERTIES HeapProperties
+ The parameters of memory heap where allocations of this pool should be placed.
+D3D12_HEAP_FLAGS HeapFlags
+ Heap flags to be used when allocating heaps of this pool.
+UINT64 BlockSize
+ Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional.
+UINT MinBlockCount
+ Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional.
+UINT MaxBlockCount
+ Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional.
+UINT64 MinAllocationAlignment
+ Additional minimum alignment to be used for all allocations created from this pool. Can be 0.
+ID3D12ProtectedResourceSession * pProtectedSession
+ Additional parameter allowing pool to create resources with passed protected session.
+D3D12_RESIDENCY_PRIORITY ResidencyPriority
+ Residency priority to be set for all allocations made in this pool. Optional.
Helper structure that helps with complete and conscise initialization of the D3D12MA::POOL_DESC structure.
@@ -304,7 +331,7 @@
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
index afdd347..5577a6b 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
index a680c64..d18d725 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::CVIRTUAL_ALLOCATION_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_ALLOCATION_DESC structure.
@@ -221,7 +248,7 @@
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html
index 4214b1e..bacbaac 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html
index 38ce216..a2e6caa 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_c_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::CVIRTUAL_BLOCK_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
Helper structure that helps with complete and conscise initialization of the D3D12MA::VIRTUAL_BLOCK_DESC structure.
@@ -214,7 +241,7 @@
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html
index 7e63c6f..1287df7 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html
index e63500f..198610d 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html
index d0270bd..202221f 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html
index c6f5b3c..69bb537 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_MOVE Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html
index 5242a0a..f820cb3 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html
index dfe3d11..d5e11b8 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html
index 7f6aae4..19d7dc5 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html
index 69cfce6..fb9343c 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___s_t_a_t_s.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::DEFRAGMENTATION_STATS Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html
index bf5694d..3583127 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html
index 79754ca..6d80e9c 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_detailed_statistics.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::DetailedStatistics Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html
index c2ce4c2..40b0047 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html
index e4bf711..4de9569 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::POOL_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html b/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html
index be8fbd0..bf9a32c 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_statistics-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_statistics.html b/docs/html/struct_d3_d12_m_a_1_1_statistics.html
index 8786bc2..942ff55 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_statistics.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_statistics.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::Statistics Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html b/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html
index 867ee40..0654134 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_total_statistics-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html b/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html
index f442e42..65c511d 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_total_statistics.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::TotalStatistics Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
index 01d0638..7489ef2 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
index 92e38d7..0a16b29 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::VIRTUAL_ALLOCATION_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html
index 437d0fe..aa79bf5 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html
index 449d1ae..bbd3794 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::VIRTUAL_ALLOCATION_INFO Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html
index 096699e..6649a8c 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html
index 01416df..0a7ea70 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::VIRTUAL_BLOCK_DESC Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html
index fa52fc4..70bea90 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation-members.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Member List
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html
index 1b1618d..b949738 100644
--- a/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html
+++ b/docs/html/struct_d3_d12_m_a_1_1_virtual_allocation.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: D3D12MA::VirtualAllocation Struct Reference
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
diff --git a/docs/html/tabs.css b/docs/html/tabs.css
index 84f33ae..5b84c15 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/virtual_allocator.html b/docs/html/virtual_allocator.html
index 555c6e8..c1cfc27 100644
--- a/docs/html/virtual_allocator.html
+++ b/docs/html/virtual_allocator.html
@@ -3,17 +3,21 @@
-
+
D3D12 Memory Allocator: Virtual allocator
-
-
+
+
@@ -31,22 +35,45 @@
-
+
-
+
+
+
+ Toggle main menu visibility
+
+
+
+
HRESULT hr = CreateVirtualBlock(&blockDesc, &block);
-Represents pure allocation algorithm and a data structure with allocations in some memory block,...
Definition D3D12MemAlloc.h:1594
-Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().
Definition D3D12MemAlloc.h:1500
-UINT64 Size
Total size of the block.
Definition D3D12MemAlloc.h:1508
+Represents pure allocation algorithm and a data structure with allocations in some memory block,...
Definition D3D12MemAlloc.h:1602
+Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().
Definition D3D12MemAlloc.h:1508
+UINT64 Size
Total size of the block.
Definition D3D12MemAlloc.h:1516
Making virtual allocations
D3D12MA::VirtualBlock object contains internal data structure that keeps track of free and occupied regions using the same code as the main D3D12 memory allocator. A single allocation is identified by a lightweight structure D3D12MA::VirtualAllocation . You will also likely want to know the offset at which the allocation was made in the block.
@@ -119,8 +146,8 @@
}
HRESULT Allocate(const VIRTUAL_ALLOCATION_DESC *pDesc, VirtualAllocation *pAllocation, UINT64 *pOffset)
Creates new allocation.
-Parameters of created virtual allocation to be passed to VirtualBlock::Allocate().
Definition D3D12MemAlloc.h:1545
-UINT64 Size
Size of the allocation.
Definition D3D12MemAlloc.h:1552
+Parameters of created virtual allocation to be passed to VirtualBlock::Allocate().
Definition D3D12MemAlloc.h:1553
+UINT64 Size
Size of the allocation.
Definition D3D12MemAlloc.h:1560
Represents single memory allocation done inside VirtualBlock.
Definition D3D12MemAlloc.h:503
Deallocation
@@ -158,7 +185,7 @@ D3D12MA::VirtualAllocation alloc;
UINT64 allocOffset;
hr = block->
Allocate (&allocDesc, &alloc, &allocOffset);
-UINT64 Alignment
Required alignment of the allocation.
Definition D3D12MemAlloc.h:1557
+UINT64 Alignment
Required alignment of the allocation.
Definition D3D12MemAlloc.h:1565
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:
D3D12MA::VIRTUAL_BLOCK_DESC::Size
@@ -186,7 +213,7 @@
diff --git a/include/D3D12MemAlloc.h b/include/D3D12MemAlloc.h
index c34d1d7..735fb3b 100644
--- a/include/D3D12MemAlloc.h
+++ b/include/D3D12MemAlloc.h
@@ -889,10 +889,17 @@ enum POOL_FLAGS
*/
POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED = 0x2,
/** Every allocation made in this pool will be created as a committed resource - will have its own memory block.
-
+
There is also an equivalent flag for the entire allocator: D3D12MA::ALLOCATOR_FLAG_ALWAYS_COMMITTED.
*/
POOL_FLAG_ALWAYS_COMMITTED = 0x4,
+ /** Disables tight resource alignment for all resources created from this pool.
+
+ When tight alignment is supported and enabled for the allocator, resources created from custom pools
+ normally use it automatically. Specify this flag to restore pre-tight-alignment behavior for this pool:
+ tight alignment won't be requested and small buffers may again be preferred as committed resources.
+ */
+ POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT = 0x8,
// Bit mask to extract only `ALGORITHM` bits from entire set of flags.
POOL_FLAG_ALGORITHM_MASK = POOL_FLAG_ALGORITHM_LINEAR
@@ -1114,7 +1121,8 @@ enum ALLOCATOR_FLAGS
It can also be disabled for a single allocation by using #ALLOCATION_FLAG_STRATEGY_MIN_TIME.
If the tight resource alignment feature is used by the library (which happens automatically whenever supported,
- unless you use flag #ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT), then small buffers are not preferred as committed.
+ unless you use flag #ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT or
+ #POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT on a custom pool), then small buffers are not preferred as committed.
Long story short, you don't need to specify any of these flags.
The library chooses the most optimal method automatically.
*/
@@ -2892,6 +2900,7 @@ as it is no longer needed.
You can check if the tight alignment it is available in the current system by calling D3D12MA::Allocator::IsTightAlignmentSupported().
You can tell the library to not use it by specifying D3D12MA::ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT.
+Custom pools can opt out independently by specifying D3D12MA::POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT.
Typically, you don't need to do any of those.
The library automatically aligns all buffers to at least 256 B, even when the system supports smaller alignment.
diff --git a/src/Common.h b/src/Common.h
index 5ba3aea..6f150ac 100644
--- a/src/Common.h
+++ b/src/Common.h
@@ -349,8 +349,8 @@ struct MyUniformRandomNumberGenerator
{
typedef uint32_t result_type;
MyUniformRandomNumberGenerator(RandomNumberGenerator& gen) : m_Gen(gen) { }
- static uint32_t min() { return 0; }
- static uint32_t max() { return UINT32_MAX; }
+ static constexpr uint32_t min() { return 0; }
+ static constexpr uint32_t max() { return UINT32_MAX; }
uint32_t operator()() { return m_Gen.Generate(); }
private:
diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp
index 7ebf580..0a58d30 100644
--- a/src/D3D12MemAlloc.cpp
+++ b/src/D3D12MemAlloc.cpp
@@ -163,6 +163,14 @@ especially to test compatibility with D3D12_RESOURCE_HEAP_TIER_1 on modern GPUs.
#endif
#endif
+#ifndef D3D12MA_OPTIONS4_SUPPORTED
+ #ifdef __ID3D12Device5_INTERFACE_DEFINED__
+ #define D3D12MA_OPTIONS4_SUPPORTED 1
+ #else
+ #define D3D12MA_OPTIONS4_SUPPORTED 0
+ #endif
+#endif
+
#ifndef D3D12MA_DEBUG_LOG
#define D3D12MA_DEBUG_LOG(format, ...)
/*
@@ -777,46 +785,175 @@ static ResourceClass ResourceDescToResourceClass(const D3D12_RESOURCE_DESC_T& re
(resDesc.Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) != 0;
return isRenderTargetOrDepthStencil ? ResourceClass::RT_DS_Texture : ResourceClass::Non_RT_DS_Texture;
}
+
+static bool ResourceDimensionIsTexture(D3D12_RESOURCE_DIMENSION dimension)
+{
+ return dimension == D3D12_RESOURCE_DIMENSION_TEXTURE1D ||
+ dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D ||
+ dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D;
+}
+
+static bool ResourceFlagsContainRenderTargetOrDepthStencil(D3D12_RESOURCE_FLAGS flags)
+{
+ return (flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) != 0;
+}
-// This algorithm is overly conservative.
+struct SmallAlignmentTileShape
+{
+ UINT Width;
+ UINT Height;
+ UINT Depth;
+};
+
+static bool GetSmallAlignmentTileShape(
+ D3D12_RESOURCE_DIMENSION dimension,
+ bool isMsaa,
+ UINT bitsPerUnit,
+ SmallAlignmentTileShape& outTileShape)
+{
+ if (isMsaa)
+ {
+ if (dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D)
+ return false;
+
+ switch (bitsPerUnit)
+ {
+ case 8: outTileShape = { 256, 256, 1 }; return true;
+ case 16: outTileShape = { 256, 128, 1 }; return true;
+ case 32: outTileShape = { 128, 128, 1 }; return true;
+ case 64: outTileShape = { 128, 64, 1 }; return true;
+ case 128: outTileShape = { 64, 64, 1 }; return true;
+ case 256: outTileShape = { 64, 32, 1 }; return true;
+ case 512: outTileShape = { 32, 32, 1 }; return true;
+ case 1024: outTileShape = { 32, 16, 1 }; return true;
+ case 2048: outTileShape = { 16, 16, 1 }; return true;
+ default: return false;
+ }
+ }
+
+ switch (dimension)
+ {
+ case D3D12_RESOURCE_DIMENSION_TEXTURE1D:
+ switch (bitsPerUnit)
+ {
+ case 8: outTileShape = { 4096, 1, 1 }; return true;
+ case 16: outTileShape = { 2048, 1, 1 }; return true;
+ case 32: outTileShape = { 1024, 1, 1 }; return true;
+ case 64: outTileShape = { 512, 1, 1 }; return true;
+ case 128: outTileShape = { 256, 1, 1 }; return true;
+ default: return false;
+ }
+
+ case D3D12_RESOURCE_DIMENSION_TEXTURE2D:
+ switch (bitsPerUnit)
+ {
+ case 8: outTileShape = { 64, 64, 1 }; return true;
+ case 16: outTileShape = { 64, 32, 1 }; return true;
+ case 32: outTileShape = { 32, 32, 1 }; return true;
+ case 64: outTileShape = { 32, 16, 1 }; return true;
+ case 128: outTileShape = { 16, 16, 1 }; return true;
+ default: return false;
+ }
+
+ case D3D12_RESOURCE_DIMENSION_TEXTURE3D:
+ // 4 KB counterparts of the documented 64 KB volume-tile shapes.
+ switch (bitsPerUnit)
+ {
+ case 8: outTileShape = { 16, 16, 16 }; return true;
+ case 16: outTileShape = { 16, 16, 8 }; return true;
+ case 32: outTileShape = { 16, 8, 8 }; return true;
+ case 64: outTileShape = { 8, 8, 8 }; return true;
+ case 128: outTileShape = { 8, 8, 4 }; return true;
+ default: return false;
+ }
+
+ default:
+ return false;
+ }
+}
+
+// This algorithm is overly conservative and applies only to the legacy small-alignment heuristic path.
template
static bool CanUseSmallAlignment(const D3D12_RESOURCE_DESC_T& resourceDesc)
{
- if (resourceDesc.Dimension != D3D12_RESOURCE_DIMENSION_TEXTURE2D)
- return false;
- if ((resourceDesc.Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) != 0)
+ if (resourceDesc.SampleDesc.Count == 0 ||
+ resourceDesc.Layout != D3D12_TEXTURE_LAYOUT_UNKNOWN ||
+ resourceDesc.Width > UINT_MAX)
+ {
return false;
- if (resourceDesc.SampleDesc.Count > 1)
+ }
+
+ const bool isMsaa = resourceDesc.SampleDesc.Count > 1;
+ const bool isRtDs = ResourceFlagsContainRenderTargetOrDepthStencil(resourceDesc.Flags);
+ if (isMsaa && !isRtDs)
+ {
return false;
- if (resourceDesc.DepthOrArraySize != 1)
+ }
+ if (!isMsaa &&
+ isRtDs)
+ {
return false;
+ }
UINT sizeX = (UINT)resourceDesc.Width;
- UINT sizeY = resourceDesc.Height;
- UINT bitsPerPixel = GetBitsPerPixel(resourceDesc.Format);
- if (bitsPerPixel == 0)
+ UINT sizeY = 1;
+ UINT sizeZ = 1;
+ UINT bitsPerUnit = GetBitsPerPixel(resourceDesc.Format);
+ if (bitsPerUnit == 0)
return false;
- if (IsFormatCompressed(resourceDesc.Format))
+ switch (resourceDesc.Dimension)
{
- sizeX = DivideRoundingUp(sizeX, 4u);
- sizeY = DivideRoundingUp(sizeY, 4u);
- bitsPerPixel *= 16;
- }
+ case D3D12_RESOURCE_DIMENSION_TEXTURE1D:
+ if (isMsaa)
+ return false;
+ // For 1D arrays, small-alignment eligibility depends on the mip0 slice size, not array size.
+ if (IsFormatCompressed(resourceDesc.Format))
+ return false;
+ break;
- UINT tileSizeX = 0, tileSizeY = 0;
- switch (bitsPerPixel)
- {
- case 8: tileSizeX = 64; tileSizeY = 64; break;
- case 16: tileSizeX = 64; tileSizeY = 32; break;
- case 32: tileSizeX = 32; tileSizeY = 32; break;
- case 64: tileSizeX = 32; tileSizeY = 16; break;
- case 128: tileSizeX = 16; tileSizeY = 16; break;
- default: return false;
+ case D3D12_RESOURCE_DIMENSION_TEXTURE2D:
+ // For 2D arrays, small-alignment eligibility depends on mip0 width/height, not array size.
+ sizeY = resourceDesc.Height;
+ if (isMsaa && IsFormatCompressed(resourceDesc.Format))
+ return false;
+ if (IsFormatCompressed(resourceDesc.Format))
+ {
+ sizeX = DivideRoundingUp(sizeX, 4u);
+ sizeY = DivideRoundingUp(sizeY, 4u);
+ bitsPerUnit *= 16;
+ }
+ break;
+
+ case D3D12_RESOURCE_DIMENSION_TEXTURE3D:
+ if (isMsaa)
+ return false;
+ sizeY = resourceDesc.Height;
+ sizeZ = resourceDesc.DepthOrArraySize;
+ if (IsFormatCompressed(resourceDesc.Format))
+ {
+ sizeX = DivideRoundingUp(sizeX, 4u);
+ sizeY = DivideRoundingUp(sizeY, 4u);
+ bitsPerUnit *= 16;
+ }
+ break;
+
+ default:
+ return false;
}
- const UINT tileCount = DivideRoundingUp(sizeX, tileSizeX) * DivideRoundingUp(sizeY, tileSizeY);
- return tileCount <= 16;
+ bitsPerUnit *= resourceDesc.SampleDesc.Count;
+
+ SmallAlignmentTileShape tileShape = {};
+ if (!GetSmallAlignmentTileShape(resourceDesc.Dimension, isMsaa, bitsPerUnit, tileShape))
+ return false;
+
+ const UINT64 tileCount =
+ UINT64(DivideRoundingUp(sizeX, tileShape.Width)) *
+ UINT64(DivideRoundingUp(sizeY, tileShape.Height)) *
+ UINT64(DivideRoundingUp(sizeZ, tileShape.Depth));
+ // Non-MSAA compares 64 KB against 4 KB tiles => 16 pages. MSAA compares 4 MB against 64 KB tiles => 64 pages.
+ return tileCount <= (isMsaa ? 64 : 16);
}
static bool ValidateAllocateMemoryParameters(
@@ -5998,6 +6135,7 @@ class AllocatorPimpl
BOOL IsCacheCoherentUMA() const { return m_D3D12Architecture.CacheCoherentUMA; }
bool SupportsResourceHeapTier2() const { return m_D3D12Options.ResourceHeapTier >= D3D12_RESOURCE_HEAP_TIER_2; }
bool IsGPUUploadHeapSupported() const { return m_GPUUploadHeapSupported != FALSE; }
+ bool IsMsaa64KBAlignedTextureSupported() const { return m_MSAA64KBAlignedTextureSupported != FALSE; }
bool IsTightAlignmentSupported() const { return m_TightAlignmentSupported != FALSE; }
bool IsTightAlignmentEnabled() const { return IsTightAlignmentSupported() && m_UseTightAlignment; }
bool UseMutex() const { return m_UseMutex; }
@@ -6086,7 +6224,7 @@ class AllocatorPimpl
const bool m_UseMutex;
const bool m_AlwaysCommitted;
const bool m_MsaaAlwaysCommitted;
- bool m_PreferSmallBuffersCommitted;
+ const bool m_PreferSmallBuffersCommitted;
const bool m_UseTightAlignment;
bool m_DefaultPoolsNotZeroed = false;
ID3D12Device* m_Device; // AddRef
@@ -6115,6 +6253,7 @@ class AllocatorPimpl
DXGI_ADAPTER_DESC m_AdapterDesc;
D3D12_FEATURE_DATA_D3D12_OPTIONS m_D3D12Options;
BOOL m_GPUUploadHeapSupported = FALSE;
+ BOOL m_MSAA64KBAlignedTextureSupported = FALSE;
BOOL m_TightAlignmentSupported = FALSE;
D3D12_FEATURE_DATA_ARCHITECTURE m_D3D12Architecture;
AllocationObjectAllocator m_AllocationObjectAllocator;
@@ -6131,7 +6270,7 @@ class AllocatorPimpl
*/
template
bool PrefersCommittedAllocation(const D3D12_RESOURCE_DESC_T& resourceDesc,
- ALLOCATION_FLAGS strategy);
+ ALLOCATION_FLAGS strategy, bool useTightAlignment) const;
// Allocates and registers new committed resource with implicit heap, as dedicated allocation.
// Creates and returns Allocation object and optionally D3D12 resource.
@@ -6151,6 +6290,7 @@ class AllocatorPimpl
template
HRESULT CalcAllocationParams(const ALLOCATION_DESC& allocDesc, UINT64 allocSize,
const D3D12_RESOURCE_DESC_T* resDesc, // Optional
+ bool useTightAlignment,
BlockVector*& outBlockVector, CommittedAllocationParameters& outCommittedAllocationParams, bool& outPreferCommitted);
// Returns UINT32_MAX if index cannot be calculcated.
@@ -6184,7 +6324,10 @@ class AllocatorPimpl
template
HRESULT GetResourceAllocationInfo(D3D12_RESOURCE_DESC_T& inOutResourceDesc,
UINT32 NumCastableFormats, const DXGI_FORMAT* pCastableFormats,
- D3D12_RESOURCE_ALLOCATION_INFO& outAllocInfo) const;
+ D3D12_RESOURCE_ALLOCATION_INFO& outAllocInfo,
+ bool useTightAlignment) const;
+
+ bool IsTightAlignmentEnabled(const ALLOCATION_DESC& allocDesc) const;
bool NewAllocationWithinBudget(D3D12_HEAP_TYPE heapType, UINT64 size);
@@ -6287,6 +6430,17 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
}
#endif // #if D3D12MA_OPTIONS16_SUPPORTED
+#if D3D12MA_OPTIONS4_SUPPORTED
+ {
+ D3D12_FEATURE_DATA_D3D12_OPTIONS4 options4 = {};
+ hr = m_Device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS4, &options4, sizeof(options4));
+ if (SUCCEEDED(hr))
+ {
+ m_MSAA64KBAlignedTextureSupported = options4.MSAA64KBAlignedTextureSupported;
+ }
+ }
+#endif // #if D3D12MA_OPTIONS4_SUPPORTED
+
#if D3D12MA_TIGHT_ALIGNMENT_SUPPORTED
{
D3D12_FEATURE_DATA_TIGHT_ALIGNMENT tightAlignment = {};
@@ -6295,13 +6449,6 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
{
m_TightAlignmentSupported = tightAlignment.SupportTier >= D3D12_TIGHT_ALIGNMENT_TIER_1;
- // If tight alignment is supported (checked by the code above) and wasn't disabled by the developer
- // (with ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT), disable the preference for creating small buffers as committed,
- // as if ALLOCATOR_FLAG_DONT_PREFER_SMALL_BUFFERS_COMMITTED was specified.
- if (IsTightAlignmentEnabled())
- {
- m_PreferSmallBuffersCommitted = false;
- }
}
}
#endif // #if D3D12MA_TIGHT_ALIGNMENT_SUPPORTED
@@ -6500,6 +6647,7 @@ HRESULT AllocatorPimpl::CreateResource(
}
HRESULT hr = E_NOINTERFACE;
+ const bool useTightAlignment = IsTightAlignmentEnabled(*pAllocDesc);
CREATE_RESOURCE_PARAMS finalCreateParams = createParams;
D3D12_RESOURCE_DESC finalResourceDesc;
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
@@ -6510,7 +6658,7 @@ HRESULT AllocatorPimpl::CreateResource(
{
finalResourceDesc = *createParams.GetResourceDesc();
finalCreateParams.AccessResourceDesc() = &finalResourceDesc;
- hr = GetResourceAllocationInfo(finalResourceDesc, 0, NULL, resAllocInfo);
+ hr = GetResourceAllocationInfo(finalResourceDesc, 0, NULL, resAllocInfo, useTightAlignment);
}
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
else if (createParams.Variant == CREATE_RESOURCE_PARAMS::VARIANT_WITH_STATE_AND_DESC1)
@@ -6519,7 +6667,7 @@ HRESULT AllocatorPimpl::CreateResource(
{
finalResourceDesc1 = *createParams.GetResourceDesc1();
finalCreateParams.AccessResourceDesc1() = &finalResourceDesc1;
- hr = GetResourceAllocationInfo(finalResourceDesc1, 0, NULL, resAllocInfo);
+ hr = GetResourceAllocationInfo(finalResourceDesc1, 0, NULL, resAllocInfo, useTightAlignment);
}
}
#endif
@@ -6531,7 +6679,7 @@ HRESULT AllocatorPimpl::CreateResource(
finalResourceDesc1 = *createParams.GetResourceDesc1();
finalCreateParams.AccessResourceDesc1() = &finalResourceDesc1;
hr = GetResourceAllocationInfo(finalResourceDesc1,
- createParams.GetNumCastableFormats(), createParams.GetCastableFormats(), resAllocInfo);
+ createParams.GetNumCastableFormats(), createParams.GetCastableFormats(), resAllocInfo, useTightAlignment);
}
}
#endif
@@ -6557,14 +6705,14 @@ HRESULT AllocatorPimpl::CreateResource(
if (createParams.Variant >= CREATE_RESOURCE_PARAMS::VARIANT_WITH_STATE_AND_DESC1)
{
hr = CalcAllocationParams(*pAllocDesc, resAllocInfo.SizeInBytes,
- createParams.GetResourceDesc1(),
+ createParams.GetResourceDesc1(), useTightAlignment,
blockVector, committedAllocationParams, preferCommitted);
}
else
#endif
{
hr = CalcAllocationParams(*pAllocDesc, resAllocInfo.SizeInBytes,
- createParams.GetResourceDesc(),
+ createParams.GetResourceDesc(), useTightAlignment,
blockVector, committedAllocationParams, preferCommitted);
}
if (FAILED(hr))
@@ -6611,6 +6759,7 @@ HRESULT AllocatorPimpl::AllocateMemory(
bool preferCommitted = false;
HRESULT hr = CalcAllocationParams(*pAllocDesc, pAllocInfo->SizeInBytes,
NULL, // pResDesc
+ false, // useTightAlignment - irrelevant for AllocateMemory
blockVector, committedAllocationParams, preferCommitted);
if (FAILED(hr))
return hr;
@@ -6659,7 +6808,7 @@ HRESULT AllocatorPimpl::CreateAliasingResource(
{
finalResourceDesc = *createParams.GetResourceDesc();
finalCreateParams.AccessResourceDesc() = &finalResourceDesc;
- hr = GetResourceAllocationInfo(finalResourceDesc, 0, NULL, resAllocInfo);
+ hr = GetResourceAllocationInfo(finalResourceDesc, 0, NULL, resAllocInfo, IsTightAlignmentEnabled());
}
#ifdef __ID3D12Device8_INTERFACE_DEFINED__
else if (createParams.Variant == CREATE_RESOURCE_PARAMS::VARIANT_WITH_STATE_AND_DESC1)
@@ -6668,7 +6817,7 @@ HRESULT AllocatorPimpl::CreateAliasingResource(
{
finalResourceDesc1 = *createParams.GetResourceDesc1();
finalCreateParams.AccessResourceDesc1() = &finalResourceDesc1;
- hr = GetResourceAllocationInfo(finalResourceDesc1, 0, NULL, resAllocInfo);
+ hr = GetResourceAllocationInfo(finalResourceDesc1, 0, NULL, resAllocInfo, IsTightAlignmentEnabled());
}
}
#endif
@@ -6680,7 +6829,7 @@ HRESULT AllocatorPimpl::CreateAliasingResource(
finalResourceDesc1 = *createParams.GetResourceDesc1();
finalCreateParams.AccessResourceDesc1() = &finalResourceDesc1;
hr = GetResourceAllocationInfo(finalResourceDesc1,
- createParams.GetNumCastableFormats(), createParams.GetCastableFormats(), resAllocInfo);
+ createParams.GetNumCastableFormats(), createParams.GetCastableFormats(), resAllocInfo, IsTightAlignmentEnabled());
}
}
#endif
@@ -7315,13 +7464,14 @@ void AllocatorPimpl::FreeStatsString(WCHAR* pStatsString)
template
bool AllocatorPimpl::PrefersCommittedAllocation(const D3D12_RESOURCE_DESC_T& resourceDesc,
- ALLOCATION_FLAGS strategy)
+ ALLOCATION_FLAGS strategy, bool useTightAlignment) const
{
// Prefer creating small buffers <= 32 KB as committed, because drivers pack them better,
// while placed buffers require 64 KB alignment.
if(resourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER &&
resourceDesc.Width <= D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT / 2 &&
strategy != ALLOCATION_FLAG_STRATEGY_MIN_TIME && // Creating as committed would be slower.
+ !useTightAlignment &&
m_PreferSmallBuffersCommitted)
{
return true;
@@ -7536,7 +7686,7 @@ HRESULT AllocatorPimpl::AllocateHeap(
template
HRESULT AllocatorPimpl::CalcAllocationParams(const ALLOCATION_DESC& allocDesc, UINT64 allocSize,
- const D3D12_RESOURCE_DESC_T* resDesc,
+ const D3D12_RESOURCE_DESC_T* resDesc, bool useTightAlignment,
BlockVector*& outBlockVector, CommittedAllocationParameters& outCommittedAllocationParams, bool& outPreferCommitted)
{
outBlockVector = NULL;
@@ -7609,7 +7759,7 @@ HRESULT AllocatorPimpl::CalcAllocationParams(const ALLOCATION_DESC& allocDesc, U
{
if (resDesc->SampleDesc.Count > 1 && msaaAlwaysCommitted)
outBlockVector = NULL;
- if (!outPreferCommitted && PrefersCommittedAllocation(*resDesc, allocDesc.Flags & ALLOCATION_FLAG_STRATEGY_MASK))
+ if (!outPreferCommitted && PrefersCommittedAllocation(*resDesc, allocDesc.Flags & ALLOCATION_FLAG_STRATEGY_MASK, useTightAlignment))
outPreferCommitted = true;
}
@@ -7820,12 +7970,13 @@ template
HRESULT AllocatorPimpl::GetResourceAllocationInfo(
D3D12_RESOURCE_DESC_T& inOutResourceDesc,
UINT32 NumCastableFormats, const DXGI_FORMAT* pCastableFormats,
- D3D12_RESOURCE_ALLOCATION_INFO& outAllocInfo) const
+ D3D12_RESOURCE_ALLOCATION_INFO& outAllocInfo,
+ bool useTightAlignment) const
{
#ifdef __ID3D12Device1_INTERFACE_DEFINED__
#if D3D12MA_TIGHT_ALIGNMENT_SUPPORTED
- if (IsTightAlignmentEnabled())
+ if (useTightAlignment)
{
// Don't allow USE_TIGHT_ALIGNMENT together with ALLOW_CROSS_ADAPTER as there is a D3D Debug Layer error:
// D3D12 ERROR: ID3D12Device::GetResourceAllocationInfo: D3D12_RESOURCE_DESC::Flag D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT will be ignored since D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER is set. [ STATE_CREATION ERROR #599: CREATERESOURCE_INVALIDMISCFLAGS]
@@ -7849,7 +8000,7 @@ HRESULT AllocatorPimpl::GetResourceAllocationInfo(
*/
if (inOutResourceDesc.Alignment == 0 &&
inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER &&
- !IsTightAlignmentEnabled())
+ !useTightAlignment)
{
outAllocInfo = {
AlignUp(inOutResourceDesc.Width, D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT), // SizeInBytes
@@ -7862,16 +8013,33 @@ HRESULT AllocatorPimpl::GetResourceAllocationInfo(
HRESULT hr = S_OK;
#if D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT
- if (inOutResourceDesc.Alignment == 0 &&
- (inOutResourceDesc.Flags & D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT_COPY) == 0 &&
- (inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE1D ||
- inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D ||
- inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D) &&
- (inOutResourceDesc.Flags & (D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET | D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)) == 0
+ bool trySmallAlignment = false;
+
+ if (inOutResourceDesc.Alignment == 0
+ && (inOutResourceDesc.Flags & D3D12_RESOURCE_FLAG_USE_TIGHT_ALIGNMENT_COPY) == 0
+ && inOutResourceDesc.Layout == D3D12_TEXTURE_LAYOUT_UNKNOWN
+ && ResourceDimensionIsTexture(inOutResourceDesc.Dimension))
+ {
+ // MSAA texture.
+ if(inOutResourceDesc.SampleDesc.Count > 1)
+ {
+ trySmallAlignment = IsMsaa64KBAlignedTextureSupported()
+ && ResourceFlagsContainRenderTargetOrDepthStencil(inOutResourceDesc.Flags)
+ && inOutResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+ }
+ // Non-MSAA texture.
+ else
+ {
+ trySmallAlignment = !ResourceFlagsContainRenderTargetOrDepthStencil(inOutResourceDesc.Flags);
+ }
+ }
+
#if D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT == 1
- && CanUseSmallAlignment(inOutResourceDesc)
+ if(trySmallAlignment)
+ trySmallAlignment = CanUseSmallAlignment(inOutResourceDesc);
#endif
- )
+
+ if (trySmallAlignment)
{
/*
The algorithm here is based on Microsoft sample: "Small Resources Sample"
@@ -7896,6 +8064,20 @@ HRESULT AllocatorPimpl::GetResourceAllocationInfo(
inOutResourceDesc, NumCastableFormats, pCastableFormats, outAllocInfo);
}
+bool AllocatorPimpl::IsTightAlignmentEnabled(const ALLOCATION_DESC& allocDesc) const
+{
+ if (!IsTightAlignmentEnabled())
+ return false;
+
+ if (allocDesc.CustomPool != NULL &&
+ (allocDesc.CustomPool->m_Pimpl->GetDesc().Flags & POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT) != 0)
+ {
+ return false;
+ }
+
+ return true;
+}
+
bool AllocatorPimpl::NewAllocationWithinBudget(D3D12_HEAP_TYPE heapType, UINT64 size)
{
Budget budget = {};
diff --git a/src/Tests.cpp b/src/Tests.cpp
index 9e00157..b38840f 100644
--- a/src/Tests.cpp
+++ b/src/Tests.cpp
@@ -165,6 +165,22 @@ static void FillResourceDescForBuffer(D3D12_RESOURCE_DESC_T& outResourceDesc, UI
outResourceDesc.Flags = D3D12_RESOURCE_FLAG_NONE;
}
+static void FillResourceDescForSmallMsaaRenderTarget(D3D12_RESOURCE_DESC& outResourceDesc)
+{
+ outResourceDesc = {};
+ outResourceDesc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+ outResourceDesc.Alignment = 0;
+ outResourceDesc.Width = 64;
+ outResourceDesc.Height = 64;
+ outResourceDesc.DepthOrArraySize = 1;
+ outResourceDesc.MipLevels = 1;
+ outResourceDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ outResourceDesc.SampleDesc.Count = 2;
+ outResourceDesc.SampleDesc.Quality = 0;
+ outResourceDesc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
+ outResourceDesc.Flags = D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET;
+}
+
static void FillData(void* outPtr, const UINT64 sizeInBytes, UINT seed)
{
UINT* outValues = (UINT*)outPtr;
@@ -361,6 +377,30 @@ static void SaveStatsStringToFile(const TestContext& ctx, const wchar_t* dstFile
ctx.allocator->FreeStatsString(s);
}
+static bool QueryMsaa64KBAlignedTextureSupported(const TestContext& ctx)
+{
+ D3D12_FEATURE_DATA_D3D12_OPTIONS4 options4 = {};
+ CHECK_HR(ctx.device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS4, &options4, sizeof(options4)));
+ return options4.MSAA64KBAlignedTextureSupported != FALSE;
+}
+
+static UINT64 ExpectedMsaaTexturePlacementAlignment(bool msaa64KBAlignedTextureSupported)
+{
+ return msaa64KBAlignedTextureSupported ?
+ D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT :
+ D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT;
+}
+
+static void ValidatePlacedSmallMsaaTextureAllocation(const D3D12MA::Allocation* alloc, UINT64 expectedAlignment)
+{
+ CHECK_BOOL(alloc != nullptr);
+ CHECK_BOOL(alloc->GetResource() != nullptr);
+ CHECK_BOOL(alloc->GetHeap() != nullptr);
+ CHECK_BOOL(alloc->GetAlignment() == expectedAlignment);
+ CHECK_BOOL(alloc->GetOffset() % expectedAlignment == 0);
+ CHECK_BOOL(alloc->GetHeap()->GetDesc().Alignment == D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT);
+}
+
static void TestDebugMargin(const TestContext& ctx)
{
@@ -730,70 +770,77 @@ static void TestSmallBuffers(const TestContext& ctx)
const bool isTightAlignmentEnabled = ctx.allocator->IsTightAlignmentSupported() &&
(ctx.allocatorFlags & D3D12MA::ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT) == 0;
- const bool expectSmallBuffersCommitted = !isTightAlignmentEnabled &&
+ const bool allowSmallBuffersCommitted =
(ctx.allocatorFlags & D3D12MA::ALLOCATOR_FLAG_DONT_PREFER_SMALL_BUFFERS_COMMITTED) == 0;
-
+ const bool expectSmallBuffersCommitted = !isTightAlignmentEnabled &&
+ allowSmallBuffersCommitted;
- D3D12MA::CPOOL_DESC poolDesc = D3D12MA::CPOOL_DESC{
- D3D12_HEAP_TYPE_DEFAULT,
- D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS };
- ComPtr pool;
- CHECK_HR(ctx.allocator->CreatePool(&poolDesc, &pool));
+ const auto testPool = [&](D3D12MA::POOL_FLAGS poolFlags, bool expectDefaultCommitted)
+ {
+ D3D12MA::CPOOL_DESC poolDesc = D3D12MA::CPOOL_DESC{
+ D3D12_HEAP_TYPE_DEFAULT,
+ D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS,
+ poolFlags };
+ ComPtr pool;
+ CHECK_HR(ctx.allocator->CreatePool(&poolDesc, &pool));
- D3D12MA::CALLOCATION_DESC allocDesc = D3D12MA::CALLOCATION_DESC{ pool.Get() };
+ D3D12MA::CALLOCATION_DESC allocDesc = D3D12MA::CALLOCATION_DESC{ pool.Get() };
- D3D12_RESOURCE_DESC resDesc;
- FillResourceDescForBuffer(resDesc, 8 * KILOBYTE);
+ D3D12_RESOURCE_DESC resDesc;
+ FillResourceDescForBuffer(resDesc, 8 * KILOBYTE);
- D3D12_RESOURCE_DESC largeResDesc = resDesc;
- largeResDesc.Width = 128 * KILOBYTE;
+ D3D12_RESOURCE_DESC largeResDesc = resDesc;
+ largeResDesc.Width = 128 * KILOBYTE;
- std::vector resources;
+ std::vector resources;
- // A large buffer placed inside the heap to allocate first block.
- {
- resources.emplace_back();
- ResourceWithAllocation& resWithAlloc = resources.back();
- CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &largeResDesc, D3D12_RESOURCE_STATE_COMMON,
- nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
- CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
- CHECK_BOOL(resWithAlloc.allocation->GetHeap()); // Expected to be placed.
- }
+ // A large buffer placed inside the heap to allocate first block.
+ {
+ resources.emplace_back();
+ ResourceWithAllocation& resWithAlloc = resources.back();
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &largeResDesc, D3D12_RESOURCE_STATE_COMMON,
+ nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
+ CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
+ CHECK_BOOL(resWithAlloc.allocation->GetHeap()); // Expected to be placed.
+ }
- // Test 1: COMMITTED.
- {
- resources.emplace_back();
- ResourceWithAllocation& resWithAlloc = resources.back();
- allocDesc.Flags = D3D12MA::ALLOCATION_FLAG_COMMITTED;
- CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_COMMON,
- nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
- CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
- CHECK_BOOL(!resWithAlloc.allocation->GetHeap()); // Expected to be committed.
- }
+ // Test 1: COMMITTED.
+ {
+ resources.emplace_back();
+ ResourceWithAllocation& resWithAlloc = resources.back();
+ allocDesc.Flags = D3D12MA::ALLOCATION_FLAG_COMMITTED;
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_COMMON,
+ nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
+ CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
+ CHECK_BOOL(!resWithAlloc.allocation->GetHeap()); // Expected to be committed.
+ }
- // Test 2: Default.
- {
- resources.emplace_back();
- ResourceWithAllocation& resWithAlloc = resources.back();
- allocDesc.Flags = D3D12MA::ALLOCATION_FLAG_NONE;
- CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_COMMON,
- nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
- CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
- // Expected to be committed?
- const bool isCommitted = resWithAlloc.allocation->GetHeap() == NULL;
- CHECK_BOOL(isCommitted == expectSmallBuffersCommitted);
- }
+ // Test 2: Default.
+ {
+ resources.emplace_back();
+ ResourceWithAllocation& resWithAlloc = resources.back();
+ allocDesc.Flags = D3D12MA::ALLOCATION_FLAG_NONE;
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_COMMON,
+ nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
+ CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
+ const bool isCommitted = resWithAlloc.allocation->GetHeap() == NULL;
+ CHECK_BOOL(isCommitted == expectDefaultCommitted);
+ }
- // Test 3: NEVER_ALLOCATE.
- {
- resources.emplace_back();
- ResourceWithAllocation& resWithAlloc = resources.back();
- allocDesc.Flags = D3D12MA::ALLOCATION_FLAG_NEVER_ALLOCATE;
- CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_COMMON,
- nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
- CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
- CHECK_BOOL(resWithAlloc.allocation->GetHeap()); // Expected to be placed.
- }
+ // Test 3: NEVER_ALLOCATE.
+ {
+ resources.emplace_back();
+ ResourceWithAllocation& resWithAlloc = resources.back();
+ allocDesc.Flags = D3D12MA::ALLOCATION_FLAG_NEVER_ALLOCATE;
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_COMMON,
+ nullptr, &resWithAlloc.allocation, IID_PPV_ARGS(&resWithAlloc.resource)));
+ CHECK_BOOL(resWithAlloc.allocation && resWithAlloc.allocation->GetResource());
+ CHECK_BOOL(resWithAlloc.allocation->GetHeap()); // Expected to be placed.
+ }
+ };
+
+ testPool(D3D12MA::POOL_FLAG_NONE, expectSmallBuffersCommitted);
+ testPool(D3D12MA::POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT, allowSmallBuffersCommitted);
}
static void TestCustomHeapFlags(const TestContext& ctx)
@@ -1773,6 +1820,170 @@ static void TestPoolMsaaTextureAsCommitted(const TestContext& ctx)
CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_RENDER_TARGET, nullptr, &alloc, IID_NULL, nullptr));
// Committed allocation should not have explicit heap
CHECK_BOOL(alloc->GetHeap() == nullptr);
+ CHECK_BOOL(alloc->GetOffset() == 0);
+}
+
+static void TestMsaa64KBAlignedTextureSupported_DefaultPool(const TestContext& ctx)
+{
+ wprintf(L"Test MSAA 64 KB alignment in default pool\n");
+
+ CHECK_BOOL((ctx.allocatorFlags & D3D12MA::ALLOCATOR_FLAG_ALWAYS_COMMITTED) == 0);
+ CHECK_BOOL((ctx.allocatorFlags & D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED) == 0);
+
+ const UINT64 expectedAlignment =
+ ExpectedMsaaTexturePlacementAlignment(QueryMsaa64KBAlignedTextureSupported(ctx));
+
+ D3D12MA::CALLOCATION_DESC allocDesc = D3D12MA::CALLOCATION_DESC{ D3D12_HEAP_TYPE_DEFAULT };
+
+ D3D12_RESOURCE_DESC resDesc = {};
+ FillResourceDescForSmallMsaaRenderTarget(resDesc);
+
+ ComPtr alloc;
+ ComPtr resource;
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_RENDER_TARGET,
+ nullptr, &alloc, IID_PPV_ARGS(&resource)));
+
+ ValidatePlacedSmallMsaaTextureAllocation(alloc.Get(), expectedAlignment);
+}
+
+static void TestMsaa64KBAlignedTextureSupported_CustomPool(const TestContext& ctx)
+{
+ wprintf(L"Test MSAA 64 KB alignment in custom pool\n");
+
+ const UINT64 expectedAlignment =
+ ExpectedMsaaTexturePlacementAlignment(QueryMsaa64KBAlignedTextureSupported(ctx));
+
+ D3D12MA::CPOOL_DESC poolDesc = D3D12MA::CPOOL_DESC{
+ D3D12_HEAP_TYPE_DEFAULT,
+ D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES,
+ D3D12MA::POOL_FLAG_NONE };
+ ComPtr pool;
+ CHECK_HR(ctx.allocator->CreatePool(&poolDesc, &pool));
+
+ D3D12MA::CALLOCATION_DESC allocDesc = D3D12MA::CALLOCATION_DESC{ pool.Get() };
+
+ D3D12_RESOURCE_DESC resDesc = {};
+ FillResourceDescForSmallMsaaRenderTarget(resDesc);
+
+ ComPtr alloc;
+ ComPtr resource;
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, D3D12_RESOURCE_STATE_RENDER_TARGET,
+ nullptr, &alloc, IID_PPV_ARGS(&resource)));
+
+ ValidatePlacedSmallMsaaTextureAllocation(alloc.Get(), expectedAlignment);
+}
+
+static void TestSmallTextureAlignment(const TestContext& ctx)
+{
+ wprintf(L"Test small texture alignment\n");
+
+ struct TextureCase
+ {
+ DXGI_FORMAT Format;
+ UINT WidthBelowThreshold;
+ UINT HeightBelowThreshold;
+ UINT WidthAboveThreshold;
+ UINT HeightAboveThreshold;
+ };
+
+ static const TextureCase NON_MSAA_CASES[] =
+ {
+ { DXGI_FORMAT_R8_UNORM, 128, 128, 320, 320 },
+ { DXGI_FORMAT_R8G8B8A8_UNORM, 64, 64, 160, 160 },
+ { DXGI_FORMAT_BC1_UNORM, 128, 128, 640, 256 },
+ };
+ static const TextureCase MSAA_CASES[] =
+ {
+ { DXGI_FORMAT_R8G8B8A8_UNORM, 256, 256, 1152, 512 },
+ { DXGI_FORMAT_R16G16B16A16_FLOAT, 256, 128, 576, 512 },
+ { DXGI_FORMAT_R32G32B32A32_FLOAT, 256, 128, 576, 256 },
+ };
+
+ for (UINT msaaIndex = 0; msaaIndex < 2; ++msaaIndex)
+ {
+ const bool isMsaa = msaaIndex != 0;
+ const UINT64 largeAlignment = isMsaa ?
+ D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT :
+ D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
+ const UINT64 smallAlignment = isMsaa ?
+ D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT :
+ D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT;
+ const TextureCase* textureCases = isMsaa ? MSAA_CASES : NON_MSAA_CASES;
+ const size_t textureCaseCount = isMsaa ? _countof(MSAA_CASES) : _countof(NON_MSAA_CASES);
+ const D3D12_HEAP_FLAGS heapFlags = isMsaa ?
+ D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES :
+ D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES;
+ const D3D12_RESOURCE_FLAGS resourceFlags = isMsaa ?
+ D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET :
+ D3D12_RESOURCE_FLAG_NONE;
+ const D3D12_RESOURCE_STATES initialState = isMsaa ?
+ D3D12_RESOURCE_STATE_RENDER_TARGET :
+ D3D12_RESOURCE_STATE_COPY_DEST;
+
+ D3D12MA::CPOOL_DESC poolDesc = D3D12MA::CPOOL_DESC{
+ D3D12_HEAP_TYPE_DEFAULT,
+ heapFlags,
+ D3D12MA::POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT,
+ 16 * MEGABYTE,
+ 0,
+ 1 };
+ ComPtr pool;
+ CHECK_HR(ctx.allocator->CreatePool(&poolDesc, &pool));
+
+ D3D12MA::CALLOCATION_DESC allocDesc = D3D12MA::CALLOCATION_DESC{ pool.Get() };
+
+ for (size_t textureCaseIndex = 0; textureCaseIndex < textureCaseCount; ++textureCaseIndex)
+ {
+ const TextureCase& textureCase = textureCases[textureCaseIndex];
+ for (UINT thresholdIndex = 0; thresholdIndex < 2; ++thresholdIndex)
+ {
+ const bool belowThreshold = thresholdIndex == 0;
+ D3D12_RESOURCE_DESC resDesc = {};
+ resDesc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+ resDesc.Alignment = 0;
+ resDesc.Width = belowThreshold ? textureCase.WidthBelowThreshold : textureCase.WidthAboveThreshold;
+ resDesc.Height = belowThreshold ? textureCase.HeightBelowThreshold : textureCase.HeightAboveThreshold;
+ resDesc.DepthOrArraySize = 1;
+ resDesc.MipLevels = 1;
+ resDesc.Format = textureCase.Format;
+ resDesc.SampleDesc.Count = isMsaa ? 2 : 1;
+ resDesc.SampleDesc.Quality = 0;
+ resDesc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
+ resDesc.Flags = resourceFlags;
+
+ ComPtr alloc0, alloc1;
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, initialState,
+ nullptr, &alloc0, IID_NULL, nullptr));
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc, initialState,
+ nullptr, &alloc1, IID_NULL, nullptr));
+
+ CHECK_BOOL(alloc0->GetHeap() != nullptr);
+ CHECK_BOOL(alloc1->GetHeap() != nullptr);
+ CHECK_BOOL(alloc0->GetHeap() == alloc1->GetHeap());
+
+ // Note these asserts may fail if you use D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT=2.
+ const UINT64 expectedAlignment = belowThreshold ? smallAlignment : largeAlignment;
+ CHECK_BOOL((alloc0->GetOffset() % expectedAlignment) == 0);
+ CHECK_BOOL((alloc1->GetOffset() % expectedAlignment) == 0);
+ if (belowThreshold)
+ {
+ const UINT64 nonZeroOffset = alloc0->GetOffset() > 0 ? alloc0->GetOffset() : alloc1->GetOffset();
+ wprintf(L" Small alignment case: format=%u msaa=%u size=%llux%u offset=%llu -> small alignment %s\n",
+ (UINT)textureCase.Format,
+ isMsaa ? 1u : 0u,
+ resDesc.Width,
+ resDesc.Height,
+ nonZeroOffset,
+ nonZeroOffset < largeAlignment ? L"YES" : L"NO");
+ }
+
+ alloc1.Reset();
+ alloc0.Reset();
+ }
+ }
+
+ pool.Reset();
+ }
}
static void TestMapping(const TestContext& ctx)
@@ -3373,45 +3584,51 @@ static void TestTightAlignment(const TestContext& ctx)
for (auto heapType : heapTypes)
{
poolDesc.HeapProperties.Type = heapType;
- for (uint32_t minAlignmentTestIndex = 0; minAlignmentTestIndex < 2; ++minAlignmentTestIndex)
+ for (uint32_t poolFlagsIndex = 0; poolFlagsIndex < 2; ++poolFlagsIndex)
{
- // MinAllocationAlignment == 0 - default alignment.
- // MinAllocationAlignment == 1 - minimum possible alignment.
- poolDesc.MinAllocationAlignment = minAlignmentTestIndex;
+ poolDesc.Flags = poolFlagsIndex == 0 ? POOL_FLAG_NONE : POOL_FLAG_DONT_USE_TIGHT_ALIGNMENT;
+ const bool isPoolTightAlignmentEnabled = isTightAlignmentEnabled && poolDesc.Flags == POOL_FLAG_NONE;
+ for (uint32_t minAlignmentTestIndex = 0; minAlignmentTestIndex < 2; ++minAlignmentTestIndex)
+ {
+ // MinAllocationAlignment == 0 - default alignment.
+ // MinAllocationAlignment == 1 - minimum possible alignment.
+ poolDesc.MinAllocationAlignment = minAlignmentTestIndex;
- ComPtr pool;
- CHECK_HR(ctx.allocator->CreatePool(&poolDesc, &pool));
+ ComPtr pool;
+ CHECK_HR(ctx.allocator->CreatePool(&poolDesc, &pool));
- ALLOCATION_DESC allocDesc = {};
- allocDesc.CustomPool = pool.Get();
+ ALLOCATION_DESC allocDesc = {};
+ allocDesc.CustomPool = pool.Get();
- ComPtr allocs[2] = {};
+ ComPtr allocs[2] = {};
- for (size_t i = 0; i < _countof(allocs); ++i)
- {
- CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc,
- D3D12_RESOURCE_STATE_COMMON, NULL, &allocs[i], IID_NULL, NULL));
- CHECK_BOOL(allocs[i] && allocs[i]->GetResource());
- }
+ for (size_t i = 0; i < _countof(allocs); ++i)
+ {
+ CHECK_HR(ctx.allocator->CreateResource(&allocDesc, &resDesc,
+ D3D12_RESOURCE_STATE_COMMON, NULL, &allocs[i], IID_NULL, NULL));
+ CHECK_BOOL(allocs[i] && allocs[i]->GetResource());
+ }
- const UINT64 secondAllocOffset = allocs[1]->GetOffset();
+ const UINT64 secondAllocOffset = allocs[1]->GetOffset();
- // Print the offset of the 2nd buffer.
- wprintf(L" In D3D12_HEAP_TYPE_%s, with MinAllocationAlignment=%llu, a %llu B buffer was aligned to %llu B.\n",
- HEAP_TYPE_NAMES[(size_t)heapType],
- poolDesc.MinAllocationAlignment,
- resDesc.Width,
- secondAllocOffset);
+ // Print the offset of the 2nd buffer.
+ wprintf(L" In D3D12_HEAP_TYPE_%s, with Flags=0x%X, MinAllocationAlignment=%llu, a %llu B buffer was aligned to %llu B.\n",
+ HEAP_TYPE_NAMES[(size_t)heapType],
+ poolDesc.Flags,
+ poolDesc.MinAllocationAlignment,
+ resDesc.Width,
+ secondAllocOffset);
- UINT64 expectedMinAlignment = 1;
- if (isTightAlignmentEnabled)
- {
- if (minAlignmentTestIndex == 0)
- expectedMinAlignment = D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT;
+ UINT64 expectedMinAlignment = 1;
+ if (isPoolTightAlignmentEnabled)
+ {
+ if (minAlignmentTestIndex == 0)
+ expectedMinAlignment = D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT;
+ }
+ else
+ expectedMinAlignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
+ CHECK_BOOL(secondAllocOffset % expectedMinAlignment == 0);
}
- else
- expectedMinAlignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
- CHECK_BOOL(secondAllocOffset % expectedMinAlignment == 0);
}
}
}
@@ -4684,6 +4901,9 @@ static void TestGroupBasics(const TestContext& ctx)
TestStandardCustomCommittedPlaced(ctx);
TestAliasingMemory(ctx);
TestAliasingImplicitCommitted(ctx);
+ TestMsaa64KBAlignedTextureSupported_DefaultPool(ctx);
+ TestMsaa64KBAlignedTextureSupported_CustomPool(ctx);
+ TestSmallTextureAlignment(ctx);
TestPoolMsaaTextureAsCommitted(ctx);
TestMapping(ctx);
TestStats(ctx);