mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
Reserve capacity for image initialization barriers
This commit is contained in:
1 parent
0c7bd64b48
commit
fabbe8137d
1 file changed
+1
@@ -372,6 +372,7 @@ void FrameGen::record(VkCommandBuffer cmd, VkImageView prevView, VkImageView cur
|
||||
if (!reuseFlow) {
|
||||
// Batch fresh-image transitions that share the same stage and access masks.
|
||||
std::vector<VkImageMemoryBarrier> initBarriers;
|
||||
initBarriers.reserve(static_cast<size_t>(4 * kLevels + 1));
|
||||
auto addInitBarrier = [&](VkImage image) {
|
||||
VkImageMemoryBarrier b{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
|
||||
b.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
|
||||
Reference in new issue
Block a user