VulkanMemoryAllocator/docs/html/struct_vma_allocation_info.html

218 lines
16 KiB
HTML
Raw Normal View History

<!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>Vulkan Memory Allocator: VmaAllocationInfo 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">Vulkan 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><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="struct_vma_allocation_info-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">VmaAllocationInfo Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Parameters of <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation.">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>.
<a href="struct_vma_allocation_info.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.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:a7f6b0aa58c135e488e6b40a388dad9d5"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5">memoryType</a></td></tr>
<tr class="memdesc:a7f6b0aa58c135e488e6b40a388dad9d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory type index that this allocation was allocated from. <a href="struct_vma_allocation_info.html#a7f6b0aa58c135e488e6b40a388dad9d5">More...</a><br /></td></tr>
<tr class="separator:a7f6b0aa58c135e488e6b40a388dad9d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0bfb7dfdf79a76ffefc9a94677a2f67"><td class="memItemLeft" align="right" valign="top">VkDeviceMemory&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">deviceMemory</a></td></tr>
<tr class="memdesc:ae0bfb7dfdf79a76ffefc9a94677a2f67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle to Vulkan memory object. <a href="struct_vma_allocation_info.html#ae0bfb7dfdf79a76ffefc9a94677a2f67">More...</a><br /></td></tr>
<tr class="separator:ae0bfb7dfdf79a76ffefc9a94677a2f67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a3c732388dbdc7a23f9365b00825268"><td class="memItemLeft" align="right" valign="top">VkDeviceSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268">offset</a></td></tr>
<tr class="memdesc:a4a3c732388dbdc7a23f9365b00825268"><td class="mdescLeft">&#160;</td><td class="mdescRight">Offset in <code>VkDeviceMemory</code> object to the beginning of this allocation, in bytes. <code>(deviceMemory, offset)</code> pair is unique to this allocation. <a href="struct_vma_allocation_info.html#a4a3c732388dbdc7a23f9365b00825268">More...</a><br /></td></tr>
<tr class="separator:a4a3c732388dbdc7a23f9365b00825268"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac76d113a6a5ccbb09fea00fb25fd18f"><td class="memItemLeft" align="right" valign="top">VkDeviceSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f">size</a></td></tr>
<tr class="memdesc:aac76d113a6a5ccbb09fea00fb25fd18f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of this allocation, in bytes. <a href="struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f">More...</a><br /></td></tr>
<tr class="separator:aac76d113a6a5ccbb09fea00fb25fd18f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5eeffbe2d2f30f53370ff14aefbadbe2"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">pMappedData</a></td></tr>
<tr class="memdesc:a5eeffbe2d2f30f53370ff14aefbadbe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the beginning of this allocation as mapped data. <a href="struct_vma_allocation_info.html#a5eeffbe2d2f30f53370ff14aefbadbe2">More...</a><br /></td></tr>
<tr class="separator:a5eeffbe2d2f30f53370ff14aefbadbe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc507656149c04de7ed95d0042ba2a13"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">pUserData</a></td></tr>
<tr class="memdesc:adc507656149c04de7ed95d0042ba2a13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom general-purpose pointer that was passed as <a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> or set using <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value.">vmaSetAllocationUserData()</a>. <a href="struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13">More...</a><br /></td></tr>
<tr class="separator:adc507656149c04de7ed95d0042ba2a13"><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 <a class="el" href="struct_vma_allocation.html" title="Represents single memory allocation.">VmaAllocation</a> objects, that can be retrieved using function <a class="el" href="vk__mem__alloc_8h.html#a86dd08aba8633bfa4ad0df2e76481d8b" title="Returns current information about specified allocation and atomically marks it as used in current fra...">vmaGetAllocationInfo()</a>. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="ae0bfb7dfdf79a76ffefc9a94677a2f67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0bfb7dfdf79a76ffefc9a94677a2f67">&#9670;&nbsp;</a></span>deviceMemory</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkDeviceMemory VmaAllocationInfo::deviceMemory</td>
</tr>
</table>
</div><div class="memdoc">
<p>Handle to Vulkan memory object. </p>
<p>Same memory object can be shared by multiple allocations.</p>
2020-04-08 15:09:59 +00:00
<p>It can change after call to <a class="el" href="vk__mem__alloc_8h.html#a9f0f8f56db5f7f57fe4454f465142dac" title="Deprecated. Compacts memory by moving allocations.">vmaDefragment()</a> if this allocation is passed to the function, or if allocation is lost.</p>
2017-09-12 18:45:14 +00:00
<p>If the allocation is lost, it is equal to <code>VK_NULL_HANDLE</code>. </p>
</div>
</div>
<a id="a7f6b0aa58c135e488e6b40a388dad9d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f6b0aa58c135e488e6b40a388dad9d5">&#9670;&nbsp;</a></span>memoryType</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint32_t VmaAllocationInfo::memoryType</td>
</tr>
</table>
</div><div class="memdoc">
<p>Memory type index that this allocation was allocated from. </p>
<p>It never changes. </p>
</div>
</div>
<a id="a4a3c732388dbdc7a23f9365b00825268"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a3c732388dbdc7a23f9365b00825268">&#9670;&nbsp;</a></span>offset</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkDeviceSize VmaAllocationInfo::offset</td>
</tr>
</table>
</div><div class="memdoc">
<p>Offset in <code>VkDeviceMemory</code> object to the beginning of this allocation, in bytes. <code>(deviceMemory, offset)</code> pair is unique to this allocation. </p>
<p>You usually don't need to use this offset. If you create a buffer or an image together with the allocation using e.g. function <a class="el" href="vk__mem__alloc_8h.html#ac72ee55598617e8eecca384e746bab51">vmaCreateBuffer()</a>, <a class="el" href="vk__mem__alloc_8h.html#a02a94f25679275851a53e82eacbcfc73" title="Function similar to vmaCreateBuffer().">vmaCreateImage()</a>, functions that operate on these resources refer to the beginning of the buffer or image, not entire device memory block. Functions like <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a>, <a class="el" href="vk__mem__alloc_8h.html#a6b0929b914b60cf2d45cac4bf3547470" title="Binds buffer to allocation.">vmaBindBufferMemory()</a> also refer to the beginning of the allocation and apply this offset automatically.</p>
2020-04-08 15:09:59 +00:00
<p>It can change after call to <a class="el" href="vk__mem__alloc_8h.html#a9f0f8f56db5f7f57fe4454f465142dac" title="Deprecated. Compacts memory by moving allocations.">vmaDefragment()</a> if this allocation is passed to the function, or if allocation is lost. </p>
</div>
</div>
<a id="a5eeffbe2d2f30f53370ff14aefbadbe2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5eeffbe2d2f30f53370ff14aefbadbe2">&#9670;&nbsp;</a></span>pMappedData</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* VmaAllocationInfo::pMappedData</td>
</tr>
</table>
</div><div class="memdoc">
<p>Pointer to the beginning of this allocation as mapped data. </p>
2020-04-08 15:09:59 +00:00
<p>If the allocation hasn't been mapped using <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a> and hasn't been created with <a class="el" href="vk__mem__alloc_8h.html#ad9889c10c798b040d59c92f257cae597a11da372cc3a82931c5e5d6146cd9dd1f" title="Set this flag to use a memory that will be persistently mapped and retrieve pointer to it.">VMA_ALLOCATION_CREATE_MAPPED_BIT</a> flag, this value is null.</p>
<p>It can change after call to <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a>, <a class="el" href="vk__mem__alloc_8h.html#a9bc268595cb33f6ec4d519cfce81ff45" title="Unmaps memory represented by given allocation, mapped previously using vmaMapMemory().">vmaUnmapMemory()</a>. It can also change after call to <a class="el" href="vk__mem__alloc_8h.html#a9f0f8f56db5f7f57fe4454f465142dac" title="Deprecated. Compacts memory by moving allocations.">vmaDefragment()</a> if this allocation is passed to the function. </p>
</div>
</div>
<a id="adc507656149c04de7ed95d0042ba2a13"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc507656149c04de7ed95d0042ba2a13">&#9670;&nbsp;</a></span>pUserData</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* VmaAllocationInfo::pUserData</td>
</tr>
</table>
</div><div class="memdoc">
<p>Custom general-purpose pointer that was passed as <a class="el" href="struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19" title="Custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo...">VmaAllocationCreateInfo::pUserData</a> or set using <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value.">vmaSetAllocationUserData()</a>. </p>
<p>It can change after call to <a class="el" href="vk__mem__alloc_8h.html#af9147d31ffc11d62fc187bde283ed14f" title="Sets pUserData in given allocation to new value.">vmaSetAllocationUserData()</a> for this allocation. </p>
</div>
</div>
<a id="aac76d113a6a5ccbb09fea00fb25fd18f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac76d113a6a5ccbb09fea00fb25fd18f">&#9670;&nbsp;</a></span>size</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">VkDeviceSize VmaAllocationInfo::size</td>
</tr>
</table>
</div><div class="memdoc">
<p>Size of this allocation, in bytes. </p>
<p>It never changes, unless allocation is lost.</p>
<dl class="section note"><dt>Note</dt><dd>Allocation size returned in this variable may be greater than the size requested for the resource e.g. as <code>VkBufferCreateInfo::size</code>. Whole size of the allocation is accessible for operations on memory e.g. using a pointer after mapping with <a class="el" href="vk__mem__alloc_8h.html#ad5bd1243512d099706de88168992f069" title="Maps memory represented by given allocation and returns pointer to it.">vmaMapMemory()</a>, but operations on the resource e.g. using <code>vkCmdCopyBuffer</code> must be limited to the size of the resource. </dd></dl>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
2021-06-09 15:03:10 +00:00
<li>include/<a class="el" href="vk__mem__alloc_8h_source.html">vk_mem_alloc.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>