KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.33k stars 648 forks source link

Recreating resources in high level sample framework fundamentally broken (Subpass samples, etc.) #920

Open SaschaWillems opened 9 months ago

SaschaWillems commented 9 months ago

While trying to fix the sync issues in the subpass sample (#455, #867) I noticed that it seems to be fundamentally broken/flawed. When enabling sync validation, the sample crashes the validation layers. After a few hours of debugging, it looks like it's trying to update the swap chain without properly making sure resources in use are waited on, resulting in validation crash. This happens right at startup. I was able to fix that one, but a similar error happens on resize. I'm looking into this, but may need some assistance as this is a sample done by Arm using the high level sample framework, so lots of indirections and implicit things happening that are very hard to debug.

image

SaschaWillems commented 9 months ago

This seems to affect several samples based on the Arm framework. I can reproduce this, albeit not with every single start/resize with e.g. the MSAA and also the command buffer usage sample. I think this is caused by how the framework recreates framebuffers/swapchains and as such may be a fundamental flaw in the Arm framework.