VulkanMemoryAllocator/docs/html/group__layer3.html

268 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Vulkan Memory Allocator: Layer 3 Creating Buffers and Images</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">Vulkan Memory Allocator
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- 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 class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Layer 3 Creating Buffers and Images</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga6cafa3a644324a1e0c9165494db11648"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#ga6cafa3a644324a1e0c9165494db11648">vmaCreateBuffer</a> (VmaAllocator allocator, const VkBufferCreateInfo *pCreateInfo, const <a class="el" href="struct_vma_memory_requirements.html">VmaMemoryRequirements</a> *pMemoryRequirements, VkBuffer *pBuffer, VkMappedMemoryRange *pMemory, uint32_t *pMemoryTypeIndex)</td></tr>
<tr class="separator:ga6cafa3a644324a1e0c9165494db11648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga967857c06b8232b2a54936daf36d1535"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#ga967857c06b8232b2a54936daf36d1535">vmaDestroyBuffer</a> (VmaAllocator allocator, VkBuffer buffer)</td></tr>
<tr class="separator:ga967857c06b8232b2a54936daf36d1535"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9646281a3d9abc9f4d0bc5632db117de"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#ga9646281a3d9abc9f4d0bc5632db117de">vmaCreateImage</a> (VmaAllocator allocator, const VkImageCreateInfo *pCreateInfo, const <a class="el" href="struct_vma_memory_requirements.html">VmaMemoryRequirements</a> *pMemoryRequirements, VkImage *pImage, VkMappedMemoryRange *pMemory, uint32_t *pMemoryTypeIndex)</td></tr>
<tr class="memdesc:ga9646281a3d9abc9f4d0bc5632db117de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function similar to <a class="el" href="group__layer3.html#ga6cafa3a644324a1e0c9165494db11648">vmaCreateBuffer()</a>. <a href="#ga9646281a3d9abc9f4d0bc5632db117de">More...</a><br /></td></tr>
<tr class="separator:ga9646281a3d9abc9f4d0bc5632db117de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9377799736c4a1262b41ee441e5fc877"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#ga9377799736c4a1262b41ee441e5fc877">vmaDestroyImage</a> (VmaAllocator allocator, VkImage image)</td></tr>
<tr class="separator:ga9377799736c4a1262b41ee441e5fc877"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga6cafa3a644324a1e0c9165494db11648"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6cafa3a644324a1e0c9165494db11648">&#9670;&nbsp;</a></span>vmaCreateBuffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkResult vmaCreateBuffer </td>
<td>(</td>
<td class="paramtype">VmaAllocator&#160;</td>
<td class="paramname"><em>allocator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const VkBufferCreateInfo *&#160;</td>
<td class="paramname"><em>pCreateInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="struct_vma_memory_requirements.html">VmaMemoryRequirements</a> *&#160;</td>
<td class="paramname"><em>pMemoryRequirements</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkBuffer *&#160;</td>
<td class="paramname"><em>pBuffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkMappedMemoryRange *&#160;</td>
<td class="paramname"><em>pMemory</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t *&#160;</td>
<td class="paramname"><em>pMemoryTypeIndex</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">pMemory</td><td>Optional. Pass null if you don't need this information. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pMemoryTypeIndex</td><td>Optional. Pass null if you don't need this information.</td></tr>
</table>
</dd>
</dl>
<p>This function automatically:</p>
<ol type="1">
<li>Creates buffer/image.</li>
<li>Allocates appropriate memory for it.</li>
<li>Binds the buffer/image with the memory.</li>
</ol>
<p>You do not (and should not) pass returned pMemory to vmaFreeMemory. Only calling <a class="el" href="group__layer3.html#ga967857c06b8232b2a54936daf36d1535">vmaDestroyBuffer()</a> / <a class="el" href="group__layer3.html#ga9377799736c4a1262b41ee441e5fc877">vmaDestroyImage()</a> is required for objects created using <a class="el" href="group__layer3.html#ga6cafa3a644324a1e0c9165494db11648">vmaCreateBuffer()</a> / <a class="el" href="group__layer3.html#ga9646281a3d9abc9f4d0bc5632db117de" title="Function similar to vmaCreateBuffer(). ">vmaCreateImage()</a>.</p>
<p>All allocated buffers and images are also automatically destroyed in <a class="el" href="group__general.html#gaa8d164061c88f22fb1fd3c8f3534bc1d" title="Destroys allocator object. ">vmaDestroyAllocator()</a>, along with their memory allocations. </p>
</div>
</div>
<a id="ga9646281a3d9abc9f4d0bc5632db117de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9646281a3d9abc9f4d0bc5632db117de">&#9670;&nbsp;</a></span>vmaCreateImage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkResult vmaCreateImage </td>
<td>(</td>
<td class="paramtype">VmaAllocator&#160;</td>
<td class="paramname"><em>allocator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const VkImageCreateInfo *&#160;</td>
<td class="paramname"><em>pCreateInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="struct_vma_memory_requirements.html">VmaMemoryRequirements</a> *&#160;</td>
<td class="paramname"><em>pMemoryRequirements</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkImage *&#160;</td>
<td class="paramname"><em>pImage</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkMappedMemoryRange *&#160;</td>
<td class="paramname"><em>pMemory</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t *&#160;</td>
<td class="paramname"><em>pMemoryTypeIndex</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Function similar to <a class="el" href="group__layer3.html#ga6cafa3a644324a1e0c9165494db11648">vmaCreateBuffer()</a>. </p>
</div>
</div>
<a id="ga967857c06b8232b2a54936daf36d1535"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga967857c06b8232b2a54936daf36d1535">&#9670;&nbsp;</a></span>vmaDestroyBuffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void vmaDestroyBuffer </td>
<td>(</td>
<td class="paramtype">VmaAllocator&#160;</td>
<td class="paramname"><em>allocator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkBuffer&#160;</td>
<td class="paramname"><em>buffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ga9377799736c4a1262b41ee441e5fc877"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9377799736c4a1262b41ee441e5fc877">&#9670;&nbsp;</a></span>vmaDestroyImage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void vmaDestroyImage </td>
<td>(</td>
<td class="paramtype">VmaAllocator&#160;</td>
<td class="paramname"><em>allocator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VkImage&#160;</td>
<td class="paramname"><em>image</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>