blob: 8d0b6883bc84d02f441c45ee2fca038a82c62c0d [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::Budget 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_budget.html">Budget</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_budget-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">D3D12MA::Budget Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Statistics of current memory usage and available budget, in bytes, for GPU or CPU memory.
<a href="struct_d3_d12_m_a_1_1_budget.html#details">More...</a></p>
<p><code>#include &lt;D3D12MemAlloc.h&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:ad1ad5d8521993cb623255ee1709a1c4c"><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_budget.html#ad1ad5d8521993cb623255ee1709a1c4c">BlockBytes</a></td></tr>
<tr class="memdesc:ad1ad5d8521993cb623255ee1709a1c4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sum size of all memory blocks allocated from particular heap type, in bytes. <a href="struct_d3_d12_m_a_1_1_budget.html#ad1ad5d8521993cb623255ee1709a1c4c">More...</a><br /></td></tr>
<tr class="separator:ad1ad5d8521993cb623255ee1709a1c4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcb043908bd528852f8ef3867ad76099"><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_budget.html#abcb043908bd528852f8ef3867ad76099">AllocationBytes</a></td></tr>
<tr class="memdesc:abcb043908bd528852f8ef3867ad76099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sum size of all allocations created in particular heap type, in bytes. <a href="struct_d3_d12_m_a_1_1_budget.html#abcb043908bd528852f8ef3867ad76099">More...</a><br /></td></tr>
<tr class="separator:abcb043908bd528852f8ef3867ad76099"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77a8c9e32d6602f95b7d1c285cddd253"><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_budget.html#a77a8c9e32d6602f95b7d1c285cddd253">UsageBytes</a></td></tr>
<tr class="memdesc:a77a8c9e32d6602f95b7d1c285cddd253"><td class="mdescLeft">&#160;</td><td class="mdescRight">Estimated current memory usage of the program, in bytes. <a href="struct_d3_d12_m_a_1_1_budget.html#a77a8c9e32d6602f95b7d1c285cddd253">More...</a><br /></td></tr>
<tr class="separator:a77a8c9e32d6602f95b7d1c285cddd253"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a326515f08d89ee2e31dcfdd5c1e8ac71"><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_budget.html#a326515f08d89ee2e31dcfdd5c1e8ac71">BudgetBytes</a></td></tr>
<tr class="memdesc:a326515f08d89ee2e31dcfdd5c1e8ac71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Estimated amount of memory available to the program, in bytes. <a href="struct_d3_d12_m_a_1_1_budget.html#a326515f08d89ee2e31dcfdd5c1e8ac71">More...</a><br /></td></tr>
<tr class="separator:a326515f08d89ee2e31dcfdd5c1e8ac71"><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>Statistics of current memory usage and available budget, in bytes, for GPU or CPU memory. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="abcb043908bd528852f8ef3867ad76099"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abcb043908bd528852f8ef3867ad76099">&#9670;&nbsp;</a></span>AllocationBytes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::Budget::AllocationBytes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sum size of all allocations created in particular heap type, in bytes. </p>
<p>Always less or equal than <code>BlockBytes</code>. Difference <code>BlockBytes - AllocationBytes</code> is the amount of memory allocated but unused - available for new allocations or wasted due to fragmentation. </p>
</div>
</div>
<a id="ad1ad5d8521993cb623255ee1709a1c4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1ad5d8521993cb623255ee1709a1c4c">&#9670;&nbsp;</a></span>BlockBytes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::Budget::BlockBytes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sum size of all memory blocks allocated from particular heap type, in bytes. </p>
</div>
</div>
<a id="a326515f08d89ee2e31dcfdd5c1e8ac71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a326515f08d89ee2e31dcfdd5c1e8ac71">&#9670;&nbsp;</a></span>BudgetBytes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::Budget::BudgetBytes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Estimated amount of memory available to the program, in bytes. </p>
<p>Fetched from system using <code>IDXGIAdapter3::QueryVideoMemoryInfo</code> if enabled.</p>
<p>It might be different (most probably smaller) than memory sizes reported in <code>DXGI_ADAPTER_DESC</code> due to factors external to the program, like other programs also consuming system resources. Difference <code>BudgetBytes - UsageBytes</code> is the amount of additional memory that can probably be allocated without problems. Exceeding the budget may result in various problems. </p>
</div>
</div>
<a id="a77a8c9e32d6602f95b7d1c285cddd253"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77a8c9e32d6602f95b7d1c285cddd253">&#9670;&nbsp;</a></span>UsageBytes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UINT64 D3D12MA::Budget::UsageBytes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Estimated current memory usage of the program, in bytes. </p>
<p>Fetched from system using <code>IDXGIAdapter3::QueryVideoMemoryInfo</code> if enabled.</p>
<p>It might be different than <code>BlockBytes</code> (usually higher) due to additional implicit objects also occupying the memory, like swapchain, pipeline state objects, descriptor heaps, command lists, or memory blocks allocated outside of this library, if any. </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.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>