blob: e9daafa5aed5ea25b2fb97b57383d982c58406fc [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::ALLOCATION_DESC Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr 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="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></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">D3D12MA::ALLOCATION_DESC Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>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>.
<a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_d3_d12_mem_alloc_8h_source.html">D3D12MemAlloc.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a92dec49b788a334fc91c55340dfbace6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645e">ALLOCATION_FLAGS</a>&#160;</td><td class="memItemRight" valign="bottom"><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#a92dec49b788a334fc91c55340dfbace6">Flags</a></td></tr>
<tr class="memdesc:a92dec49b788a334fc91c55340dfbace6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags. <a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#a92dec49b788a334fc91c55340dfbace6">More...</a><br /></td></tr>
<tr class="separator:a92dec49b788a334fc91c55340dfbace6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa46b3c0456e5a23edef3328607ebf4d7"><td class="memItemLeft" align="right" valign="top">D3D12_HEAP_TYPE&#160;</td><td class="memItemRight" valign="bottom"><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#aa46b3c0456e5a23edef3328607ebf4d7">HeapType</a></td></tr>
<tr class="memdesc:aa46b3c0456e5a23edef3328607ebf4d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of memory heap where the new allocation should be placed. <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">More...</a><br /></td></tr>
<tr class="separator:aa46b3c0456e5a23edef3328607ebf4d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97878838f976b2d1e6b1a76881035690"><td class="memItemLeft" align="right" valign="top">D3D12_HEAP_FLAGS&#160;</td><td class="memItemRight" valign="bottom"><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#a97878838f976b2d1e6b1a76881035690">ExtraHeapFlags</a></td></tr>
<tr class="memdesc:a97878838f976b2d1e6b1a76881035690"><td class="mdescLeft">&#160;</td><td class="mdescRight">Additional heap flags to be used when allocating memory. <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">More...</a><br /></td></tr>
<tr class="separator:a97878838f976b2d1e6b1a76881035690"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab06b85f3cf3254f855b29264477e3934"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_d3_d12_m_a_1_1_pool.html">Pool</a> *&#160;</td><td class="memItemRight" valign="bottom"><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">CustomPool</a></td></tr>
<tr class="memdesc:ab06b85f3cf3254f855b29264477e3934"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom pool to place the new resource in. Optional. <a href="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___d_e_s_c.html#ab06b85f3cf3254f855b29264477e3934">More...</a><br /></td></tr>
<tr class="separator:ab06b85f3cf3254f855b29264477e3934"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Parameters 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>. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="ab06b85f3cf3254f855b29264477e3934"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab06b85f3cf3254f855b29264477e3934">&#9670;&nbsp;</a></span>CustomPool</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_pool.html">Pool</a>* D3D12MA::ALLOCATION_DESC::CustomPool</td>
</tr>
</table>
</div><div class="memdoc">
<p>Custom pool to place the new resource in. Optional. </p>
<p>When not NULL, the resource will be created inside specified custom pool. It will then never be created as committed. </p>
</div>
</div>
<a id="a97878838f976b2d1e6b1a76881035690"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97878838f976b2d1e6b1a76881035690">&#9670;&nbsp;</a></span>ExtraHeapFlags</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">D3D12_HEAP_FLAGS D3D12MA::ALLOCATION_DESC::ExtraHeapFlags</td>
</tr>
</table>
</div><div class="memdoc">
<p>Additional heap flags to be used when allocating memory. </p>
<p>In most cases it can be 0.</p>
<ul>
<li>If you use <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>, you don't need to care. Necessary flag <code>D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS</code>, <code>D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES</code>, or <code>D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES</code> is added automatically.</li>
<li>If you use <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>, you should specify one of those <code>ALLOW_ONLY</code> flags. Except when you validate that <a class="el" href="class_d3_d12_m_a_1_1_allocator.html#a8ce95f85e5f2a1d41b81d676b21c04ae" title="Returns cached options retrieved from D3D12 device.">D3D12MA::Allocator::GetD3D12Options()</a><code>.ResourceHeapTier == D3D12_RESOURCE_HEAP_TIER_1</code> - then you can leave it 0.</li>
<li>You can specify additional flags if needed. Then the memory will always be allocated as separate block using <code>D3D12Device::CreateCommittedResource</code> or <code>CreateHeap</code>, not as part of an existing larget block.</li>
</ul>
<p>When <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" title="Custom pool to place the new resource in. Optional.">D3D12MA::ALLOCATION_DESC::CustomPool</a> != NULL this member is ignored. </p>
</div>
</div>
<a id="a92dec49b788a334fc91c55340dfbace6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92dec49b788a334fc91c55340dfbace6">&#9670;&nbsp;</a></span>Flags</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespace_d3_d12_m_a.html#abbad31a7e0b3d09d77f3fb704b77645e">ALLOCATION_FLAGS</a> D3D12MA::ALLOCATION_DESC::Flags</td>
</tr>
</table>
</div><div class="memdoc">
<p>Flags. </p>
</div>
</div>
<a id="aa46b3c0456e5a23edef3328607ebf4d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa46b3c0456e5a23edef3328607ebf4d7">&#9670;&nbsp;</a></span>HeapType</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">D3D12_HEAP_TYPE D3D12MA::ALLOCATION_DESC::HeapType</td>
</tr>
</table>
</div><div class="memdoc">
<p>The type of memory heap where the new allocation should be placed. </p>
<p>It must be one of: <code>D3D12_HEAP_TYPE_DEFAULT</code>, <code>D3D12_HEAP_TYPE_UPLOAD</code>, <code>D3D12_HEAP_TYPE_READBACK</code>.</p>
<p>When <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" title="Custom pool to place the new resource in. Optional.">D3D12MA::ALLOCATION_DESC::CustomPool</a> != NULL this member is ignored. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="_d3_d12_mem_alloc_8h_source.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>