blob: dc2b56654f1a816c74c9a36accd082b7120243b9 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Direct3D 12 Memory Allocator: D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Direct3D 12 Memory Allocator
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a></li><li class="navelem"><a class="el" href="struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html">DEFRAGMENTATION_PASS_MOVE_INFO</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<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-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO Struct Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Parameters for incremental defragmentation steps.
<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#details">More...</a></p>
<p><code>#include &lt;D3D12MemAlloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a8df22d990c318d82fe9fcc5f04132c04"><td class="memItemLeft" align="right" valign="top">UINT32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html#a8df22d990c318d82fe9fcc5f04132c04">MoveCount</a></td></tr>
<tr class="memdesc:a8df22d990c318d82fe9fcc5f04132c04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of elements in the <code>pMoves</code> array. <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">More...</a><br /></td></tr>
<tr class="separator:a8df22d990c318d82fe9fcc5f04132c04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a719fbdaae54251759605c41baeb24dc4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html">DEFRAGMENTATION_MOVE</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___p_a_s_s___m_o_v_e___i_n_f_o.html#a719fbdaae54251759605c41baeb24dc4">pMoves</a></td></tr>
<tr class="memdesc:a719fbdaae54251759605c41baeb24dc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Array of moves to be performed by the user in the current defragmentation pass. <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">More...</a><br /></td></tr>
<tr class="separator:a719fbdaae54251759605c41baeb24dc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Parameters for incremental defragmentation steps. </p>
<p >To be used with function <a class="el" href="class_d3_d12_m_a_1_1_defragmentation_context.html#a1606c015d02edc094bb246986159d592" title="Starts single defragmentation pass.">DefragmentationContext::BeginPass()</a>. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a8df22d990c318d82fe9fcc5f04132c04" name="a8df22d990c318d82fe9fcc5f04132c04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8df22d990c318d82fe9fcc5f04132c04">&#9670;&nbsp;</a></span>MoveCount</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT32 D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO::MoveCount</td>
</tr>
</table>
</div><div class="memdoc">
<p>Number of elements in the <code>pMoves</code> array. </p>
</div>
</div>
<a id="a719fbdaae54251759605c41baeb24dc4" name="a719fbdaae54251759605c41baeb24dc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a719fbdaae54251759605c41baeb24dc4">&#9670;&nbsp;</a></span>pMoves</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="struct_d3_d12_m_a_1_1_d_e_f_r_a_g_m_e_n_t_a_t_i_o_n___m_o_v_e.html">DEFRAGMENTATION_MOVE</a>* D3D12MA::DEFRAGMENTATION_PASS_MOVE_INFO::pMoves</td>
</tr>
</table>
</div><div class="memdoc">
<p>Array of moves to be performed by the user in the current defragmentation pass. </p>
<p >Pointer to an array of <code>MoveCount</code> elements, owned by D3D12MA, created in <a class="el" href="class_d3_d12_m_a_1_1_defragmentation_context.html#a1606c015d02edc094bb246986159d592" title="Starts single defragmentation pass.">DefragmentationContext::BeginPass()</a>, destroyed in <a class="el" href="class_d3_d12_m_a_1_1_defragmentation_context.html#aad502ba70d6dadaeee37703fd8bf90ae" title="Ends single defragmentation pass.">DefragmentationContext::EndPass()</a>.</p>
<p >For each element, you should:</p>
<ol type="1">
<li>Create a new resource in the place pointed by <code>pMoves[i].pDstTmpAllocation-&gt;GetHeap()</code> + <code>pMoves[i].pDstTmpAllocation-&gt;GetOffset()</code>.</li>
<li>Store new resource in <code>pMoves[i].pDstTmpAllocation</code> by using <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a414a088c22bae0f29b1038f5f9346d14" title="Releases the resource currently pointed by the allocation (if any), sets it to new one,...">Allocation::SetResource()</a>. It will later replace old resource from <code>pMoves[i].pSrcAllocation</code>.</li>
<li>Copy data from the <code>pMoves[i].pSrcAllocation</code> e.g. using <code>D3D12GraphicsCommandList::CopyResource</code>.</li>
<li>Make sure these commands finished executing on the GPU.</li>
</ol>
<p >Only then you can finish defragmentation pass by calling <a class="el" href="class_d3_d12_m_a_1_1_defragmentation_context.html#aad502ba70d6dadaeee37703fd8bf90ae" title="Ends single defragmentation pass.">DefragmentationContext::EndPass()</a>. After this call, the allocation will point to the new place in memory.</p>
<p >Alternatively, if you cannot move specific allocation, you can set <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#a5ba8d6894267ae59df4efb9972af5d81" title="Operation to be performed on the allocation by DefragmentationContext::EndPass(). Default value is DE...">DEFRAGMENTATION_MOVE::Operation</a> to <a class="el" href="namespace_d3_d12_m_a.html#a82bb787a69699a877b4166789a30e602abefe270a1803998dda3f8e01ec3a4ad6" title="Set this value if you cannot move the allocation. New place reserved at pDstTmpAllocation will be fre...">D3D12MA::DEFRAGMENTATION_MOVE_OPERATION_IGNORE</a>.</p>
<p >Alternatively, if you decide you want to completely remove the allocation, set <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#a5ba8d6894267ae59df4efb9972af5d81" title="Operation to be performed on the allocation by DefragmentationContext::EndPass(). Default value is DE...">DEFRAGMENTATION_MOVE::Operation</a> to <a class="el" href="namespace_d3_d12_m_a.html#a82bb787a69699a877b4166789a30e602aa2143507d723de458c2ed94e143ac242" title="Set this value if you decide to abandon the allocation and you destroyed the resource....">D3D12MA::DEFRAGMENTATION_MOVE_OPERATION_DESTROY</a>. Then, after <a class="el" href="class_d3_d12_m_a_1_1_defragmentation_context.html#aad502ba70d6dadaeee37703fd8bf90ae" title="Ends single defragmentation pass.">DefragmentationContext::EndPass()</a> the allocation will be released. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/include/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
</small></address>
</body>
</html>