Repository navigation
fix(vulkan): stop window rebuilds waiting on background swapchain destroys - #151
Merged
Merged
Conversation
…troys Slow swapchain destroys ran one at a time on the teardown worker, so a new swapchain on the same window waited for every queued destroy (30 s with a 3 s test driver). Destroys now run concurrently, and when Roblox rebuilds its surface on the kept device the held swapchain and its surface stay alive and retire into the new swapchain, so the create never waits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #148. Once a slow driver turns on background destroys, two cases still froze:
oldSwapchainonly has to share the native window, not the surface), then get destroyed in the background, swapchain first.Tested through a layer that makes vkDestroySwapchainKHR take 3 s, with quick resizes and F11: the current build showed a 30.5 s present gap at a surface rebuild, this branch had none over 1.1 s across 3 rebuilds. A run with Khronos validation added no swapchain or surface errors. Drivers that destroy promptly keep the old path, apart from each destroy running on its own short-lived thread. Not tested on a real slow NVIDIA driver or in game.