mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 01:08:31 +00:00
Change in the defragmentation API. Compatibility breaking!
Removed VmaDefragmentationMove::dstMemory, dstOffset, internalData, added dstTmpAllocation. Code by @medranSolus
This commit is contained in:
parent
80a07979f5
commit
7d182e2c5a
14 changed files with 70 additions and 136 deletions
|
@ -712,11 +712,11 @@ Functions</h2></td></tr>
|
|||
|
||||
<p>Operation performed on single defragmentation move. See structure <a class="el" href="struct_vma_defragmentation_move.html" title="Single move of an allocation to be done for defragmentation.">VmaDefragmentationMove</a>. </p>
|
||||
<table class="fieldtable">
|
||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggada9e3861caf96f08894b0bcc160ec257ad4a06ac46c4cb1c67b0ebc1edfab9f18" name="ggada9e3861caf96f08894b0bcc160ec257ad4a06ac46c4cb1c67b0ebc1edfab9f18"></a>VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY </td><td class="fielddoc"><p >Buffer/image has been recreated at <code>dstMemory</code> + <code>dstOffset</code>, data has been copied, old buffer/image has been destroyed. <code>srcAllocation</code> should be changed to point to the new place. This is the default value set by <a class="el" href="group__group__alloc.html#ga980d7da2ce3b1fd5c8b8476bc362cc00" title="Starts single defragmentation pass.">vmaBeginDefragmentationPass()</a>. </p>
|
||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggada9e3861caf96f08894b0bcc160ec257ad4a06ac46c4cb1c67b0ebc1edfab9f18" name="ggada9e3861caf96f08894b0bcc160ec257ad4a06ac46c4cb1c67b0ebc1edfab9f18"></a>VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY </td><td class="fielddoc"><p >Buffer/image has been recreated at <code>dstTmpAllocation</code>, data has been copied, old buffer/image has been destroyed. <code>srcAllocation</code> should be changed to point to the new place. This is the default value set by <a class="el" href="group__group__alloc.html#ga980d7da2ce3b1fd5c8b8476bc362cc00" title="Starts single defragmentation pass.">vmaBeginDefragmentationPass()</a>. </p>
|
||||
</td></tr>
|
||||
<tr><td class="fieldname"><a id="ggada9e3861caf96f08894b0bcc160ec257ad25bc6f816b226b4fd5170e845f218d2" name="ggada9e3861caf96f08894b0bcc160ec257ad25bc6f816b226b4fd5170e845f218d2"></a>VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE </td><td class="fielddoc"><p >Set this value if you cannot move the allocation. New place reserved <code>dstMemory</code> + <code>dstOffset</code> will be freed. <code>srcAllocation</code> will remain unchanged. </p>
|
||||
<tr><td class="fieldname"><a id="ggada9e3861caf96f08894b0bcc160ec257ad25bc6f816b226b4fd5170e845f218d2" name="ggada9e3861caf96f08894b0bcc160ec257ad25bc6f816b226b4fd5170e845f218d2"></a>VMA_DEFRAGMENTATION_MOVE_OPERATION_IGNORE </td><td class="fielddoc"><p >Set this value if you cannot move the allocation. New place reserved at <code>dstTmpAllocation</code> will be freed. <code>srcAllocation</code> will remain unchanged. </p>
|
||||
</td></tr>
|
||||
<tr><td class="fieldname"><a id="ggada9e3861caf96f08894b0bcc160ec257a9786f8492a9be2c03bd26395e352ab85" name="ggada9e3861caf96f08894b0bcc160ec257a9786f8492a9be2c03bd26395e352ab85"></a>VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY </td><td class="fielddoc"><p >Set this value if you decide to abandon the allocation and you destroyed the buffer/image. New place reserved <code>dstMemory</code> + <code>dstOffset</code> will be freed, along with <code>srcAllocation</code>. </p>
|
||||
<tr><td class="fieldname"><a id="ggada9e3861caf96f08894b0bcc160ec257a9786f8492a9be2c03bd26395e352ab85" name="ggada9e3861caf96f08894b0bcc160ec257a9786f8492a9be2c03bd26395e352ab85"></a>VMA_DEFRAGMENTATION_MOVE_OPERATION_DESTROY </td><td class="fielddoc"><p >Set this value if you decide to abandon the allocation and you destroyed the buffer/image. New place reserved at <code>dstTmpAllocation</code> will be freed, along with <code>srcAllocation</code>, which will be destroyed. </p>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
@ -1862,7 +1862,7 @@ Functions</h2></td></tr>
|
|||
<p>Returns <code>VK_SUCCESS</code> if no more moves are possible or <code>VK_INCOMPLETE</code> if more defragmentations are possible.</p>
|
||||
<p >Ends incremental defragmentation pass and commits all defragmentation moves from <code>pPassInfo</code>. After this call:</p>
|
||||
<ul>
|
||||
<li>Allocations at <code>pPassInfo[i].srcAllocation</code> that had <code>pPassInfo[i].operation ==</code> <a class="el" href="group__group__alloc.html#ggada9e3861caf96f08894b0bcc160ec257ad4a06ac46c4cb1c67b0ebc1edfab9f18" title="Buffer/image has been recreated at dstMemory + dstOffset, data has been copied, old buffer/image has ...">VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY</a> (which is the default) will be pointing to the new destination place.</li>
|
||||
<li>Allocations at <code>pPassInfo[i].srcAllocation</code> that had <code>pPassInfo[i].operation ==</code> <a class="el" href="group__group__alloc.html#ggada9e3861caf96f08894b0bcc160ec257ad4a06ac46c4cb1c67b0ebc1edfab9f18" title="Buffer/image has been recreated at dstTmpAllocation, data has been copied, old buffer/image has been ...">VMA_DEFRAGMENTATION_MOVE_OPERATION_COPY</a> (which is the default) will be pointing to the new destination place.</li>
|
||||
<li>Allocation at <code>pPassInfo[i].srcAllocation</code> that had <code>pPassInfo[i].operation ==</code> <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> will be freed.</li>
|
||||
</ul>
|
||||
<p >If no more moves are possible you can end whole defragmentation. </p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue