fix: do not discard content on copy

This commit is contained in:
PancakeTAS 2025-07-04 17:57:13 +02:00
parent e3eae11e32
commit c8ed0750c7
No known key found for this signature in database

View file

@ -56,6 +56,7 @@ void Utils::copyImage(VkCommandBuffer buf,
const VkImageMemoryBarrier srcBarrier{ const VkImageMemoryBarrier srcBarrier{
.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT,
.oldLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
.newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, .newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
.image = src, .image = src,
.subresourceRange = { .subresourceRange = {