Skip to content

Commit 3ac0989

Browse files
Custom pools with specific MinAllocationAlignment don't impose minimum 256B
Added macro D3D12MA_DEFAULT_ALIGNMENT. Improvements in TestTightAlignment. Reverted "Removed mention of tight alignment from docs on this branch". Rebuilt the docs.
1 parent 3863df4 commit 3ac0989

65 files changed

Lines changed: 2211 additions & 345 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: 99 additions & 4 deletions
Large diffs are not rendered by default.

docs/html/annotated.html

Lines changed: 19 additions & 15 deletions
Large diffs are not rendered by default.

docs/html/class_d3_d12_m_a_1_1_allocation.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<tr class="memdesc:ad00308118252f82d8f803c623c67bf18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns D3D12 resource associated with this object. <br /></td></tr>
122122
<tr class="separator:ad00308118252f82d8f803c623c67bf18"><td class="memSeparator" colspan="2">&#160;</td></tr>
123123
<tr class="memitem:a414a088c22bae0f29b1038f5f9346d14" id="r_a414a088c22bae0f29b1038f5f9346d14"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a414a088c22bae0f29b1038f5f9346d14">SetResource</a> (ID3D12Resource *pResource)</td></tr>
124-
<tr class="memdesc:a414a088c22bae0f29b1038f5f9346d14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the resource currently pointed by the allocation (if any), sets it to new one, incrementing its reference counter (if not null). <br /></td></tr>
124+
<tr class="memdesc:a414a088c22bae0f29b1038f5f9346d14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the resource currently pointed by the allocation (if not null), sets it to new one, incrementing its reference counter (if not null). <br /></td></tr>
125125
<tr class="separator:a414a088c22bae0f29b1038f5f9346d14"><td class="memSeparator" colspan="2">&#160;</td></tr>
126126
<tr class="memitem:adca8d5a82bed492fe7265fcda6e53da2" id="r_adca8d5a82bed492fe7265fcda6e53da2"><td class="memItemLeft" align="right" valign="top">ID3D12Heap *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adca8d5a82bed492fe7265fcda6e53da2">GetHeap</a> () const</td></tr>
127127
<tr class="memdesc:adca8d5a82bed492fe7265fcda6e53da2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns memory heap that the resource is created in. <br /></td></tr>
@@ -393,7 +393,8 @@ <h2 class="memtitle"><span class="permalink"><a href="#a414a088c22bae0f29b1038f5
393393
</table>
394394
</div><div class="memdoc">
395395

396-
<p>Releases the resource currently pointed by the allocation (if any), sets it to new one, incrementing its reference counter (if not null). </p>
396+
<p>Releases the resource currently pointed by the allocation (if not null), sets it to new one, incrementing its reference counter (if not null). </p>
397+
<dl class="section warning"><dt>Warning</dt><dd>This is an advanced feature that should be used only in special cases, e.g. during <a class="el" href="defragmentation.html">Defragmentation</a>. Typically, an allocation object should reference the resource that was created together with it. If you swap it to another resource of different size, <a class="el" href="statistics.html">Statistics</a> and budgets can be calculated incorrectly. </dd></dl>
397398

398399
</div>
399400
</div>

docs/html/class_d3_d12_m_a_1_1_allocator.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<tr class="memdesc:a3f3fd1e88cf2cd02257fe272e08a273c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if GPU Upload Heaps are supported on the current system. <br /></td></tr>
122122
<tr class="separator:a3f3fd1e88cf2cd02257fe272e08a273c"><td class="memSeparator" colspan="2">&#160;</td></tr>
123123
<tr class="memitem:a3f5aa191cebdca7c1932da4723cfc03e" id="r_a3f5aa191cebdca7c1932da4723cfc03e"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3f5aa191cebdca7c1932da4723cfc03e">IsTightAlignmentSupported</a> () const</td></tr>
124-
<tr class="memdesc:a3f5aa191cebdca7c1932da4723cfc03e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if resource tight alignment is supported on the current system. When supported, it is automatically used by the library, unless <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916af13bc700d7b799c856c6516acac12fed">ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT</a> flag was specified on allocator creation. <br /></td></tr>
124+
<tr class="memdesc:a3f5aa191cebdca7c1932da4723cfc03e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if resource tight alignment is supported on the current system. When supported, it is automatically used by the library, unless <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916af13bc700d7b799c856c6516acac12fed">ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT</a> flag was specified on allocator creation. This flag is fetched from <code>D3D12_FEATURE_DATA_TIGHT_ALIGNMENT::SupportTier</code>. <br /></td></tr>
125125
<tr class="separator:a3f5aa191cebdca7c1932da4723cfc03e"><td class="memSeparator" colspan="2">&#160;</td></tr>
126126
<tr class="memitem:a434ae3147209953253da26687bfd62dc" id="r_a434ae3147209953253da26687bfd62dc"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a434ae3147209953253da26687bfd62dc">GetMemoryCapacity</a> (UINT memorySegmentGroup) const</td></tr>
127127
<tr class="memdesc:a434ae3147209953253da26687bfd62dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns total amount of memory of specific segment group, in bytes. <br /></td></tr>
@@ -837,8 +837,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a3f5aa191cebdca7c1932da47
837837
</table>
838838
</div><div class="memdoc">
839839

