Improved documentation chapter "Resource aliasing (overlap)"

This commit is contained in:
Adam Sawicki 2023-03-06 11:43:13 +01:00
parent dd09767ff6
commit 66afe099f1
2 changed files with 8 additions and 1 deletions

View file

@ -18208,6 +18208,12 @@ vkDestroyImage(allocator, img2, nullptr);
vkDestroyImage(allocator, img1, nullptr);
\endcode
VMA also provides convenience functions that create a buffer or image and bind it to memory
represented by an existing #VmaAllocation:
vmaCreateAliasingBuffer(), vmaCreateAliasingBuffer2(),
vmaCreateAliasingImage(), vmaCreateAliasingImage2().
Versions with "2" offer additional parameter `allocationLocalOffset`.
Remember that using resources that alias in memory requires proper synchronization.
You need to issue a memory barrier to make sure commands that use `img1` and `img2`
don't overlap on GPU timeline.