GPU: cap the time a frame waits for compute pipelines made at their dispatch (#1420) #1450
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1450"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by arminkhaleghirod on 2026-11-27T09:34:23Z.
Fixes the
+0x23cf683crash in #1420 without turning compute waiting off.Cause. With
VICTORY_PIPELINE_COMPUTE_WAITon (the default), a compute dispatch builds its pipeline on the spot, however long that takes. With an empty cache, the first cutscene hit 457 compute programs in one frame, at about a second each. The frame did not end for over 30 s, so the title's own hang watchdog stored to address 0.Change. A frame now waits for such pipelines for at most
VICTORY_PIPELINE_COMPUTE_WAIT_MS(8,000 by default, summed over threads). After that, its dispatches wait within the frame's budget, as withVICTORY_PIPELINE_COMPUTE_WAIT=0.Tested on an RTX 4080 16 GB, Ryzen 9 7950X, 32 GB RAM, Windows 11. Diag build of
9a9091dplus this change, Series X profile, the run-278 switch set,VICTORY_BVH_BUILDER=0.+0x23cf683fault in 2 of 2 runs, about a minute after Enter on the start screen. In the log,frame=3107stayed stuck for about 30 s while compute pipelines were built one by one.a frame waited its cap for compute pipelines). The game reached the world and ran 5+ minutes without a fault.One machine and one scene, so the 8 s default may want tuning on slower CPUs.
Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T10:12:41Z.
This cap addresses a startup stall I measured on RTX 5060 Laptop / GE-Proton11-14 with a
9a9091d-based build. The startup trace recorded 193 completed compute waits. In one frame, a single recording thread accumulated 28.010 seconds of returned waits before the title watchdog. An earlier replay with the older bounded-wait option got farther and later hit NVIDIA Xid 13SKEDCHECK36_DEPENDENCE_COUNTER_UNDERFLOW. Those are separate observations on that earlier build.At
17a6f01d, a caller can sample frame N, reachcompute_roomafter N+1 has already used its budget, and reset the count back to frame N. The next N+1 caller then starts with an empty budget. I tested a one-file correction that lets a newer token reset the budget and sends stale callers through the existing bounded fallback. Late completions leave the newer tally alone. The old reset condition failed the deterministic regression. The corrected MSVC build passed the targeted case and all six scheduler tests under Proton. The staged source-only asset check also passed.Review commit
Assisted by Codex (GPT-6.2-Sol High).
Imported from fxceless/victory-fork. Originally posted by lmouz823-lang on 2026-11-27T13:47:53Z.
Windows repro for the crash in #1420: Windows 11 build 26200, RTX 4060 Laptop GPU (8 GiB, driver 610.88).
I built base
9a9091d180f044726463d3db819808086daeebaeand this PR's17a6f01d7be53a3696614654a2fd970a37879b25as release builds withdiagnostics. Both carried the same local AppContainer scratch-path policy shim; there were no local pipeline or GPU behavior changes. Each run used a separate AppContainer copy of the same save and warm shader cache, Series X, scripted Enter at 2 s and 18 s, and GPU timing plus DRED.9a9091d, default waits0xc0000005after 91.61 s17a6f01, default 8,000 ms compute cap17a6f01,VICTORY_PIPELINE_COMPUTE_WAIT_MS=2000All three faults were writes to
0x0atvictory-image-b99f876b74d4a77f.dll+0x23cf683; the next two frames were+0x2215c35and+0x2215eca. The cap did not prevent this fault in these replays. This is one run per setting, so the elapsed-time differences alone do not show an improvement or regression. None reached sustained playable world rendering. No game assets or derived files are attached.Imported from fxceless/victory-fork. Originally posted by lukinhasnojento on 2026-11-27T14:53:36Z.
Follow-up test context (2026-11-27): a later build using the pipeline pre-build approach in PR #1226, with early-use keys identified from a prior run involving the #1450/#1442 changes, advanced into the prologue without reproducing +0x23cf683 in the observed window. The tested build was based on the pre-build PR, not this PR, so this is not evidence that #1450 prevents the watchdog. Performance remained very low and draws were still dropped; this is a preliminary single-run observation, not a confirmed fix. No game files, derived assets, screenshots, or raw logs are attached.
Imported from fxceless/victory-fork. Originally posted by grosterr on 2026-11-27T15:08:16Z.
Another data point for #1420 / this fix, on different hardware: RTX 3060 12 GB, Ryzen 7 5700X (8c/16t), 32 GB RAM, Windows 11, Series S profile, old line (
main9a9091dplus a stack of open PRs).0xc0000005 at <image>+0x23cf683 (write 0x0: nothing mapped there), the same address as in #1420.Caveat: by then the pipeline library was warm, and one run without this PR but with the warm library did not crash either, so these runs show that nothing else broke rather than prove the fix on a cold library. The address matches #1420 exactly.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.