Run on a 16 GB PC: windows on the card, relief on out-of-memory, idle lists by memory #92
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!92
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-92"
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?
@TheHoracio on GitHub · 2026-11-26 03:09 UTC · original
TheHoracio:memory-16gb→main· +406 −12 · 4 files · 2 commits · closed without mergingThanks for this fork. On a 16 GB machine it ran out of memory in the world. These changes make it run stable there. They are measured on one PC only.
PC:
VICTORY_DISPLAY_MODE=1920x1080), Series X profile;play.ps1 -Safesettings.The problem
The PC's memory shared with the card is half the RAM, so 7.1 GB here. It filled at world entry, mostly with 4 MiB windows of title memory (2.7–3.8 GB) and with idle host lists' command allocators. List creation or
Closethen failed with E_OUTOFMEMORY:The card itself still had several GB free.
What changed
Windows on the card. Windows of title memory go to a GPU upload heap (Resizable BAR) first, while the card is under 85 % of its budget. Then they go to shared memory, then to the card up to 92 %.
VICTORY_WINDOWS_VRAM=0keeps them in shared memory only;=lateuses the card only after shared memory refuses. Windows are only written by the CPU here: the log showed 0 MB a frame compared on the CPU.Upload buffers. When PC memory refuses an upload buffer, it falls back to a GPU upload heap, up to 95 % of the card's budget.
Relief and retry. On a refusal,
relieve/again_on_oom/again_while_nonefree what is held in reserve:Idle copies then age out quickly for 3 s, and the creation is retried. This covers make_list, make_prelude, and upload/shared/uav buffers.
Refused
Close. A host list whoseCloseis refused for lack of memory is left out of its submission instead of ending the run.Idle host lists scale with shared memory. The pool keeps 256 lists under 70 % of the shared budget, 96 under 86 %, 32 under 92 %, and none above. The pool is trimmed when the level drops.
VICTORY_LIST_POOL_MOST=<n>fixes the count.Texture room. The default goes from 90 % to 85 %, leaving card room for the above.
Measured
VICTORY_LIST_POOL=0On machines with 32 GB of RAM or more, nothing should change: the pool stays at 256 lists, and windows only use card space while it is free. That is untested here.
🤖 Generated with Claude Code
On a 16 GB PC (RX 7800 XT 16 GB, Ryzen 7 9800X3D, 64 GB page file, 1080p, Series X profile) the world crashed within seconds to a minute: the PC's memory shared with the card (half the PC's, 7.1 GB) filled and a list could not be made or closed ("no host list for a state prelude", "did not close", E_OUTOFMEMORY). The card itself still had GBs free. - Windows of title memory go to a GPU upload heap (Resizable BAR) first while the card is under 85 % of its budget, then to the shared memory, then the card up to 92 % (`VICTORY_WINDOWS_VRAM=0`: shared only, `late`: card only after a refusal). The CPU only writes windows here (0 MB a frame compared on the CPU). - Upload buffers fall back to a GPU upload heap up to 95 % when the PC's memory refuses one. - `relieve` / `again_on_oom` / `again_while_none`: on a refusal the spare scratch chunks, unheld texture staging, idle host lists and the pipeline library's mapping go, idle copies age out fast for 3 s, and the creation is tried again (make_list, make_prelude, upload/shared/uav buffers). - A host list whose Close is refused for lack of memory is left out of its submission instead of ending the run. - Idle host lists kept by how full the shared memory is: 256 under 70 %, 96 under 86 %, 32 under 92 %, none above (`VICTORY_LIST_POOL_MOST=<n>` fixes it). Their command allocators live in that memory: 512 of them (the old fixed count) ran it out a minute into the world. - Texture room default 90 -> 85 %, leaving card room for the above. Measured on that PC with play.ps1 -Safe settings: - before: crash at world entry (or after ~1 min at 13-14 fps with the windows change alone); - after: 8-minute runs without a crash, 9.5-11.4 fps in the prologue, shared memory steady at 5.6-6.1 GB. - `VICTORY_LIST_POOL=0` (no pool) was stable too, but at 4.5 fps. - The non-Safe settings (THIN etc.) still ran out of memory and were slower there (5-8 fps). Co-Authored-By: Claude Opus 5.5 <[email protected]>@TheHoracio on GitHub · 2026-11-26 03:25 UTC · original
Follow-up commit: the texture room default is back to 90 %. At 85 %, textures waited for room on the card. With 90 %, no pass went without room, and a 7-minute run on the same 16 GB PC stayed stable at 9.6–11.5 fps. List Reset is now also retried on out-of-memory. One more finding: an idle host list holds about 2–3 MB of shared memory here.
@HrHd on GitHub · 2026-11-26 06:13 UTC · original
Confirmed from a small PC, in case it helps the 16 GB thread: with both halves of this applied the tree no longer stops at
0x8007000Ein the load the old way, but on an RTX 4060 Ti 8 GB / 15.7 GB RAM it then removes the device (0x887A0006) as soon as the world is entered — frame 4092, VRAM 3.1 GB of 8 GB, working set 7.4 GB, so it is not raw capacity.Switches used alongside it:
play.ps1 -SafeplusVICTORY_KEYS_LIVE(to press pad A into the world without a person) and our clampVICTORY_RENDER_SCALE=2; the page file is 48 GB allocated, with a 13.5 GB peak seen, so that is not the limit either.Without this change the same configuration dies earlier, at
make_prelude(0x8007000E), so it does move the wall — just not past world entry on 8 GB.@avatarmanz on GitHub · 2026-11-26 07:35 UTC · original
Left open: VICTORY_WINDOWS_VRAM defaults to 2 (windows in GPU upload heaps) and the out-of-memory retries sleep on the render path; needs an in-game check on the 7900 XTX and a 16 GB PC first.
Pull request closed