blob: 34696fa92c86aa8c7d4db104eee3477c3c3a9bdf [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::POOL_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 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="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html">POOL_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_p_o_o_l___d_e_s_c-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">D3D12MA::POOL_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_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>.
<a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#details">More...</a></p>
<p><code>#include &lt;D3D12MemAlloc.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ac4ed93b0191344d68c0b4ac1a4822ff4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1">POOL_FLAGS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#ac4ed93b0191344d68c0b4ac1a4822ff4">Flags</a></td></tr>
<tr class="memdesc:ac4ed93b0191344d68c0b4ac1a4822ff4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#ac4ed93b0191344d68c0b4ac1a4822ff4">More...</a><br /></td></tr>
<tr class="separator:ac4ed93b0191344d68c0b4ac1a4822ff4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06e06813bcb5206e9f7a8b0564bf1d6a"><td class="memItemLeft" align="right" valign="top">D3D12_HEAP_PROPERTIES&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a">HeapProperties</a></td></tr>
<tr class="memdesc:a06e06813bcb5206e9f7a8b0564bf1d6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The parameters of memory heap where allocations of this pool should be placed. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a06e06813bcb5206e9f7a8b0564bf1d6a">More...</a><br /></td></tr>
<tr class="separator:a06e06813bcb5206e9f7a8b0564bf1d6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3795956e4fbfe7c3a23546e02e5d28dc"><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_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc">HeapFlags</a></td></tr>
<tr class="memdesc:a3795956e4fbfe7c3a23546e02e5d28dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Heap flags to be used when allocating heaps of this pool. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a3795956e4fbfe7c3a23546e02e5d28dc">More...</a><br /></td></tr>
<tr class="separator:a3795956e4fbfe7c3a23546e02e5d28dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7284cc51a8ed5b551075584256de23c"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#af7284cc51a8ed5b551075584256de23c">BlockSize</a></td></tr>
<tr class="memdesc:af7284cc51a8ed5b551075584256de23c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#af7284cc51a8ed5b551075584256de23c">More...</a><br /></td></tr>
<tr class="separator:af7284cc51a8ed5b551075584256de23c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f10db3911a3bea1becfc9a0dfa5bac8"><td class="memItemLeft" align="right" valign="top">UINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a6f10db3911a3bea1becfc9a0dfa5bac8">MinBlockCount</a></td></tr>
<tr class="memdesc:a6f10db3911a3bea1becfc9a0dfa5bac8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a6f10db3911a3bea1becfc9a0dfa5bac8">More...</a><br /></td></tr>
<tr class="separator:a6f10db3911a3bea1becfc9a0dfa5bac8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbce3a99f253928f9c3c09fa16015f9e"><td class="memItemLeft" align="right" valign="top">UINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#abbce3a99f253928f9c3c09fa16015f9e">MaxBlockCount</a></td></tr>
<tr class="memdesc:abbce3a99f253928f9c3c09fa16015f9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#abbce3a99f253928f9c3c09fa16015f9e">More...</a><br /></td></tr>
<tr class="separator:abbce3a99f253928f9c3c09fa16015f9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a6283eeb1f3f99d8c4ae264aec7f749"><td class="memItemLeft" align="right" valign="top">UINT64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a0a6283eeb1f3f99d8c4ae264aec7f749">MinAllocationAlignment</a></td></tr>
<tr class="memdesc:a0a6283eeb1f3f99d8c4ae264aec7f749"><td class="mdescLeft">&#160;</td><td class="mdescRight">Additional minimum alignment to be used for all allocations created from this pool. Can be 0. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a0a6283eeb1f3f99d8c4ae264aec7f749">More...</a><br /></td></tr>
<tr class="separator:a0a6283eeb1f3f99d8c4ae264aec7f749"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a475840ec05c19732c8d5aa8bb27270f4"><td class="memItemLeft" align="right" valign="top">ID3D12ProtectedResourceSession *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4">pProtectedSession</a></td></tr>
<tr class="memdesc:a475840ec05c19732c8d5aa8bb27270f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Additional parameter allowing pool to create resources with passed protected session. <a href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a475840ec05c19732c8d5aa8bb27270f4">More...</a><br /></td></tr>
<tr class="separator:a475840ec05c19732c8d5aa8bb27270f4"><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_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>. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="af7284cc51a8ed5b551075584256de23c" name="af7284cc51a8ed5b551075584256de23c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7284cc51a8ed5b551075584256de23c">&#9670;&nbsp;</a></span>BlockSize</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::POOL_DESC::BlockSize</td>
</tr>
</table>
</div><div class="memdoc">
<p>Size of a single heap (memory block) to be allocated as part of this pool, in bytes. Optional. </p>
<p >Specify nonzero to set explicit, constant size of memory blocks used by this pool. Leave 0 to use default and let the library manage block sizes automatically. Then sizes of particular blocks may vary. </p>
</div>
</div>
<a id="ac4ed93b0191344d68c0b4ac1a4822ff4" name="ac4ed93b0191344d68c0b4ac1a4822ff4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4ed93b0191344d68c0b4ac1a4822ff4">&#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#a919d8545365d6b7209a964f2b99936d1">POOL_FLAGS</a> D3D12MA::POOL_DESC::Flags</td>
</tr>
</table>
</div><div class="memdoc">
<p>Flags. </p>
</div>
</div>
<a id="a3795956e4fbfe7c3a23546e02e5d28dc" name="a3795956e4fbfe7c3a23546e02e5d28dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3795956e4fbfe7c3a23546e02e5d28dc">&#9670;&nbsp;</a></span>HeapFlags</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">D3D12_HEAP_FLAGS D3D12MA::POOL_DESC::HeapFlags</td>
</tr>
</table>
</div><div class="memdoc">
<p>Heap flags to be used when allocating heaps of this pool. </p>
<p >It should contain one of these values, depending on type of resources you are going to create in this heap: <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 ResourceHeapTier = 2, then it may be <code>D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES</code> = 0.</p>
<p >You can specify additional flags if needed. </p>
</div>
</div>
<a id="a06e06813bcb5206e9f7a8b0564bf1d6a" name="a06e06813bcb5206e9f7a8b0564bf1d6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06e06813bcb5206e9f7a8b0564bf1d6a">&#9670;&nbsp;</a></span>HeapProperties</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">D3D12_HEAP_PROPERTIES D3D12MA::POOL_DESC::HeapProperties</td>
</tr>
</table>
</div><div class="memdoc">
<p>The parameters of memory heap where allocations of this pool should be placed. </p>
<p >In the simplest case, just fill it with zeros and set <code>Type</code> to one of: <code>D3D12_HEAP_TYPE_DEFAULT</code>, <code>D3D12_HEAP_TYPE_UPLOAD</code>, <code>D3D12_HEAP_TYPE_READBACK</code>. Additional parameters can be used e.g. to utilize UMA. </p>
</div>
</div>
<a id="abbce3a99f253928f9c3c09fa16015f9e" name="abbce3a99f253928f9c3c09fa16015f9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbce3a99f253928f9c3c09fa16015f9e">&#9670;&nbsp;</a></span>MaxBlockCount</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT D3D12MA::POOL_DESC::MaxBlockCount</td>
</tr>
</table>
</div><div class="memdoc">
<p>Maximum number of heaps (memory blocks) that can be allocated in this pool. Optional. </p>
<p >Set to 0 to use default, which is <code>UINT64_MAX</code>, which means no limit.</p>
<p >Set to same value as <a class="el" href="struct_d3_d12_m_a_1_1_p_o_o_l___d_e_s_c.html#a6f10db3911a3bea1becfc9a0dfa5bac8" title="Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty....">D3D12MA::POOL_DESC::MinBlockCount</a> to have fixed amount of memory allocated throughout whole lifetime of this pool. </p>
</div>
</div>
<a id="a0a6283eeb1f3f99d8c4ae264aec7f749" name="a0a6283eeb1f3f99d8c4ae264aec7f749"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a6283eeb1f3f99d8c4ae264aec7f749">&#9670;&nbsp;</a></span>MinAllocationAlignment</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::POOL_DESC::MinAllocationAlignment</td>
</tr>
</table>
</div><div class="memdoc">
<p>Additional minimum alignment to be used for all allocations created from this pool. Can be 0. </p>
<p >Leave 0 (default) not to impose any additional alignment. If not 0, it must be a power of two. </p>
</div>
</div>
<a id="a6f10db3911a3bea1becfc9a0dfa5bac8" name="a6f10db3911a3bea1becfc9a0dfa5bac8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f10db3911a3bea1becfc9a0dfa5bac8">&#9670;&nbsp;</a></span>MinBlockCount</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT D3D12MA::POOL_DESC::MinBlockCount</td>
</tr>
</table>
</div><div class="memdoc">
<p>Minimum number of heaps (memory blocks) to be always allocated in this pool, even if they stay empty. Optional. </p>
<p >Set to 0 to have no preallocated blocks and allow the pool be completely empty. </p>
</div>
</div>
<a id="a475840ec05c19732c8d5aa8bb27270f4" name="a475840ec05c19732c8d5aa8bb27270f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a475840ec05c19732c8d5aa8bb27270f4">&#9670;&nbsp;</a></span>pProtectedSession</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ID3D12ProtectedResourceSession* D3D12MA::POOL_DESC::pProtectedSession</td>
</tr>
</table>
</div><div class="memdoc">
<p>Additional parameter allowing pool to create resources with passed protected session. </p>
<p >If not null then all the heaps and committed resources will be created with this parameter. Valid only if ID3D12Device4 interface is present in current Windows SDK! </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>D:/PROJECTS/D3D12 Memory Allocator/REPO/include/<a class="el" href="_d3_d12_mem_alloc_8h.html">D3D12MemAlloc.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>