mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-21 19:50:05 +00:00
Fixes in the documentation
This commit is contained in:
parent
8f02da698d
commit
ae2ea0b293
@ -72,8 +72,7 @@ $(function() {
|
|||||||
<a href="#define-members">Macros</a> |
|
<a href="#define-members">Macros</a> |
|
||||||
<a href="#typedef-members">Typedefs</a> |
|
<a href="#typedef-members">Typedefs</a> |
|
||||||
<a href="#enum-members">Enumerations</a> |
|
<a href="#enum-members">Enumerations</a> |
|
||||||
<a href="#func-members">Functions</a> |
|
<a href="#func-members">Functions</a> </div>
|
||||||
<a href="#var-members">Variables</a> </div>
|
|
||||||
<div class="headertitle"><div class="title">D3D12MemAlloc.h File Reference</div></div>
|
<div class="headertitle"><div class="title">D3D12MemAlloc.h File Reference</div></div>
|
||||||
</div><!--header-->
|
</div><!--header-->
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
@ -200,12 +199,6 @@ Functions</h2></td></tr>
|
|||||||
<tr class="memitem:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memItemLeft" align="right" valign="top">D3D12MA_API HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">D3D12MA::CreateVirtualBlock</a> (const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)</td></tr>
|
<tr class="memitem:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memItemLeft" align="right" valign="top">D3D12MA_API HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">D3D12MA::CreateVirtualBlock</a> (const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)</td></tr>
|
||||||
<tr class="memdesc:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="mdescLeft"> </td><td class="mdescRight">Creates new <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 and returns it through <code>ppVirtualBlock</code>. <a href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">More...</a><br /></td></tr>
|
<tr class="memdesc:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="mdescLeft"> </td><td class="mdescRight">Creates new <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 and returns it through <code>ppVirtualBlock</code>. <a href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
|
|
||||||
Variables</h2></td></tr>
|
|
||||||
<tr class="memitem:abad7f40135648f8d0871be36f2919982"><td class="memItemLeft" align="right" valign="top">const UINT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#abad7f40135648f8d0871be36f2919982">D3D12MA::HEAP_TYPE_COUNT</a> = 4</td></tr>
|
|
||||||
<tr class="memdesc:abad7f40135648f8d0871be36f2919982"><td class="mdescLeft"> </td><td class="mdescRight">Number of D3D12 memory heap types supported. <a href="namespace_d3_d12_m_a.html#abad7f40135648f8d0871be36f2919982">More...</a><br /></td></tr>
|
|
||||||
<tr class="separator:abad7f40135648f8d0871be36f2919982"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||||
<a id="aa623643886b8481adb32017e5c748b50" name="aa623643886b8481adb32017e5c748b50"></a>
|
<a id="aa623643886b8481adb32017e5c748b50" name="aa623643886b8481adb32017e5c748b50"></a>
|
||||||
|
@ -293,8 +293,12 @@ Public Member Functions</h2></td></tr>
|
|||||||
|
|
||||||
<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> 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>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: <a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-createplacedresource#notes-on-the-required-resource-initialization">ID3D12Device::CreatePlacedResource method - Notes on the required resource initialization</a>. 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 >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: <a href="https://devblogs.microsoft.com/directx/coming-to-directx-12-more-control-over-memory-allocation/">"Coming to DirectX 12: More control over memory allocation"</a>, <a href="https://asawicki.info/news_1724_initializing_dx12_textures_after_allocation_and_aliasing">"Initializing DX12 Textures After Allocation and Aliasing"</a>. </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>
|
||||||
</div>
|
</div>
|
||||||
|
@ -619,10 +619,11 @@ Public Member Functions</h2></td></tr>
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA</code> was found to be true. </p>
|
<p>Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA</code> was found to be true. </p>
|
||||||
<p >For more information about how to use it, see articles in Microsoft Docs:</p><ul>
|
<p >For more information about how to use it, see articles in Microsoft Docs articles:</p>
|
||||||
<li><a href="https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping">https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping</a></li>
|
<ul>
|
||||||
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture</a></li>
|
<li>"UMA Optimizations: CPU Accessible Textures and Standard Swizzle"</li>
|
||||||
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties</a> </li>
|
<li>"D3D12_FEATURE_DATA_ARCHITECTURE structure (d3d12.h)"</li>
|
||||||
|
<li>"ID3D12Device::GetCustomHeapProperties method (d3d12.h)" </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -643,10 +644,11 @@ Public Member Functions</h2></td></tr>
|
|||||||
</div><div class="memdoc">
|
</div><div class="memdoc">
|
||||||
|
|
||||||
<p>Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::UMA</code> was found to be true. </p>
|
<p>Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::UMA</code> was found to be true. </p>
|
||||||
<p >For more information about how to use it, see articles in Microsoft Docs:</p><ul>
|
<p >For more information about how to use it, see articles in Microsoft Docs articles:</p>
|
||||||
<li><a href="https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping">https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping</a></li>
|
<ul>
|
||||||
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture</a></li>
|
<li>"UMA Optimizations: CPU Accessible Textures and Standard Swizzle"</li>
|
||||||
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties</a> </li>
|
<li>"D3D12_FEATURE_DATA_ARCHITECTURE structure (d3d12.h)"</li>
|
||||||
|
<li>"ID3D12Device::GetCustomHeapProperties method (d3d12.h)" </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -101,15 +101,15 @@ Custom CPU memory allocator</h1>
|
|||||||
<div class="line"> </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"><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="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:793</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:789</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="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:184</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:184</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:188</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:188</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:186</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:186</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:749</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:750</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:769</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:770</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:775</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:776</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:757</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:758</div></div>
|
||||||
</div><!-- fragment --><h1><a class="anchor" id="debug_margins"></a>
|
</div><!-- fragment --><h1><a class="anchor" id="debug_margins"></a>
|
||||||
Debug margins</h1>
|
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>
|
<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>
|
||||||
|
@ -30,7 +30,6 @@ var menudata={children:[
|
|||||||
{text:"Namespace Members",url:"namespacemembers.html",children:[
|
{text:"Namespace Members",url:"namespacemembers.html",children:[
|
||||||
{text:"All",url:"namespacemembers.html"},
|
{text:"All",url:"namespacemembers.html"},
|
||||||
{text:"Functions",url:"namespacemembers_func.html"},
|
{text:"Functions",url:"namespacemembers_func.html"},
|
||||||
{text:"Variables",url:"namespacemembers_vars.html"},
|
|
||||||
{text:"Typedefs",url:"namespacemembers_type.html"},
|
{text:"Typedefs",url:"namespacemembers_type.html"},
|
||||||
{text:"Enumerations",url:"namespacemembers_enum.html"},
|
{text:"Enumerations",url:"namespacemembers_enum.html"},
|
||||||
{text:"Enumerator",url:"namespacemembers_eval.html"}]}]},
|
{text:"Enumerator",url:"namespacemembers_eval.html"}]}]},
|
||||||
|
@ -66,8 +66,7 @@ $(function() {
|
|||||||
<a href="#nested-classes">Classes</a> |
|
<a href="#nested-classes">Classes</a> |
|
||||||
<a href="#typedef-members">Typedefs</a> |
|
<a href="#typedef-members">Typedefs</a> |
|
||||||
<a href="#enum-members">Enumerations</a> |
|
<a href="#enum-members">Enumerations</a> |
|
||||||
<a href="#func-members">Functions</a> |
|
<a href="#func-members">Functions</a> </div>
|
||||||
<a href="#var-members">Variables</a> </div>
|
|
||||||
<div class="headertitle"><div class="title">D3D12MA Namespace Reference</div></div>
|
<div class="headertitle"><div class="title">D3D12MA Namespace Reference</div></div>
|
||||||
</div><!--header-->
|
</div><!--header-->
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
@ -180,12 +179,6 @@ Functions</h2></td></tr>
|
|||||||
<tr class="memitem:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memItemLeft" align="right" valign="top">D3D12MA_API HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">CreateVirtualBlock</a> (const <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> *pDesc, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">VirtualBlock</a> **ppVirtualBlock)</td></tr>
|
<tr class="memitem:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memItemLeft" align="right" valign="top">D3D12MA_API HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">CreateVirtualBlock</a> (const <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> *pDesc, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">VirtualBlock</a> **ppVirtualBlock)</td></tr>
|
||||||
<tr class="memdesc:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="mdescLeft"> </td><td class="mdescRight">Creates new <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 and returns it through <code>ppVirtualBlock</code>. <a href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">More...</a><br /></td></tr>
|
<tr class="memdesc:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="mdescLeft"> </td><td class="mdescRight">Creates new <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 and returns it through <code>ppVirtualBlock</code>. <a href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">More...</a><br /></td></tr>
|
||||||
<tr class="separator:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memSeparator" colspan="2"> </td></tr>
|
<tr class="separator:ab024647ae85ee63e2fa2c1c4beac6d98"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
</table><table class="memberdecls">
|
|
||||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
|
|
||||||
Variables</h2></td></tr>
|
|
||||||
<tr class="memitem:abad7f40135648f8d0871be36f2919982"><td class="memItemLeft" align="right" valign="top">const UINT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#abad7f40135648f8d0871be36f2919982">HEAP_TYPE_COUNT</a> = 4</td></tr>
|
|
||||||
<tr class="memdesc:abad7f40135648f8d0871be36f2919982"><td class="mdescLeft"> </td><td class="mdescRight">Number of D3D12 memory heap types supported. <a href="namespace_d3_d12_m_a.html#abad7f40135648f8d0871be36f2919982">More...</a><br /></td></tr>
|
|
||||||
<tr class="separator:abad7f40135648f8d0871be36f2919982"><td class="memSeparator" colspan="2"> </td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
<h2 class="groupheader">Typedef Documentation</h2>
|
<h2 class="groupheader">Typedef Documentation</h2>
|
||||||
<a id="a1513cdeed760a8a2a6c94fa7cba87616" name="a1513cdeed760a8a2a6c94fa7cba87616"></a>
|
<a id="a1513cdeed760a8a2a6c94fa7cba87616" name="a1513cdeed760a8a2a6c94fa7cba87616"></a>
|
||||||
@ -434,23 +427,6 @@ Variables</h2></td></tr>
|
|||||||
<p>Creates new <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 and returns it through <code>ppVirtualBlock</code>. </p>
|
<p>Creates new <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 and returns it through <code>ppVirtualBlock</code>. </p>
|
||||||
<p >Note you don't need to create <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">D3D12MA::Allocator</a> to use virtual blocks. </p>
|
<p >Note you don't need to create <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">D3D12MA::Allocator</a> to use virtual blocks. </p>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="groupheader">Variable Documentation</h2>
|
|
||||||
<a id="abad7f40135648f8d0871be36f2919982" name="abad7f40135648f8d0871be36f2919982"></a>
|
|
||||||
<h2 class="memtitle"><span class="permalink"><a href="#abad7f40135648f8d0871be36f2919982">◆ </a></span>HEAP_TYPE_COUNT</h2>
|
|
||||||
|
|
||||||
<div class="memitem">
|
|
||||||
<div class="memproto">
|
|
||||||
<table class="memname">
|
|
||||||
<tr>
|
|
||||||
<td class="memname">const UINT D3D12MA::HEAP_TYPE_COUNT = 4</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div><div class="memdoc">
|
|
||||||
|
|
||||||
<p>Number of D3D12 memory heap types supported. </p>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- contents -->
|
</div><!-- contents -->
|
||||||
|
@ -78,7 +78,6 @@ $(function() {
|
|||||||
<li>CreateAllocator() : <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA</a></li>
|
<li>CreateAllocator() : <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA</a></li>
|
||||||
<li>CreateVirtualBlock() : <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">D3D12MA</a></li>
|
<li>CreateVirtualBlock() : <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">D3D12MA</a></li>
|
||||||
<li>FREE_FUNC_PTR : <a class="el" href="namespace_d3_d12_m_a.html#a6a68d0d4ed318abe8f5496d27d6caff7">D3D12MA</a></li>
|
<li>FREE_FUNC_PTR : <a class="el" href="namespace_d3_d12_m_a.html#a6a68d0d4ed318abe8f5496d27d6caff7">D3D12MA</a></li>
|
||||||
<li>HEAP_TYPE_COUNT : <a class="el" href="namespace_d3_d12_m_a.html#abad7f40135648f8d0871be36f2919982">D3D12MA</a></li>
|
|
||||||
<li>POOL_FLAG_ALGORITHM_LINEAR : <a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aa37a0103f511954ea42a1d0bba286b6a">D3D12MA</a></li>
|
<li>POOL_FLAG_ALGORITHM_LINEAR : <a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aa37a0103f511954ea42a1d0bba286b6a">D3D12MA</a></li>
|
||||||
<li>POOL_FLAG_ALGORITHM_MASK : <a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aec9d4939b8cc5438545b9df840b5f5f7">D3D12MA</a></li>
|
<li>POOL_FLAG_ALGORITHM_MASK : <a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1aec9d4939b8cc5438545b9df840b5f5f7">D3D12MA</a></li>
|
||||||
<li>POOL_FLAG_NONE : <a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a5d8dc91add3423140809a550c7224d02">D3D12MA</a></li>
|
<li>POOL_FLAG_NONE : <a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1a5d8dc91add3423140809a550c7224d02">D3D12MA</a></li>
|
||||||
|
@ -90,11 +90,11 @@ Project setup and initialization</h1>
|
|||||||
<div class="line"> </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"><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="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:793</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:789</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="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:749</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:750</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:775</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:776</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:757</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:758</div></div>
|
||||||
</div><!-- fragment --><p >(5.) Right before destroying the D3D12 device, destroy the allocator object.</p>
|
</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>
|
<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>
|
<div class="fragment"><div class="line">allocator->Release();</div>
|
||||||
@ -140,7 +140,7 @@ Creating resources</h1>
|
|||||||
<p >The library also automatically handles resource heap tier. When <code>D3D12_FEATURE_DATA_D3D12_OPTIONS::ResourceHeapTier</code> equals <code>D3D12_RESOURCE_HEAP_TIER_1</code>, resources of 3 types: buffers, textures that are render targets or depth-stencil, and other textures must be kept in separate heaps. When <code>D3D12_RESOURCE_HEAP_TIER_2</code>, they can be kept together. By using this library, you don't need to handle this manually.</p>
|
<p >The library also automatically handles resource heap tier. When <code>D3D12_FEATURE_DATA_D3D12_OPTIONS::ResourceHeapTier</code> equals <code>D3D12_RESOURCE_HEAP_TIER_1</code>, resources of 3 types: buffers, textures that are render targets or depth-stencil, and other textures must be kept in separate heaps. When <code>D3D12_RESOURCE_HEAP_TIER_2</code>, they can be kept together. By using this library, you don't need to handle this manually.</p>
|
||||||
<h1><a class="anchor" id="quick_start_mapping_memory"></a>
|
<h1><a class="anchor" id="quick_start_mapping_memory"></a>
|
||||||
Mapping memory</h1>
|
Mapping memory</h1>
|
||||||
<p >The process of getting regular CPU-side pointer to the memory of a resource in Direct3D is called "mapping". There are rules and restrictions to this process, as described in D3D12 documentation of <a href="https://docs.microsoft.com/en-us/windows/desktop/api/d3d12/nf-d3d12-id3d12resource-map">ID3D12Resource::Map method</a>.</p>
|
<p >The process of getting regular CPU-side pointer to the memory of a resource in Direct3D is called "mapping". There are rules and restrictions to this process, as described in D3D12 documentation of ID3D12Resource::Map method.</p>
|
||||||
<p >Mapping happens on the level of particular resources, not entire memory heaps, and so it is out of scope of this library. Just as the linked documentation says:</p>
|
<p >Mapping happens on the level of particular resources, not entire memory heaps, and so it is out of scope of this library. Just as the linked documentation says:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Returned pointer refers to data of particular subresource, not entire memory heap.</li>
|
<li>Returned pointer refers to data of particular subresource, not entire memory heap.</li>
|
||||||
|
@ -152,7 +152,7 @@ $(function() {
|
|||||||
</div><!-- fragment --><p >Remember that using resouces that alias in memory requires proper synchronization. You need to issue a special barrier of type <code>D3D12_RESOURCE_BARRIER_TYPE_ALIASING</code>. You also need to treat a resource after aliasing as uninitialized - containing garbage data. For example, if you use <code>res1</code> and then want to use <code>res2</code>, you need to first initialize <code>res2</code> using either Clear, Discard, or Copy to the entire resource.</p>
|
</div><!-- fragment --><p >Remember that using resouces that alias in memory requires proper synchronization. You need to issue a special barrier of type <code>D3D12_RESOURCE_BARRIER_TYPE_ALIASING</code>. You also need to treat a resource after aliasing as uninitialized - containing garbage data. For example, if you use <code>res1</code> and then want to use <code>res2</code>, you need to first initialize <code>res2</code> using either Clear, Discard, or Copy to the entire resource.</p>
|
||||||
<p >Additional considerations:</p>
|
<p >Additional considerations:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>D3D12 also allows to interpret contents of memory between aliasing resources consistently in some cases, which is called "data inheritance". For details, see Microsoft documentation, chapter <a href="https://docs.microsoft.com/en-us/windows/win32/direct3d12/memory-aliasing-and-data-inheritance">Memory Aliasing and Data Inheritance</a>.</li>
|
<li>D3D12 also allows to interpret contents of memory between aliasing resources consistently in some cases, which is called "data inheritance". For details, see Microsoft documentation chapter "Memory Aliasing and Data Inheritance".</li>
|
||||||
<li>You can create more complex layout where different textures and buffers are bound at different offsets inside one large allocation. For example, one can imagine a big texture used in some render passes, aliasing with a set of many small buffers used in some further passes. To bind a resource at non-zero offset of an allocation, call <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717" title="Creates a new resource in place of an existing allocation. This is useful for memory aliasing.">D3D12MA::Allocator::CreateAliasingResource</a> with appropriate value of <code>AllocationLocalOffset</code> parameter.</li>
|
<li>You can create more complex layout where different textures and buffers are bound at different offsets inside one large allocation. For example, one can imagine a big texture used in some render passes, aliasing with a set of many small buffers used in some further passes. To bind a resource at non-zero offset of an allocation, call <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717" title="Creates a new resource in place of an existing allocation. This is useful for memory aliasing.">D3D12MA::Allocator::CreateAliasingResource</a> with appropriate value of <code>AllocationLocalOffset</code> parameter.</li>
|
||||||
<li>Resources of the three categories: buffers, textures with <code>RENDER_TARGET</code> or <code>DEPTH_STENCIL</code> flags, and all other textures, can be placed in the same memory only when <code>allocator->GetD3D12Options().ResourceHeapTier >= D3D12_RESOURCE_HEAP_TIER_2</code>. Otherwise they must be placed in different memory heap types, and thus aliasing them is not possible. </li>
|
<li>Resources of the three categories: buffers, textures with <code>RENDER_TARGET</code> or <code>DEPTH_STENCIL</code> flags, and all other textures, can be placed in the same memory only when <code>allocator->GetD3D12Options().ResourceHeapTier >= D3D12_RESOURCE_HEAP_TIER_2</code>. Otherwise they must be placed in different memory heap types, and thus aliasing them is not possible. </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
var searchData=
|
var searchData=
|
||||||
[
|
[
|
||||||
['heap_0',['heap',['../class_d3_d12_m_a_1_1_allocation.html#a4e7380aabcac5b0a1cd833c5c84459c6',1,'D3D12MA::Allocation']]],
|
['heap_0',['heap',['../class_d3_d12_m_a_1_1_allocation.html#a4e7380aabcac5b0a1cd833c5c84459c6',1,'D3D12MA::Allocation']]],
|
||||||
['heap_5ftype_5fcount_1',['HEAP_TYPE_COUNT',['../namespace_d3_d12_m_a.html#abad7f40135648f8d0871be36f2919982',1,'D3D12MA']]],
|
['heapflags_1',['HeapFlags',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc',1,'D3D12MA::POOL_DESC']]],
|
||||||
['heapflags_2',['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']]],
|
||||||
['heapproperties_3',['HeapProperties',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a',1,'D3D12MA::POOL_DESC']]],
|
['heaptype_3',['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#a07247152fc70a8ee5605cab0fe220ea5',1,'D3D12MA::TotalStatistics::HeapType()']]]
|
|
||||||
];
|
];
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
var searchData=
|
var searchData=
|
||||||
[
|
[
|
||||||
['heap_0',['heap',['../class_d3_d12_m_a_1_1_allocation.html#a4e7380aabcac5b0a1cd833c5c84459c6',1,'D3D12MA::Allocation']]],
|
['heap_0',['heap',['../class_d3_d12_m_a_1_1_allocation.html#a4e7380aabcac5b0a1cd833c5c84459c6',1,'D3D12MA::Allocation']]],
|
||||||
['heap_5ftype_5fcount_1',['HEAP_TYPE_COUNT',['../namespace_d3_d12_m_a.html#abad7f40135648f8d0871be36f2919982',1,'D3D12MA']]],
|
['heapflags_1',['HeapFlags',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc',1,'D3D12MA::POOL_DESC']]],
|
||||||
['heapflags_2',['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']]],
|
||||||
['heapproperties_3',['HeapProperties',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a',1,'D3D12MA::POOL_DESC']]],
|
['heaptype_3',['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#a07247152fc70a8ee5605cab0fe220ea5',1,'D3D12MA::TotalStatistics::HeapType()']]]
|
|
||||||
];
|
];
|
||||||
|
@ -83,10 +83,10 @@ Creating virtual block</h1>
|
|||||||
<div class="line"> </div>
|
<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"><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 = <a class="code hl_function" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">CreateVirtualBlock</a>(&blockDesc, &block);</div>
|
<div class="line">HRESULT hr = <a class="code hl_function" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">CreateVirtualBlock</a>(&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:1115</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:1113</div></div>
|
||||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_ab024647ae85ee63e2fa2c1c4beac6d98"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">D3D12MA::CreateVirtualBlock</a></div><div class="ttdeci">D3D12MA_API HRESULT CreateVirtualBlock(const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)</div><div class="ttdoc">Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.</div></div>
|
<div class="ttc" id="anamespace_d3_d12_m_a_html_ab024647ae85ee63e2fa2c1c4beac6d98"><div class="ttname"><a href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98">D3D12MA::CreateVirtualBlock</a></div><div class="ttdeci">D3D12MA_API HRESULT CreateVirtualBlock(const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)</div><div class="ttdoc">Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.</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:1035</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:1033</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:1043</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:1041</div></div>
|
||||||
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_making_virtual_allocations"></a>
|
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_making_virtual_allocations"></a>
|
||||||
Making virtual allocations</h1>
|
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>
|
<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>
|
||||||
@ -111,8 +111,8 @@ 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"> <span class="comment">// Allocation failed - no space for it could be found. Handle this error!</span></div>
|
||||||
<div class="line">}</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="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:1066</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:1064</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:1073</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:1071</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:400</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:400</div></div>
|
||||||
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_deallocation"></a>
|
</div><!-- fragment --><h1><a class="anchor" id="virtual_allocator_deallocation"></a>
|
||||||
Deallocation</h1>
|
Deallocation</h1>
|
||||||
@ -150,7 +150,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"><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">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="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:1078</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:1076</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>
|
</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>
|
<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>
|
<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>
|
||||||
|
@ -476,14 +476,15 @@ public:
|
|||||||
Returns `FALSE` if the memory could potentially contain garbage data.
|
Returns `FALSE` if the memory could potentially contain garbage data.
|
||||||
If it's a render-target or depth-stencil texture, it then needs proper
|
If it's a render-target or depth-stencil texture, it then needs proper
|
||||||
initialization with `ClearRenderTargetView`, `ClearDepthStencilView`, `DiscardResource`,
|
initialization with `ClearRenderTargetView`, `ClearDepthStencilView`, `DiscardResource`,
|
||||||
or a copy operation, as described on page:
|
or a copy operation, as described on page
|
||||||
[ID3D12Device::CreatePlacedResource method - Notes on the required resource initialization](https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-createplacedresource#notes-on-the-required-resource-initialization).
|
"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
|
Please note that rendering a fullscreen triangle or quad to the texture as
|
||||||
a render target is not a proper way of initialization!
|
a render target is not a proper way of initialization!
|
||||||
|
|
||||||
See also articles:
|
See also articles:
|
||||||
["Coming to DirectX 12: More control over memory allocation"](https://devblogs.microsoft.com/directx/coming-to-directx-12-more-control-over-memory-allocation/),
|
|
||||||
["Initializing DX12 Textures After Allocation and Aliasing"](https://asawicki.info/news_1724_initializing_dx12_textures_after_allocation_and_aliasing).
|
- "Coming to DirectX 12: More control over memory allocation" on DirectX Developer Blog
|
||||||
|
- ["Initializing DX12 Textures After Allocation and Aliasing"](https://asawicki.info/news_1724_initializing_dx12_textures_after_allocation_and_aliasing).
|
||||||
*/
|
*/
|
||||||
BOOL WasZeroInitialized() const { return m_PackedData.WasZeroInitialized(); }
|
BOOL WasZeroInitialized() const { return m_PackedData.WasZeroInitialized(); }
|
||||||
|
|
||||||
@ -791,18 +792,20 @@ public:
|
|||||||
const D3D12_FEATURE_DATA_D3D12_OPTIONS& GetD3D12Options() const;
|
const D3D12_FEATURE_DATA_D3D12_OPTIONS& GetD3D12Options() const;
|
||||||
/** \brief Returns true if `D3D12_FEATURE_DATA_ARCHITECTURE1::UMA` was found to be true.
|
/** \brief Returns true if `D3D12_FEATURE_DATA_ARCHITECTURE1::UMA` was found to be true.
|
||||||
|
|
||||||
For more information about how to use it, see articles in Microsoft Docs:
|
For more information about how to use it, see articles in Microsoft Docs articles:
|
||||||
- https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping
|
|
||||||
- https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture
|
- "UMA Optimizations: CPU Accessible Textures and Standard Swizzle"
|
||||||
- https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties
|
- "D3D12_FEATURE_DATA_ARCHITECTURE structure (d3d12.h)"
|
||||||
|
- "ID3D12Device::GetCustomHeapProperties method (d3d12.h)"
|
||||||
*/
|
*/
|
||||||
BOOL IsUMA() const;
|
BOOL IsUMA() const;
|
||||||
/** \brief Returns true if `D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA` was found to be true.
|
/** \brief Returns true if `D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA` was found to be true.
|
||||||
|
|
||||||
For more information about how to use it, see articles in Microsoft Docs:
|
For more information about how to use it, see articles in Microsoft Docs articles:
|
||||||
- https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping
|
|
||||||
- https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture
|
- "UMA Optimizations: CPU Accessible Textures and Standard Swizzle"
|
||||||
- https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties
|
- "D3D12_FEATURE_DATA_ARCHITECTURE structure (d3d12.h)"
|
||||||
|
- "ID3D12Device::GetCustomHeapProperties method (d3d12.h)"
|
||||||
*/
|
*/
|
||||||
BOOL IsCacheCoherentUMA() const;
|
BOOL IsCacheCoherentUMA() const;
|
||||||
/** \brief Returns total amount of memory of specific segment group, in bytes.
|
/** \brief Returns total amount of memory of specific segment group, in bytes.
|
||||||
@ -1326,7 +1329,7 @@ manually.
|
|||||||
|
|
||||||
The process of getting regular CPU-side pointer to the memory of a resource in
|
The process of getting regular CPU-side pointer to the memory of a resource in
|
||||||
Direct3D is called "mapping". There are rules and restrictions to this process,
|
Direct3D is called "mapping". There are rules and restrictions to this process,
|
||||||
as described in D3D12 documentation of [ID3D12Resource::Map method](https://docs.microsoft.com/en-us/windows/desktop/api/d3d12/nf-d3d12-id3d12resource-map).
|
as described in D3D12 documentation of ID3D12Resource::Map method.
|
||||||
|
|
||||||
Mapping happens on the level of particular resources, not entire memory heaps,
|
Mapping happens on the level of particular resources, not entire memory heaps,
|
||||||
and so it is out of scope of this library. Just as the linked documentation says:
|
and so it is out of scope of this library. Just as the linked documentation says:
|
||||||
@ -1624,7 +1627,7 @@ Additional considerations:
|
|||||||
|
|
||||||
- D3D12 also allows to interpret contents of memory between aliasing resources consistently in some cases,
|
- D3D12 also allows to interpret contents of memory between aliasing resources consistently in some cases,
|
||||||
which is called "data inheritance". For details, see
|
which is called "data inheritance". For details, see
|
||||||
Microsoft documentation, chapter [Memory Aliasing and Data Inheritance](https://docs.microsoft.com/en-us/windows/win32/direct3d12/memory-aliasing-and-data-inheritance).
|
Microsoft documentation chapter "Memory Aliasing and Data Inheritance".
|
||||||
- You can create more complex layout where different textures and buffers are bound
|
- You can create more complex layout where different textures and buffers are bound
|
||||||
at different offsets inside one large allocation. For example, one can imagine
|
at different offsets inside one large allocation. For example, one can imagine
|
||||||
a big texture used in some render passes, aliasing with a set of many small buffers
|
a big texture used in some render passes, aliasing with a set of many small buffers
|
||||||
|
Loading…
Reference in New Issue
Block a user