Vulkan: Ignore swapchain image layout/content

Blender always updates all pixels of the swap chain. As an optimization
we can skip the initial layout transition from present to transfer
destination as all pixels will be rewritten.

Pull Request: https://projects.blender.org/blender/blender/pulls/133061
This commit is contained in:
Jeroen Bakker 2025-01-14 17:08:04 +01:00
parent 1bacb0de62
commit 04e64b27ea

View file

@ -347,7 +347,7 @@ void VKContext::swap_buffers_pre_handler(const GHOST_VulkanSwapChainData &swap_c
VKDevice &device = VKBackend::get().device;
device.resources.add_image(swap_chain_data.image,
1,
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
VK_IMAGE_LAYOUT_UNDEFINED,
render_graph::ResourceOwner::SWAP_CHAIN,
"SwapchainImage");