Repository navigation
fix(vk): release modules from failed shader variants - #116
Merged
Merged
Conversation
soltros
marked this pull request as ready for review
November 11, 2026 03:58
This was referenced Nov 11, 2026
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.
A state-list shader translation can create an earlier stage's Vulkan module before a later stage fails. seed_variant_of discarded that temporary Program without destroying its modules. The failure branch now releases each nonnull stage module before returning, preventing repeated failed translations from leaking driver resources.
Related: #18. This fixes a demonstrated ownership bug; the cause of every reported multi-gigabyte RAM-growth symptom remains unverified. Successful cached programs and their submitted modules keep their existing lifetime. Duplicate-variant cleanup is unchanged.
The game-free fixture executes the actual seed_variant_of function with authored translation results and a counted Vulkan boundary. Unchanged main fails immediately on a retained module. The fix passes 1,000 alternating failed graphics/mesh translations, resets translation-context pointers, retains successful cached ownership and releases duplicate modules exactly once. The same stress test passes GCC UBSan with recovery disabled.
Final Actions validation at head 9655e27: Linux 330 passed, 0 failed, 9 skipped; Windows 318 passed, 0 failed, 21 skipped. Windows Builder, Linux AppImage, actionlint and both focused shader jobs passed. Local combined suite: 275 passed, 12 unchanged environment failures, 52 skipped, with no new failing paths. Existing capture resource/retry and slot-ownership fixtures also pass when run explicitly.
No physical Vulkan driver, gameplay session, process-RSS improvement or game-derived material was used. Keep #18 open for the remaining memory audit.