Vulkan swapchain and RT layout transition validation error #83
Labels
bug
Something isn't working
good first issue
Good for newcomers
graphics:Vulkan
Issue related to Vulkan API implementation
icebox
This will not be worked on for a while
The swapchain image is in VK_IMAGE_LAYOUT_UNDEFINED layout, but to present the image, it should be in either VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR.
We can manually transition the layout of swapchain image to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR before presenting to resolve this issue using memory and pipeline barriers, however now VK_IMAGE_LAYOUT_PRESENT_SRC_KHR is not a layout fit for rendering in the next frame. So before rendering, we need to transition the image back into VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL. Hence it must be done once before presenting and again after presenting to make sure the format of the swapchain images is properly transitioned.
============================================================
Razix Engine Stats
Version : 0.20.1
Configuration : [Debug | Release | Distribution]
Release Stage : Development
Release Date : 9-1-2022
OS : Windows 10 Home
Processor : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz 2.60 GHz
Vulkan API Version : 1.2.186
GPU Name : NVIDIA GeForce RTX 2060
Vendor ID : 4318
Device Type : DISCRETE GPU
Driver Version : 497.116.0
The text was updated successfully, but these errors were encountered: