Use VK_EXT_swapchain_maintenance1 in the Swapchain Recreation sample
Description
This change builds on https://github.com/KhronosGroup/Vulkan-Samples/pull/613 which adds a sample demonstrating safe recycling of present semaphores and efficient swapchain recreation. This change takes advantage of VK_EXT_swapchain_maintenance1 to perform the same job with less complication / more efficiently.
This sample has been tested on Nvidia/Linux/X11, as well as SwiftShader/Linux/X11.
General Checklist:
Please ensure the following points are checked:
- [x] My code follows the coding style
- [x] I have reviewed file licenses
- [x] I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
- [x] I have commented any added functions (in line with Doxygen)
- [x] I have commented any code that could be hard to understand
- [x] My changes do not add any new compiler warnings
- [x] My changes do not add any new validation layer errors or warnings
- [x] I have used existing framework/helper functions where possible
- [x] My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions
- [x] My changes do not add any regressions
- [x] I have tested every sample to ensure everything runs correctly
- [x] This PR describes the scope and expected impact of the changes I am making
Sample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:
- [x] I have tested the sample on at least one compliant Vulkan implementation
- [x] If the sample is vendor-specific, I have tagged it appropriately
- [x] I have stated on what implementation the sample has been tested so that others can test on different implementations and platforms
- [x] Any dependent assets have been merged and published in downstream modules
- [x] For new samples, I have added a paragraph with a summary to the appropriate chapter in the samples readme
Hi @ShabbyX, we briefly discussed this on the Samples call today and had questions on timing. Do you know if (or when) there are HW drivers that support this? It looked like it is available on Swiftshader and possibly RADV. We're thinking we should hold off until more vendors support this in drivers? We would be interested in your thoughts on timing for this sample. Thanks.
We're thinking we should hold off until more vendors support this in drivers?
Yes, that was my understanding in the call a few weeks ago, which is why I split the PRs. I am in no rush to land this, so take your time!
Do you know if (or when) there are HW drivers that support this?
I know Hans-Kristian had an implementation for mesa (I believe that'd be all mesa drivers), but don't know if that's merged. I also know that Nvidia is working on it, but of course release timing depends on them.
I don't have a driver that supports swapchain_maintenance1 yet, so all I can do is confirm that this doesn't break the existing functionality for me.
Works fine for me.
Will approve once the merge conflicts have been resolved :)
Done