-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use VK_EXT_swapchain_maintenance1 in the Swapchain Recreation sample #617
Conversation
3839bde
to
2d9221a
Compare
2d9221a
to
cca2486
Compare
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. |
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!
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. |
cca2486
to
9578bef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I don't have HW around supporting VK_EXT_surface_maintenance1.
But the changes compared to #613 look pretty clear.
9578bef
to
b3c575b
Compare
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine for me.
Will approve once the merge conflicts have been resolved :)
b3c575b
to
6ff325c
Compare
Done |
6ff325c
to
6e28e2e
Compare
// It is indeed supported. | ||
add_instance_extension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME); | ||
add_instance_extension(VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME); | ||
add_device_extension(VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, the way to handle the extensions would be to unconditionally add them in the SwapchainRecreation
constructor, but mark them as optional.
Then, you don't need to initialize volk on your own, and can handle the implications of that extension not being there in prepare
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try when I find the time, but I think the issue was with surface_maintenance1
being an instance extension that made it complicated.
6e28e2e
to
084cc2b
Compare
da55278
to
36ab1d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine on my NVIDIA RTX 4070 on Windows 11, which finally supports the extension.
I can also confirm that the validation error mentioned above is gone with a build of the latest validation layers from source.
…hronosGroup#617) * Add usage of VK_EXT_swapchain_maintenance1 for present fences * Switch between compatible modes without swapchain recreation * Update copyright dates
Description
This change builds on #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:
Sample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: