#9553

Backends: Vulkan: don't transition swapchain images before acquire

Opensarpsenturkwants to merge intofrom

Currently ImGui_ImplVulkanH_CreateOrResizeWindow() manually transitions all swapchain images to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR. This leads to validation errors as vkAcquireNextImageKHR hasn't been called:

Validation Error: [ UNASSIGNED-non-acquired-swapchain-image-used ] | MessageID = 0x1cecb534 vkQueueSubmit(): pSubmits[0] performs a layout transition on presentable VkImage 0x60000000006, but the image has not been acquired from VkSwapchainKHR 0x40000000004 (either never or since the last present operation). The Vulkan spec states: Use of a presentable image must occur only after the image is returned by vkAcquireNextImageKHR, and before it is released by vkQueuePresentKHR. This includes transitioning the image layout and rendering commands (https://docs.vulkan.org/refpages/latest/refpages/source/VkSwapchainKHR.html#_description) Objects: 2 [0] VkCommandBuffer 0x27cbefa09e0 [1] VkImage 0x60000000006

This transition isn't needed. The attachments referencing the swapchain images always use VK_ATTACHMENT_LOAD_OP_CLEAR therefore the previous contents don't need to be preserved and VK_IMAGE_LAYOUT_UNDEFINED is sufficient here.

Removing the code that performs the layout transitions gets rid of the validation errors and doesn't change the behavior. Fixes #9496