mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-22 15:04:34 +00:00
Revert "change documentation to allow defragmentation of only buffers not images"
This reverts commit c9f948243c
.
Fixes #59
This commit is contained in:
parent
0186958ee2
commit
d53dc4b211
@ -103,7 +103,13 @@ Defragmenting GPU memory</h1>
|
|||||||
<p>You may try not to block your entire program to wait until defragmentation finishes, but do it in the background, as long as you carefully fullfill requirements described in function <a class="el" href="vk__mem__alloc_8h.html#a36ba776fd7fd5cb1e9359fdc0d8e6e8a" title="Begins defragmentation process.">vmaDefragmentationBegin()</a>.</p>
|
<p>You may try not to block your entire program to wait until defragmentation finishes, but do it in the background, as long as you carefully fullfill requirements described in function <a class="el" href="vk__mem__alloc_8h.html#a36ba776fd7fd5cb1e9359fdc0d8e6e8a" title="Begins defragmentation process.">vmaDefragmentationBegin()</a>.</p>
|
||||||
<h1><a class="anchor" id="defragmentation_additional_notes"></a>
|
<h1><a class="anchor" id="defragmentation_additional_notes"></a>
|
||||||
Additional notes</h1>
|
Additional notes</h1>
|
||||||
<p><b>It is only legal to defragment allocations bound to buffers, not images!</b></p>
|
<p>It is only legal to defragment allocations bound to:</p>
|
||||||
|
<ul>
|
||||||
|
<li>buffers</li>
|
||||||
|
<li>images created with <code>VK_IMAGE_CREATE_ALIAS_BIT</code>, <code>VK_IMAGE_TILING_LINEAR</code>, and being currently in <code>VK_IMAGE_LAYOUT_GENERAL</code> or <code>VK_IMAGE_LAYOUT_PREINITIALIZED</code>.</li>
|
||||||
|
</ul>
|
||||||
|
<p>Defragmentation of images created with <code>VK_IMAGE_TILING_OPTIMAL</code> or in any other layout may give undefined results.</p>
|
||||||
|
<p>If you defragment allocations bound to images, new images to be bound to new memory region after defragmentation should be created with <code>VK_IMAGE_LAYOUT_PREINITIALIZED</code> and then transitioned to their original layout from before defragmentation if needed using an image memory barrier.</p>
|
||||||
<p>While using defragmentation, you may experience validation layer warnings, which you just need to ignore. See <a class="el" href="general_considerations.html#general_considerations_validation_layer_warnings">Validation layer warnings</a>.</p>
|
<p>While using defragmentation, you may experience validation layer warnings, which you just need to ignore. See <a class="el" href="general_considerations.html#general_considerations_validation_layer_warnings">Validation layer warnings</a>.</p>
|
||||||
<p>Please don't expect memory to be fully compacted after defragmentation. Algorithms inside are based on some heuristics that try to maximize number of Vulkan memory blocks to make totally empty to release them, as well as to maximimze continuous empty space inside remaining blocks, while minimizing the number and size of allocations that need to be moved. Some fragmentation may still remain - this is normal.</p>
|
<p>Please don't expect memory to be fully compacted after defragmentation. Algorithms inside are based on some heuristics that try to maximize number of Vulkan memory blocks to make totally empty to release them, as well as to maximimze continuous empty space inside remaining blocks, while minimizing the number and size of allocations that need to be moved. Some fragmentation may still remain - this is normal.</p>
|
||||||
<h1><a class="anchor" id="defragmentation_custom_algorithm"></a>
|
<h1><a class="anchor" id="defragmentation_custom_algorithm"></a>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -907,7 +907,19 @@ in function vmaDefragmentationBegin().
|
|||||||
|
|
||||||
\section defragmentation_additional_notes Additional notes
|
\section defragmentation_additional_notes Additional notes
|
||||||
|
|
||||||
<b>It is only legal to defragment allocations bound to buffers, not images!</b>
|
It is only legal to defragment allocations bound to:
|
||||||
|
|
||||||
|
- buffers
|
||||||
|
- images created with `VK_IMAGE_CREATE_ALIAS_BIT`, `VK_IMAGE_TILING_LINEAR`, and
|
||||||
|
being currently in `VK_IMAGE_LAYOUT_GENERAL` or `VK_IMAGE_LAYOUT_PREINITIALIZED`.
|
||||||
|
|
||||||
|
Defragmentation of images created with `VK_IMAGE_TILING_OPTIMAL` or in any other
|
||||||
|
layout may give undefined results.
|
||||||
|
|
||||||
|
If you defragment allocations bound to images, new images to be bound to new
|
||||||
|
memory region after defragmentation should be created with `VK_IMAGE_LAYOUT_PREINITIALIZED`
|
||||||
|
and then transitioned to their original layout from before defragmentation if
|
||||||
|
needed using an image memory barrier.
|
||||||
|
|
||||||
While using defragmentation, you may experience validation layer warnings, which you just need to ignore.
|
While using defragmentation, you may experience validation layer warnings, which you just need to ignore.
|
||||||
See [Validation layer warnings](@ref general_considerations_validation_layer_warnings).
|
See [Validation layer warnings](@ref general_considerations_validation_layer_warnings).
|
||||||
|
Loading…
Reference in New Issue
Block a user