mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
281 lines
13 KiB
HTML
281 lines
13 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:ga2f711e32e95cf9bf8dff4917230c2e9b"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#ga2f711e32e95cf9bf8dff4917230c2e9b">vmaCreateBuffer</a> (VmaAllocator allocator, const VkBufferCreateInfo *pCreateInfo, const <a class="el" href="struct_vma_memory_requirements.html">VmaMemoryRequirements</a> *pMemoryRequirements, VkBuffer *pBuffer, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
|
<tr class="separator:ga2f711e32e95cf9bf8dff4917230c2e9b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga0d9f4e4ba5bf9aab1f1c746387753d77"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#ga0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer</a> (VmaAllocator allocator, VkBuffer buffer, VmaAllocation allocation)</td></tr>
|
|
<tr class="separator:ga0d9f4e4ba5bf9aab1f1c746387753d77"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9e34bc318ff4b25d1958e79b9db3f1aa"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#ga9e34bc318ff4b25d1958e79b9db3f1aa">vmaCreateImage</a> (VmaAllocator allocator, const VkImageCreateInfo *pCreateInfo, const <a class="el" href="struct_vma_memory_requirements.html">VmaMemoryRequirements</a> *pMemoryRequirements, VkImage *pImage, VmaAllocation *pAllocation, <a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> *pAllocationInfo)</td></tr>
|
|
<tr class="memdesc:ga9e34bc318ff4b25d1958e79b9db3f1aa"><td class="mdescLeft"> </td><td class="mdescRight">Function similar to <a class="el" href="group__layer3.html#ga2f711e32e95cf9bf8dff4917230c2e9b">vmaCreateBuffer()</a>. <a href="#ga9e34bc318ff4b25d1958e79b9db3f1aa">More...</a><br /></td></tr>
|
|
<tr class="separator:ga9e34bc318ff4b25d1958e79b9db3f1aa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__layer3.html#gae50d2cb3b4a3bfd4dd40987234e50e7e">vmaDestroyImage</a> (VmaAllocator allocator, VkImage image, VmaAllocation allocation)</td></tr>
|
|
<tr class="separator:gae50d2cb3b4a3bfd4dd40987234e50e7e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="ga2f711e32e95cf9bf8dff4917230c2e9b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga2f711e32e95cf9bf8dff4917230c2e9b">◆ </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 </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const VkBufferCreateInfo * </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> * </td>
|
|
<td class="paramname"><em>pMemoryRequirements</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VkBuffer * </td>
|
|
<td class="paramname"><em>pBuffer</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation * </td>
|
|
<td class="paramname"><em>pAllocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> * </td>
|
|
<td class="paramname"><em>pAllocationInfo</em> </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">pBuffer</td><td>Buffer that was created. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocation</td><td>Allocation that was created. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Information about allocated memory. It can be later fetched using function <a class="el" href="group__layer2.html#ga86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation. ">vmaGetAllocationInfo()</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>This function automatically:</p>
|
|
<ol type="1">
|
|
<li>Creates buffer.</li>
|
|
<li>Allocates appropriate memory for it.</li>
|
|
<li>Binds the buffer with the memory.</li>
|
|
</ol>
|
|
<p>If any of these operations fail, buffer and allocation are not created, returned value is negative error code, *pBuffer and *pAllocation are null.</p>
|
|
<p>If the function succeeded, you must destroy both buffer and allocation when you no longer need them using either convenience function <a class="el" href="group__layer3.html#ga0d9f4e4ba5bf9aab1f1c746387753d77">vmaDestroyBuffer()</a> or separately, using vkDestroyBuffer() and <a class="el" href="group__layer2.html#ga11f0fbc034fa81a4efedd73d61ce7568" title="Frees memory previously allocated using vmaAllocateMemory(), vmaAllocateMemoryForBuffer(), or vmaAllocateMemoryForImage(). ">vmaFreeMemory()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga9e34bc318ff4b25d1958e79b9db3f1aa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga9e34bc318ff4b25d1958e79b9db3f1aa">◆ </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 </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const VkImageCreateInfo * </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> * </td>
|
|
<td class="paramname"><em>pMemoryRequirements</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VkImage * </td>
|
|
<td class="paramname"><em>pImage</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation * </td>
|
|
<td class="paramname"><em>pAllocation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_vma_allocation_info.html">VmaAllocationInfo</a> * </td>
|
|
<td class="paramname"><em>pAllocationInfo</em> </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#ga2f711e32e95cf9bf8dff4917230c2e9b">vmaCreateBuffer()</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga0d9f4e4ba5bf9aab1f1c746387753d77"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga0d9f4e4ba5bf9aab1f1c746387753d77">◆ </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 </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VkBuffer </td>
|
|
<td class="paramname"><em>buffer</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation </td>
|
|
<td class="paramname"><em>allocation</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gae50d2cb3b4a3bfd4dd40987234e50e7e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gae50d2cb3b4a3bfd4dd40987234e50e7e">◆ </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 </td>
|
|
<td class="paramname"><em>allocator</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VkImage </td>
|
|
<td class="paramname"><em>image</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">VmaAllocation </td>
|
|
<td class="paramname"><em>allocation</em> </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  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|