Repository navigation
fix(vulkan): keep one host surface per window across game joins - #159
Merged
Merged
Conversation
Roblox makes a new VkSurfaceKHR for the window on every join. Since the swapchain reuse in 0.5.6 kept the old one alive, NVIDIA's Wayland driver crashed on present once a swapchain moved to the second surface.
…creen While StartGame runs, Roblox is already in the game stage, so a LuaApp surface update restarted the home screen and abandoned the join. The surface is now held until the launch finishes and then given to the game.
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.
Two join fixes.
Crash on join (0.5.6 regression). Roblox makes a new VkSurfaceKHR for the window on every join. Since the swapchain reuse in #156 kept the old one alive, a join where the window changed size retired the swapchain into the second surface, and NVIDIA's Wayland driver crashed on the next present (
libnvidia-glcore+0xcff99c, reported on Discord on an RTX 4060 with mango). Nightcap now keeps one host surface per window: later creates get it back, the game's destroys keep it, and it goes with its instance. Approach suggested by the reporter.Resize during a join bounced to the home screen. While StartGame runs, Roblox is already in the game stage, but Nightcap still sent surface changes to the LuaApp, which restarted it and abandoned the join. The surface is now held until the launch finishes and then given to the game. This one predates the fork.
Tested on an RTX 4090 (620.73.04):
Not tested on the reporter's setup.