| <!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.2"/> |
| <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| <title>Vulkan Memory Allocator: VmaDefragmentationPassMoveInfo 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.2 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&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&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><!-- top --> |
| <div class="header"> |
| <div class="summary"> |
| <a href="#pub-attribs">Public Attributes</a> | |
| <a href="struct_vma_defragmentation_pass_move_info-members.html">List of all members</a> </div> |
| <div class="headertitle"><div class="title">VmaDefragmentationPassMoveInfo Struct Reference<div class="ingroups"><a class="el" href="group__group__alloc.html">Memory allocation</a></div></div></div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>Parameters for incremental defragmentation steps. |
| <a href="struct_vma_defragmentation_pass_move_info.html#details">More...</a></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:a1b3e18c23f9691f35baf183e615c4408"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_defragmentation_pass_move_info.html#a1b3e18c23f9691f35baf183e615c4408">moveCount</a></td></tr> |
| <tr class="memdesc:a1b3e18c23f9691f35baf183e615c4408"><td class="mdescLeft"> </td><td class="mdescRight">Number of elements in the <code>pMoves</code> array. <a href="struct_vma_defragmentation_pass_move_info.html#a1b3e18c23f9691f35baf183e615c4408">More...</a><br /></td></tr> |
| <tr class="separator:a1b3e18c23f9691f35baf183e615c4408"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:adfa7a4994afd9b940e7f1dfaf436a725"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_vma_defragmentation_move.html">VmaDefragmentationMove</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_defragmentation_pass_move_info.html#adfa7a4994afd9b940e7f1dfaf436a725">pMoves</a></td></tr> |
| <tr class="memdesc:adfa7a4994afd9b940e7f1dfaf436a725"><td class="mdescLeft"> </td><td class="mdescRight">Array of moves to be performed by the user in the current defragmentation pass. <a href="struct_vma_defragmentation_pass_move_info.html#adfa7a4994afd9b940e7f1dfaf436a725">More...</a><br /></td></tr> |
| <tr class="separator:adfa7a4994afd9b940e7f1dfaf436a725"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p >Parameters for incremental defragmentation steps. </p> |
| <p >To be used with function <a class="el" href="group__group__alloc.html#ga980d7da2ce3b1fd5c8b8476bc362cc00" title="Starts single defragmentation pass.">vmaBeginDefragmentationPass()</a>. </p> |
| </div><h2 class="groupheader">Member Data Documentation</h2> |
| <a id="a1b3e18c23f9691f35baf183e615c4408" name="a1b3e18c23f9691f35baf183e615c4408"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a1b3e18c23f9691f35baf183e615c4408">◆ </a></span>moveCount</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint32_t VmaDefragmentationPassMoveInfo::moveCount</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Number of elements in the <code>pMoves</code> array. </p> |
| |
| </div> |
| </div> |
| <a id="adfa7a4994afd9b940e7f1dfaf436a725" name="adfa7a4994afd9b940e7f1dfaf436a725"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#adfa7a4994afd9b940e7f1dfaf436a725">◆ </a></span>pMoves</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="struct_vma_defragmentation_move.html">VmaDefragmentationMove</a>* VmaDefragmentationPassMoveInfo::pMoves</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Array of moves to be performed by the user in the current defragmentation pass. </p> |
| <p >Pointer to an array of <code>moveCount</code> elements, owned by VMA, created in <a class="el" href="group__group__alloc.html#ga980d7da2ce3b1fd5c8b8476bc362cc00" title="Starts single defragmentation pass.">vmaBeginDefragmentationPass()</a>, destroyed in <a class="el" href="group__group__alloc.html#gaded05a445742a00718ee766144c5c226" title="Ends single defragmentation pass.">vmaEndDefragmentationPass()</a>.</p> |
| <p >For each element, you should:</p> |
| <ol type="1"> |
| <li>Create a new buffer/image in the place pointed by VmaDefragmentationMove::dstMemory + VmaDefragmentationMove::dstOffset.</li> |
| <li>Copy data from the <a class="el" href="struct_vma_defragmentation_move.html#a25aa1bb64efc507a49c6cbc50689f862" title="Allocation that should be moved.">VmaDefragmentationMove::srcAllocation</a> e.g. using <code>vkCmdCopyBuffer</code>, <code>vkCmdCopyImage</code>.</li> |
| <li>Make sure these commands finished executing on the GPU.</li> |
| <li>Destroy the old buffer/image.</li> |
| </ol> |
| <p >Only then you can finish defragmentation pass by calling <a class="el" href="group__group__alloc.html#gaded05a445742a00718ee766144c5c226" title="Ends single defragmentation pass.">vmaEndDefragmentationPass()</a>. After this call, the allocation will point to the new place in memory.</p> |
| <p >Alternatively, if you cannot move specific allocation, you can set <a class="el" href="struct_vma_defragmentation_move.html#a20996a4686c9246dff77b375ac4a91e2" title="Operation to be performed on the allocation by vmaEndDefragmentationPass(). Default value is VMA_DEFR...">VmaDefragmentationMove::operation</a> to <a class="el" href="group__group__alloc.html#ggada9e3861caf96f08894b0bcc160ec257ad25bc6f816b226b4fd5170e845f218d2" title="Set this value if you cannot move the allocation. New place reserved at dstTmpAllocation will be free...">VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE</a>.</p> |
| <p >Alternatively, if you decide you want to completely remove the allocation:</p> |
| <ol type="1"> |
| <li>Destroy its buffer/image.</li> |
| <li>Set <a class="el" href="struct_vma_defragmentation_move.html#a20996a4686c9246dff77b375ac4a91e2" title="Operation to be performed on the allocation by vmaEndDefragmentationPass(). Default value is VMA_DEFR...">VmaDefragmentationMove::operation</a> to <a class="el" href="group__group__alloc.html#ggada9e3861caf96f08894b0bcc160ec257a9786f8492a9be2c03bd26395e352ab85" title="Set this value if you decide to abandon the allocation and you destroyed the buffer/image....">VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY</a>.</li> |
| </ol> |
| <p >Then, after <a class="el" href="group__group__alloc.html#gaded05a445742a00718ee766144c5c226" title="Ends single defragmentation pass.">vmaEndDefragmentationPass()</a> the allocation will be freed. </p> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this struct was generated from the following file:<ul> |
| <li>D:/PROJECTS/Vulkan Memory Allocator/REPO/include/<a class="el" href="vk__mem__alloc_8h.html">vk_mem_alloc.h</a></li> |
| </ul> |
| </div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 |
| </small></address> |
| </body> |
| </html> |