mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-24 04:50:12 +00:00
Improvements in documentation
Rebuilt the documentation.
This commit is contained in:
parent
514c67b84d
commit
2d83dfe7a4
@ -101,7 +101,6 @@ $(function() {
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#af9e643276b577aa7f21937f75d4b82ac">SetName</a>(LPCWSTR Name)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a6f209094455dd876b6d9f84076ee1436">SetPrivateData</a>(void *pPrivateData)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a414a088c22bae0f29b1038f5f9346d14">SetResource</a>(ID3D12Resource *pResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a1b1ef2717beed503fcb3cb7e6a171762">WasZeroInitialized</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
@ -125,9 +125,6 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a65fab0c479df1b6b72c9300e68dc6770" id="r_a65fab0c479df1b6b72c9300e68dc6770"><td class="memItemLeft" align="right" valign="top">LPCWSTR </td><td class="memItemRight" valign="bottom"><a class="el" href="#a65fab0c479df1b6b72c9300e68dc6770">GetName</a> () const</td></tr>
|
||||
<tr class="memdesc:a65fab0c479df1b6b72c9300e68dc6770"><td class="mdescLeft"> </td><td class="mdescRight">Returns the name associated with the allocation object. <br /></td></tr>
|
||||
<tr class="separator:a65fab0c479df1b6b72c9300e68dc6770"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1b1ef2717beed503fcb3cb7e6a171762" id="r_a1b1ef2717beed503fcb3cb7e6a171762"><td class="memItemLeft" align="right" valign="top">BOOL </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1b1ef2717beed503fcb3cb7e6a171762">WasZeroInitialized</a> () const</td></tr>
|
||||
<tr class="memdesc:a1b1ef2717beed503fcb3cb7e6a171762"><td class="mdescLeft"> </td><td class="mdescRight">Returns <code>TRUE</code> if the memory of the allocation was filled with zeros when the allocation was created. <br /></td></tr>
|
||||
<tr class="separator:a1b1ef2717beed503fcb3cb7e6a171762"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Represents single memory allocation. </p>
|
||||
@ -385,40 +382,6 @@ Public Member Functions</h2></td></tr>
|
||||
|
||||
<p>Releases the resource currently pointed by the allocation (if any), sets it to new one, incrementing its reference counter (if not null). </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1b1ef2717beed503fcb3cb7e6a171762" name="a1b1ef2717beed503fcb3cb7e6a171762"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1b1ef2717beed503fcb3cb7e6a171762">◆ </a></span>WasZeroInitialized()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">BOOL D3D12MA::Allocation::WasZeroInitialized </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"></span></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns <code>TRUE</code> if the memory of the allocation was filled with zeros when the allocation was created. </p>
|
||||
<p>Returns <code>TRUE</code> only if the allocator is sure that the entire memory where the allocation was created was filled with zeros at the moment the allocation was made.</p>
|
||||
<p>Returns <code>FALSE</code> if the memory could potentially contain garbage data. If it's a render-target or depth-stencil texture, it then needs proper initialization with <code>ClearRenderTargetView</code>, <code>ClearDepthStencilView</code>, <code>DiscardResource</code>, or a copy operation, as described on page "ID3D12Device::CreatePlacedResource method - Notes on the required resource initialization" in Microsoft documentation. Please note that rendering a fullscreen triangle or quad to the texture as a render target is not a proper way of initialization!</p>
|
||||
<p>See also articles:</p>
|
||||
<ul>
|
||||
<li>"Coming to DirectX 12: More control over memory allocation" on DirectX Developer Blog</li>
|
||||
<li><a href="https://asawicki.info/news_1724_initializing_dx12_textures_after_allocation_and_aliasing">"Initializing DX12 Textures After Allocation and Aliasing"</a>. </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Data Documentation</h2>
|
||||
|
@ -99,8 +99,9 @@ $(function() {
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ae276d2358a58a36f8c6639f837f29be5">GetD3D12Options</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a434ae3147209953253da26687bfd62dc">GetMemoryCapacity</a>(UINT memorySegmentGroup) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80">IsCacheCoherentUMA</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">IsUMA</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a468ba0c93121eaaee402b08775f1dd11">SetCurrentFrameIndex</a>(UINT frameIndex)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a3f3fd1e88cf2cd02257fe272e08a273c">IsGPUUploadHeapSupported</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">IsUMA</a>() const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a468ba0c93121eaaee402b08775f1dd11">SetCurrentFrameIndex</a>(UINT frameIndex)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
@ -104,6 +104,9 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a08210561b92c4bd7ede9dd7beba4bb80" id="r_a08210561b92c4bd7ede9dd7beba4bb80"><td class="memItemLeft" align="right" valign="top">BOOL </td><td class="memItemRight" valign="bottom"><a class="el" href="#a08210561b92c4bd7ede9dd7beba4bb80">IsCacheCoherentUMA</a> () const</td></tr>
|
||||
<tr class="memdesc:a08210561b92c4bd7ede9dd7beba4bb80"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA</code> was found to be true. <br /></td></tr>
|
||||
<tr class="separator:a08210561b92c4bd7ede9dd7beba4bb80"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3f3fd1e88cf2cd02257fe272e08a273c" id="r_a3f3fd1e88cf2cd02257fe272e08a273c"><td class="memItemLeft" align="right" valign="top">BOOL </td><td class="memItemRight" valign="bottom"><a class="el" href="#a3f3fd1e88cf2cd02257fe272e08a273c">IsGPUUploadHeapSupported</a> () const</td></tr>
|
||||
<tr class="memdesc:a3f3fd1e88cf2cd02257fe272e08a273c"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if GPU Upload Heaps are supported on the current system. <br /></td></tr>
|
||||
<tr class="separator:a3f3fd1e88cf2cd02257fe272e08a273c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a434ae3147209953253da26687bfd62dc" id="r_a434ae3147209953253da26687bfd62dc"><td class="memItemLeft" align="right" valign="top">UINT64 </td><td class="memItemRight" valign="bottom"><a class="el" href="#a434ae3147209953253da26687bfd62dc">GetMemoryCapacity</a> (UINT memorySegmentGroup) const</td></tr>
|
||||
<tr class="memdesc:a434ae3147209953253da26687bfd62dc"><td class="mdescLeft"> </td><td class="mdescRight">Returns total amount of memory of specific segment group, in bytes. <br /></td></tr>
|
||||
<tr class="separator:a434ae3147209953253da26687bfd62dc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@ -780,6 +783,28 @@ Public Member Functions</h2></td></tr>
|
||||
<li>"ID3D12Device::GetCustomHeapProperties method (d3d12.h)" </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a3f3fd1e88cf2cd02257fe272e08a273c" name="a3f3fd1e88cf2cd02257fe272e08a273c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3f3fd1e88cf2cd02257fe272e08a273c">◆ </a></span>IsGPUUploadHeapSupported()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">BOOL D3D12MA::Allocator::IsGPUUploadHeapSupported </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"><span class="paramname"></span></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns true if GPU Upload Heaps are supported on the current system. </p>
|
||||
<p>When true, you can use <code>D3D12_HEAP_TYPE_GPU_UPLOAD</code>.</p>
|
||||
<p>This flag is fetched from <code>D3D12_FEATURE_D3D12_OPTIONS16::GPUUploadHeapSupported</code>.</p>
|
||||
<p><code>#define D3D12MA_OPTIONS16_SUPPORTED 1</code> is needed for the compilation of this library. Otherwise the flag is always false. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a9e742884bd45dd7f01193d13fcd05af0" name="a9e742884bd45dd7f01193d13fcd05af0"></a>
|
||||
|
@ -110,15 +110,15 @@ Custom CPU memory allocator</h1>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_class" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a>* allocator;</div>
|
||||
<div class="line">HRESULT hr = <a class="code hl_function" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA::CreateAllocator</a>(&allocatorDesc, &allocator);</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocator_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></div><div class="ttdoc">Represents main object of this library initialized for particular ID3D12Device.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1121</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocator_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></div><div class="ttdoc">Represents main object of this library initialized for particular ID3D12Device.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1099</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_ab7a1cd1683986d75ce1488b0920f4cb0"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA::CreateAllocator</a></div><div class="ttdeci">D3D12MA_API HRESULT CreateAllocator(const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)</div><div class="ttdoc">Creates new main D3D12MA::Allocator object and returns it through ppAllocator.</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a href="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">D3D12MA::ALLOCATION_CALLBACKS</a></div><div class="ttdoc">Custom callbacks to CPU memory allocation functions.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:209</div></div>
|
||||
<div class="ttc" id="astruct_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_a114e6c4d63d6b020e01f526a975d6849"><div class="ttname"><a href="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#a114e6c4d63d6b020e01f526a975d6849">D3D12MA::ALLOCATION_CALLBACKS::pFree</a></div><div class="ttdeci">FREE_FUNC_PTR pFree</div><div class="ttdoc">Dellocation function.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:213</div></div>
|
||||
<div class="ttc" id="astruct_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_af4d6436455728696fefd503869226436"><div class="ttname"><a href="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#af4d6436455728696fefd503869226436">D3D12MA::ALLOCATION_CALLBACKS::pAllocate</a></div><div class="ttdeci">ALLOCATE_FUNC_PTR pAllocate</div><div class="ttdoc">Allocation function.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:211</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html">D3D12MA::ALLOCATOR_DESC</a></div><div class="ttdoc">Parameters of created Allocator object. To be used with CreateAllocator().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1082</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_a773ecc1945eb47c20e06455c3759e4ef"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a773ecc1945eb47c20e06455c3759e4ef">D3D12MA::ALLOCATOR_DESC::pAllocationCallbacks</a></div><div class="ttdeci">const ALLOCATION_CALLBACKS * pAllocationCallbacks</div><div class="ttdoc">Custom CPU memory allocation callbacks. Optional.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1102</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_abf9a9f87f0ffea52816efd363c5fcd7b"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#abf9a9f87f0ffea52816efd363c5fcd7b">D3D12MA::ALLOCATOR_DESC::pAdapter</a></div><div class="ttdeci">IDXGIAdapter * pAdapter</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1108</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_ada1bf21205065b3aa0284b5a9ee1cb3c"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#ada1bf21205065b3aa0284b5a9ee1cb3c">D3D12MA::ALLOCATOR_DESC::pDevice</a></div><div class="ttdeci">ID3D12Device * pDevice</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1090</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html">D3D12MA::ALLOCATOR_DESC</a></div><div class="ttdoc">Parameters of created Allocator object. To be used with CreateAllocator().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1060</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_a773ecc1945eb47c20e06455c3759e4ef"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a773ecc1945eb47c20e06455c3759e4ef">D3D12MA::ALLOCATOR_DESC::pAllocationCallbacks</a></div><div class="ttdeci">const ALLOCATION_CALLBACKS * pAllocationCallbacks</div><div class="ttdoc">Custom CPU memory allocation callbacks. Optional.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1080</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_abf9a9f87f0ffea52816efd363c5fcd7b"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#abf9a9f87f0ffea52816efd363c5fcd7b">D3D12MA::ALLOCATOR_DESC::pAdapter</a></div><div class="ttdeci">IDXGIAdapter * pAdapter</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1086</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_ada1bf21205065b3aa0284b5a9ee1cb3c"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#ada1bf21205065b3aa0284b5a9ee1cb3c">D3D12MA::ALLOCATOR_DESC::pDevice</a></div><div class="ttdeci">ID3D12Device * pDevice</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1068</div></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="debug_margins"></a>
|
||||
Debug margins</h1>
|
||||
<p>By default, allocations are laid out in memory blocks next to each other if possible (considering required alignment returned by <code>ID3D12Device::GetResourceAllocationInfo</code>).</p>
|
||||
|
@ -84,9 +84,12 @@ Usage</h1>
|
||||
<p>To create a custom pool, fill in structure <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html" title="Parameters of created D3D12MA::Pool object. To be used with D3D12MA::Allocator::CreatePool.">D3D12MA::POOL_DESC</a> and call function <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515" title="Creates custom pool.">D3D12MA::Allocator::CreatePool</a> to obtain object <a class="el" href="class_d3_d12_m_a_1_1_pool.html" title="Custom memory pool.">D3D12MA::Pool</a>. Example:</p>
|
||||
<div class="fragment"><div class="line">POOL_DESC poolDesc = {};</div>
|
||||
<div class="line">poolDesc.HeapProperties.Type = D3D12_HEAP_TYPE_DEFAULT;</div>
|
||||
<div class="line"><span class="comment">// This flag is optional but recommended.</span></div>
|
||||
<div class="line">poolDesc.Flags = <a class="code hl_enumvalue" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1acc379a89755438c0f76667783b778baa">D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED</a>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line">Pool* pool;</div>
|
||||
<div class="line">HRESULT hr = allocator->CreatePool(&poolDesc, &pool);</div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_a919d8545365d6b7209a964f2b99936d1acc379a89755438c0f76667783b778baa"><div class="ttname"><a href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1acc379a89755438c0f76667783b778baa">D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED</a></div><div class="ttdeci">@ POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED</div><div class="ttdoc">Optimization, allocate MSAA textures as committed resources always.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:842</div></div>
|
||||
</div><!-- fragment --><p>To allocate resources out of a custom pool, only set member <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934" title="Custom pool to place the new resource in. Optional.">D3D12MA::ALLOCATION_DESC::CustomPool</a>. Example:</p>
|
||||
<div class="fragment"><div class="line">ALLOCATION_DESC allocDesc = {};</div>
|
||||
<div class="line">allocDesc.CustomPool = pool;</div>
|
||||
|
@ -136,19 +136,19 @@ $(function() {
|
||||
<div class="line">defragCtx->Release();</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html_a414a088c22bae0f29b1038f5f9346d14"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html#a414a088c22bae0f29b1038f5f9346d14">D3D12MA::Allocation::SetResource</a></div><div class="ttdeci">void SetResource(ID3D12Resource *pResource)</div><div class="ttdoc">Releases the resource currently pointed by the allocation (if any), sets it to new one,...</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html_a47be9557d441797b65de177a3d5cdf60"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html#a47be9557d441797b65de177a3d5cdf60">D3D12MA::Allocation::GetOffset</a></div><div class="ttdeci">UINT64 GetOffset() const</div><div class="ttdoc">Returns offset in bytes from the start of memory heap.</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html_ad00308118252f82d8f803c623c67bf18"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html#ad00308118252f82d8f803c623c67bf18">D3D12MA::Allocation::GetResource</a></div><div class="ttdeci">ID3D12Resource * GetResource() const</div><div class="ttdoc">Returns D3D12 resource associated with this object.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:511</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html_ad00308118252f82d8f803c623c67bf18"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html#ad00308118252f82d8f803c623c67bf18">D3D12MA::Allocation::GetResource</a></div><div class="ttdeci">ID3D12Resource * GetResource() const</div><div class="ttdoc">Returns D3D12 resource associated with this object.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:512</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html_adca8d5a82bed492fe7265fcda6e53da2"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html#adca8d5a82bed492fe7265fcda6e53da2">D3D12MA::Allocation::GetHeap</a></div><div class="ttdeci">ID3D12Heap * GetHeap() const</div><div class="ttdoc">Returns memory heap that the resource is created in.</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_defragmentation_context_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_defragmentation_context.html">D3D12MA::DefragmentationContext</a></div><div class="ttdoc">Represents defragmentation process in progress.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:790</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_defragmentation_context_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_defragmentation_context.html">D3D12MA::DefragmentationContext</a></div><div class="ttdoc">Represents defragmentation process in progress.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:768</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_defragmentation_context_html_a1606c015d02edc094bb246986159d592"><div class="ttname"><a href="class_d3_d12_m_a_1_1_defragmentation_context.html#a1606c015d02edc094bb246986159d592">D3D12MA::DefragmentationContext::BeginPass</a></div><div class="ttdeci">HRESULT BeginPass(DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo)</div><div class="ttdoc">Starts single defragmentation pass.</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_defragmentation_context_html_aad502ba70d6dadaeee37703fd8bf90ae"><div class="ttname"><a href="class_d3_d12_m_a_1_1_defragmentation_context.html#aad502ba70d6dadaeee37703fd8bf90ae">D3D12MA::DefragmentationContext::EndPass</a></div><div class="ttdeci">HRESULT EndPass(DEFRAGMENTATION_PASS_MOVE_INFO *pPassInfo)</div><div class="ttdoc">Ends single defragmentation pass.</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_ab433989212ee6736bf9d63c5bc565df4a9d0301a81136ca79e3ba52542c6d2e13"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ab433989212ee6736bf9d63c5bc565df4a9d0301a81136ca79e3ba52542c6d2e13">D3D12MA::DEFRAGMENTATION_FLAG_ALGORITHM_FAST</a></div><div class="ttdeci">@ DEFRAGMENTATION_FLAG_ALGORITHM_FAST</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:670</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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">D3D12MA::DEFRAGMENTATION_DESC</a></div><div class="ttdoc">Parameters for defragmentation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:692</div></div>
|
||||
<div class="ttc" id="astruct_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_aac9a357e679a0afa9ab84cd06057630b"><div class="ttname"><a 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#aac9a357e679a0afa9ab84cd06057630b">D3D12MA::DEFRAGMENTATION_DESC::Flags</a></div><div class="ttdeci">DEFRAGMENTATION_FLAGS Flags</div><div class="ttdoc">Flags.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:694</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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#a4946b874c958a71c21fac25b515cf5f7">D3D12MA::DEFRAGMENTATION_MOVE::pSrcAllocation</a></div><div class="ttdeci">Allocation * pSrcAllocation</div><div class="ttdoc">Allocation that should be moved.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:728</div></div>
|
||||
<div class="ttc" id="astruct_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_aec0c7f51ccc870c6a88af7c7390d8eda"><div class="ttname"><a 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#aec0c7f51ccc870c6a88af7c7390d8eda">D3D12MA::DEFRAGMENTATION_MOVE::pDstTmpAllocation</a></div><div class="ttdeci">Allocation * pDstTmpAllocation</div><div class="ttdoc">Temporary allocation pointing to destination memory that will replace pSrcAllocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:736</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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">D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO</a></div><div class="ttdoc">Parameters for incremental defragmentation steps.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:744</div></div>
|
||||
<div class="ttc" id="astruct_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_a719fbdaae54251759605c41baeb24dc4"><div class="ttname"><a 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#a719fbdaae54251759605c41baeb24dc4">D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO::pMoves</a></div><div class="ttdeci">DEFRAGMENTATION_MOVE * pMoves</div><div class="ttdoc">Array of moves to be performed by the user in the current defragmentation pass.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:768</div></div>
|
||||
<div class="ttc" id="astruct_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_a8df22d990c318d82fe9fcc5f04132c04"><div class="ttname"><a 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#a8df22d990c318d82fe9fcc5f04132c04">D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO::MoveCount</a></div><div class="ttdeci">UINT32 MoveCount</div><div class="ttdoc">Number of elements in the pMoves array.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:746</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_ab433989212ee6736bf9d63c5bc565df4a9d0301a81136ca79e3ba52542c6d2e13"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ab433989212ee6736bf9d63c5bc565df4a9d0301a81136ca79e3ba52542c6d2e13">D3D12MA::DEFRAGMENTATION_FLAG_ALGORITHM_FAST</a></div><div class="ttdeci">@ DEFRAGMENTATION_FLAG_ALGORITHM_FAST</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:648</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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">D3D12MA::DEFRAGMENTATION_DESC</a></div><div class="ttdoc">Parameters for defragmentation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:670</div></div>
|
||||
<div class="ttc" id="astruct_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_aac9a357e679a0afa9ab84cd06057630b"><div class="ttname"><a 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#aac9a357e679a0afa9ab84cd06057630b">D3D12MA::DEFRAGMENTATION_DESC::Flags</a></div><div class="ttdeci">DEFRAGMENTATION_FLAGS Flags</div><div class="ttdoc">Flags.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:672</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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#a4946b874c958a71c21fac25b515cf5f7">D3D12MA::DEFRAGMENTATION_MOVE::pSrcAllocation</a></div><div class="ttdeci">Allocation * pSrcAllocation</div><div class="ttdoc">Allocation that should be moved.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:706</div></div>
|
||||
<div class="ttc" id="astruct_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_aec0c7f51ccc870c6a88af7c7390d8eda"><div class="ttname"><a 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#aec0c7f51ccc870c6a88af7c7390d8eda">D3D12MA::DEFRAGMENTATION_MOVE::pDstTmpAllocation</a></div><div class="ttdeci">Allocation * pDstTmpAllocation</div><div class="ttdoc">Temporary allocation pointing to destination memory that will replace pSrcAllocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:714</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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">D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO</a></div><div class="ttdoc">Parameters for incremental defragmentation steps.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:722</div></div>
|
||||
<div class="ttc" id="astruct_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_a719fbdaae54251759605c41baeb24dc4"><div class="ttname"><a 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#a719fbdaae54251759605c41baeb24dc4">D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO::pMoves</a></div><div class="ttdeci">DEFRAGMENTATION_MOVE * pMoves</div><div class="ttdoc">Array of moves to be performed by the user in the current defragmentation pass.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:746</div></div>
|
||||
<div class="ttc" id="astruct_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_a8df22d990c318d82fe9fcc5f04132c04"><div class="ttname"><a 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#a8df22d990c318d82fe9fcc5f04132c04">D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO::MoveCount</a></div><div class="ttdeci">UINT32 MoveCount</div><div class="ttdoc">Number of elements in the pMoves array.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:724</div></div>
|
||||
</div><!-- fragment --><p>Although functions like <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a" title="Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation functi...">D3D12MA::Allocator::CreateResource()</a> create an allocation and a buffer/texture at once, these are just a shortcut for allocating memory and creating a placed resource. Defragmentation works on memory allocations only. You must handle the rest manually. Defragmentation is an iterative process that should repreat "passes" as long as related functions return <code>S_FALSE</code> not <code>S_OK</code>. In each pass:</p>
|
||||
<ol type="1">
|
||||
<li><a class="el" href="class_d3_d12_m_a_1_1_defragmentation_context.html#a1606c015d02edc094bb246986159d592" title="Starts single defragmentation pass.">D3D12MA::DefragmentationContext::BeginPass()</a> function call:<ul>
|
||||
|
@ -103,8 +103,6 @@
|
||||
<a href="functions.html"/>
|
||||
<a href="functions.html"/>
|
||||
<a href="functions.html"/>
|
||||
<a href="functions.html"/>
|
||||
<a href="functions_func.html"/>
|
||||
<a href="functions_func.html"/>
|
||||
<a href="functions_func.html"/>
|
||||
<a href="functions_func.html"/>
|
||||
|
@ -158,13 +158,14 @@ $(function() {
|
||||
<li>HeapFlags : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc">D3D12MA::POOL_DESC</a></li>
|
||||
<li>HeapProperties : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a">D3D12MA::POOL_DESC</a></li>
|
||||
<li>HeapsFreed : <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#aecc6120afcf75028c9850f8d475b727d">D3D12MA::DEFRAGMENTATION_STATS</a></li>
|
||||
<li>HeapType : <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7">D3D12MA::ALLOCATION_DESC</a>, <a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#a07247152fc70a8ee5605cab0fe220ea5">D3D12MA::TotalStatistics</a></li>
|
||||
<li>HeapType : <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7">D3D12MA::ALLOCATION_DESC</a>, <a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#abad2e48b38f8a73a4daf8577e7a33b89">D3D12MA::TotalStatistics</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
|
||||
<li>IsCacheCoherentUMA() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80">D3D12MA::Allocator</a></li>
|
||||
<li>IsEmpty() : <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a7b23fd2da6f0343095fb14b31395678b">D3D12MA::VirtualBlock</a></li>
|
||||
<li>IsGPUUploadHeapSupported() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a3f3fd1e88cf2cd02257fe272e08a273c">D3D12MA::Allocator</a></li>
|
||||
<li>IsUMA() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">D3D12MA::Allocator</a></li>
|
||||
</ul>
|
||||
|
||||
@ -242,11 +243,6 @@ $(function() {
|
||||
<li>UnusedRangeSizeMin : <a class="el" href="struct_d3_d12_m_a_1_1_detailed_statistics.html#ac13f6cb1737f0d906e55182385f38b70">D3D12MA::DetailedStatistics</a></li>
|
||||
<li>UsageBytes : <a class="el" href="struct_d3_d12_m_a_1_1_budget.html#a77a8c9e32d6602f95b7d1c285cddd253">D3D12MA::Budget</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_w" name="index_w"></a>- w -</h3><ul>
|
||||
<li>WasZeroInitialized() : <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a1b1ef2717beed503fcb3cb7e6a171762">D3D12MA::Allocation</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
@ -131,6 +131,7 @@ $(function() {
|
||||
<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
|
||||
<li>IsCacheCoherentUMA() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80">D3D12MA::Allocator</a></li>
|
||||
<li>IsEmpty() : <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a7b23fd2da6f0343095fb14b31395678b">D3D12MA::VirtualBlock</a></li>
|
||||
<li>IsGPUUploadHeapSupported() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a3f3fd1e88cf2cd02257fe272e08a273c">D3D12MA::Allocator</a></li>
|
||||
<li>IsUMA() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">D3D12MA::Allocator</a></li>
|
||||
</ul>
|
||||
|
||||
@ -142,11 +143,6 @@ $(function() {
|
||||
<li>SetPrivateData() : <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a6f209094455dd876b6d9f84076ee1436">D3D12MA::Allocation</a></li>
|
||||
<li>SetResource() : <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a414a088c22bae0f29b1038f5f9346d14">D3D12MA::Allocation</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_w" name="index_w"></a>- w -</h3><ul>
|
||||
<li>WasZeroInitialized() : <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a1b1ef2717beed503fcb3cb7e6a171762">D3D12MA::Allocation</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
@ -116,7 +116,7 @@ $(function() {
|
||||
<li>HeapFlags : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc">D3D12MA::POOL_DESC</a></li>
|
||||
<li>HeapProperties : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a">D3D12MA::POOL_DESC</a></li>
|
||||
<li>HeapsFreed : <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#aecc6120afcf75028c9850f8d475b727d">D3D12MA::DEFRAGMENTATION_STATS</a></li>
|
||||
<li>HeapType : <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7">D3D12MA::ALLOCATION_DESC</a>, <a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#a07247152fc70a8ee5605cab0fe220ea5">D3D12MA::TotalStatistics</a></li>
|
||||
<li>HeapType : <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7">D3D12MA::ALLOCATION_DESC</a>, <a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#abad2e48b38f8a73a4daf8577e7a33b89">D3D12MA::TotalStatistics</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -74,8 +74,8 @@ $(function() {
|
||||
<div class="headertitle"><div class="title">D3D12 Memory Allocator </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Version 2.1.0-development</b> (2023-07-05)</p>
|
||||
<p>Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved. <br />
|
||||
<div class="textblock"><p><b>Version 2.1.0-development</b> (2024-07-05)</p>
|
||||
<p>Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All rights reserved. <br />
|
||||
License: MIT</p>
|
||||
<p>Documentation of all members: <a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></p>
|
||||
<h1><a class="anchor" id="main_table_of_contents"></a>
|
||||
|
@ -65,8 +65,7 @@ var menudata={children:[
|
||||
{text:"r",url:"functions.html#index_r"},
|
||||
{text:"s",url:"functions.html#index_s"},
|
||||
{text:"t",url:"functions.html#index_t"},
|
||||
{text:"u",url:"functions.html#index_u"},
|
||||
{text:"w",url:"functions.html#index_w"}]},
|
||||
{text:"u",url:"functions.html#index_u"}]},
|
||||
{text:"Functions",url:"functions_func.html",children:[
|
||||
{text:"a",url:"functions_func.html#index_a"},
|
||||
{text:"b",url:"functions_func.html#index_b"},
|
||||
@ -75,8 +74,7 @@ var menudata={children:[
|
||||
{text:"f",url:"functions_func.html#index_f"},
|
||||
{text:"g",url:"functions_func.html#index_g"},
|
||||
{text:"i",url:"functions_func.html#index_i"},
|
||||
{text:"s",url:"functions_func.html#index_s"},
|
||||
{text:"w",url:"functions_func.html#index_w"}]},
|
||||
{text:"s",url:"functions_func.html#index_s"}]},
|
||||
{text:"Variables",url:"functions_vars.html",children:[
|
||||
{text:"a",url:"functions_vars.html#index_a"},
|
||||
{text:"b",url:"functions_vars.html#index_b"},
|
||||
|
@ -96,14 +96,20 @@ Project setup and initialization</h1>
|
||||
<div class="line"><a class="code hl_struct" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html">D3D12MA::ALLOCATOR_DESC</a> allocatorDesc = {};</div>
|
||||
<div class="line">allocatorDesc.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#ada1bf21205065b3aa0284b5a9ee1cb3c">pDevice</a> = device;</div>
|
||||
<div class="line">allocatorDesc.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#abf9a9f87f0ffea52816efd363c5fcd7b">pAdapter</a> = adapter;</div>
|
||||
<div class="line"><span class="comment">// These flags are optional but recommended.</span></div>
|
||||
<div class="line">allocatorDesc.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#ad8abad7c80ea0d8df27c85243ce720f3">Flags</a> = <a class="code hl_enumvalue" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916adfbfd20d716f2a46f74d6226056fef1e">D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED</a> |</div>
|
||||
<div class="line"> <a class="code hl_enumvalue" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916ae7dc7ab9168148281ebfe1586f554335">D3D12MA::ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED</a>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_class" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a>* allocator;</div>
|
||||
<div class="line">HRESULT hr = <a class="code hl_function" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA::CreateAllocator</a>(&allocatorDesc, &allocator);</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocator_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></div><div class="ttdoc">Represents main object of this library initialized for particular ID3D12Device.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1121</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocator_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></div><div class="ttdoc">Represents main object of this library initialized for particular ID3D12Device.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1099</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_ab7a1cd1683986d75ce1488b0920f4cb0"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA::CreateAllocator</a></div><div class="ttdeci">D3D12MA_API HRESULT CreateAllocator(const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)</div><div class="ttdoc">Creates new main D3D12MA::Allocator object and returns it through ppAllocator.</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html">D3D12MA::ALLOCATOR_DESC</a></div><div class="ttdoc">Parameters of created Allocator object. To be used with CreateAllocator().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1082</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_abf9a9f87f0ffea52816efd363c5fcd7b"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#abf9a9f87f0ffea52816efd363c5fcd7b">D3D12MA::ALLOCATOR_DESC::pAdapter</a></div><div class="ttdeci">IDXGIAdapter * pAdapter</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1108</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_ada1bf21205065b3aa0284b5a9ee1cb3c"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#ada1bf21205065b3aa0284b5a9ee1cb3c">D3D12MA::ALLOCATOR_DESC::pDevice</a></div><div class="ttdeci">ID3D12Device * pDevice</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1090</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_ad5ae5a5e42b878f2e18ab5d1fbfb9916adfbfd20d716f2a46f74d6226056fef1e"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916adfbfd20d716f2a46f74d6226056fef1e">D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED</a></div><div class="ttdeci">@ ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED</div><div class="ttdoc">Optimization, allocate MSAA textures as committed resources always.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1045</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_ad5ae5a5e42b878f2e18ab5d1fbfb9916ae7dc7ab9168148281ebfe1586f554335"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916ae7dc7ab9168148281ebfe1586f554335">D3D12MA::ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED</a></div><div class="ttdeci">@ ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1037</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html">D3D12MA::ALLOCATOR_DESC</a></div><div class="ttdoc">Parameters of created Allocator object. To be used with CreateAllocator().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1060</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_abf9a9f87f0ffea52816efd363c5fcd7b"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#abf9a9f87f0ffea52816efd363c5fcd7b">D3D12MA::ALLOCATOR_DESC::pAdapter</a></div><div class="ttdeci">IDXGIAdapter * pAdapter</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1086</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_ad8abad7c80ea0d8df27c85243ce720f3"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#ad8abad7c80ea0d8df27c85243ce720f3">D3D12MA::ALLOCATOR_DESC::Flags</a></div><div class="ttdeci">ALLOCATOR_FLAGS Flags</div><div class="ttdoc">Flags.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1062</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html_ada1bf21205065b3aa0284b5a9ee1cb3c"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#ada1bf21205065b3aa0284b5a9ee1cb3c">D3D12MA::ALLOCATOR_DESC::pDevice</a></div><div class="ttdeci">ID3D12Device * pDevice</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1068</div></div>
|
||||
</div><!-- fragment --><p>(5.) Right before destroying the D3D12 device, destroy the allocator object.</p>
|
||||
<p>Objects of this library must be destroyed by calling <code>Release</code> method. They are somewhat compatible with COM: they implement <code>IUnknown</code> interface with its virtual methods: <code>AddRef</code>, <code>Release</code>, <code>QueryInterface</code>, and they are reference-counted internally. You can use smart pointers designed for COM with objects of this library - e.g. <code>CComPtr</code> or <code>Microsoft::WRL::ComPtr</code>. The reference counter is thread-safe. <code>QueryInterface</code> method supports only <code>IUnknown</code>, as classes of this library don't define their own GUIDs.</p>
|
||||
<div class="fragment"><div class="line">allocator->Release();</div>
|
||||
@ -138,7 +144,7 @@ Creating resources</h1>
|
||||
<div class="line"> IID_NULL, NULL);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Use allocation->GetResource()...</span></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></div><div class="ttdoc">Represents single memory allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:482</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></div><div class="ttdoc">Represents single memory allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:483</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocator_html_aa37d6b9fe8ea0864f7a35b9d68e8345a"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">D3D12MA::Allocator::CreateResource</a></div><div class="ttdeci">HRESULT CreateResource(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</div><div class="ttdoc">Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation functi...</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">D3D12MA::ALLOCATION_DESC</a></div><div class="ttdoc">Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:299</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c_html_aa46b3c0456e5a23edef3328607ebf4d7"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7">D3D12MA::ALLOCATION_DESC::HeapType</a></div><div class="ttdeci">D3D12_HEAP_TYPE HeapType</div><div class="ttdoc">The type of memory heap where the new allocation should be placed.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:308</div></div>
|
||||
|
@ -153,7 +153,7 @@ $(function() {
|
||||
<div class="line">res2->Release();</div>
|
||||
<div class="line">res1->Release();</div>
|
||||
<div class="line">alloc->Release();</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></div><div class="ttdoc">Represents single memory allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:482</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html">D3D12MA::Allocation</a></div><div class="ttdoc">Represents single memory allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:483</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_allocation_html_adca8d5a82bed492fe7265fcda6e53da2"><div class="ttname"><a href="class_d3_d12_m_a_1_1_allocation.html#adca8d5a82bed492fe7265fcda6e53da2">D3D12MA::Allocation::GetHeap</a></div><div class="ttdeci">ID3D12Heap * GetHeap() const</div><div class="ttdoc">Returns memory heap that the resource is created in.</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">D3D12MA::ALLOCATION_DESC</a></div><div class="ttdoc">Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:299</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c_html_a97878838f976b2d1e6b1a76881035690"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#a97878838f976b2d1e6b1a76881035690">D3D12MA::ALLOCATION_DESC::ExtraHeapFlags</a></div><div class="ttdeci">D3D12_HEAP_FLAGS ExtraHeapFlags</div><div class="ttdoc">Additional heap flags to be used when allocating memory.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:324</div></div>
|
||||
|
@ -42,12 +42,13 @@ var searchData=
|
||||
['allocator_5fflag_5fnone_39',['ALLOCATOR_FLAG_NONE',['../namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916a2fb30967b492c27823a80b5de3aea26f',1,'D3D12MA']]],
|
||||
['allocator_5fflag_5fsinglethreaded_40',['ALLOCATOR_FLAG_SINGLETHREADED',['../namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916a1b06bb21df006f76a9ed1bc41838bc52',1,'D3D12MA']]],
|
||||
['allocator_5fflags_41',['ALLOCATOR_FLAGS',['../namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916',1,'D3D12MA']]],
|
||||
['allochandle_42',['allocHandle',['../class_d3_d12_m_a_1_1_allocation.html#a5c38846905b1ca0ff228c6081f2fc20c',1,'D3D12MA::Allocation']]],
|
||||
['allochandle_43',['AllocHandle',['../struct_d3_d12_m_a_1_1_virtual_allocation.html#a5d3166cf1f284fbbea4d0b169c4dba13',1,'D3D12MA::VirtualAllocation::AllocHandle'],['../namespace_d3_d12_m_a.html#a15e349adce86a40e0417d405aef1af80',1,'D3D12MA::AllocHandle']]],
|
||||
['also_44',['See also',['../index.html#main_see_also',1,'']]],
|
||||
['and_20benefits_45',['Features and benefits',['../custom_pools.html#custom_pools_features_and_benefits',1,'']]],
|
||||
['and_20compatibility_46',['Versioning and compatibility',['../general_considerations.html#general_considerations_versioning_and_compatibility',1,'']]],
|
||||
['and_20initialization_47',['Project setup and initialization',['../quick_start.html#quick_start_project_setup',1,'']]],
|
||||
['and_20units_48',['Alignment and units',['../virtual_allocator.html#virtual_allocator_alignment_and_units',1,'']]],
|
||||
['at_20once_49',['Free-at-once',['../linear_algorithm.html#linear_algorithm_free_at_once',1,'']]]
|
||||
['allochandle_42',['AllocHandle',['../struct_d3_d12_m_a_1_1_virtual_allocation.html#a5d3166cf1f284fbbea4d0b169c4dba13',1,'D3D12MA::VirtualAllocation']]],
|
||||
['allochandle_43',['allocHandle',['../class_d3_d12_m_a_1_1_allocation.html#a5c38846905b1ca0ff228c6081f2fc20c',1,'D3D12MA::Allocation']]],
|
||||
['allochandle_44',['AllocHandle',['../namespace_d3_d12_m_a.html#a15e349adce86a40e0417d405aef1af80',1,'D3D12MA']]],
|
||||
['also_45',['See also',['../index.html#main_see_also',1,'']]],
|
||||
['and_20benefits_46',['Features and benefits',['../custom_pools.html#custom_pools_features_and_benefits',1,'']]],
|
||||
['and_20compatibility_47',['Versioning and compatibility',['../general_considerations.html#general_considerations_versioning_and_compatibility',1,'']]],
|
||||
['and_20initialization_48',['Project setup and initialization',['../quick_start.html#quick_start_project_setup',1,'']]],
|
||||
['and_20units_49',['Alignment and units',['../virtual_allocator.html#virtual_allocator_alignment_and_units',1,'']]],
|
||||
['at_20once_50',['Free-at-once',['../linear_algorithm.html#linear_algorithm_free_at_once',1,'']]]
|
||||
];
|
||||
|
@ -4,5 +4,5 @@ var searchData=
|
||||
['heapflags_1',['HeapFlags',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc',1,'D3D12MA::POOL_DESC']]],
|
||||
['heapproperties_2',['HeapProperties',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a',1,'D3D12MA::POOL_DESC']]],
|
||||
['heapsfreed_3',['HeapsFreed',['../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#aecc6120afcf75028c9850f8d475b727d',1,'D3D12MA::DEFRAGMENTATION_STATS']]],
|
||||
['heaptype_4',['HeapType',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7',1,'D3D12MA::ALLOCATION_DESC::HeapType'],['../struct_d3_d12_m_a_1_1_total_statistics.html#a07247152fc70a8ee5605cab0fe220ea5',1,'D3D12MA::TotalStatistics::HeapType']]]
|
||||
['heaptype_4',['HeapType',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7',1,'D3D12MA::ALLOCATION_DESC::HeapType'],['../struct_d3_d12_m_a_1_1_total_statistics.html#abad2e48b38f8a73a4daf8577e7a33b89',1,'D3D12MA::TotalStatistics::HeapType']]]
|
||||
];
|
||||
|
@ -3,5 +3,6 @@ var searchData=
|
||||
['initialization_0',['Project setup and initialization',['../quick_start.html#quick_start_project_setup',1,'']]],
|
||||
['iscachecoherentuma_1',['IsCacheCoherentUMA',['../class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80',1,'D3D12MA::Allocator']]],
|
||||
['isempty_2',['IsEmpty',['../class_d3_d12_m_a_1_1_virtual_block.html#a7b23fd2da6f0343095fb14b31395678b',1,'D3D12MA::VirtualBlock']]],
|
||||
['isuma_3',['IsUMA',['../class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0',1,'D3D12MA::Allocator']]]
|
||||
['isgpuuploadheapsupported_3',['IsGPUUploadHeapSupported',['../class_d3_d12_m_a_1_1_allocator.html#a3f3fd1e88cf2cd02257fe272e08a273c',1,'D3D12MA::Allocator']]],
|
||||
['isuma_4',['IsUMA',['../class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0',1,'D3D12MA::Allocator']]]
|
||||
];
|
||||
|
@ -2,5 +2,6 @@ var searchData=
|
||||
[
|
||||
['iscachecoherentuma_0',['IsCacheCoherentUMA',['../class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80',1,'D3D12MA::Allocator']]],
|
||||
['isempty_1',['IsEmpty',['../class_d3_d12_m_a_1_1_virtual_block.html#a7b23fd2da6f0343095fb14b31395678b',1,'D3D12MA::VirtualBlock']]],
|
||||
['isuma_2',['IsUMA',['../class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0',1,'D3D12MA::Allocator']]]
|
||||
['isgpuuploadheapsupported_2',['IsGPUUploadHeapSupported',['../class_d3_d12_m_a_1_1_allocator.html#a3f3fd1e88cf2cd02257fe272e08a273c',1,'D3D12MA::Allocator']]],
|
||||
['isuma_3',['IsUMA',['../class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0',1,'D3D12MA::Allocator']]]
|
||||
];
|
||||
|
@ -1,10 +1,10 @@
|
||||
var indexSectionsWithContent =
|
||||
{
|
||||
0: "abcdefghijlmnopqrstuvw",
|
||||
0: "abcdefghijlmnopqrstuv",
|
||||
1: "abdpstv",
|
||||
2: "d",
|
||||
3: "d",
|
||||
4: "abcefgisw",
|
||||
4: "abcefgis",
|
||||
5: "abcefhlmnoprstu",
|
||||
6: "af",
|
||||
7: "adpv",
|
||||
|
@ -6,6 +6,6 @@ var searchData=
|
||||
['allocationsizemax_3',['AllocationSizeMax',['../struct_d3_d12_m_a_1_1_detailed_statistics.html#a2f47015bebf9a30ce221aef88fe11991',1,'D3D12MA::DetailedStatistics']]],
|
||||
['allocationsizemin_4',['AllocationSizeMin',['../struct_d3_d12_m_a_1_1_detailed_statistics.html#a187e5562265c3daa87c15d54f1396a6a',1,'D3D12MA::DetailedStatistics']]],
|
||||
['allocationsmoved_5',['AllocationsMoved',['../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#a708fa1b14c35da8d5d6abd4a457ef0c2',1,'D3D12MA::DEFRAGMENTATION_STATS']]],
|
||||
['allochandle_6',['allocHandle',['../class_d3_d12_m_a_1_1_allocation.html#a5c38846905b1ca0ff228c6081f2fc20c',1,'D3D12MA::Allocation']]],
|
||||
['allochandle_7',['AllocHandle',['../struct_d3_d12_m_a_1_1_virtual_allocation.html#a5d3166cf1f284fbbea4d0b169c4dba13',1,'D3D12MA::VirtualAllocation']]]
|
||||
['allochandle_6',['AllocHandle',['../struct_d3_d12_m_a_1_1_virtual_allocation.html#a5d3166cf1f284fbbea4d0b169c4dba13',1,'D3D12MA::VirtualAllocation']]],
|
||||
['allochandle_7',['allocHandle',['../class_d3_d12_m_a_1_1_allocation.html#a5c38846905b1ca0ff228c6081f2fc20c',1,'D3D12MA::Allocation']]]
|
||||
];
|
||||
|
@ -4,5 +4,5 @@ var searchData=
|
||||
['heapflags_1',['HeapFlags',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc',1,'D3D12MA::POOL_DESC']]],
|
||||
['heapproperties_2',['HeapProperties',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a',1,'D3D12MA::POOL_DESC']]],
|
||||
['heapsfreed_3',['HeapsFreed',['../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#aecc6120afcf75028c9850f8d475b727d',1,'D3D12MA::DEFRAGMENTATION_STATS']]],
|
||||
['heaptype_4',['HeapType',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7',1,'D3D12MA::ALLOCATION_DESC::HeapType'],['../struct_d3_d12_m_a_1_1_total_statistics.html#a07247152fc70a8ee5605cab0fe220ea5',1,'D3D12MA::TotalStatistics::HeapType']]]
|
||||
['heaptype_4',['HeapType',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#aa46b3c0456e5a23edef3328607ebf4d7',1,'D3D12MA::ALLOCATION_DESC::HeapType'],['../struct_d3_d12_m_a_1_1_total_statistics.html#abad2e48b38f8a73a4daf8577e7a33b89',1,'D3D12MA::TotalStatistics::HeapType']]]
|
||||
];
|
||||
|
@ -94,9 +94,9 @@ Numeric statistics</h1>
|
||||
<div class="line">printf(<span class="stringliteral">"D3D12 reports total usage %llu B with budget %llu B.\n"</span>,</div>
|
||||
<div class="line"> localBudget.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_budget.html#a77a8c9e32d6602f95b7d1c285cddd253">UsageBytes</a>,</div>
|
||||
<div class="line"> localBudget.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_budget.html#a326515f08d89ee2e31dcfdd5c1e8ac71">BudgetBytes</a>);</div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_budget_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_budget.html">D3D12MA::Budget</a></div><div class="ttdoc">Statistics of current memory usage and available budget for a specific memory segment group.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:433</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_budget_html_a326515f08d89ee2e31dcfdd5c1e8ac71"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_budget.html#a326515f08d89ee2e31dcfdd5c1e8ac71">D3D12MA::Budget::BudgetBytes</a></div><div class="ttdeci">UINT64 BudgetBytes</div><div class="ttdoc">Estimated amount of memory available to the program.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:456</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_budget_html_a77a8c9e32d6602f95b7d1c285cddd253"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_budget.html#a77a8c9e32d6602f95b7d1c285cddd253">D3D12MA::Budget::UsageBytes</a></div><div class="ttdeci">UINT64 UsageBytes</div><div class="ttdoc">Estimated current memory usage of the program.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:445</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_budget_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_budget.html">D3D12MA::Budget</a></div><div class="ttdoc">Statistics of current memory usage and available budget for a specific memory segment group.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:434</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_budget_html_a326515f08d89ee2e31dcfdd5c1e8ac71"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_budget.html#a326515f08d89ee2e31dcfdd5c1e8ac71">D3D12MA::Budget::BudgetBytes</a></div><div class="ttdeci">UINT64 BudgetBytes</div><div class="ttdoc">Estimated amount of memory available to the program.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:457</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_budget_html_a77a8c9e32d6602f95b7d1c285cddd253"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_budget.html#a77a8c9e32d6602f95b7d1c285cddd253">D3D12MA::Budget::UsageBytes</a></div><div class="ttdeci">UINT64 UsageBytes</div><div class="ttdoc">Estimated current memory usage of the program.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:446</div></div>
|
||||
</div><!-- fragment --><p>You can query for more detailed statistics per heap type, memory segment group, and totals, including minimum and maximum allocation size and unused range size, by calling function <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22" title="Retrieves statistics from current state of the allocator.">D3D12MA::Allocator::CalculateStatistics()</a> and inspecting structure <a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html" title="General statistics from current state of the allocator - total memory usage across all memory heaps a...">D3D12MA::TotalStatistics</a>. This function is slower though, as it has to traverse all the internal data structures, so it should be used only for debugging purposes.</p>
|
||||
<p>You can query for statistics of a custom pool using function <a class="el" href="class_d3_d12_m_a_1_1_pool.html#aa9d849dc4667314b2a53eddf02f5af91" title="Retrieves basic statistics of the custom pool that are fast to calculate.">D3D12MA::Pool::GetStatistics()</a> or <a class="el" href="class_d3_d12_m_a_1_1_pool.html#ad07999ac5dc8f0c63187afd45d551910" title="Retrieves detailed statistics of the custom pool that are slower to calculate.">D3D12MA::Pool::CalculateStatistics()</a>.</p>
|
||||
<p>You can query for information about a specific allocation using functions of the <a class="el" href="class_d3_d12_m_a_1_1_allocation.html" title="Represents single memory allocation.">D3D12MA::Allocation</a> class, e.g. <code>GetSize()</code>, <code>GetOffset()</code>, <code>GetHeap()</code>.</p>
|
||||
|
@ -81,7 +81,7 @@ $(function() {
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html">D3D12MA::TotalStatistics</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#a07247152fc70a8ee5605cab0fe220ea5">HeapType</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html">D3D12MA::TotalStatistics</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#abad2e48b38f8a73a4daf8577e7a33b89">HeapType</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html">D3D12MA::TotalStatistics</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#aed7d22d5cd773aa896bc4c786c7f3650">MemorySegmentGroup</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html">D3D12MA::TotalStatistics</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html#ac0bb53579457ddec2872c547ae8922a6">Total</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_total_statistics.html">D3D12MA::TotalStatistics</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
|
@ -89,9 +89,9 @@ $(function() {
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||||
Public Attributes</h2></td></tr>
|
||||
<tr class="memitem:a07247152fc70a8ee5605cab0fe220ea5" id="r_a07247152fc70a8ee5605cab0fe220ea5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_d3_d12_m_a_1_1_detailed_statistics.html">DetailedStatistics</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a07247152fc70a8ee5605cab0fe220ea5">HeapType</a> [4]</td></tr>
|
||||
<tr class="memdesc:a07247152fc70a8ee5605cab0fe220ea5"><td class="mdescLeft"> </td><td class="mdescRight">One element for each type of heap located at the following indices: <br /></td></tr>
|
||||
<tr class="separator:a07247152fc70a8ee5605cab0fe220ea5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abad2e48b38f8a73a4daf8577e7a33b89" id="r_abad2e48b38f8a73a4daf8577e7a33b89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_d3_d12_m_a_1_1_detailed_statistics.html">DetailedStatistics</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#abad2e48b38f8a73a4daf8577e7a33b89">HeapType</a> [5]</td></tr>
|
||||
<tr class="memdesc:abad2e48b38f8a73a4daf8577e7a33b89"><td class="mdescLeft"> </td><td class="mdescRight">One element for each type of heap located at the following indices: <br /></td></tr>
|
||||
<tr class="separator:abad2e48b38f8a73a4daf8577e7a33b89"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aed7d22d5cd773aa896bc4c786c7f3650" id="r_aed7d22d5cd773aa896bc4c786c7f3650"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_d3_d12_m_a_1_1_detailed_statistics.html">DetailedStatistics</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#aed7d22d5cd773aa896bc4c786c7f3650">MemorySegmentGroup</a> [2]</td></tr>
|
||||
<tr class="memdesc:aed7d22d5cd773aa896bc4c786c7f3650"><td class="mdescLeft"> </td><td class="mdescRight">One element for each memory segment group located at the following indices: <br /></td></tr>
|
||||
<tr class="separator:aed7d22d5cd773aa896bc4c786c7f3650"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@ -103,14 +103,14 @@ Public Attributes</h2></td></tr>
|
||||
<div class="textblock"><p>General statistics from current state of the allocator - total memory usage across all memory heaps and segments. </p>
|
||||
<p>These are slower to calculate. Use for debugging purposes. See function <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a99db00df909963573a976c203b107d22" title="Retrieves statistics from current state of the allocator.">D3D12MA::Allocator::CalculateStatistics()</a>. </p>
|
||||
</div><h2 class="groupheader">Member Data Documentation</h2>
|
||||
<a id="a07247152fc70a8ee5605cab0fe220ea5" name="a07247152fc70a8ee5605cab0fe220ea5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a07247152fc70a8ee5605cab0fe220ea5">◆ </a></span>HeapType</h2>
|
||||
<a id="abad2e48b38f8a73a4daf8577e7a33b89" name="abad2e48b38f8a73a4daf8577e7a33b89"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abad2e48b38f8a73a4daf8577e7a33b89">◆ </a></span>HeapType</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="struct_d3_d12_m_a_1_1_detailed_statistics.html">DetailedStatistics</a> D3D12MA::TotalStatistics::HeapType[4]</td>
|
||||
<td class="memname"><a class="el" href="struct_d3_d12_m_a_1_1_detailed_statistics.html">DetailedStatistics</a> D3D12MA::TotalStatistics::HeapType[5]</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@ -120,7 +120,8 @@ Public Attributes</h2></td></tr>
|
||||
<li>0 = <code>D3D12_HEAP_TYPE_DEFAULT</code></li>
|
||||
<li>1 = <code>D3D12_HEAP_TYPE_UPLOAD</code></li>
|
||||
<li>2 = <code>D3D12_HEAP_TYPE_READBACK</code></li>
|
||||
<li>3 = <code>D3D12_HEAP_TYPE_CUSTOM</code> </li>
|
||||
<li>3 = <code>D3D12_HEAP_TYPE_CUSTOM</code></li>
|
||||
<li>4 = <code>D3D12_HEAP_TYPE_GPU_UPLOAD</code> </li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@ -145,7 +146,7 @@ Public Attributes</h2></td></tr>
|
||||
<p>Meaning of these segment groups is:</p>
|
||||
<ul>
|
||||
<li>When <code>IsUMA() == FALSE</code> (discrete graphics card):<ul>
|
||||
<li><code>DXGI_MEMORY_SEGMENT_GROUP_LOCAL</code> (index 0) represents GPU memory (resources allocated in <code>D3D12_HEAP_TYPE_DEFAULT</code> or <code>D3D12_MEMORY_POOL_L1</code>).</li>
|
||||
<li><code>DXGI_MEMORY_SEGMENT_GROUP_LOCAL</code> (index 0) represents GPU memory (resources allocated in <code>D3D12_HEAP_TYPE_DEFAULT</code>, <code>D3D12_HEAP_TYPE_GPU_UPLOAD</code> or <code>D3D12_MEMORY_POOL_L1</code>).</li>
|
||||
<li><code>DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL</code> (index 1) represents system memory (resources allocated in <code>D3D12_HEAP_TYPE_UPLOAD</code>, <code>D3D12_HEAP_TYPE_READBACK</code>, or <code>D3D12_MEMORY_POOL_L0</code>).</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -92,9 +92,9 @@ Creating virtual block</h1>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_class" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a> *block;</div>
|
||||
<div class="line">HRESULT hr = CreateVirtualBlock(&blockDesc, &block);</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></div><div class="ttdoc">Represents pure allocation algorithm and a data structure with allocations in some memory block,...</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1526</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html"><div class="ttname"><a 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">D3D12MA::VIRTUAL_BLOCK_DESC</a></div><div class="ttdoc">Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1432</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html_ac56491679f276a5a9956ed99bc4654e4"><div class="ttname"><a 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#ac56491679f276a5a9956ed99bc4654e4">D3D12MA::VIRTUAL_BLOCK_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Total size of the block.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1440</div></div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></div><div class="ttdoc">Represents pure allocation algorithm and a data structure with allocations in some memory block,...</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1513</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html"><div class="ttname"><a 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">D3D12MA::VIRTUAL_BLOCK_DESC</a></div><div class="ttdoc">Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1419</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___b_l_o_c_k___d_e_s_c_html_ac56491679f276a5a9956ed99bc4654e4"><div class="ttname"><a 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#ac56491679f276a5a9956ed99bc4654e4">D3D12MA::VIRTUAL_BLOCK_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Total size of the block.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1427</div></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_making_virtual_allocations"></a>
|
||||
Making virtual allocations</h1>
|
||||
<p><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html" title="Represents pure allocation algorithm and a data structure with allocations in some memory block,...">D3D12MA::VirtualBlock</a> 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 <a class="el" href="struct_d3_d12_m_a_1_1_virtual_allocation.html" title="Represents single memory allocation done inside VirtualBlock.">D3D12MA::VirtualAllocation</a>. You will also likely want to know the offset at which the allocation was made in the block.</p>
|
||||
@ -119,9 +119,9 @@ Making virtual allocations</h1>
|
||||
<div class="line"> <span class="comment">// Allocation failed - no space for it could be found. Handle this error!</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html_a9281daf76e888ea1bd5247d5732e8179"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html#a9281daf76e888ea1bd5247d5732e8179">D3D12MA::VirtualBlock::Allocate</a></div><div class="ttdeci">HRESULT Allocate(const VIRTUAL_ALLOCATION_DESC *pDesc, VirtualAllocation *pAllocation, UINT64 *pOffset)</div><div class="ttdoc">Creates new allocation.</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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">D3D12MA::VIRTUAL_ALLOCATION_DESC</a></div><div class="ttdoc">Parameters of created virtual allocation to be passed to VirtualBlock::Allocate().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1477</div></div>
|
||||
<div class="ttc" id="astruct_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_a976b649e45abdd0769da0d79acde4bac"><div class="ttname"><a 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#a976b649e45abdd0769da0d79acde4bac">D3D12MA::VIRTUAL_ALLOCATION_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Size of the allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1484</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_virtual_allocation_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_virtual_allocation.html">D3D12MA::VirtualAllocation</a></div><div class="ttdoc">Represents single memory allocation done inside VirtualBlock.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:462</div></div>
|
||||
<div class="ttc" id="astruct_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"><div class="ttname"><a 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">D3D12MA::VIRTUAL_ALLOCATION_DESC</a></div><div class="ttdoc">Parameters of created virtual allocation to be passed to VirtualBlock::Allocate().</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1464</div></div>
|
||||
<div class="ttc" id="astruct_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_a976b649e45abdd0769da0d79acde4bac"><div class="ttname"><a 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#a976b649e45abdd0769da0d79acde4bac">D3D12MA::VIRTUAL_ALLOCATION_DESC::Size</a></div><div class="ttdeci">UINT64 Size</div><div class="ttdoc">Size of the allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1471</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_virtual_allocation_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_virtual_allocation.html">D3D12MA::VirtualAllocation</a></div><div class="ttdoc">Represents single memory allocation done inside VirtualBlock.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:463</div></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_deallocation"></a>
|
||||
Deallocation</h1>
|
||||
<p>When no longer needed, an allocation can be freed by calling <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#aab44e46bd122054c894fc84740f1e8fb" title="Frees the allocation.">D3D12MA::VirtualBlock::FreeAllocation</a>.</p>
|
||||
@ -158,7 +158,7 @@ Alignment and units</h1>
|
||||
<div class="line"><a class="code hl_struct" href="struct_d3_d12_m_a_1_1_virtual_allocation.html">D3D12MA::VirtualAllocation</a> alloc;</div>
|
||||
<div class="line">UINT64 allocOffset;</div>
|
||||
<div class="line">hr = block-><a class="code hl_function" href="class_d3_d12_m_a_1_1_virtual_block.html#a9281daf76e888ea1bd5247d5732e8179">Allocate</a>(&allocDesc, &alloc, &allocOffset);</div>
|
||||
<div class="ttc" id="astruct_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_aaa95e62f2f399339a09dcbb312a42de0"><div class="ttname"><a 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#aaa95e62f2f399339a09dcbb312a42de0">D3D12MA::VIRTUAL_ALLOCATION_DESC::Alignment</a></div><div class="ttdeci">UINT64 Alignment</div><div class="ttdoc">Required alignment of the allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1489</div></div>
|
||||
<div class="ttc" id="astruct_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_aaa95e62f2f399339a09dcbb312a42de0"><div class="ttname"><a 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#aaa95e62f2f399339a09dcbb312a42de0">D3D12MA::VIRTUAL_ALLOCATION_DESC::Alignment</a></div><div class="ttdeci">UINT64 Alignment</div><div class="ttdoc">Required alignment of the allocation.</div><div class="ttdef"><b>Definition</b> D3D12MemAlloc.h:1476</div></div>
|
||||
</div><!-- fragment --><p>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 <code>sizeof(MyDataStruct)</code>, 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:</p>
|
||||
<ul>
|
||||
<li><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#ac56491679f276a5a9956ed99bc4654e4" title="Total size of the block.">D3D12MA::VIRTUAL_BLOCK_DESC::Size</a></li>
|
||||
|
@ -1637,6 +1637,9 @@ ID3D12Device* device = (...)
|
||||
D3D12MA::ALLOCATOR_DESC allocatorDesc = {};
|
||||
allocatorDesc.pDevice = device;
|
||||
allocatorDesc.pAdapter = adapter;
|
||||
// These flags are optional but recommended.
|
||||
allocatorDesc.Flags = D3D12MA::ALLOCATOR_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED |
|
||||
D3D12MA::ALLOCATOR_FLAG_DEFAULT_POOLS_NOT_ZEROED;
|
||||
|
||||
D3D12MA::Allocator* allocator;
|
||||
HRESULT hr = D3D12MA::CreateAllocator(&allocatorDesc, &allocator);
|
||||
@ -1861,6 +1864,8 @@ to obtain object D3D12MA::Pool. Example:
|
||||
\code
|
||||
POOL_DESC poolDesc = {};
|
||||
poolDesc.HeapProperties.Type = D3D12_HEAP_TYPE_DEFAULT;
|
||||
// This flag is optional but recommended.
|
||||
poolDesc.Flags = D3D12MA::POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED;
|
||||
|
||||
Pool* pool;
|
||||
HRESULT hr = allocator->CreatePool(&poolDesc, &pool);
|
||||
|
Loading…
Reference in New Issue
Block a user