mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-21 11:50:03 +00:00
Added POOL_DESC::Priority
This commit is contained in:
parent
48c7f78f45
commit
ad4dbc18fd
@ -108,15 +108,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:1067</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:1102</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: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:192</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:190</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:1028</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:1048</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:1054</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:1036</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:200</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:204</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:202</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:1063</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:1083</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:1089</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:1071</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>
|
||||
|
@ -134,19 +134,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:490</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:502</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:769</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:781</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:649</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:671</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:673</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:707</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:715</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:723</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:747</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:725</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:661</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:683</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:685</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:719</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:727</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:735</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:759</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:737</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>
|
||||
|
@ -206,6 +206,7 @@ $(function() {
|
||||
<li>pProtectedSession : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4">D3D12MA::POOL_DESC</a></li>
|
||||
<li>PreferredBlockSize : <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a97149c9559deae943c2cfa49aeeff8a6">D3D12MA::ALLOCATOR_DESC</a></li>
|
||||
<li>prev : <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#adc3ac89758a915a409e047f9b89aa160">D3D12MA::Allocation</a></li>
|
||||
<li>Priority : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3fd42e9d726c0a9fd846b4c3b73cc488">D3D12MA::POOL_DESC</a></li>
|
||||
<li>pSrcAllocation : <a class="el" href="struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7">D3D12MA::DEFRAGMENTATION_MOVE</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -160,6 +160,7 @@ $(function() {
|
||||
<li>pProtectedSession : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4">D3D12MA::POOL_DESC</a></li>
|
||||
<li>PreferredBlockSize : <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a97149c9559deae943c2cfa49aeeff8a6">D3D12MA::ALLOCATOR_DESC</a></li>
|
||||
<li>prev : <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#adc3ac89758a915a409e047f9b89aa160">D3D12MA::Allocation</a></li>
|
||||
<li>Priority : <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3fd42e9d726c0a9fd846b4c3b73cc488">D3D12MA::POOL_DESC</a></li>
|
||||
<li>pSrcAllocation : <a class="el" href="struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7">D3D12MA::DEFRAGMENTATION_MOVE</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -97,11 +97,11 @@ Project setup and initialization</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:1067</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:1102</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:1028</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:1054</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:1036</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:1063</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:1089</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:1071</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>
|
||||
@ -136,10 +136,10 @@ 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:461</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:473</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:278</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:287</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:290</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:299</div></div>
|
||||
</div><!-- fragment --><p >You need to release the allocation object when no longer needed. This will also release the D3D12 resource.</p>
|
||||
<div class="fragment"><div class="line">allocation->Release();</div>
|
||||
</div><!-- fragment --><p >The advantage of using the allocator instead of creating committed resource, and the main purpose of this library, is that it can decide to allocate bigger memory heap internally using <code>ID3D12Device::CreateHeap</code> and place multiple resources in it, at different offsets, using <code>ID3D12Device::CreatePlacedResource</code>. The library manages its own collection of allocated memory blocks (heaps) and remembers which parts of them are occupied and which parts are free to be used for new resources.</p>
|
||||
|
@ -151,11 +151,11 @@ $(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:461</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:473</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:278</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:303</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:287</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:290</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:315</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:299</div></div>
|
||||
</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>
|
||||
<ul>
|
||||
|
@ -18,5 +18,6 @@ var searchData=
|
||||
['pprotectedsession_15',['pProtectedSession',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4',1,'D3D12MA::POOL_DESC']]],
|
||||
['preferredblocksize_16',['PreferredBlockSize',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a97149c9559deae943c2cfa49aeeff8a6',1,'D3D12MA::ALLOCATOR_DESC']]],
|
||||
['prev_17',['prev',['../class_d3_d12_m_a_1_1_allocation.html#adc3ac89758a915a409e047f9b89aa160',1,'D3D12MA::Allocation']]],
|
||||
['psrcallocation_18',['pSrcAllocation',['../struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7',1,'D3D12MA::DEFRAGMENTATION_MOVE']]]
|
||||
['priority_18',['Priority',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3fd42e9d726c0a9fd846b4c3b73cc488',1,'D3D12MA::POOL_DESC']]],
|
||||
['psrcallocation_19',['pSrcAllocation',['../struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7',1,'D3D12MA::DEFRAGMENTATION_MOVE']]]
|
||||
];
|
||||
|
@ -11,5 +11,6 @@ var searchData=
|
||||
['pprotectedsession_8',['pProtectedSession',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4',1,'D3D12MA::POOL_DESC']]],
|
||||
['preferredblocksize_9',['PreferredBlockSize',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a97149c9559deae943c2cfa49aeeff8a6',1,'D3D12MA::ALLOCATOR_DESC']]],
|
||||
['prev_10',['prev',['../class_d3_d12_m_a_1_1_allocation.html#adc3ac89758a915a409e047f9b89aa160',1,'D3D12MA::Allocation']]],
|
||||
['psrcallocation_11',['pSrcAllocation',['../struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7',1,'D3D12MA::DEFRAGMENTATION_MOVE']]]
|
||||
['priority_11',['Priority',['../struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3fd42e9d726c0a9fd846b4c3b73cc488',1,'D3D12MA::POOL_DESC']]],
|
||||
['psrcallocation_12',['pSrcAllocation',['../struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html#a4946b874c958a71c21fac25b515cf5f7',1,'D3D12MA::DEFRAGMENTATION_MOVE']]]
|
||||
];
|
||||
|
@ -92,9 +92,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:412</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:435</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:424</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:424</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:447</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:436</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>
|
||||
|
@ -87,6 +87,7 @@ $(function() {
|
||||
<tr class="odd"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a0a6283eeb1f3f99d8c4ae264aec7f749">MinAllocationAlignment</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">D3D12MA::POOL_DESC</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a6f10db3911a3bea1becfc9a0dfa5bac8">MinBlockCount</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">D3D12MA::POOL_DESC</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4">pProtectedSession</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">D3D12MA::POOL_DESC</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3fd42e9d726c0a9fd846b4c3b73cc488">Priority</a></td><td class="entry"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">D3D12MA::POOL_DESC</a></td><td class="entry"></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
|
@ -111,6 +111,9 @@ Public Attributes</h2></td></tr>
|
||||
<tr class="memitem:a475840ec05c19732c8d5aa8bb27270f4"><td class="memItemLeft" align="right" valign="top">ID3D12ProtectedResourceSession * </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4">pProtectedSession</a></td></tr>
|
||||
<tr class="memdesc:a475840ec05c19732c8d5aa8bb27270f4"><td class="mdescLeft"> </td><td class="mdescRight">Additional parameter allowing pool to create resources with passed protected session. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4">More...</a><br /></td></tr>
|
||||
<tr class="separator:a475840ec05c19732c8d5aa8bb27270f4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3fd42e9d726c0a9fd846b4c3b73cc488"><td class="memItemLeft" align="right" valign="top">D3D12_RESIDENCY_PRIORITY </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3fd42e9d726c0a9fd846b4c3b73cc488">Priority</a></td></tr>
|
||||
<tr class="memdesc:a3fd42e9d726c0a9fd846b4c3b73cc488"><td class="mdescLeft"> </td><td class="mdescRight">Residency priority to be set for all allocations made in this pool. Optional. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3fd42e9d726c0a9fd846b4c3b73cc488">More...</a><br /></td></tr>
|
||||
<tr class="separator:a3fd42e9d726c0a9fd846b4c3b73cc488"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_pool.html" title="Custom memory pool.">D3D12MA::Pool</a> object. To be used with <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515" title="Creates custom pool.">D3D12MA::Allocator::CreatePool</a>. </p>
|
||||
@ -250,6 +253,26 @@ Public Attributes</h2></td></tr>
|
||||
<p>Additional parameter allowing pool to create resources with passed protected session. </p>
|
||||
<p >If not null then all the heaps and committed resources will be created with this parameter. Valid only if ID3D12Device4 interface is present in current Windows SDK! </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a3fd42e9d726c0a9fd846b4c3b73cc488" name="a3fd42e9d726c0a9fd846b4c3b73cc488"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3fd42e9d726c0a9fd846b4c3b73cc488">◆ </a></span>Priority</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">D3D12_RESIDENCY_PRIORITY D3D12MA::POOL_DESC::Priority</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Residency priority to be set for all allocations made in this pool. Optional. </p>
|
||||
<p >Set this parameter to one of the possible enum values e.g. <code>D3D12_RESIDENCY_PRIORITY_HIGH</code> to apply specific residency priority to all allocations made in this pool: <code>ID3D12Heap</code> memory blocks used to sub-allocate for placed resources, as well as committed resources or heaps created when <a class="el" href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675">D3D12MA::ALLOCATION_FLAG_COMMITTED</a> is used. This can increase/decrease chance that the memory will be pushed out from VRAM to system RAM when the system runs out of memory, which is invisible to the developer using D3D12 API while it can degrade performance.</p>
|
||||
<p >Priority is set using function <code>ID3D12Device1::SetResidencyPriority</code>. It is performed only when <code>ID3D12Device1</code> interface is defined and successfully obtained. Otherwise, this parameter is ignored.</p>
|
||||
<p >This parameter is optional. If you set it to <code>D3D12_RESIDENCY_PRIORITY(0)</code>, residency priority will not be set for allocations made in this pool.</p>
|
||||
<p >There is no equivalent parameter for allocations made in default pools. If you want to set residency priority for such allocation, you need to do it manually: allocate with <a class="el" href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675">D3D12MA::ALLOCATION_FLAG_COMMITTED</a> and call <code>ID3D12Device1::SetResidencyPriority</code>, passing <code>allocation->GetResource()</code>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
|
@ -90,9 +90,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:1418</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:1324</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:1332</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:1453</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:1359</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:1367</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>
|
||||
@ -117,9 +117,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:1369</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:1376</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:441</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:1404</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:1411</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:453</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>
|
||||
@ -156,7 +156,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:1381</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:1416</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>
|
||||
@ -171,9 +171,9 @@ Statistics</h1>
|
||||
<div class="line">printf(<span class="stringliteral">"My virtual block has %llu bytes used by %u virtual allocations\n"</span>,</div>
|
||||
<div class="line"> stats.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_statistics.html#a53cfe3d241124b5a8e8058871a4b50e8">AllocationBytes</a>, stats.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_statistics.html#aef88ac53531db43a8888ad2be4a06c68">AllocationCount</a>);</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html_a0f1dda0e019e218b021f64987a74b110"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html#a0f1dda0e019e218b021f64987a74b110">D3D12MA::VirtualBlock::GetStatistics</a></div><div class="ttdeci">void GetStatistics(Statistics *pStats) const</div><div class="ttdoc">Retrieves basic statistics of the virtual block that are fast to calculate.</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_statistics_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_statistics.html">D3D12MA::Statistics</a></div><div class="ttdoc">Calculated statistics of memory usage e.g. in a specific memory heap type, memory segment group,...</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:320</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_statistics_html_a53cfe3d241124b5a8e8058871a4b50e8"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_statistics.html#a53cfe3d241124b5a8e8058871a4b50e8">D3D12MA::Statistics::AllocationBytes</a></div><div class="ttdeci">UINT64 AllocationBytes</div><div class="ttdoc">Total number of bytes occupied by all D3D12MA::Allocation objects.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:338</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_statistics_html_aef88ac53531db43a8888ad2be4a06c68"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_statistics.html#aef88ac53531db43a8888ad2be4a06c68">D3D12MA::Statistics::AllocationCount</a></div><div class="ttdeci">UINT AllocationCount</div><div class="ttdoc">Number of D3D12MA::Allocation objects allocated.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:328</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_statistics_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_statistics.html">D3D12MA::Statistics</a></div><div class="ttdoc">Calculated statistics of memory usage e.g. in a specific memory heap type, memory segment group,...</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:332</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_statistics_html_a53cfe3d241124b5a8e8058871a4b50e8"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_statistics.html#a53cfe3d241124b5a8e8058871a4b50e8">D3D12MA::Statistics::AllocationBytes</a></div><div class="ttdeci">UINT64 AllocationBytes</div><div class="ttdoc">Total number of bytes occupied by all D3D12MA::Allocation objects.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:350</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_statistics_html_aef88ac53531db43a8888ad2be4a06c68"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_statistics.html#aef88ac53531db43a8888ad2be4a06c68">D3D12MA::Statistics::AllocationCount</a></div><div class="ttdeci">UINT AllocationCount</div><div class="ttdoc">Number of D3D12MA::Allocation objects allocated.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:340</div></div>
|
||||
</div><!-- fragment --><p >More detailed statistics can be obtained using function <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a614a82247ce6cf29c38895e16eb971d9" title="Retrieves detailed statistics of the virtual block that are slower to calculate.">D3D12MA::VirtualBlock::CalculateStatistics()</a>, but they are slower to calculate.</p>
|
||||
<p >You can also request a full list of allocations and free regions as a string in JSON format by calling <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a828a27070bfa762cae796d4c8f2ef703" title="Builds and returns statistics as a string in JSON format, including the list of allocations with thei...">D3D12MA::VirtualBlock::BuildStatsString</a>. Returned string must be later freed using <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a6f78ddaa7da194e239089e52093e68a9" title="Frees memory of a string returned from VirtualBlock::BuildStatsString.">D3D12MA::VirtualBlock::FreeStatsString</a>. The format of this string may differ from the one returned by the main D3D12 allocator, but it is similar.</p>
|
||||
<h1><a class="anchor" id="virtual_allocator_additional_considerations"></a>
|
||||
|
@ -133,6 +133,18 @@ If providing your own implementation, you need to implement a subset of std::ato
|
||||
// Forward declaration if ID3D12ProtectedResourceSession is not defined inside the headers (older SDK, pre ID3D12Device4)
|
||||
struct ID3D12ProtectedResourceSession;
|
||||
|
||||
// Define this enum even if SDK doesn't provide it, to simplify the API.
|
||||
#ifndef __ID3D12Device1_INTERFACE_DEFINED__
|
||||
typedef enum D3D12_RESIDENCY_PRIORITY
|
||||
{
|
||||
D3D12_RESIDENCY_PRIORITY_MINIMUM = 0x28000000,
|
||||
D3D12_RESIDENCY_PRIORITY_LOW = 0x50000000,
|
||||
D3D12_RESIDENCY_PRIORITY_NORMAL = 0x78000000,
|
||||
D3D12_RESIDENCY_PRIORITY_HIGH = 0xa0010000,
|
||||
D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000
|
||||
} D3D12_RESIDENCY_PRIORITY;
|
||||
#endif
|
||||
|
||||
namespace D3D12MA
|
||||
{
|
||||
class D3D12MA_API IUnknownImpl : public IUnknown
|
||||
@ -899,6 +911,29 @@ struct POOL_DESC
|
||||
Valid only if ID3D12Device4 interface is present in current Windows SDK!
|
||||
*/
|
||||
ID3D12ProtectedResourceSession* pProtectedSession;
|
||||
/** \brief Residency priority to be set for all allocations made in this pool. Optional.
|
||||
|
||||
Set this parameter to one of the possible enum values e.g. `D3D12_RESIDENCY_PRIORITY_HIGH`
|
||||
to apply specific residency priority to all allocations made in this pool:
|
||||
`ID3D12Heap` memory blocks used to sub-allocate for placed resources, as well as
|
||||
committed resources or heaps created when D3D12MA::ALLOCATION_FLAG_COMMITTED is used.
|
||||
This can increase/decrease chance that the memory will be pushed out from VRAM
|
||||
to system RAM when the system runs out of memory, which is invisible to the developer
|
||||
using D3D12 API while it can degrade performance.
|
||||
|
||||
Priority is set using function `ID3D12Device1::SetResidencyPriority`.
|
||||
It is performed only when `ID3D12Device1` interface is defined and successfully obtained.
|
||||
Otherwise, this parameter is ignored.
|
||||
|
||||
This parameter is optional. If you set it to `D3D12_RESIDENCY_PRIORITY(0)`,
|
||||
residency priority will not be set for allocations made in this pool.
|
||||
|
||||
There is no equivalent parameter for allocations made in default pools.
|
||||
If you want to set residency priority for such allocation, you need to do it manually:
|
||||
allocate with D3D12MA::ALLOCATION_FLAG_COMMITTED and call
|
||||
`ID3D12Device1::SetResidencyPriority`, passing `allocation->GetResource()`.
|
||||
*/
|
||||
D3D12_RESIDENCY_PRIORITY Priority;
|
||||
};
|
||||
|
||||
/** \brief Custom memory pool
|
||||
|
@ -148,6 +148,8 @@ static const WCHAR* const HeapTypeNames[] =
|
||||
static const D3D12_HEAP_FLAGS RESOURCE_CLASS_HEAP_FLAGS =
|
||||
D3D12_HEAP_FLAG_DENY_BUFFERS | D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES | D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES;
|
||||
|
||||
static const D3D12_RESIDENCY_PRIORITY D3D12_RESIDENCY_PRIORITY_NONE = D3D12_RESIDENCY_PRIORITY(0);
|
||||
|
||||
#ifndef _D3D12MA_ENUM_DECLARATIONS
|
||||
|
||||
// Local copy of this enum, as it is provided only by <dxgi1_4.h>, so it may not be available.
|
||||
@ -6000,6 +6002,7 @@ struct CommittedAllocationParameters
|
||||
D3D12_HEAP_FLAGS m_HeapFlags = D3D12_HEAP_FLAG_NONE;
|
||||
ID3D12ProtectedResourceSession* m_ProtectedSession = NULL;
|
||||
bool m_CanAlias = false;
|
||||
D3D12_RESIDENCY_PRIORITY m_ResidencyPriority = D3D12_RESIDENCY_PRIORITY_NONE;
|
||||
|
||||
bool IsValid() const { return m_List != NULL; }
|
||||
};
|
||||
@ -6028,8 +6031,10 @@ public:
|
||||
UINT64 minAllocationAlignment,
|
||||
UINT32 algorithm,
|
||||
bool denyMsaaTextures,
|
||||
ID3D12ProtectedResourceSession* pProtectedSession);
|
||||
ID3D12ProtectedResourceSession* pProtectedSession,
|
||||
D3D12_RESIDENCY_PRIORITY priority);
|
||||
~BlockVector();
|
||||
D3D12_RESIDENCY_PRIORITY GetResidencyPriority() const { return m_ResidencyPriority; }
|
||||
|
||||
const D3D12_HEAP_PROPERTIES& GetHeapProperties() const { return m_HeapProps; }
|
||||
D3D12_HEAP_FLAGS GetHeapFlags() const { return m_HeapFlags; }
|
||||
@ -6095,6 +6100,7 @@ private:
|
||||
const UINT32 m_Algorithm;
|
||||
const bool m_DenyMsaaTextures;
|
||||
ID3D12ProtectedResourceSession* const m_ProtectedSession;
|
||||
const D3D12_RESIDENCY_PRIORITY m_ResidencyPriority;
|
||||
/* There can be at most one allocation that is completely empty - a
|
||||
hysteresis to avoid pessimistic case of alternating creation and destruction
|
||||
of a ID3D12Heap. */
|
||||
@ -6417,6 +6423,9 @@ public:
|
||||
~AllocatorPimpl();
|
||||
|
||||
ID3D12Device* GetDevice() const { return m_Device; }
|
||||
#ifdef __ID3D12Device1_INTERFACE_DEFINED__
|
||||
ID3D12Device1* GetDevice1() const { return m_Device1; }
|
||||
#endif
|
||||
#ifdef __ID3D12Device4_INTERFACE_DEFINED__
|
||||
ID3D12Device4* GetDevice4() const { return m_Device4; }
|
||||
#endif
|
||||
@ -6501,6 +6510,8 @@ public:
|
||||
// Allocation object must be deleted externally afterwards.
|
||||
void FreeHeapMemory(Allocation* allocation);
|
||||
|
||||
void SetResidencyPriority(ID3D12Pageable* obj, D3D12_RESIDENCY_PRIORITY priority) const;
|
||||
|
||||
void SetCurrentFrameIndex(UINT frameIndex);
|
||||
// For more deailed stats use outCutomHeaps to access statistics divided into L0 and L1 group
|
||||
void CalculateStatistics(TotalStatistics& outStats, DetailedStatistics outCutomHeaps[2] = NULL);
|
||||
@ -6518,6 +6529,9 @@ private:
|
||||
const bool m_AlwaysCommitted;
|
||||
const bool m_MsaaAlwaysCommitted;
|
||||
ID3D12Device* m_Device; // AddRef
|
||||
#ifdef __ID3D12Device1_INTERFACE_DEFINED__
|
||||
ID3D12Device1* m_Device1 = NULL; // AddRef, optional
|
||||
#endif
|
||||
#ifdef __ID3D12Device4_INTERFACE_DEFINED__
|
||||
ID3D12Device4* m_Device4 = NULL; // AddRef, optional
|
||||
#endif
|
||||
@ -6643,6 +6657,10 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
|
||||
desc.pAdapter->QueryInterface(D3D12MA_IID_PPV_ARGS(&m_Adapter3));
|
||||
#endif
|
||||
|
||||
#ifdef __ID3D12Device1_INTERFACE_DEFINED__
|
||||
m_Device->QueryInterface(D3D12MA_IID_PPV_ARGS(&m_Device1));
|
||||
#endif
|
||||
|
||||
#ifdef __ID3D12Device4_INTERFACE_DEFINED__
|
||||
m_Device->QueryInterface(D3D12MA_IID_PPV_ARGS(&m_Device4));
|
||||
#endif
|
||||
@ -6704,7 +6722,8 @@ HRESULT AllocatorPimpl::Init(const ALLOCATOR_DESC& desc)
|
||||
D3D12MA_DEBUG_ALIGNMENT, // minAllocationAlignment
|
||||
0, // Default algorithm,
|
||||
m_MsaaAlwaysCommitted,
|
||||
NULL); // pProtectedSession
|
||||
NULL, // pProtectedSession
|
||||
D3D12_RESIDENCY_PRIORITY_NONE); // priority
|
||||
// No need to call m_pBlockVectors[i]->CreateMinBlocks here, becase minBlockCount is 0.
|
||||
}
|
||||
|
||||
@ -6723,6 +6742,9 @@ AllocatorPimpl::~AllocatorPimpl()
|
||||
#ifdef __ID3D12Device4_INTERFACE_DEFINED__
|
||||
SAFE_RELEASE(m_Device4);
|
||||
#endif
|
||||
#ifdef __ID3D12Device1_INTERFACE_DEFINED__
|
||||
SAFE_RELEASE(m_Device1);
|
||||
#endif
|
||||
#if D3D12MA_DXGI_1_4
|
||||
SAFE_RELEASE(m_Adapter3);
|
||||
#endif
|
||||
@ -7042,6 +7064,17 @@ void AllocatorPimpl::FreeHeapMemory(Allocation* allocation)
|
||||
m_Budget.RemoveBlock(memSegmentGroup, allocSize);
|
||||
}
|
||||
|
||||
void AllocatorPimpl::SetResidencyPriority(ID3D12Pageable* obj, D3D12_RESIDENCY_PRIORITY priority) const
|
||||
{
|
||||
#ifdef __ID3D12Device1_INTERFACE_DEFINED__
|
||||
if (priority != D3D12_RESIDENCY_PRIORITY_NONE && m_Device1)
|
||||
{
|
||||
// Intentionally ignoring the result.
|
||||
m_Device1->SetResidencyPriority(1, &obj, &priority);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AllocatorPimpl::SetCurrentFrameIndex(UINT frameIndex)
|
||||
{
|
||||
m_CurrentFrameIndex.store(frameIndex);
|
||||
@ -7642,6 +7675,8 @@ HRESULT AllocatorPimpl::AllocateCommittedResource(
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
SetResidencyPriority(res, committedAllocParams.m_ResidencyPriority);
|
||||
|
||||
if (ppvResource != NULL)
|
||||
{
|
||||
hr = res->QueryInterface(riidResource, ppvResource);
|
||||
@ -7794,6 +7829,8 @@ HRESULT AllocatorPimpl::AllocateHeap(
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
SetResidencyPriority(heap, committedAllocParams.m_ResidencyPriority);
|
||||
|
||||
const BOOL wasZeroInitialized = TRUE;
|
||||
(*ppAllocation) = m_AllocationObjectAllocator.Allocate(this, allocInfo.SizeInBytes, allocInfo.Alignment, wasZeroInitialized);
|
||||
(*ppAllocation)->InitHeap(committedAllocParams.m_List, heap);
|
||||
@ -7829,6 +7866,7 @@ HRESULT AllocatorPimpl::CalcAllocationParams(const ALLOCATION_DESC& allocDesc, U
|
||||
outCommittedAllocationParams.m_HeapProperties = desc.HeapProperties;
|
||||
outCommittedAllocationParams.m_HeapFlags = desc.HeapFlags;
|
||||
outCommittedAllocationParams.m_List = pool->GetCommittedAllocationList();
|
||||
outCommittedAllocationParams.m_ResidencyPriority = pool->GetDesc().Priority;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -7841,6 +7879,7 @@ HRESULT AllocatorPimpl::CalcAllocationParams(const ALLOCATION_DESC& allocDesc, U
|
||||
outCommittedAllocationParams.m_HeapProperties = StandardHeapTypeToHeapProperties(allocDesc.HeapType);
|
||||
outCommittedAllocationParams.m_HeapFlags = allocDesc.ExtraHeapFlags;
|
||||
outCommittedAllocationParams.m_List = &m_CommittedAllocations[HeapTypeToIndex(allocDesc.HeapType)];
|
||||
// outCommittedAllocationParams.m_ResidencyPriority intentionally left with default value.
|
||||
|
||||
const ResourceClass resourceClass = (resDesc != NULL) ?
|
||||
ResourceDescToResourceClass(*resDesc) : HeapFlagsToResourceClass(allocDesc.ExtraHeapFlags);
|
||||
@ -8072,6 +8111,7 @@ void AllocatorPimpl::WriteBudgetToJson(JsonWriter& json, const Budget& budget)
|
||||
}
|
||||
json.EndObject();
|
||||
}
|
||||
|
||||
#endif // _D3D12MA_ALLOCATOR_PIMPL
|
||||
#endif // _D3D12MA_ALLOCATOR_PIMPL
|
||||
|
||||
@ -8322,7 +8362,8 @@ BlockVector::BlockVector(
|
||||
UINT64 minAllocationAlignment,
|
||||
UINT32 algorithm,
|
||||
bool denyMsaaTextures,
|
||||
ID3D12ProtectedResourceSession* pProtectedSession)
|
||||
ID3D12ProtectedResourceSession* pProtectedSession,
|
||||
D3D12_RESIDENCY_PRIORITY priority)
|
||||
: m_hAllocator(hAllocator),
|
||||
m_HeapProps(heapProps),
|
||||
m_HeapFlags(heapFlags),
|
||||
@ -8334,6 +8375,7 @@ BlockVector::BlockVector(
|
||||
m_Algorithm(algorithm),
|
||||
m_DenyMsaaTextures(denyMsaaTextures),
|
||||
m_ProtectedSession(pProtectedSession),
|
||||
m_ResidencyPriority(priority),
|
||||
m_HasEmptyBlock(false),
|
||||
m_Blocks(hAllocator->GetAllocs()),
|
||||
m_NextBlockId(0) {}
|
||||
@ -8869,6 +8911,8 @@ HRESULT BlockVector::CreateBlock(
|
||||
return hr;
|
||||
}
|
||||
|
||||
m_hAllocator->SetResidencyPriority(pBlock->GetHeap(), m_ResidencyPriority);
|
||||
|
||||
m_Blocks.push_back(pBlock);
|
||||
if (pNewBlockIndex != NULL)
|
||||
{
|
||||
@ -9531,7 +9575,8 @@ PoolPimpl::PoolPimpl(AllocatorPimpl* allocator, const POOL_DESC& desc)
|
||||
D3D12MA_MAX(desc.MinAllocationAlignment, (UINT64)D3D12MA_DEBUG_ALIGNMENT),
|
||||
(desc.Flags & POOL_FLAG_ALGORITHM_MASK) != 0,
|
||||
(desc.Flags & POOL_FLAG_MSAA_TEXTURES_ALWAYS_COMMITTED) != 0,
|
||||
desc.pProtectedSession);
|
||||
desc.pProtectedSession,
|
||||
desc.Priority);
|
||||
}
|
||||
|
||||
PoolPimpl::~PoolPimpl()
|
||||
|
@ -2324,7 +2324,8 @@ INCLUDE_FILE_PATTERNS =
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED = __ID3D12Device4_INTERFACE_DEFINED__ \
|
||||
PREDEFINED = __ID3D12Device1_INTERFACE_DEFINED__ \
|
||||
__ID3D12Device4_INTERFACE_DEFINED__ \
|
||||
__ID3D12Device8_INTERFACE_DEFINED__ \
|
||||
protected=private
|
||||
|
||||
|
@ -906,6 +906,7 @@ static void TestCustomPools(const TestContext& ctx)
|
||||
poolDesc.BlockSize = 11 * MEGABYTE;
|
||||
poolDesc.MinBlockCount = 1;
|
||||
poolDesc.MaxBlockCount = 2;
|
||||
poolDesc.Priority = D3D12_RESIDENCY_PRIORITY_HIGH; // Test some residency priority, by the way.
|
||||
|
||||
ComPtr<D3D12MA::Pool> pool;
|
||||
CHECK_HR( ctx.allocator->CreatePool(&poolDesc, &pool) );
|
||||
|
Loading…
Reference in New Issue
Block a user