mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-24 21:10:11 +00:00
Improved and rebuilt documentation
This commit is contained in:
parent
8a2224211b
commit
4488fa2a73
@ -5,7 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Direct3D 12 Memory Allocator: D:/PROJECTS/D3D12 Memory Allocator/REPO/src/D3D12MemAlloc.h File Reference</title>
|
||||
<title>Direct3D 12 Memory Allocator: D:/PROJECTS/D3D12 Memory Allocator/REPO/include/D3D12MemAlloc.h File 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>
|
||||
@ -62,7 +62,7 @@ $(function() {
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
@ -98,7 +98,7 @@ Classes</h2></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Custom memory pool. <a href="class_d3_d12_m_a_1_1_pool.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><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">D3D12MA::ALLOCATOR_DESC</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>. <a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#details">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>. <a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_stat_info.html">D3D12MA::StatInfo</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Calculated statistics of memory usage in entire allocator. <a href="struct_d3_d12_m_a_1_1_stat_info.html#details">More...</a><br /></td></tr>
|
||||
@ -113,7 +113,7 @@ Classes</h2></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents main object of this library initialized for particular <code>ID3D12Device</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><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">D3D12MA::VIRTUAL_BLOCK_DESC</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. <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#details">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. <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#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html">D3D12MA::VIRTUAL_ALLOCATION_DESC</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created virtual allocation to be passed to <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#aa57575f1af18461012bde8c4b6f3c56c" title="Creates new allocation.">VirtualBlock::Allocate()</a>. <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#details">More...</a><br /></td></tr>
|
||||
@ -164,12 +164,12 @@ Enumerations</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:aa341b796fdffb16c976e659ccce80332"><td class="memItemLeft" align="right" valign="top">HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">D3D12MA::CreateAllocator</a> (const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)</td></tr>
|
||||
<tr class="memdesc:aa341b796fdffb16c976e659ccce80332"><td class="mdescLeft"> </td><td class="mdescRight">Creates new main <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> object and returns it through <code>ppAllocator</code>. <a href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">More...</a><br /></td></tr>
|
||||
<tr class="separator:aa341b796fdffb16c976e659ccce80332"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aefde6264e7a88bebe8e193df343af317"><td class="memItemLeft" align="right" valign="top">HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317">D3D12MA::CreateVirtualBlock</a> (const VIRTUAL_BLOCK_DESC *pDesc, VirtualBlock **ppVirtualBlock)</td></tr>
|
||||
<tr class="memdesc:aefde6264e7a88bebe8e193df343af317"><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#aefde6264e7a88bebe8e193df343af317">More...</a><br /></td></tr>
|
||||
<tr class="separator:aefde6264e7a88bebe8e193df343af317"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab7a1cd1683986d75ce1488b0920f4cb0"><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#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA::CreateAllocator</a> (const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)</td></tr>
|
||||
<tr class="memdesc:ab7a1cd1683986d75ce1488b0920f4cb0"><td class="mdescLeft"> </td><td class="mdescRight">Creates new main <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> object and returns it through <code>ppAllocator</code>. <a href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab7a1cd1683986d75ce1488b0920f4cb0"><td class="memSeparator" colspan="2"> </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="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>
|
||||
|
@ -72,7 +72,7 @@ $(function() {
|
||||
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" 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" target="_self">ALLOCATION_CALLBACKS</a></td><td class="desc">Custom callbacks to CPU memory allocation functions </td></tr>
|
||||
<tr id="row_0_2_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html" target="_self">ALLOCATION_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocation.html" title="Represents single memory allocation.">D3D12MA::Allocation</a> object. To be used with <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...">Allocator::CreateResource</a> </td></tr>
|
||||
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_d3_d12_m_a_1_1_allocator.html" target="_self">Allocator</a></td><td class="desc">Represents main object of this library initialized for particular <code>ID3D12Device</code> </td></tr>
|
||||
<tr id="row_0_4_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">ALLOCATOR_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> </td></tr>
|
||||
<tr id="row_0_4_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">ALLOCATOR_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> </td></tr>
|
||||
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_budget.html" target="_self">Budget</a></td><td class="desc">Statistics of current memory usage and available budget, in bytes, for GPU or CPU memory </td></tr>
|
||||
<tr id="row_0_6_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_d3_d12_m_a_1_1_pool.html" target="_self">Pool</a></td><td class="desc">Custom memory pool </td></tr>
|
||||
<tr id="row_0_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html" target="_self">POOL_DESC</a></td><td class="desc">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> </td></tr>
|
||||
@ -80,7 +80,7 @@ $(function() {
|
||||
<tr id="row_0_9_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_stats.html" target="_self">Stats</a></td><td class="desc">General statistics from the current state of the allocator </td></tr>
|
||||
<tr id="row_0_10_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html" target="_self">VIRTUAL_ALLOCATION_DESC</a></td><td class="desc">Parameters of created virtual allocation to be passed to <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#aa57575f1af18461012bde8c4b6f3c56c" title="Creates new allocation.">VirtualBlock::Allocate()</a> </td></tr>
|
||||
<tr id="row_0_11_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html" target="_self">VIRTUAL_ALLOCATION_INFO</a></td><td class="desc">Parameters of an existing virtual allocation, returned by <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a287b8f0e455ffc7f302094671f922afb" title="Returns information about an allocation at given offset - its size and custom pointer.">VirtualBlock::GetAllocationInfo()</a> </td></tr>
|
||||
<tr id="row_0_12_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">VIRTUAL_BLOCK_DESC</a></td><td class="desc">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a> </td></tr>
|
||||
<tr id="row_0_12_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">VIRTUAL_BLOCK_DESC</a></td><td class="desc">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a> </td></tr>
|
||||
<tr id="row_0_13_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html" target="_self">VirtualBlock</a></td><td class="desc">Represents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
|
@ -426,7 +426,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -77,7 +77,7 @@ $(function() {
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a29716b3084916abed7793bf2ec4b65db">BuildStatsString</a>(WCHAR **ppStatsString, BOOL DetailedMap) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#addedcd0067319ec566042f5cb520843b">CalculateStats</a>(Stats *pStats)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">CreateAliasingResource</a>(Allocation *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7cc10fd0b328a512165cf636cb795090">CreateAllocator</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459">CreateAllocator</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">CreatePool</a>(const POOL_DESC *pPoolDesc, Pool **ppPool)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">CreateResource</a>(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b">CreateResource1</a>(const ALLOCATION_DESC *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, ID3D12ProtectedResourceSession *pProtectedSession, Allocation **ppAllocation, REFIID riidResource, void **ppvResource)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></td><td class="entry"></td></tr>
|
||||
|
@ -134,7 +134,7 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Represents main object of this library initialized for particular <code>ID3D12Device</code>. </p>
|
||||
<p >Fill structure <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" title="Parameters of created Allocator object. To be used with CreateAllocator().">D3D12MA::ALLOCATOR_DESC</a> and call function <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7cc10fd0b328a512165cf636cb795090" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> to create it. Call method <code>Release()</code> to destroy it.</p>
|
||||
<p >Fill structure <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" title="Parameters of created Allocator object. To be used with CreateAllocator().">D3D12MA::ALLOCATOR_DESC</a> and call function <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> to create it. Call method <code>Release()</code> to destroy it.</p>
|
||||
<p >It is recommended to create just one object of this type per <code>ID3D12Device</code> object, right after Direct3D 12 is initialized and keep it alive until before Direct3D device is destroyed. </p>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="acb8a10a5ea30171ce60128286aec5ee2" name="acb8a10a5ea30171ce60128286aec5ee2"></a>
|
||||
@ -741,7 +741,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -188,7 +188,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -76,7 +76,7 @@ $(function() {
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a828a27070bfa762cae796d4c8f2ef703">BuildStatsString</a>(WCHAR **ppStatsString) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a039ee8426818d0126cf7f44c1c658526">CalculateStats</a>(StatInfo *pInfo) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189">Clear</a>()</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ab8bb16e20c691720aad26ecbf105aa6f">CreateVirtualBlock</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74">CreateVirtualBlock</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a968f13f23d03e50cc50b87835b6d5a85">D3D12MA_DELETE</a></td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a02dfae4c0856f22da885a332de7821fa">FreeAllocation</a>(UINT64 offset)</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a6f78ddaa7da194e239089e52093e68a9">FreeStatsString</a>(WCHAR *pStatsString) const</td><td class="entry"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">D3D12MA::VirtualBlock</a></td><td class="entry"></td></tr>
|
||||
|
@ -117,7 +117,8 @@ Public Member Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Represents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory. </p>
|
||||
<p >This class allows to use the core algorithm of the library custom allocations e.g. CPU memory or sub-allocation regions inside a single GPU buffer.</p>
|
||||
<p >To create this object, fill in <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" title="Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().">D3D12MA::VIRTUAL_BLOCK_DESC</a> and call <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ab8bb16e20c691720aad26ecbf105aa6f" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. To destroy it, call its method <code>VirtualBlock::Release()</code>. You need to free all the allocations within this block or call <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189" title="Frees all the allocations.">Clear()</a> before destroying it. </p>
|
||||
<p >To create this object, fill in <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" title="Parameters of created D3D12MA::VirtualBlock object to be passed to CreateVirtualBlock().">D3D12MA::VIRTUAL_BLOCK_DESC</a> and call <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. To destroy it, call its method <code>VirtualBlock::Release()</code>. You need to free all the allocations within this block or call <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189" title="Frees all the allocations.">Clear()</a> before destroying it.</p>
|
||||
<p >This object is not thread-safe - should not be used from multiple threads simultaneously, must be synchronized externally. </p>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="aa57575f1af18461012bde8c4b6f3c56c" name="aa57575f1af18461012bde8c4b6f3c56c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa57575f1af18461012bde8c4b6f3c56c">◆ </a></span>Allocate()</h2>
|
||||
@ -342,7 +343,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -100,16 +100,16 @@ Custom CPU memory allocator</h1>
|
||||
<div class="line">allocatorDesc.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#a773ecc1945eb47c20e06455c3759e4ef">pAllocationCallbacks</a> = &allocationCallbacks;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_class" href="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a>* allocator;</div>
|
||||
<div class="line">HRESULT hr = <a class="code hl_function" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">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:661</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_aa341b796fdffb16c976e659ccce80332"><div class="ttname"><a href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">D3D12MA::CreateAllocator</a></div><div class="ttdeci">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:166</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:170</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:168</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:542</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:562</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:568</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:550</div></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:670</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:175</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:179</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:177</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:551</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:571</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:577</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:559</div></div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<!-- start footer part -->
|
||||
|
@ -110,7 +110,7 @@ Features and benefits</h1>
|
||||
<div class="line">ID3D12Resource* res;</div>
|
||||
<div class="line">hr = allocator->CreateResource(&allocDesc, &resDesc,</div>
|
||||
<div class="line"> D3D12_RESOURCE_STATE_GENERIC_READ, NULL, &alloc, IID_PPV_ARGS(&res));</div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675"><div class="ttname"><a href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675">D3D12MA::ALLOCATION_FLAG_COMMITTED</a></div><div class="ttdeci">@ ALLOCATION_FLAG_COMMITTED</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:186</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675"><div class="ttname"><a href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675">D3D12MA::ALLOCATION_FLAG_COMMITTED</a></div><div class="ttdeci">@ ALLOCATION_FLAG_COMMITTED</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:195</div></div>
|
||||
</div><!-- fragment --><p >This feature may seem unnecessary, but creating committed allocations from custom pools may be useful in some cases, e.g. to have separate memory usage statistics for some group of resources or to use extended allocation parameters, like custom <code>D3D12_HEAP_PROPERTIES</code>, which are available only in custom pools. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
|
84
docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
Normal file
84
docs/html/dir_d44c64559bbebec7f509842c48db8b23.html
Normal file
@ -0,0 +1,84 @@
|
||||
<!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.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Direct3D 12 Memory Allocator: D:/PROJECTS/D3D12 Memory Allocator/REPO/include Directory 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 style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Direct3D 12 Memory Allocator
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&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&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="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">include Directory Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
@ -67,7 +67,7 @@ $(function() {
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </span><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html" target="_self">src</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </span><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html" target="_self">include</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icondoc"></span><a class="el" href="_d3_d12_mem_alloc_8h.html" target="_self">D3D12MemAlloc.h</a></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
|
@ -91,12 +91,12 @@ $(function() {
|
||||
<li>CalculateStats() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#addedcd0067319ec566042f5cb520843b">D3D12MA::Allocator</a>, <a class="el" href="class_d3_d12_m_a_1_1_pool.html#a8e4cc5fb13aa33398d391296336c457e">D3D12MA::Pool</a>, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a039ee8426818d0126cf7f44c1c658526">D3D12MA::VirtualBlock</a></li>
|
||||
<li>Clear() : <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189">D3D12MA::VirtualBlock</a></li>
|
||||
<li>CreateAliasingResource() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">D3D12MA::Allocator</a></li>
|
||||
<li>CreateAllocator : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7cc10fd0b328a512165cf636cb795090">D3D12MA::Allocator</a></li>
|
||||
<li>CreateAllocator : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459">D3D12MA::Allocator</a></li>
|
||||
<li>CreatePool() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">D3D12MA::Allocator</a></li>
|
||||
<li>CreateResource() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">D3D12MA::Allocator</a></li>
|
||||
<li>CreateResource1() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b">D3D12MA::Allocator</a></li>
|
||||
<li>CreateResource2() : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad9616c8e8e59ede99214b9c7cea97e5a">D3D12MA::Allocator</a></li>
|
||||
<li>CreateVirtualBlock : <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ab8bb16e20c691720aad26ecbf105aa6f">D3D12MA::VirtualBlock</a></li>
|
||||
<li>CreateVirtualBlock : <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74">D3D12MA::VirtualBlock</a></li>
|
||||
<li>CustomPool : <a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934">D3D12MA::ALLOCATION_DESC</a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -63,8 +63,8 @@ $(function() {
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>CreateAllocator : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a7cc10fd0b328a512165cf636cb795090">D3D12MA::Allocator</a></li>
|
||||
<li>CreateVirtualBlock : <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#ab8bb16e20c691720aad26ecbf105aa6f">D3D12MA::VirtualBlock</a></li>
|
||||
<li>CreateAllocator : <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459">D3D12MA::Allocator</a></li>
|
||||
<li>CreateVirtualBlock : <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74">D3D12MA::VirtualBlock</a></li>
|
||||
<li>D3D12MA_DELETE : <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a968f13f23d03e50cc50b87835b6d5a85">D3D12MA::Allocation</a>, <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a968f13f23d03e50cc50b87835b6d5a85">D3D12MA::Allocator</a>, <a class="el" href="class_d3_d12_m_a_1_1_pool.html#a968f13f23d03e50cc50b87835b6d5a85">D3D12MA::Pool</a>, <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a968f13f23d03e50cc50b87835b6d5a85">D3D12MA::VirtualBlock</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
|
@ -75,6 +75,7 @@ Thread safety</h1>
|
||||
<li>The library has no global state, so separate <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> objects can be used independently. In typical applications there should be no need to create multiple such objects though - one per <code>ID3D12Device</code> is enough.</li>
|
||||
<li>All calls to methods of <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> class are safe to be made from multiple threads simultaneously because they are synchronized internally when needed.</li>
|
||||
<li>When the allocator is created with <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916a1b06bb21df006f76a9ed1bc41838bc52">D3D12MA::ALLOCATOR_FLAG_SINGLETHREADED</a>, calls to methods of <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> class must be made from a single thread or synchronized by the user. Using this flag may improve performance.</li>
|
||||
<li><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> is not safe to be used from multiple threads simultaneously.</li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="general_considerations_future_plans"></a>
|
||||
Future plans</h1>
|
||||
|
@ -69,7 +69,7 @@ $(function() {
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" 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" target="_self">D3D12MA::ALLOCATION_CALLBACKS</a></td><td class="desc">Custom callbacks to CPU memory allocation functions </td></tr>
|
||||
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html" target="_self">D3D12MA::ALLOCATION_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocation.html" title="Represents single memory allocation.">D3D12MA::Allocation</a> object. To be used with <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...">Allocator::CreateResource</a> </td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">D3D12MA::ALLOCATOR_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> </td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">D3D12MA::ALLOCATOR_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> </td></tr>
|
||||
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_budget.html" target="_self">D3D12MA::Budget</a></td><td class="desc">Statistics of current memory usage and available budget, in bytes, for GPU or CPU memory </td></tr>
|
||||
<tr id="row_4_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_4_" class="arrow" onclick="toggleFolder('4_')">▼</span><span class="icona"><span class="icon">C</span></span><b>IUnknownImpl</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_4_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_d3_d12_m_a_1_1_allocation.html" target="_self">D3D12MA::Allocation</a></td><td class="desc">Represents single memory allocation </td></tr>
|
||||
@ -81,7 +81,7 @@ $(function() {
|
||||
<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_stats.html" target="_self">D3D12MA::Stats</a></td><td class="desc">General statistics from the current state of the allocator </td></tr>
|
||||
<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html" target="_self">D3D12MA::VIRTUAL_ALLOCATION_DESC</a></td><td class="desc">Parameters of created virtual allocation to be passed to <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#aa57575f1af18461012bde8c4b6f3c56c" title="Creates new allocation.">VirtualBlock::Allocate()</a> </td></tr>
|
||||
<tr id="row_9_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html" target="_self">D3D12MA::VIRTUAL_ALLOCATION_INFO</a></td><td class="desc">Parameters of an existing virtual allocation, returned by <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a287b8f0e455ffc7f302094671f922afb" title="Returns information about an allocation at given offset - its size and custom pointer.">VirtualBlock::GetAllocationInfo()</a> </td></tr>
|
||||
<tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">D3D12MA::VIRTUAL_BLOCK_DESC</a></td><td class="desc">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a> </td></tr>
|
||||
<tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">D3D12MA::VIRTUAL_BLOCK_DESC</a></td><td class="desc">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a> </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
|
@ -87,7 +87,7 @@ Classes</h2></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents main object of this library initialized for particular <code>ID3D12Device</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><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">ALLOCATOR_DESC</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>. <a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#details">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>. <a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_budget.html">Budget</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Statistics of current memory usage and available budget, in bytes, for GPU or CPU memory. <a href="struct_d3_d12_m_a_1_1_budget.html#details">More...</a><br /></td></tr>
|
||||
@ -111,7 +111,7 @@ Classes</h2></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of an existing virtual allocation, returned by <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a287b8f0e455ffc7f302094671f922afb" title="Returns information about an allocation at given offset - its size and custom pointer.">VirtualBlock::GetAllocationInfo()</a>. <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___i_n_f_o.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><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></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. <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#details">More...</a><br /></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. <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#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html">VirtualBlock</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Represents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory. <a href="class_d3_d12_m_a_1_1_virtual_block.html#details">More...</a><br /></td></tr>
|
||||
@ -144,12 +144,12 @@ Enumerations</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:aa341b796fdffb16c976e659ccce80332"><td class="memItemLeft" align="right" valign="top">HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">CreateAllocator</a> (const <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">ALLOCATOR_DESC</a> *pDesc, <a class="el" href="class_d3_d12_m_a_1_1_allocator.html">Allocator</a> **ppAllocator)</td></tr>
|
||||
<tr class="memdesc:aa341b796fdffb16c976e659ccce80332"><td class="mdescLeft"> </td><td class="mdescRight">Creates new main <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> object and returns it through <code>ppAllocator</code>. <a href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">More...</a><br /></td></tr>
|
||||
<tr class="separator:aa341b796fdffb16c976e659ccce80332"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aefde6264e7a88bebe8e193df343af317"><td class="memItemLeft" align="right" valign="top">HRESULT </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317">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:aefde6264e7a88bebe8e193df343af317"><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#aefde6264e7a88bebe8e193df343af317">More...</a><br /></td></tr>
|
||||
<tr class="separator:aefde6264e7a88bebe8e193df343af317"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab7a1cd1683986d75ce1488b0920f4cb0"><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#ab7a1cd1683986d75ce1488b0920f4cb0">CreateAllocator</a> (const <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">ALLOCATOR_DESC</a> *pDesc, <a class="el" href="class_d3_d12_m_a_1_1_allocator.html">Allocator</a> **ppAllocator)</td></tr>
|
||||
<tr class="memdesc:ab7a1cd1683986d75ce1488b0920f4cb0"><td class="mdescLeft"> </td><td class="mdescRight">Creates new main <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> object and returns it through <code>ppAllocator</code>. <a href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab7a1cd1683986d75ce1488b0920f4cb0"><td class="memSeparator" colspan="2"> </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="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>
|
||||
@ -247,14 +247,14 @@ Variables</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="aa341b796fdffb16c976e659ccce80332" name="aa341b796fdffb16c976e659ccce80332"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa341b796fdffb16c976e659ccce80332">◆ </a></span>CreateAllocator()</h2>
|
||||
<a id="ab7a1cd1683986d75ce1488b0920f4cb0" name="ab7a1cd1683986d75ce1488b0920f4cb0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab7a1cd1683986d75ce1488b0920f4cb0">◆ </a></span>CreateAllocator()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">HRESULT D3D12MA::CreateAllocator </td>
|
||||
<td class="memname">D3D12MA_API HRESULT D3D12MA::CreateAllocator </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <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">ALLOCATOR_DESC</a> * </td>
|
||||
<td class="paramname"><em>pDesc</em>, </td>
|
||||
@ -278,14 +278,14 @@ Variables</h2></td></tr>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aefde6264e7a88bebe8e193df343af317" name="aefde6264e7a88bebe8e193df343af317"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aefde6264e7a88bebe8e193df343af317">◆ </a></span>CreateVirtualBlock()</h2>
|
||||
<a id="ab024647ae85ee63e2fa2c1c4beac6d98" name="ab024647ae85ee63e2fa2c1c4beac6d98"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab024647ae85ee63e2fa2c1c4beac6d98">◆ </a></span>CreateVirtualBlock()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">HRESULT D3D12MA::CreateVirtualBlock </td>
|
||||
<td class="memname">D3D12MA_API HRESULT D3D12MA::CreateVirtualBlock </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">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> * </td>
|
||||
<td class="paramname"><em>pDesc</em>, </td>
|
||||
|
@ -73,8 +73,8 @@ $(function() {
|
||||
<li>ALLOCATOR_FLAG_NONE : <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916a2fb30967b492c27823a80b5de3aea26f">D3D12MA</a></li>
|
||||
<li>ALLOCATOR_FLAG_SINGLETHREADED : <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916a1b06bb21df006f76a9ed1bc41838bc52">D3D12MA</a></li>
|
||||
<li>ALLOCATOR_FLAGS : <a class="el" href="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916">D3D12MA</a></li>
|
||||
<li>CreateAllocator() : <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">D3D12MA</a></li>
|
||||
<li>CreateVirtualBlock() : <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317">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>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>
|
||||
</ul>
|
||||
|
@ -63,8 +63,8 @@ $(function() {
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>CreateAllocator() : <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">D3D12MA</a></li>
|
||||
<li>CreateVirtualBlock() : <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317">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>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
|
@ -72,7 +72,7 @@ $(function() {
|
||||
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" 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" target="_self">ALLOCATION_CALLBACKS</a></td><td class="desc">Custom callbacks to CPU memory allocation functions </td></tr>
|
||||
<tr id="row_0_2_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html" target="_self">ALLOCATION_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocation.html" title="Represents single memory allocation.">D3D12MA::Allocation</a> object. To be used with <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...">Allocator::CreateResource</a> </td></tr>
|
||||
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_d3_d12_m_a_1_1_allocator.html" target="_self">Allocator</a></td><td class="desc">Represents main object of this library initialized for particular <code>ID3D12Device</code> </td></tr>
|
||||
<tr id="row_0_4_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">ALLOCATOR_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> </td></tr>
|
||||
<tr id="row_0_4_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">ALLOCATOR_DESC</a></td><td class="desc">Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a> </td></tr>
|
||||
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_budget.html" target="_self">Budget</a></td><td class="desc">Statistics of current memory usage and available budget, in bytes, for GPU or CPU memory </td></tr>
|
||||
<tr id="row_0_6_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_d3_d12_m_a_1_1_pool.html" target="_self">Pool</a></td><td class="desc">Custom memory pool </td></tr>
|
||||
<tr id="row_0_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html" target="_self">POOL_DESC</a></td><td class="desc">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> </td></tr>
|
||||
@ -80,7 +80,7 @@ $(function() {
|
||||
<tr id="row_0_9_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_stats.html" target="_self">Stats</a></td><td class="desc">General statistics from the current state of the allocator </td></tr>
|
||||
<tr id="row_0_10_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___d_e_s_c.html" target="_self">VIRTUAL_ALLOCATION_DESC</a></td><td class="desc">Parameters of created virtual allocation to be passed to <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#aa57575f1af18461012bde8c4b6f3c56c" title="Creates new allocation.">VirtualBlock::Allocate()</a> </td></tr>
|
||||
<tr id="row_0_11_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_d3_d12_m_a_1_1_v_i_r_t_u_a_l___a_l_l_o_c_a_t_i_o_n___i_n_f_o.html" target="_self">VIRTUAL_ALLOCATION_INFO</a></td><td class="desc">Parameters of an existing virtual allocation, returned by <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#a287b8f0e455ffc7f302094671f922afb" title="Returns information about an allocation at given offset - its size and custom pointer.">VirtualBlock::GetAllocationInfo()</a> </td></tr>
|
||||
<tr id="row_0_12_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">VIRTUAL_BLOCK_DESC</a></td><td class="desc">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a> </td></tr>
|
||||
<tr id="row_0_12_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><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" target="_self">VIRTUAL_BLOCK_DESC</a></td><td class="desc">Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a> </td></tr>
|
||||
<tr id="row_0_13_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html" target="_self">VirtualBlock</a></td><td class="desc">Represents pure allocation algorithm and a data structure with allocations in some memory block, without actually allocating any GPU memory </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
|
@ -79,7 +79,7 @@ Project setup and initialization</h1>
|
||||
<p >(3.) Include library header in each CPP file that needs to use the library.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#include "<a class="code" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a>"</span></div>
|
||||
<div class="ttc" id="a_d3_d12_mem_alloc_8h_html"><div class="ttname"><a href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></div></div>
|
||||
</div><!-- fragment --><p >(4.) Right after you created <code>ID3D12Device</code>, fill <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" title="Parameters of created Allocator object. To be used with CreateAllocator().">D3D12MA::ALLOCATOR_DESC</a> structure and call function <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">D3D12MA::CreateAllocator</a> to create the main <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> object.</p>
|
||||
</div><!-- fragment --><p >(4.) Right after you created <code>ID3D12Device</code>, fill <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" title="Parameters of created Allocator object. To be used with CreateAllocator().">D3D12MA::ALLOCATOR_DESC</a> structure and call function <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">D3D12MA::CreateAllocator</a> to create the main <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> object.</p>
|
||||
<p >Please note that all symbols of the library are declared inside <a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a> namespace.</p>
|
||||
<div class="fragment"><div class="line">IDXGIAdapter* adapter = (...)</div>
|
||||
<div class="line">ID3D12Device* device = (...)</div>
|
||||
@ -89,12 +89,12 @@ Project setup and initialization</h1>
|
||||
<div class="line">allocatorDesc.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#abf9a9f87f0ffea52816efd363c5fcd7b">pAdapter</a> = adapter;</div>
|
||||
<div class="line"> </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#aa341b796fdffb16c976e659ccce80332">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:661</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_aa341b796fdffb16c976e659ccce80332"><div class="ttname"><a href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332">D3D12MA::CreateAllocator</a></div><div class="ttdeci">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:542</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:568</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:550</div></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:670</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:551</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:577</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:559</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>
|
||||
@ -128,10 +128,10 @@ Creating resources</h1>
|
||||
<div class="line"> NULL,</div>
|
||||
<div class="line"> &allocation,</div>
|
||||
<div class="line"> IID_PPV_ARGS(&resource));</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:256</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:265</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:207</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:216</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:216</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:225</div></div>
|
||||
</div><!-- fragment --><p >You need to remember both resource and allocation objects and destroy them separately when no longer needed.</p>
|
||||
<div class="fragment"><div class="line">allocation->Release();</div>
|
||||
<div class="line">resource->Release();</div>
|
||||
|
@ -144,11 +144,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:256</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:265</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:207</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:232</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:216</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:216</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:241</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:225</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>
|
||||
|
@ -4,12 +4,12 @@ var searchData=
|
||||
['clear_1',['Clear',['../class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189',1,'D3D12MA::VirtualBlock']]],
|
||||
['configuration_2',['Configuration',['../configuration.html',1,'index']]],
|
||||
['createaliasingresource_3',['CreateAliasingResource',['../class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717',1,'D3D12MA::Allocator']]],
|
||||
['createallocator_4',['CreateAllocator',['../class_d3_d12_m_a_1_1_allocator.html#a7cc10fd0b328a512165cf636cb795090',1,'D3D12MA::Allocator::CreateAllocator()'],['../namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332',1,'D3D12MA::CreateAllocator()']]],
|
||||
['createallocator_4',['CreateAllocator',['../class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459',1,'D3D12MA::Allocator::CreateAllocator()'],['../namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0',1,'D3D12MA::CreateAllocator()']]],
|
||||
['createpool_5',['CreatePool',['../class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515',1,'D3D12MA::Allocator']]],
|
||||
['createresource_6',['CreateResource',['../class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a',1,'D3D12MA::Allocator']]],
|
||||
['createresource1_7',['CreateResource1',['../class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b',1,'D3D12MA::Allocator']]],
|
||||
['createresource2_8',['CreateResource2',['../class_d3_d12_m_a_1_1_allocator.html#ad9616c8e8e59ede99214b9c7cea97e5a',1,'D3D12MA::Allocator']]],
|
||||
['createvirtualblock_9',['CreateVirtualBlock',['../class_d3_d12_m_a_1_1_virtual_block.html#ab8bb16e20c691720aad26ecbf105aa6f',1,'D3D12MA::VirtualBlock::CreateVirtualBlock()'],['../namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317',1,'D3D12MA::CreateVirtualBlock()']]],
|
||||
['createvirtualblock_9',['CreateVirtualBlock',['../class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74',1,'D3D12MA::VirtualBlock::CreateVirtualBlock()'],['../namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98',1,'D3D12MA::CreateVirtualBlock()']]],
|
||||
['custom_20memory_20pools_10',['Custom memory pools',['../custom_pools.html',1,'index']]],
|
||||
['custompool_11',['CustomPool',['../struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934',1,'D3D12MA::ALLOCATION_DESC']]]
|
||||
];
|
||||
|
@ -3,10 +3,10 @@ var searchData=
|
||||
['calculatestats_0',['CalculateStats',['../class_d3_d12_m_a_1_1_pool.html#a8e4cc5fb13aa33398d391296336c457e',1,'D3D12MA::Pool::CalculateStats()'],['../class_d3_d12_m_a_1_1_allocator.html#addedcd0067319ec566042f5cb520843b',1,'D3D12MA::Allocator::CalculateStats()'],['../class_d3_d12_m_a_1_1_virtual_block.html#a039ee8426818d0126cf7f44c1c658526',1,'D3D12MA::VirtualBlock::CalculateStats(StatInfo *pInfo) const']]],
|
||||
['clear_1',['Clear',['../class_d3_d12_m_a_1_1_virtual_block.html#ae22b18c0b7c31b44c1d740f886369189',1,'D3D12MA::VirtualBlock']]],
|
||||
['createaliasingresource_2',['CreateAliasingResource',['../class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717',1,'D3D12MA::Allocator']]],
|
||||
['createallocator_3',['CreateAllocator',['../namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332',1,'D3D12MA']]],
|
||||
['createallocator_3',['CreateAllocator',['../namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0',1,'D3D12MA']]],
|
||||
['createpool_4',['CreatePool',['../class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515',1,'D3D12MA::Allocator']]],
|
||||
['createresource_5',['CreateResource',['../class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a',1,'D3D12MA::Allocator']]],
|
||||
['createresource1_6',['CreateResource1',['../class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b',1,'D3D12MA::Allocator']]],
|
||||
['createresource2_7',['CreateResource2',['../class_d3_d12_m_a_1_1_allocator.html#ad9616c8e8e59ede99214b9c7cea97e5a',1,'D3D12MA::Allocator']]],
|
||||
['createvirtualblock_8',['CreateVirtualBlock',['../namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317',1,'D3D12MA']]]
|
||||
['createvirtualblock_8',['CreateVirtualBlock',['../namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98',1,'D3D12MA']]]
|
||||
];
|
||||
|
@ -1,5 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['createallocator_0',['CreateAllocator',['../class_d3_d12_m_a_1_1_allocator.html#a7cc10fd0b328a512165cf636cb795090',1,'D3D12MA::Allocator']]],
|
||||
['createvirtualblock_1',['CreateVirtualBlock',['../class_d3_d12_m_a_1_1_virtual_block.html#ab8bb16e20c691720aad26ecbf105aa6f',1,'D3D12MA::VirtualBlock']]]
|
||||
['createallocator_0',['CreateAllocator',['../class_d3_d12_m_a_1_1_allocator.html#a458f044fdc81e4a0b147e99ffcf73459',1,'D3D12MA::Allocator']]],
|
||||
['createvirtualblock_1',['CreateVirtualBlock',['../class_d3_d12_m_a_1_1_virtual_block.html#a0485028cbe13b5457fe422865f7edf74',1,'D3D12MA::VirtualBlock']]]
|
||||
];
|
||||
|
@ -142,7 +142,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -171,7 +171,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -73,7 +73,7 @@ $(function() {
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>.
|
||||
<p>Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>.
|
||||
<a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <D3D12MemAlloc.h></code></p>
|
||||
@ -95,7 +95,7 @@ Public Attributes</h2></td></tr>
|
||||
<tr class="separator:abf9a9f87f0ffea52816efd363c5fcd7b"><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_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#aa341b796fdffb16c976e659ccce80332" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>. </p>
|
||||
<div class="textblock"><p >Parameters of created <a class="el" href="class_d3_d12_m_a_1_1_allocator.html" title="Represents main object of this library initialized for particular ID3D12Device.">Allocator</a> object. To be used with <a class="el" href="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0" title="Creates new main D3D12MA::Allocator object and returns it through ppAllocator.">CreateAllocator()</a>. </p>
|
||||
</div><h2 class="groupheader">Member Data Documentation</h2>
|
||||
<a id="ad8abad7c80ea0d8df27c85243ce720f3" name="ad8abad7c80ea0d8df27c85243ce720f3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ad8abad7c80ea0d8df27c85243ce720f3">◆ </a></span>Flags</h2>
|
||||
@ -180,7 +180,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -166,7 +166,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -207,7 +207,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -276,7 +276,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -121,7 +121,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -145,7 +145,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -125,7 +125,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -73,7 +73,7 @@ $(function() {
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>.
|
||||
<p>Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>.
|
||||
<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#details">More...</a></p>
|
||||
|
||||
<p><code>#include <D3D12MemAlloc.h></code></p>
|
||||
@ -88,7 +88,7 @@ Public Attributes</h2></td></tr>
|
||||
<tr class="separator:aa8ea08ad0ee64cb2d29c03b85008317f"><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_virtual_block.html" title="Represents pure allocation algorithm and a data structure with allocations in some memory block,...">D3D12MA::VirtualBlock</a> object to be passed to <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. </p>
|
||||
<div class="textblock"><p >Parameters of created <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 to be passed to <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">CreateVirtualBlock()</a>. </p>
|
||||
</div><h2 class="groupheader">Member Data Documentation</h2>
|
||||
<a id="aa8ea08ad0ee64cb2d29c03b85008317f" name="aa8ea08ad0ee64cb2d29c03b85008317f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa8ea08ad0ee64cb2d29c03b85008317f">◆ </a></span>pAllocationCallbacks</h2>
|
||||
@ -125,7 +125,7 @@ Public Attributes</h2></td></tr>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/src/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
|
||||
<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 -->
|
||||
|
@ -75,18 +75,18 @@ Creating virtual block</h1>
|
||||
<p >To use this functionality, there is no main "allocator" object. You don't need to have <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> object created. All you need to do is to create a separate <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 for each block of memory you want to be managed by the allocator:</p>
|
||||
<ol type="1">
|
||||
<li>Fill in <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" title="Parameters of created Allocator object. To be used with CreateAllocator().">D3D12MA::ALLOCATOR_DESC</a> structure.</li>
|
||||
<li>Call <a class="el" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">D3D12MA::CreateVirtualBlock</a>. Get 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.</li>
|
||||
<li>Call <a class="el" href="namespace_d3_d12_m_a.html#ab024647ae85ee63e2fa2c1c4beac6d98" title="Creates new D3D12MA::VirtualBlock object and returns it through ppVirtualBlock.">D3D12MA::CreateVirtualBlock</a>. Get 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.</li>
|
||||
</ol>
|
||||
<p >Example:</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_struct" 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> blockDesc = {};</div>
|
||||
<div class="line">blockDesc.<a class="code hl_variable" 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">Size</a> = 1048576; <span class="comment">// 1 MB</span></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">HRESULT hr = <a class="code hl_function" href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317">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:941</div></div>
|
||||
<div class="ttc" id="anamespace_d3_d12_m_a_html_aefde6264e7a88bebe8e193df343af317"><div class="ttname"><a href="namespace_d3_d12_m_a.html#aefde6264e7a88bebe8e193df343af317">D3D12MA::CreateVirtualBlock</a></div><div class="ttdeci">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:882</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:888</div></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:952</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:891</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:897</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. However, there is no "virtual allocation" object. When you request a new allocation, a <code>UINT64</code> number is returned. It is an offset inside the block where the allocation has been placed, but it also uniquely identifies the allocation within this block.</p>
|
||||
@ -110,8 +110,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">}</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html_aa57575f1af18461012bde8c4b6f3c56c"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html#aa57575f1af18461012bde8c4b6f3c56c">D3D12MA::VirtualBlock::Allocate</a></div><div class="ttdeci">HRESULT Allocate(const VIRTUAL_ALLOCATION_DESC *pDesc, 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:898</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:903</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:907</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:912</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#a02dfae4c0856f22da885a332de7821fa" title="Frees the allocation at given offset.">D3D12MA::VirtualBlock::FreeAllocation</a>. You can only pass to this function the exact offset that was previously returned by <a class="el" href="class_d3_d12_m_a_1_1_virtual_block.html#aa57575f1af18461012bde8c4b6f3c56c" title="Creates new allocation.">D3D12MA::VirtualBlock::Allocate</a> and not any other location within the memory.</p>
|
||||
@ -146,7 +146,7 @@ Alignment and units</h1>
|
||||
<div class="line"> </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#aa57575f1af18461012bde8c4b6f3c56c">Allocate</a>(&allocDesc, &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:908</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:917</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>
|
||||
@ -161,9 +161,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"> statInfo.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_stat_info.html#ac4f3379ea88025e4ccf5880fab2699f7">UsedBytes</a>, statInfo.<a class="code hl_variable" href="struct_d3_d12_m_a_1_1_stat_info.html#a2f50de812e296b71594174ff67bbac6e">AllocationCount</a>);</div>
|
||||
<div class="ttc" id="aclass_d3_d12_m_a_1_1_virtual_block_html_a039ee8426818d0126cf7f44c1c658526"><div class="ttname"><a href="class_d3_d12_m_a_1_1_virtual_block.html#a039ee8426818d0126cf7f44c1c658526">D3D12MA::VirtualBlock::CalculateStats</a></div><div class="ttdeci">void CalculateStats(StatInfo *pInfo) const</div><div class="ttdoc">Retrieves statistics from the current state of the block.</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_stat_info_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_stat_info.html">D3D12MA::StatInfo</a></div><div class="ttdoc">Calculated statistics of memory usage in entire allocator.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:580</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_stat_info_html_a2f50de812e296b71594174ff67bbac6e"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_stat_info.html#a2f50de812e296b71594174ff67bbac6e">D3D12MA::StatInfo::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:584</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_stat_info_html_ac4f3379ea88025e4ccf5880fab2699f7"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_stat_info.html#ac4f3379ea88025e4ccf5880fab2699f7">D3D12MA::StatInfo::UsedBytes</a></div><div class="ttdeci">UINT64 UsedBytes</div><div class="ttdoc">Total number of bytes occupied by all allocations.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:588</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_stat_info_html"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_stat_info.html">D3D12MA::StatInfo</a></div><div class="ttdoc">Calculated statistics of memory usage in entire allocator.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:589</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_stat_info_html_a2f50de812e296b71594174ff67bbac6e"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_stat_info.html#a2f50de812e296b71594174ff67bbac6e">D3D12MA::StatInfo::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:593</div></div>
|
||||
<div class="ttc" id="astruct_d3_d12_m_a_1_1_stat_info_html_ac4f3379ea88025e4ccf5880fab2699f7"><div class="ttname"><a href="struct_d3_d12_m_a_1_1_stat_info.html#ac4f3379ea88025e4ccf5880fab2699f7">D3D12MA::StatInfo::UsedBytes</a></div><div class="ttdeci">UINT64 UsedBytes</div><div class="ttdoc">Total number of bytes occupied by all allocations.</div><div class="ttdef"><b>Definition:</b> D3D12MemAlloc.h:597</div></div>
|
||||
</div><!-- fragment --><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>
|
||||
Additional considerations</h1>
|
||||
|
@ -945,6 +945,8 @@ sub-allocation regions inside a single GPU buffer.
|
||||
To create this object, fill in D3D12MA::VIRTUAL_BLOCK_DESC and call CreateVirtualBlock().
|
||||
To destroy it, call its method `VirtualBlock::Release()`.
|
||||
You need to free all the allocations within this block or call Clear() before destroying it.
|
||||
|
||||
This object is not thread-safe - should not be used from multiple threads simultaneously, must be synchronized externally.
|
||||
*/
|
||||
class D3D12MA_API VirtualBlock : public IUnknownImpl
|
||||
{
|
||||
@ -1613,6 +1615,7 @@ HRESULT hr = D3D12MA::CreateAllocator(&allocatorDesc, &allocator);
|
||||
- When the allocator is created with D3D12MA::ALLOCATOR_FLAG_SINGLETHREADED,
|
||||
calls to methods of D3D12MA::Allocator class must be made from a single thread or synchronized by the user.
|
||||
Using this flag may improve performance.
|
||||
- D3D12MA::VirtualBlock is not safe to be used from multiple threads simultaneously.
|
||||
|
||||
\section general_considerations_future_plans Future plans
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user