840-
<p>Returns true if resource tight alignment is supported on the current system. When supported, it is automatically used by the library, unless <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916af13bc700d7b799c856c6516acac12fed">ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT</a> flag was specified on allocator creation. </p>
841-
<p>This flag is fetched from <code>D3D12_FEATURE_DATA_TIGHT_ALIGNMENT::SupportTier</code>. </p>
840+
<p>Returns true if resource tight alignment is supported on the current system. When supported, it is automatically used by the library, unless <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916af13bc700d7b799c856c6516acac12fed">ALLOCATOR_FLAG_DONT_USE_TIGHT_ALIGNMENT</a> flag was specified on allocator creation. This flag is fetched from <code>D3D12_FEATURE_DATA_TIGHT_ALIGNMENT::SupportTier</code>. </p>
842841

843842
</div>
844843
</div>

docs/html/classes.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<div class="headertitle"><div class="title">Class Index</div></div>
8888
</div><!--header-->
8989
<div class="contents">
90-
<div class="qindex"><a class="qindex" href="#letter_A">A</a>&#160;|&#160;<a class="qindex" href="#letter_B">B</a>&#160;|&#160;<a class="qindex" href="#letter_D">D</a>&#160;|&#160;<a class="qindex" href="#letter_P">P</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a>&#160;|&#160;<a class="qindex" href="#letter_T">T</a>&#160;|&#160;<a class="qindex" href="#letter_V">V</a></div>
90+
<div class="qindex"><a class="qindex" href="#letter_A">A</a>&#160;|&#160;<a class="qindex" href="#letter_B">B</a>&#160;|&#160;<a class="qindex" href="#letter_C">C</a>&#160;|&#160;<a class="qindex" href="#letter_D">D</a>&#160;|&#160;<a class="qindex" href="#letter_P">P</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a>&#160;|&#160;<a class="qindex" href="#letter_T">T</a>&#160;|&#160;<a class="qindex" href="#letter_V">V</a></div>
9191
<div class="classindex">
9292
<dl class="classindex even">
9393
<dt class="alphachar"><a id="letter_A" name="letter_A">A</a></dt>
@@ -96,18 +96,21 @@
9696
<dt class="alphachar"><a id="letter_B" name="letter_B">B</a></dt>
9797
<dd><a class="el" href="struct_d3_d12_m_a_1_1_budget.html">Budget</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd></dl>
9898
<dl class="classindex even">
99+
<dt class="alphachar"><a id="letter_C" name="letter_C">C</a></dt>
100+
<dd><a class="el" href="struct_d3_d12_m_a_1_1_c_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">CALLOCATION_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="struct_d3_d12_m_a_1_1_c_p_o_o_l___d_e_s_c.html">CPOOL_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="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">CVIRTUAL_ALLOCATION_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="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">CVIRTUAL_BLOCK_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd></dl>
101+
<dl class="classindex odd">
99102
<dt class="alphachar"><a id="letter_D" name="letter_D">D</a></dt>
100103
<dd><a class="el" href="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">DEFRAGMENTATION_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="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">DEFRAGMENTATION_MOVE</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="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">DEFRAGMENTATION_PASS_MOVE_INFO</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="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">DEFRAGMENTATION_STATS</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="class_d3_d12_m_a_1_1_defragmentation_context.html">DefragmentationContext</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="struct_d3_d12_m_a_1_1_detailed_statistics.html">DetailedStatistics</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd></dl>
101-
<dl class="classindex odd">
104+
<dl class="classindex even">
102105
<dt class="alphachar"><a id="letter_P" name="letter_P">P</a></dt>
103106
<dd><a class="el" href="class_d3_d12_m_a_1_1_pool.html">Pool</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">POOL_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd></dl>
104-
<dl class="classindex even">
107+
<dl class="classindex odd">
105108
<dt class="alphachar"><a id="letter_S" name="letter_S">S</a></dt>
106109
<dd><a class="el" href="struct_d3_d12_m_a_1_1_statistics.html">Statistics</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd></dl>
107-
<dl class="classindex odd">
110+
<dl class="classindex even">
108111
<dt class="alphachar"><a id="letter_T" name="letter_T">T</a></dt>
109112
<dd><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html">TotalStatistics</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd></dl>
110-
<dl class="classindex even">
113+
<dl class="classindex odd">
111114
<dt class="alphachar"><a id="letter_V" name="letter_V">V</a></dt>
112115
<dd><a class="el" href="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">VIRTUAL_ALLOCATION_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="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">VIRTUAL_ALLOCATION_INFO</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c.html">VIRTUAL_BLOCK_DESC</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="struct_d3_d12_m_a_1_1_virtual_allocation.html">VirtualAllocation</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd><dd><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">VirtualBlock</a> (<a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a>)</dd></dl>
113116
</div>

0 commit comments

Comments
 (0)