cleanupSwapChain in 17_swap_chain_recreation.cpp was not destroying the previous swapchain#101
cleanupSwapChain in 17_swap_chain_recreation.cpp was not destroying the previous swapchain#101gpx1000 merged 20 commits intoKhronosGroup:mainfrom lmichaudel:patch-1
Conversation
|
Great find! This might be the explanation behind the resize crash issue in Windows. @SaschaWillems if you have a chance, could you verify if this brilliant find solves resize? |
|
I checked all the other cleanup methods and fixed them. |
|
Well it's a great find, you're absolutely right those should have been cleaned up. Don't worry about CI failing. That has been having problems; I'm more testing if CI passes Windows. |
|
If you sync to the latest then the CI should pass for all build environments. |
|
Still crashing for me. This does not address the actual issue, which is this block of code: result = presentQueue.presentKHR(presentInfo);
if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR || framebufferResized) {
framebufferResized = false;
recreateSwapChain();
}
else if (result != vk::Result::eSuccess) {
throw std::runtime_error("failed to present swap chain image!");
}presentQueue.presentKHR will throw an exception, but there is no exception handing around it. |
|
Well, that's sad, I'll leave fixing it on my TODO list. For now, this PR is correct and necessary. LGTM. |
As the title says, the source code was missing a simple
swapChain = nullptr;(that is actually present in the tutorial).Without this fix the swapChain recreation crashes (
Device::createSwapchainKHR: ErrorSurfaceLostKHR).