You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GPU: prevent pipeline starvation under constrained host commit - #3426
On a 32 GiB host with an 8 GiB NVIDIA card, title loading and concurrent pipeline creation compete for commit. In the tested .04 run, the memory guard deferred new compiles while screen-pass waits and missing pipelines left the world black.
Treat guard deferrals and driver E_OUTOFMEMORY as retryable instead of recording a permanent refusal; skip geometry-stage fallback on a memory refusal.
Stop waiting on a deferred pipeline, avoid synchronous compute compilation during pressure, and limit waits to 100 ms under pressure.
Limit general workers to four on limited-RAM hosts and use smaller spare-buffer/cache defaults.
On limited-RAM hosts, use current commit rather than hypothetical pagefile growth and trigger critical reclamation at the compiler's protected commit floor.
This retains the existing memory guard rather than lowering or disabling it.
Before: unmodified v2026.11.29.04, fresh cache, black screen at a 0.5 FPS log sample; 455 MiB free physical RAM and 418 draws/dispatches waiting for pipeline creation.
After: v2026.11.29.04 plus these five-file changes and a populated pipeline library. 2,163/2,163 selected pipelines prepared offline, zero unavailable host pipelines or worker crashes in preparation. Verified visible 3D cutscenes; 97 sampled log intervals with at least 500 draws/frame averaged 20.97 FPS (median 20.4). User confirmed playable rendering with occasional white/clay textures. Session was still responding after 17 minutes.
Reproduction: use the existing warm --used path with locally recorded pipeline recipes/early list, matching play shader switches and sampler ordering, VICTORY_WARM_SHARED=1, VICTORY_WARM_LIBRARY_THREADS=4, and --jobs 4, with the game closed. No cache included.
Targeted victory-gpu tests on the patched .04 tag: residency (8), memguard (7), compilemem (10): 25 passed. Release build passed. The identical patch applies cleanly to current main; staged asset policy passed. Full crate/workspace suite and runtime testing of the rebased head have not been performed.
Limitations: this is a combined patch + offline-preparation comparison, not an isolated A/B of each change. Memory pressure, deferred compiles, texture residency problems and long-term stability remain unresolved. Genuine OOM retries need further stress testing; this is not a universal black-screen fix. No shader translation changes.
The intent is to offer a small integrated, hardware-tested alternative and reproducible evidence, not claim these individual ideas are new. Happy for maintainers to take only the non-overlapping parts or use the results to evaluate existing PRs. AI-assisted implementation and validation.
github-actionsBot
changed the title
[pr-fix] GPU: prevent pipeline starvation under constrained host commit
GPU: prevent pipeline starvation under constrained host commit
Nov 29, 2026
Test report for #3426 (head 609376d), merged onto main 41adb55. Synthetic tests only: no title run, no game files, so this does not show the world loading on a 32 GB PC.
Every failure is one main has too: shader_cache::tests::every_switch_of_the_translator_is_in_the_key in all six runs, and host::uav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queue, host::card_steps::tests::places_written_after_sending_are_learned and host::menu::tests::a_change_is_saved_at_once_however_the_game_was_started now and then on both trees. None is in this PR's code.
Overlap:#3474 (head 92fa413) is aimed at the same stall and also changes memguard.rs and pipeline/make.rs. A trial merge of the two heads conflicts in crates/victory-gpu/src/pipeline/make.rs, so whichever goes in second needs a rebase. Both make a pipeline that was refused for memory retryable; this one also has limited hosts count only current commit, where #3474 lets one compile through under the floor.
Not tested: the memory guard in a title, and the worker and cache sizes on a limited-RAM host under load.
Tested with the help of Claude Code (Claude Fable 5.2).
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
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.
What it changes
On a 32 GiB host with an 8 GiB NVIDIA card, title loading and concurrent pipeline creation compete for commit. In the tested .04 run, the memory guard deferred new compiles while screen-pass waits and missing pipelines left the world black.
This retains the existing memory guard rather than lowering or disabling it.
How it was tested
warm --usedpath with locally recorded pipeline recipes/early list, matching play shader switches and sampler ordering,VICTORY_WARM_SHARED=1,VICTORY_WARM_LIBRARY_THREADS=4, and--jobs 4, with the game closed. No cache included.victory-gputests on the patched .04 tag: residency (8), memguard (7), compilemem (10): 25 passed. Release build passed. The identical patch applies cleanly to current main; staged asset policy passed. Full crate/workspace suite and runtime testing of the rebased head have not been performed.Checked for overlap
The intent is to offer a small integrated, hardware-tested alternative and reproducible evidence, not claim these individual ideas are new. Happy for maintainers to take only the non-overlapping parts or use the results to evaluate existing PRs. AI-assisted implementation and validation.