Skip to content

Commit 58abb3c

Browse files
Added documentation chapter "Optimal resource allocation"
Also other fixes in the documentation. Updated Doxyfile to the new Doxygen version. Cherry-picked from branch "feature/resource-tight-alignment". Regenerated the docs.
1 parent 7e17878 commit 58abb3c

100 files changed

Lines changed: 1724 additions & 666 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/html/_d3_d12_mem_alloc_8h.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: D:/PROJECTS/D3D12 Memory Allocator/REPO/include/D3D12MemAlloc.h File Reference</title>
8+
<title>D3D12 Memory Allocator: D:/PROJECTS/D3D12 Memory Allocator/REPO/include/D3D12MemAlloc.h File Reference</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>
@@ -177,6 +177,7 @@
177177
<tr class="memitem:aa623643886b8481adb32017e5c748b50" id="r_aa623643886b8481adb32017e5c748b50"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa623643886b8481adb32017e5c748b50">D3D12MA_DXGI_1_4</a>&#160;&#160;&#160;0</td></tr>
178178
<tr class="separator:aa623643886b8481adb32017e5c748b50"><td class="memSeparator" colspan="2">&#160;</td></tr>
179179
<tr class="memitem:ad04069a2e2bbc53b7d65f85a04a2dcbc" id="r_ad04069a2e2bbc53b7d65f85a04a2dcbc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad04069a2e2bbc53b7d65f85a04a2dcbc">D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT</a>&#160;&#160;&#160;1</td></tr>
180+
<tr class="memdesc:ad04069a2e2bbc53b7d65f85a04a2dcbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">When defined to value other than 0, the library will try to use <code>D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT</code> or <code>D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT</code> for created textures when possible, which can save memory because some small textures may get their alignment 4 KB and their size a multiply of 4 KB instead of 64 KB. <br /></td></tr>
180181
<tr class="separator:ad04069a2e2bbc53b7d65f85a04a2dcbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
181182
</table><table class="memberdecls">
182183
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
@@ -299,6 +300,13 @@ <h2 class="memtitle"><span class="permalink"><a href="#ad04069a2e2bbc53b7d65f85a
299300
</table>
300301
</div><div class="memdoc">
301302

303+
<p>When defined to value other than 0, the library will try to use <code>D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT</code> or <code>D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT</code> for created textures when possible, which can save memory because some small textures may get their alignment 4 KB and their size a multiply of 4 KB instead of 64 KB. </p>
304+
<ul>
305+
<li><code>#define D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT 0</code> - Disables small texture alignment.</li>
306+
<li><code>#define D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT 1</code> (the default) - Enables conservative algorithm that will use small alignment only for some textures that are surely known to support it.</li>
307+
<li><code>#define D3D12MA_USE_SMALL_RESOURCE_PLACEMENT_ALIGNMENT 2</code> - Enables query for small alignment to D3D12 (based on Microsoft sample) which will enable small alignment for more textures, but will also generate D3D Debug Layer error #721 on call to <code>ID3D12Device::GetResourceAllocationInfo</code>, which you should just ignore. </li>
308+
</ul>
309+
302310
</div>
303311
</div>
304312
</div><!-- contents -->

docs/html/annotated.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: Class List</title>
8+
<title>D3D12 Memory Allocator: Class List</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

docs/html/class_d3_d12_m_a_1_1_allocation-members.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: Member List</title>
8+
<title>D3D12 Memory Allocator: Member List</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

docs/html/class_d3_d12_m_a_1_1_allocation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: D3D12MA::Allocation Class Reference</title>
8+
<title>D3D12 Memory Allocator: D3D12MA::Allocation Class Reference</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

docs/html/class_d3_d12_m_a_1_1_allocator-members.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: Member List</title>
8+
<title>D3D12 Memory Allocator: Member List</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

docs/html/class_d3_d12_m_a_1_1_allocator.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: D3D12MA::Allocator Class Reference</title>
8+
<title>D3D12 Memory Allocator: D3D12MA::Allocator Class Reference</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>
@@ -753,7 +753,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a434ae3147209953253da2668
753753
<p>Returns total amount of memory of specific segment group, in bytes. </p>
754754
<dl class="params"><dt>Parameters</dt><dd>
755755
<table class="params">
756-
<tr><td class="paramname">memorySegmentGroup</td><td>use <code>DXGI_MEMORY_SEGMENT_GROUP_LOCAL</code> or DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL`.</td></tr>
756+
<tr><td class="paramname">memorySegmentGroup</td><td>use <code>DXGI_MEMORY_SEGMENT_GROUP_LOCAL</code> or <code>DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL</code>.</td></tr>
757757
</table>
758758
</dd>
759759
</dl>
@@ -815,8 +815,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a3f3fd1e88cf2cd02257fe272
815815

816816
<p>Returns true if GPU Upload Heaps are supported on the current system. </p>
817817
<p>When true, you can use <code>D3D12_HEAP_TYPE_GPU_UPLOAD</code>.</p>
818-
<p>This flag is fetched from <code>D3D12_FEATURE_D3D12_OPTIONS16::GPUUploadHeapSupported</code>.</p>
819-
<p><code>#define D3D12MA_OPTIONS16_SUPPORTED 1</code> is needed for the compilation of this library. Otherwise the flag is always false. </p>
818+
<p>This flag is fetched from <code>D3D12_FEATURE_D3D12_OPTIONS16::GPUUploadHeapSupported</code>. </p>
820819

821820
</div>
822821
</div>

docs/html/class_d3_d12_m_a_1_1_defragmentation_context-members.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: Member List</title>
8+
<title>D3D12 Memory Allocator: Member List</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

docs/html/class_d3_d12_m_a_1_1_defragmentation_context.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: D3D12MA::DefragmentationContext Class Reference</title>
8+
<title>D3D12 Memory Allocator: D3D12MA::DefragmentationContext Class Reference</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

docs/html/class_d3_d12_m_a_1_1_pool-members.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: Member List</title>
8+
<title>D3D12 Memory Allocator: Member List</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

docs/html/class_d3_d12_m_a_1_1_pool.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
66
<meta name="generator" content="Doxygen 1.13.0"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
8-
<title>Direct3D 12 Memory Allocator: D3D12MA::Pool Class Reference</title>
8+
<title>D3D12 Memory Allocator: D3D12MA::Pool Class Reference</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
1010
<script type="text/javascript" src="jquery.js"></script>
1111
<script type="text/javascript" src="dynsections.js"></script>
@@ -25,7 +25,7 @@
2525
<tbody>
2626
<tr id="projectrow">
2727
<td id="projectalign">
28-
<div id="projectname">Direct3D 12 Memory Allocator
28+
<div id="projectname">D3D12 Memory Allocator
2929
</div>
3030
</td>
3131
</tr>

0 commit comments

Comments
 (0)