blob: 79a02f90c1375719db29ae3f70b3a1ac949bceff [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Direct3D 12 Memory Allocator: D3D12MA::Allocator Class 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.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a></li><li class="navelem"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html">Allocator</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_d3_d12_m_a_1_1_allocator-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">D3D12MA::Allocator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>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></p>
<p><code>#include &lt;D3D12MemAlloc.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for D3D12MA::Allocator:</div>
<div class="dyncontent">
<div class="center">
<img src="class_d3_d12_m_a_1_1_allocator.png" alt=""/>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8ce95f85e5f2a1d41b81d676b21c04ae"><td class="memItemLeft" align="right" valign="top">const D3D12_FEATURE_DATA_D3D12_OPTIONS &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a8ce95f85e5f2a1d41b81d676b21c04ae">GetD3D12Options</a> () const</td></tr>
<tr class="memdesc:a8ce95f85e5f2a1d41b81d676b21c04ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns cached options retrieved from D3D12 device. <a href="class_d3_d12_m_a_1_1_allocator.html#a8ce95f85e5f2a1d41b81d676b21c04ae">More...</a><br /></td></tr>
<tr class="separator:a8ce95f85e5f2a1d41b81d676b21c04ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e742884bd45dd7f01193d13fcd05af0"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">IsUMA</a> () const</td></tr>
<tr class="memdesc:a9e742884bd45dd7f01193d13fcd05af0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::UMA</code> was found to be true. <a href="class_d3_d12_m_a_1_1_allocator.html#a9e742884bd45dd7f01193d13fcd05af0">More...</a><br /></td></tr>
<tr class="separator:a9e742884bd45dd7f01193d13fcd05af0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08210561b92c4bd7ede9dd7beba4bb80"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80">IsCacheCoherentUMA</a> () const</td></tr>
<tr class="memdesc:a08210561b92c4bd7ede9dd7beba4bb80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA</code> was found to be true. <a href="class_d3_d12_m_a_1_1_allocator.html#a08210561b92c4bd7ede9dd7beba4bb80">More...</a><br /></td></tr>
<tr class="separator:a08210561b92c4bd7ede9dd7beba4bb80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa37d6b9fe8ea0864f7a35b9d68e8345a"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">CreateResource</a> (const <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">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:aa37d6b9fe8ea0864f7a35b9d68e8345a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation function. <a href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a">More...</a><br /></td></tr>
<tr class="separator:aa37d6b9fe8ea0864f7a35b9d68e8345a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa0de85c76ce1f86fe9b0bd94dad5e8b"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b">CreateResource1</a> (const <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">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, ID3D12ProtectedResourceSession *pProtectedSession, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:afa0de85c76ce1f86fe9b0bd94dad5e8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <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>, but supports additional parameter <code>pProtectedSession</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b">More...</a><br /></td></tr>
<tr class="separator:afa0de85c76ce1f86fe9b0bd94dad5e8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9616c8e8e59ede99214b9c7cea97e5a"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ad9616c8e8e59ede99214b9c7cea97e5a">CreateResource2</a> (const <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">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_DESC1 *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, ID3D12ProtectedResourceSession *pProtectedSession, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:ad9616c8e8e59ede99214b9c7cea97e5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b" title="Similar to Allocator::CreateResource, but supports additional parameter pProtectedSession.">Allocator::CreateResource1</a>, but supports new structure <code>D3D12_RESOURCE_DESC1</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#ad9616c8e8e59ede99214b9c7cea97e5a">More...</a><br /></td></tr>
<tr class="separator:ad9616c8e8e59ede99214b9c7cea97e5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb8a10a5ea30171ce60128286aec5ee2"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2">AllocateMemory</a> (const <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">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_ALLOCATION_INFO *pAllocInfo, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation)</td></tr>
<tr class="memdesc:acb8a10a5ea30171ce60128286aec5ee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates memory without creating any resource placed in it. <a href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2">More...</a><br /></td></tr>
<tr class="separator:acb8a10a5ea30171ce60128286aec5ee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c1fbc673e2559ead34dbf039dd47d60"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a6c1fbc673e2559ead34dbf039dd47d60">AllocateMemory1</a> (const <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">ALLOCATION_DESC</a> *pAllocDesc, const D3D12_RESOURCE_ALLOCATION_INFO *pAllocInfo, ID3D12ProtectedResourceSession *pProtectedSession, <a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **ppAllocation)</td></tr>
<tr class="memdesc:a6c1fbc673e2559ead34dbf039dd47d60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2" title="Allocates memory without creating any resource placed in it.">Allocator::AllocateMemory</a>, but supports additional parameter <code>pProtectedSession</code>. <a href="class_d3_d12_m_a_1_1_allocator.html#a6c1fbc673e2559ead34dbf039dd47d60">More...</a><br /></td></tr>
<tr class="separator:a6c1fbc673e2559ead34dbf039dd47d60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab45536f92410aedb7be44ea36b1b4717"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">CreateAliasingResource</a> (<a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *pAllocation, UINT64 AllocationLocalOffset, const D3D12_RESOURCE_DESC *pResourceDesc, D3D12_RESOURCE_STATES InitialResourceState, const D3D12_CLEAR_VALUE *pOptimizedClearValue, REFIID riidResource, void **ppvResource)</td></tr>
<tr class="memdesc:ab45536f92410aedb7be44ea36b1b4717"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new resource in place of an existing allocation. This is useful for memory aliasing. <a href="class_d3_d12_m_a_1_1_allocator.html#ab45536f92410aedb7be44ea36b1b4717">More...</a><br /></td></tr>
<tr class="separator:ab45536f92410aedb7be44ea36b1b4717"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="memItemLeft" align="right" valign="top">HRESULT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">CreatePool</a> (const <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">POOL_DESC</a> *pPoolDesc, <a class="el" href="class_d3_d12_m_a_1_1_pool.html">Pool</a> **ppPool)</td></tr>
<tr class="memdesc:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates custom pool. <a href="class_d3_d12_m_a_1_1_allocator.html#aac7b1f6bf53cbf4c4ce2264cb72ca515">More...</a><br /></td></tr>
<tr class="separator:aac7b1f6bf53cbf4c4ce2264cb72ca515"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a468ba0c93121eaaee402b08775f1dd11"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a468ba0c93121eaaee402b08775f1dd11">SetCurrentFrameIndex</a> (UINT frameIndex)</td></tr>
<tr class="memdesc:a468ba0c93121eaaee402b08775f1dd11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the index of the current frame. <a href="class_d3_d12_m_a_1_1_allocator.html#a468ba0c93121eaaee402b08775f1dd11">More...</a><br /></td></tr>
<tr class="separator:a468ba0c93121eaaee402b08775f1dd11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addedcd0067319ec566042f5cb520843b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#addedcd0067319ec566042f5cb520843b">CalculateStats</a> (<a class="el" href="struct_d3_d12_m_a_1_1_stats.html">Stats</a> *pStats)</td></tr>
<tr class="memdesc:addedcd0067319ec566042f5cb520843b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves statistics from the current state of the allocator. <a href="class_d3_d12_m_a_1_1_allocator.html#addedcd0067319ec566042f5cb520843b">More...</a><br /></td></tr>
<tr class="separator:addedcd0067319ec566042f5cb520843b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe927bd3ad6930111d4d9408515b9601"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#abe927bd3ad6930111d4d9408515b9601">GetBudget</a> (<a class="el" href="struct_d3_d12_m_a_1_1_budget.html">Budget</a> *pGpuBudget, <a class="el" href="struct_d3_d12_m_a_1_1_budget.html">Budget</a> *pCpuBudget)</td></tr>
<tr class="memdesc:abe927bd3ad6930111d4d9408515b9601"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves information about current memory budget. <a href="class_d3_d12_m_a_1_1_allocator.html#abe927bd3ad6930111d4d9408515b9601">More...</a><br /></td></tr>
<tr class="separator:abe927bd3ad6930111d4d9408515b9601"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29716b3084916abed7793bf2ec4b65db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a29716b3084916abed7793bf2ec4b65db">BuildStatsString</a> (WCHAR **ppStatsString, BOOL DetailedMap) const</td></tr>
<tr class="memdesc:a29716b3084916abed7793bf2ec4b65db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builds and returns statistics as a string in JSON format. <a href="class_d3_d12_m_a_1_1_allocator.html#a29716b3084916abed7793bf2ec4b65db">More...</a><br /></td></tr>
<tr class="separator:a29716b3084916abed7793bf2ec4b65db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8392663494384c16d8bfa12b827b4f9c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a8392663494384c16d8bfa12b827b4f9c">FreeStatsString</a> (WCHAR *pStatsString) const</td></tr>
<tr class="memdesc:a8392663494384c16d8bfa12b827b4f9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees memory of a string returned from <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a29716b3084916abed7793bf2ec4b65db" title="Builds and returns statistics as a string in JSON format.">Allocator::BuildStatsString</a>. <a href="class_d3_d12_m_a_1_1_allocator.html#a8392663494384c16d8bfa12b827b4f9c">More...</a><br /></td></tr>
<tr class="separator:a8392663494384c16d8bfa12b827b4f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>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>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"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb8a10a5ea30171ce60128286aec5ee2">&#9670;&nbsp;</a></span>AllocateMemory()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::AllocateMemory </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_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *&#160;</td>
<td class="paramname"><em>pAllocDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_ALLOCATION_INFO *&#160;</td>
<td class="paramname"><em>pAllocInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **&#160;</td>
<td class="paramname"><em>ppAllocation</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocates memory without creating any resource placed in it. </p>
<p>This function is similar to <code>ID3D12Device::CreateHeap</code>, but it may really assign part of a larger, existing heap to the allocation.</p>
<p><code>pAllocDesc-&gt;heapFlags</code> should contain one of these values, depending on type of resources you are going to create in this memory: <code>D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS</code>, <code>D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES</code>, <code>D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES</code>. Except if you validate that ResourceHeapTier = 2 - then <code>heapFlags</code> may be <code>D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES</code> = 0. Additional flags in <code>heapFlags</code> are allowed as well.</p>
<p><code>pAllocInfo-&gt;SizeInBytes</code> must be multiply of 64KB. <code>pAllocInfo-&gt;Alignment</code> must be one of the legal values as described in documentation of <code>D3D12_HEAP_DESC</code>.</p>
<p>If you use <a class="el" href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645ea661a5472dba3dcecc5a2cc92afd25675">D3D12MA::ALLOCATION_FLAG_COMMITTED</a> you will get a separate memory block - a heap that always has offset 0. </p>
</div>
</div>
<a id="a6c1fbc673e2559ead34dbf039dd47d60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c1fbc673e2559ead34dbf039dd47d60">&#9670;&nbsp;</a></span>AllocateMemory1()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::AllocateMemory1 </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_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *&#160;</td>
<td class="paramname"><em>pAllocDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_ALLOCATION_INFO *&#160;</td>
<td class="paramname"><em>pAllocInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ID3D12ProtectedResourceSession *&#160;</td>
<td class="paramname"><em>pProtectedSession</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **&#160;</td>
<td class="paramname"><em>ppAllocation</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2" title="Allocates memory without creating any resource placed in it.">Allocator::AllocateMemory</a>, but supports additional parameter <code>pProtectedSession</code>. </p>
<p>If <code>pProtectedSession</code> is not null, current implementation always creates separate heap using <code>ID3D12Device4::CreateHeap1</code>.</p>
<p>To work correctly, <code>ID3D12Device4</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p>
</div>
</div>
<a id="a29716b3084916abed7793bf2ec4b65db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29716b3084916abed7793bf2ec4b65db">&#9670;&nbsp;</a></span>BuildStatsString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocator::BuildStatsString </td>
<td>(</td>
<td class="paramtype">WCHAR **&#160;</td>
<td class="paramname"><em>ppStatsString</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">BOOL&#160;</td>
<td class="paramname"><em>DetailedMap</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Builds and returns statistics as a string in JSON format. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">ppStatsString</td><td>Must be freed using <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a8392663494384c16d8bfa12b827b4f9c" title="Frees memory of a string returned from Allocator::BuildStatsString.">Allocator::FreeStatsString</a>. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">DetailedMap</td><td><code>TRUE</code> to include full list of allocations (can make the string quite long), <code>FALSE</code> to only return statistics. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="addedcd0067319ec566042f5cb520843b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addedcd0067319ec566042f5cb520843b">&#9670;&nbsp;</a></span>CalculateStats()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocator::CalculateStats </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d3_d12_m_a_1_1_stats.html">Stats</a> *&#160;</td>
<td class="paramname"><em>pStats</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves statistics from the current state of the allocator. </p>
</div>
</div>
<a id="ab45536f92410aedb7be44ea36b1b4717"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab45536f92410aedb7be44ea36b1b4717">&#9670;&nbsp;</a></span>CreateAliasingResource()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreateAliasingResource </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> *&#160;</td>
<td class="paramname"><em>pAllocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UINT64&#160;</td>
<td class="paramname"><em>AllocationLocalOffset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_DESC *&#160;</td>
<td class="paramname"><em>pResourceDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">D3D12_RESOURCE_STATES&#160;</td>
<td class="paramname"><em>InitialResourceState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_CLEAR_VALUE *&#160;</td>
<td class="paramname"><em>pOptimizedClearValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">REFIID&#160;</td>
<td class="paramname"><em>riidResource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>ppvResource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new resource in place of an existing allocation. This is useful for memory aliasing. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir"></td><td class="paramname">pAllocation</td><td>Existing allocation indicating the memory where the new resource should be created. It can be created using <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#aa37d6b9fe8ea0864f7a35b9d68e8345a" title="Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation functi...">D3D12MA::Allocator::CreateResource</a> and already have a resource bound to it, or can be a raw memory allocated with <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#acb8a10a5ea30171ce60128286aec5ee2" title="Allocates memory without creating any resource placed in it.">D3D12MA::Allocator::AllocateMemory</a>. It must not be created as committed so that <code>ID3D12Heap</code> is available and not implicit. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">AllocationLocalOffset</td><td>Additional offset in bytes to be applied when allocating the resource. Local from the start of <code>pAllocation</code>, not the beginning of the whole <code>ID3D12Heap</code>! If the new resource should start from the beginning of the <code>pAllocation</code> it should be 0. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">pResourceDesc</td><td>Description of the new resource to be created. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">InitialResourceState</td><td></td></tr>
<tr><td class="paramdir"></td><td class="paramname">pOptimizedClearValue</td><td></td></tr>
<tr><td class="paramdir"></td><td class="paramname">riidResource</td><td></td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ppvResource</td><td>Returns pointer to the new resource. The resource is not bound with <code>pAllocation</code>. This pointer must not be null - you must get the resource pointer and <code>Release</code> it when no longer needed.</td></tr>
</table>
</dd>
</dl>
<p>Memory requirements of the new resource are checked for validation. If its size exceeds the end of <code>pAllocation</code> or required alignment is not fulfilled considering <code>pAllocation-&gt;GetOffset() + AllocationLocalOffset</code>, the function returns <code>E_INVALIDARG</code>. </p>
</div>
</div>
<a id="aac7b1f6bf53cbf4c4ce2264cb72ca515"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac7b1f6bf53cbf4c4ce2264cb72ca515">&#9670;&nbsp;</a></span>CreatePool()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreatePool </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">POOL_DESC</a> *&#160;</td>
<td class="paramname"><em>pPoolDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_pool.html">Pool</a> **&#160;</td>
<td class="paramname"><em>ppPool</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates custom pool. </p>
</div>
</div>
<a id="aa37d6b9fe8ea0864f7a35b9d68e8345a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa37d6b9fe8ea0864f7a35b9d68e8345a">&#9670;&nbsp;</a></span>CreateResource()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreateResource </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_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *&#160;</td>
<td class="paramname"><em>pAllocDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_DESC *&#160;</td>
<td class="paramname"><em>pResourceDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">D3D12_RESOURCE_STATES&#160;</td>
<td class="paramname"><em>InitialResourceState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_CLEAR_VALUE *&#160;</td>
<td class="paramname"><em>pOptimizedClearValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **&#160;</td>
<td class="paramname"><em>ppAllocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">REFIID&#160;</td>
<td class="paramname"><em>riidResource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>ppvResource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocates memory and creates a D3D12 resource (buffer or texture). This is the main allocation function. </p>
<p>The function is similar to <code>ID3D12Device::CreateCommittedResource</code>, but it may really call <code>ID3D12Device::CreatePlacedResource</code> to assign part of a larger, existing memory heap to the new resource, which is the main purpose of this whole library.</p>
<p>If <code>ppvResource</code> is null, you receive only <code>ppAllocation</code> object from this function. It holds pointer to <code>ID3D12Resource</code> that can be queried using function <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a649a3bb1be1a981cbf3f61f3819addca" title="Returns D3D12 resource associated with this object.">D3D12MA::Allocation::GetResource()</a>. Reference count of the resource object is 1. It is automatically destroyed when you destroy the allocation object.</p>
<p>If <code>ppvResource</code> is not null, you receive pointer to the resource next to allocation object. Reference count of the resource object is then increased by calling <code>QueryInterface</code>, so you need to manually <code>Release</code> it along with the allocation.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir"></td><td class="paramname">pAllocDesc</td><td>Parameters of the allocation. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">pResourceDesc</td><td>Description of created resource. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">InitialResourceState</td><td>Initial resource state. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">pOptimizedClearValue</td><td>Optional. Either null or optimized clear value. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ppAllocation</td><td>Filled with pointer to new allocation object created. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">riidResource</td><td>IID of a resource to be returned via <code>ppvResource</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ppvResource</td><td>Optional. If not null, filled with pointer to new resouce created.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function creates a new resource. Sub-allocation of parts of one large buffer, although recommended as a good practice, is out of scope of this library and could be implemented by the user as a higher-level logic on top of it, e.g. using the <a class="el" href="virtual_allocator.html">Virtual allocator</a> feature. </dd></dl>
</div>
</div>
<a id="afa0de85c76ce1f86fe9b0bd94dad5e8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa0de85c76ce1f86fe9b0bd94dad5e8b">&#9670;&nbsp;</a></span>CreateResource1()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreateResource1 </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_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *&#160;</td>
<td class="paramname"><em>pAllocDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_DESC *&#160;</td>
<td class="paramname"><em>pResourceDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">D3D12_RESOURCE_STATES&#160;</td>
<td class="paramname"><em>InitialResourceState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_CLEAR_VALUE *&#160;</td>
<td class="paramname"><em>pOptimizedClearValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ID3D12ProtectedResourceSession *&#160;</td>
<td class="paramname"><em>pProtectedSession</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **&#160;</td>
<td class="paramname"><em>ppAllocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">REFIID&#160;</td>
<td class="paramname"><em>riidResource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>ppvResource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Similar to <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>, but supports additional parameter <code>pProtectedSession</code>. </p>
<p>If <code>pProtectedSession</code> is not null, current implementation always creates the resource as committed using <code>ID3D12Device4::CreateCommittedResource1</code>.</p>
<p>To work correctly, <code>ID3D12Device4</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p>
</div>
</div>
<a id="ad9616c8e8e59ede99214b9c7cea97e5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9616c8e8e59ede99214b9c7cea97e5a">&#9670;&nbsp;</a></span>CreateResource2()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">HRESULT D3D12MA::Allocator::CreateResource2 </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_i_o_n___d_e_s_c.html">ALLOCATION_DESC</a> *&#160;</td>
<td class="paramname"><em>pAllocDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_RESOURCE_DESC1 *&#160;</td>
<td class="paramname"><em>pResourceDesc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">D3D12_RESOURCE_STATES&#160;</td>
<td class="paramname"><em>InitialResourceState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const D3D12_CLEAR_VALUE *&#160;</td>
<td class="paramname"><em>pOptimizedClearValue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ID3D12ProtectedResourceSession *&#160;</td>
<td class="paramname"><em>pProtectedSession</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a> **&#160;</td>
<td class="paramname"><em>ppAllocation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">REFIID&#160;</td>
<td class="paramname"><em>riidResource</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void **&#160;</td>
<td class="paramname"><em>ppvResource</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Similar to <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#afa0de85c76ce1f86fe9b0bd94dad5e8b" title="Similar to Allocator::CreateResource, but supports additional parameter pProtectedSession.">Allocator::CreateResource1</a>, but supports new structure <code>D3D12_RESOURCE_DESC1</code>. </p>
<p>It internally uses <code>ID3D12Device8::CreateCommittedResource2</code> or <code>ID3D12Device8::CreatePlacedResource1</code>.</p>
<p>To work correctly, <code>ID3D12Device8</code> interface must be available in the current system. Otherwise, <code>E_NOINTERFACE</code> is returned. </p>
</div>
</div>
<a id="a8392663494384c16d8bfa12b827b4f9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8392663494384c16d8bfa12b827b4f9c">&#9670;&nbsp;</a></span>FreeStatsString()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocator::FreeStatsString </td>
<td>(</td>
<td class="paramtype">WCHAR *&#160;</td>
<td class="paramname"><em>pStatsString</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Frees memory of a string returned from <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a29716b3084916abed7793bf2ec4b65db" title="Builds and returns statistics as a string in JSON format.">Allocator::BuildStatsString</a>. </p>
</div>
</div>
<a id="abe927bd3ad6930111d4d9408515b9601"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe927bd3ad6930111d4d9408515b9601">&#9670;&nbsp;</a></span>GetBudget()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocator::GetBudget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="struct_d3_d12_m_a_1_1_budget.html">Budget</a> *&#160;</td>
<td class="paramname"><em>pGpuBudget</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="struct_d3_d12_m_a_1_1_budget.html">Budget</a> *&#160;</td>
<td class="paramname"><em>pCpuBudget</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves information about current memory budget. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">pGpuBudget</td><td>Optional, can be null. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pCpuBudget</td><td>Optional, can be null.</td></tr>
</table>
</dd>
</dl>
<p>This function is called "get" not "calculate" because it is very fast, suitable to be called every frame or every allocation. For more detailed statistics use <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#addedcd0067319ec566042f5cb520843b" title="Retrieves statistics from the current state of the allocator.">CalculateStats()</a>.</p>
<p>Note that when using allocator from multiple threads, returned information may immediately become outdated. </p>
</div>
</div>
<a id="a8ce95f85e5f2a1d41b81d676b21c04ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ce95f85e5f2a1d41b81d676b21c04ae">&#9670;&nbsp;</a></span>GetD3D12Options()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const D3D12_FEATURE_DATA_D3D12_OPTIONS&amp; D3D12MA::Allocator::GetD3D12Options </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns cached options retrieved from D3D12 device. </p>
</div>
</div>
<a id="a08210561b92c4bd7ede9dd7beba4bb80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08210561b92c4bd7ede9dd7beba4bb80">&#9670;&nbsp;</a></span>IsCacheCoherentUMA()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOL D3D12MA::Allocator::IsCacheCoherentUMA </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::CacheCoherentUMA</code> was found to be true. </p>
<p>For more information about how to use it, see articles in Microsoft Docs:</p><ul>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping">https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties</a> </li>
</ul>
</div>
</div>
<a id="a9e742884bd45dd7f01193d13fcd05af0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e742884bd45dd7f01193d13fcd05af0">&#9670;&nbsp;</a></span>IsUMA()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOL D3D12MA::Allocator::IsUMA </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if <code>D3D12_FEATURE_DATA_ARCHITECTURE1::UMA</code> was found to be true. </p>
<p>For more information about how to use it, see articles in Microsoft Docs:</p><ul>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping">https://docs.microsoft.com/en-us/windows/win32/direct3d12/default-texture-mapping</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_architecture</a></li>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties">https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-getcustomheapproperties</a> </li>
</ul>
</div>
</div>
<a id="a468ba0c93121eaaee402b08775f1dd11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a468ba0c93121eaaee402b08775f1dd11">&#9670;&nbsp;</a></span>SetCurrentFrameIndex()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocator::SetCurrentFrameIndex </td>
<td>(</td>
<td class="paramtype">UINT&#160;</td>
<td class="paramname"><em>frameIndex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the index of the current frame. </p>
<p>This function is used to set the frame index in the allocator when a new game frame begins. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>