Open engineer1109 opened 5 years ago
@mattparks I am writing a project for vulkan: https://github.com/engineer1109/LearnVulkan The project contains the above codes. I hope this will help you. You can see the swapchain recreation while resizing window to deal with the VK_ERROR_OUT_OF_DATE_KHR.
I found your code is crashed on this while resizing :
Graphics.cpp: 354 vkCmdBeginRenderPass(*commandBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
GDB stack info 1 ?? 0x7fffe198c69b 2 ?? 0x7fffe19cf33b 3 ?? 0x7fffe19cf4ac 4 ?? 0x7fffe193a91c 5 DispatchCmdBeginRenderPass(VkCommandBuffer_T , VkRenderPassBeginInfo const , VkSubpassContents) 0x7fffcb3e95d5 6 vulkan_layer_chassis::CmdBeginRenderPass(VkCommandBuffer_T , VkRenderPassBeginInfo const , VkSubpassContents) 0x7fffcb35008d 7 acid::Graphics::StartRenderpass Graphics.cpp 354 0x7ffff7685ab7 8 acid::Graphics::Update Graphics.cpp 65 0x7ffff7683b77 9 acid::Engine::UpdateStage Engine.cpp 124 0x7ffff760a53b 10 acid::Engine::Run Engine.cpp 111 0x7ffff760a44e 11 main MainApp.cpp 20 0x5555555ac9da
SwapChain should be recreated while resizing windows. Destroy the swapchain and create the swapchain again. For example: