blob: b8f4bd222b39ec30bb52ba482de49927d6ecef33 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Direct3D 12 Memory Allocator: D3D12MA::Allocation 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 id="projectrow">
<td id="projectalign">
<div id="projectname">Direct3D 12 Memory Allocator
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_d3_d12_m_a.html">D3D12MA</a></li><li class="navelem"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_d3_d12_m_a_1_1_allocation-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">D3D12MA::Allocation Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Represents single memory allocation.
<a href="class_d3_d12_m_a_1_1_allocation.html#details">More...</a></p>
<p><code>#include &lt;D3D12MemAlloc.h&gt;</code></p>
<div class="dynheader">
Inheritance diagram for D3D12MA::Allocation:</div>
<div class="dyncontent">
<div class="center">
<img src="class_d3_d12_m_a_1_1_allocation.png" alt=""/>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a47be9557d441797b65de177a3d5cdf60"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a47be9557d441797b65de177a3d5cdf60">GetOffset</a> () const</td></tr>
<tr class="memdesc:a47be9557d441797b65de177a3d5cdf60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns offset in bytes from the start of memory heap. <a href="class_d3_d12_m_a_1_1_allocation.html#a47be9557d441797b65de177a3d5cdf60">More...</a><br /></td></tr>
<tr class="separator:a47be9557d441797b65de177a3d5cdf60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0acdc6b31e957b6d83762bdaace6d255"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a0acdc6b31e957b6d83762bdaace6d255">GetAlignment</a> () const</td></tr>
<tr class="memdesc:a0acdc6b31e957b6d83762bdaace6d255"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns alignment that resource was created with. <a href="class_d3_d12_m_a_1_1_allocation.html#a0acdc6b31e957b6d83762bdaace6d255">More...</a><br /></td></tr>
<tr class="separator:a0acdc6b31e957b6d83762bdaace6d255"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92c2fb6f22b28817eb83a59407d7dd30"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a92c2fb6f22b28817eb83a59407d7dd30">GetSize</a> () const</td></tr>
<tr class="memdesc:a92c2fb6f22b28817eb83a59407d7dd30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns size in bytes of the allocation. <a href="class_d3_d12_m_a_1_1_allocation.html#a92c2fb6f22b28817eb83a59407d7dd30">More...</a><br /></td></tr>
<tr class="separator:a92c2fb6f22b28817eb83a59407d7dd30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad00308118252f82d8f803c623c67bf18"><td class="memItemLeft" align="right" valign="top">ID3D12Resource *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#ad00308118252f82d8f803c623c67bf18">GetResource</a> () const</td></tr>
<tr class="memdesc:ad00308118252f82d8f803c623c67bf18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns D3D12 resource associated with this object. <a href="class_d3_d12_m_a_1_1_allocation.html#ad00308118252f82d8f803c623c67bf18">More...</a><br /></td></tr>
<tr class="separator:ad00308118252f82d8f803c623c67bf18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a414a088c22bae0f29b1038f5f9346d14"><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_allocation.html#a414a088c22bae0f29b1038f5f9346d14">SetResource</a> (ID3D12Resource *pResource)</td></tr>
<tr class="memdesc:a414a088c22bae0f29b1038f5f9346d14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases the resource currently pointed by the allocation (if any), sets it to new one, incrementing its reference counter (if not null). <a href="class_d3_d12_m_a_1_1_allocation.html#a414a088c22bae0f29b1038f5f9346d14">More...</a><br /></td></tr>
<tr class="separator:a414a088c22bae0f29b1038f5f9346d14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adca8d5a82bed492fe7265fcda6e53da2"><td class="memItemLeft" align="right" valign="top">ID3D12Heap *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#adca8d5a82bed492fe7265fcda6e53da2">GetHeap</a> () const</td></tr>
<tr class="memdesc:adca8d5a82bed492fe7265fcda6e53da2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns memory heap that the resource is created in. <a href="class_d3_d12_m_a_1_1_allocation.html#adca8d5a82bed492fe7265fcda6e53da2">More...</a><br /></td></tr>
<tr class="separator:adca8d5a82bed492fe7265fcda6e53da2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f209094455dd876b6d9f84076ee1436"><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_allocation.html#a6f209094455dd876b6d9f84076ee1436">SetPrivateData</a> (void *pPrivateData)</td></tr>
<tr class="memdesc:a6f209094455dd876b6d9f84076ee1436"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes custom pointer for an allocation to a new value. <a href="class_d3_d12_m_a_1_1_allocation.html#a6f209094455dd876b6d9f84076ee1436">More...</a><br /></td></tr>
<tr class="separator:a6f209094455dd876b6d9f84076ee1436"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae45eed901de5d16afe179f883028c5ee"><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_allocation.html#ae45eed901de5d16afe179f883028c5ee">GetPrivateData</a> () const</td></tr>
<tr class="memdesc:ae45eed901de5d16afe179f883028c5ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get custom pointer associated with the allocation. <a href="class_d3_d12_m_a_1_1_allocation.html#ae45eed901de5d16afe179f883028c5ee">More...</a><br /></td></tr>
<tr class="separator:ae45eed901de5d16afe179f883028c5ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9e643276b577aa7f21937f75d4b82ac"><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_allocation.html#af9e643276b577aa7f21937f75d4b82ac">SetName</a> (LPCWSTR Name)</td></tr>
<tr class="memdesc:af9e643276b577aa7f21937f75d4b82ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates a name with the allocation object. This name is for use in debug diagnostics and tools. <a href="class_d3_d12_m_a_1_1_allocation.html#af9e643276b577aa7f21937f75d4b82ac">More...</a><br /></td></tr>
<tr class="separator:af9e643276b577aa7f21937f75d4b82ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65fab0c479df1b6b72c9300e68dc6770"><td class="memItemLeft" align="right" valign="top">LPCWSTR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a65fab0c479df1b6b72c9300e68dc6770">GetName</a> () const</td></tr>
<tr class="memdesc:a65fab0c479df1b6b72c9300e68dc6770"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name associated with the allocation object. <a href="class_d3_d12_m_a_1_1_allocation.html#a65fab0c479df1b6b72c9300e68dc6770">More...</a><br /></td></tr>
<tr class="separator:a65fab0c479df1b6b72c9300e68dc6770"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b1ef2717beed503fcb3cb7e6a171762"><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_allocation.html#a1b1ef2717beed503fcb3cb7e6a171762">WasZeroInitialized</a> () const</td></tr>
<tr class="memdesc:a1b1ef2717beed503fcb3cb7e6a171762"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>TRUE</code> if the memory of the allocation was filled with zeros when the allocation was created. <a href="class_d3_d12_m_a_1_1_allocation.html#a1b1ef2717beed503fcb3cb7e6a171762">More...</a><br /></td></tr>
<tr class="separator:a1b1ef2717beed503fcb3cb7e6a171762"><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 single memory allocation. </p>
<p >It may be either implicit memory heap dedicated to a single resource or a specific region of a bigger heap plus unique offset.</p>
<p >To create such object, fill structure <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" title="Parameters of created D3D12MA::Allocation object. To be used with Allocator::CreateResource.">D3D12MA::ALLOCATION_DESC</a> and call function <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>.</p>
<p >The object remembers size and some other information. To retrieve this information, use methods of this class.</p>
<p >The object also remembers <code>ID3D12Resource</code> and "owns" a reference to it, so it calls <code>Release()</code> on the resource when destroyed. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a0acdc6b31e957b6d83762bdaace6d255" name="a0acdc6b31e957b6d83762bdaace6d255"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0acdc6b31e957b6d83762bdaace6d255">&#9670;&nbsp;</a></span>GetAlignment()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::Allocation::GetAlignment </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns alignment that resource was created with. </p>
</div>
</div>
<a id="adca8d5a82bed492fe7265fcda6e53da2" name="adca8d5a82bed492fe7265fcda6e53da2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adca8d5a82bed492fe7265fcda6e53da2">&#9670;&nbsp;</a></span>GetHeap()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ID3D12Heap * D3D12MA::Allocation::GetHeap </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns memory heap that the resource is created in. </p>
<p >If the <a class="el" href="class_d3_d12_m_a_1_1_allocation.html" title="Represents single memory allocation.">Allocation</a> represents committed resource with implicit heap, returns NULL. </p>
</div>
</div>
<a id="a65fab0c479df1b6b72c9300e68dc6770" name="a65fab0c479df1b6b72c9300e68dc6770"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65fab0c479df1b6b72c9300e68dc6770">&#9670;&nbsp;</a></span>GetName()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">LPCWSTR D3D12MA::Allocation::GetName </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the name associated with the allocation object. </p>
<p >Returned string points to an internal copy.</p>
<p >If no name was associated with the allocation, returns null. </p>
</div>
</div>
<a id="a47be9557d441797b65de177a3d5cdf60" name="a47be9557d441797b65de177a3d5cdf60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47be9557d441797b65de177a3d5cdf60">&#9670;&nbsp;</a></span>GetOffset()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::Allocation::GetOffset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns offset in bytes from the start of memory heap. </p>
<p >You usually don't need to use this offset. If you create a buffer or a texture together with the allocation using function <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>, functions that operate on that resource refer to the beginning of the resource, not entire memory heap.</p>
<p >If the <a class="el" href="class_d3_d12_m_a_1_1_allocation.html" title="Represents single memory allocation.">Allocation</a> represents committed resource with implicit heap, returns 0. </p>
</div>
</div>
<a id="ae45eed901de5d16afe179f883028c5ee" name="ae45eed901de5d16afe179f883028c5ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae45eed901de5d16afe179f883028c5ee">&#9670;&nbsp;</a></span>GetPrivateData()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void * D3D12MA::Allocation::GetPrivateData </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get custom pointer associated with the allocation. </p>
</div>
</div>
<a id="ad00308118252f82d8f803c623c67bf18" name="ad00308118252f82d8f803c623c67bf18"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad00308118252f82d8f803c623c67bf18">&#9670;&nbsp;</a></span>GetResource()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ID3D12Resource * D3D12MA::Allocation::GetResource </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns D3D12 resource associated with this object. </p>
<p >Calling this method doesn't increment resource's reference counter. </p>
</div>
</div>
<a id="a92c2fb6f22b28817eb83a59407d7dd30" name="a92c2fb6f22b28817eb83a59407d7dd30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92c2fb6f22b28817eb83a59407d7dd30">&#9670;&nbsp;</a></span>GetSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::Allocation::GetSize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns size in bytes of the allocation. </p>
<ul>
<li>If you created a buffer or a texture together with the allocation using function <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>, this is the size of the resource returned by <code>ID3D12Device::GetResourceAllocationInfo</code>.</li>
<li>For allocations made out of bigger memory blocks, this also is the size of the memory region assigned exclusively to this allocation.</li>
<li>For resources created as committed, this value may not be accurate. DirectX implementation may optimize memory usage internally so that you may even observe regions of <code>ID3D12Resource::GetGPUVirtualAddress()</code> + <a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a92c2fb6f22b28817eb83a59407d7dd30" title="Returns size in bytes of the allocation.">Allocation::GetSize()</a> to overlap in memory and still work correctly. </li>
</ul>
</div>
</div>
<a id="af9e643276b577aa7f21937f75d4b82ac" name="af9e643276b577aa7f21937f75d4b82ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9e643276b577aa7f21937f75d4b82ac">&#9670;&nbsp;</a></span>SetName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocation::SetName </td>
<td>(</td>
<td class="paramtype">LPCWSTR&#160;</td>
<td class="paramname"><em>Name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Associates a name with the allocation object. This name is for use in debug diagnostics and tools. </p>
<p >Internal copy of the string is made, so the memory pointed by the argument can be changed of freed immediately after this call.</p>
<p ><code>Name</code> can be null. </p>
</div>
</div>
<a id="a6f209094455dd876b6d9f84076ee1436" name="a6f209094455dd876b6d9f84076ee1436"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f209094455dd876b6d9f84076ee1436">&#9670;&nbsp;</a></span>SetPrivateData()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocation::SetPrivateData </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>pPrivateData</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Changes custom pointer for an allocation to a new value. </p>
</div>
</div>
<a id="a414a088c22bae0f29b1038f5f9346d14" name="a414a088c22bae0f29b1038f5f9346d14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a414a088c22bae0f29b1038f5f9346d14">&#9670;&nbsp;</a></span>SetResource()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void D3D12MA::Allocation::SetResource </td>
<td>(</td>
<td class="paramtype">ID3D12Resource *&#160;</td>
<td class="paramname"><em>pResource</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Releases the resource currently pointed by the allocation (if any), sets it to new one, incrementing its reference counter (if not null). </p>
</div>
</div>
<a id="a1b1ef2717beed503fcb3cb7e6a171762" name="a1b1ef2717beed503fcb3cb7e6a171762"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b1ef2717beed503fcb3cb7e6a171762">&#9670;&nbsp;</a></span>WasZeroInitialized()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">BOOL D3D12MA::Allocation::WasZeroInitialized </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns <code>TRUE</code> if the memory of the allocation was filled with zeros when the allocation was created. </p>
<p >Returns <code>TRUE</code> only if the allocator is sure that the entire memory where the allocation was created was filled with zeros at the moment the allocation was made.</p>
<p >Returns <code>FALSE</code> if the memory could potentially contain garbage data. If it's a render-target or depth-stencil texture, it then needs proper initialization with <code>ClearRenderTargetView</code>, <code>ClearDepthStencilView</code>, <code>DiscardResource</code>, or a copy operation, as described on page "ID3D12Device::CreatePlacedResource method - Notes on the required resource initialization" in Microsoft documentation. Please note that rendering a fullscreen triangle or quad to the texture as a render target is not a proper way of initialization!</p>
<p >See also articles:</p>
<ul>
<li>"Coming to DirectX 12: More control over memory allocation" on DirectX Developer Blog</li>
<li><a href="https://asawicki.info/news_1724_initializing_dx12_textures_after_allocation_and_aliasing">"Initializing DX12 Textures After Allocation and Aliasing"</a>. </li>
</ul>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a5c38846905b1ca0ff228c6081f2fc20c" name="a5c38846905b1ca0ff228c6081f2fc20c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c38846905b1ca0ff228c6081f2fc20c">&#9670;&nbsp;</a></span>allocHandle</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespace_d3_d12_m_a.html#a15e349adce86a40e0417d405aef1af80">AllocHandle</a> D3D12MA::Allocation::allocHandle</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a413aec64eba9f4ec57e912511591b3b8" name="a413aec64eba9f4ec57e912511591b3b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a413aec64eba9f4ec57e912511591b3b8">&#9670;&nbsp;</a></span>block</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">NormalBlock* D3D12MA::Allocation::block</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a4e7380aabcac5b0a1cd833c5c84459c6" name="a4e7380aabcac5b0a1cd833c5c84459c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e7380aabcac5b0a1cd833c5c84459c6">&#9670;&nbsp;</a></span>heap</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ID3D12Heap* D3D12MA::Allocation::heap</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ab1f59d849add2cdbfbebf4eb98db5c97" name="ab1f59d849add2cdbfbebf4eb98db5c97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1f59d849add2cdbfbebf4eb98db5c97">&#9670;&nbsp;</a></span>list</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html#a49c0b7395d40df48949fc68599058a06">CommittedAllocationList</a>* D3D12MA::Allocation::list</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a5b3d5b189021973d9934cbe9f5f266f0" name="a5b3d5b189021973d9934cbe9f5f266f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b3d5b189021973d9934cbe9f5f266f0">&#9670;&nbsp;</a></span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct { ... } D3D12MA::Allocation::m_Committed</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="adc7cf6224b7ca6205d1099a013f40424" name="adc7cf6224b7ca6205d1099a013f40424"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc7cf6224b7ca6205d1099a013f40424">&#9670;&nbsp;</a></span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct { ... } D3D12MA::Allocation::m_Heap</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a35fca5f0b1c5eb46d0bb33cdb7ccc198" name="a35fca5f0b1c5eb46d0bb33cdb7ccc198"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35fca5f0b1c5eb46d0bb33cdb7ccc198">&#9670;&nbsp;</a></span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct { ... } D3D12MA::Allocation::m_Placed</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a6f31560bc71451410a2a907b6d81b48f" name="a6f31560bc71451410a2a907b6d81b48f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f31560bc71451410a2a907b6d81b48f">&#9670;&nbsp;</a></span>next</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a>* D3D12MA::Allocation::next</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="adc3ac89758a915a409e047f9b89aa160" name="adc3ac89758a915a409e047f9b89aa160"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc3ac89758a915a409e047f9b89aa160">&#9670;&nbsp;</a></span>prev</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_d3_d12_m_a_1_1_allocation.html">Allocation</a>* D3D12MA::Allocation::prev</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/include/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>