RTX 5080 (native Windows): stops 1 s in because of the 16 MiB default stack; with 1 MiB, the device is lost at the same point of the first load in 14 of 14 runs #121
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#121
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@larelgit on GitHub · 2026-11-25 14:55 UTC · original
A first run of this fork on an NVIDIA card on native Windows: what works, where it stops, and what I ruled out. hyphennn's victory-fork runs on the same machine with the same save, so I tried each finding against it too.
Machine and build
mainat4cbe9d7for most runs; both stops checked again on01aadd1(currentmain), nothing addedcargo build --profile diag -p victory --features diagnostics --locked(toolchain fromrust-toolchain.toml)victory run <title> --execute, with and without--console series-xand the README's three settings1. Startup: the title stops on its own breakpoint
Every run of the build as it is (10 of 10) stopped 1 to 3 s after start on the title's own breakpoint (
0x80000003), before the first frame. That held with the README's settings and--console series-x, withVICTORY_FPS=30added, without the console flag, and with no settings at all.With
VICTORY_LOG=trace, the last call before the stop is the title's reservation of about 185 MB that has to lie below 4 GB (XMemVirtualAllocwith the 32-bit address flag), and it returns null. victory-fork makes the same call at the same point on this machine and gets its memory.I mapped the process's address space below 4 GB from outside (
VirtualQueryEx, read only) every 20 ms until the stop:apps/victory/build.rslinksvictory.exewith/STACK:16777216. That is the commit "Link victory.exe with a 16 MiB default thread stack", still an open pull request upstream (Marvisak/VIctory#151). Every thread created without a stack size takes that reserve. That includes the driver's and the thread pool's threads, and also the title's own threads: I counted the threads of a running process by start address and stack reserve, and 55 start in the title image, all at the executable's default. The 37 such threads made before that call reserve about 555 MB more than they would with 1 MiB, and the 185 MB block no longer fits.I changed only that header field on copies of the same executable (
editbin /STACK:<size>):4cbe9d7, 0 of 2 on01aadd14cbe9d7, 2 on01aadd1)main(f85101b) relinked at 16 MiB#9 and #15 report runs on
4cbe9d7that got past this point on other NVIDIA cards, so whether it bites depends on the machine (thread count or timing; I can't tell which).2. With a 1 MiB stack: the device is lost at the same point of the first load
What works:
Card memory in use stays at 6-7 GB of 16, and the process's private memory at 12-13 GB.
Then, in all 14 runs, the D3D12 device is lost 54.5 to 60 s after start. I ran 6 with the README's settings and
--console series-x(one of them with scripted movement keys), 5 with no settings, 1 withVICTORY_D3D12_DRED=1, and 2 for the tests listed further down. In the 12 runs of the build as it is, the loss came at frame 9,700 to 10,200.GetDeviceRemovedReasongivesDXGI_ERROR_INVALID_CALL(0x887A0001). After that, every new resource fails with "device suspended", and about 30 s later the title writes through a null pointer, so the process ends at 85 to 93 s. No "did not close" line is logged, unlike #13. On01aadd1it is the same: lost at 59.3 and 55.6 s, the same reason, in 2 of 2 runs (one with the new README's settings, one without).What I ruled out, each with one run unless noted:
VICTORY_SKIP_PIPELINES, the device is lost at the same moment, just after a different pipeline. So the trigger is that moment of the load, not that shader.legal_state, and transitions whose legal states match dropped). The device was still lost at 60 s.01aadd1, 2 runs. Its heap change shows: made 933,440 instead of 934,464. The device was still lost, at 54.2 and 59.7 s, with the same reason.VICTORY_D3D12_DRED=1, nothing more is logged on this path, only the reason above.One difference in the logs: before the loss, this fork logs "a title texture was released while a list not yet reset names its host copy" 4 or 5 times, and victory-fork logs it 0 times in the same scene. The host copy is retired, not freed, so I don't take it for the cause. #26 (RX 7700 XT) also loses the device in the loading screen, but there DRED shows page faults inside freed resources with card memory full. Here card memory is at 6-7 GB and the reason is an invalid call, so I can't say whether it is the same problem.
The D3D12 debug layer (Graphics Tools) is not installed on this machine, so I don't have the runtime's message for the invalid call. Someone with it installed (
VICTORY_D3D12_DEBUG=1) would get the call by name, the way #13 did.3. Frame time next to victory-fork
None to give: no run of this fork reached the world on this card. victory-fork
mainon the same machine, save and protocol reaches the cell by about 180 s. In a control run between this fork's runs today it measured 196-200 ms a frame with defaults (177-182 in a series earlier the same day), and 118 ms with its new switches (fxceless/victory-fork#921).So I could not judge this fork's AMD and speed changes on NVIDIA either: hoisted clamps, ambient, quad reads, the doubled dynamic slots. Nothing ran past the load. Here the doubled slots fall back to the capped heap, with 65,536 dynamic slots.
(Runs and this report by Claude Code with Claude Opus 5.5 on the account owner's machine, at their request. No title data is in this report: timings, settings and descriptions only.)
rx9070xtbranch #218@Praisser on GitHub · 2026-11-25 14:58 UTC · original
Another NVIDIA data point, on a smaller card, that came out differently on both counts.
mainat01aadd1, plus one local change: a startup option that patches the title's code (original bytes checked first) so two of its object pools are twice their size, against the prologue's "pool full" breakpoint at 1 fps. It does not touch the GPU sidecargo build --release -p victory(no diagnostics),/STACK:16777216as builtvictory run <title> --execute, no other settings1. Startup: no stop here with the 16 MiB stack. 3 of 3 launches got past the start, menus at 30 fps with 0 draws dropped (one launch left alone for 6 minutes on the menus). So on this machine the reservation below 4 GB still fits, which fits your note that it depends on the machine.
2. No device loss, but the world is mostly not drawn. Two runs into the prologue, about 10 and 14 minutes, with no device removal and no "device suspended" in either:
The shaders that do not translate in that run:
The view heap shows the same numbers as yours and #15:
wanted=1245184 made=934464 lost=310720, then "a view heap shorter than shaders keep their indices in", and "title slot past the host heap" 34 times in the second run.So on this card the dropped draws come from the wave64 programs, not from a device loss. I have not tried #68 here; if it covers these two wave64 reasons, it should take most of the 1,600-1,900 back. For comparison, uiliannn/VItoriaBr (fxceless line, with its wave64 handling) on the same machine and save draws the world at about 330 ms a frame with about 390 draws a frame dropped.
(Runs and this report by Claude Code with Claude Opus 5.5 on the account owner's machine, at their request. No title data is in it: timings, settings and log messages only.)
@Praisser on GitHub · 2026-11-25 15:23 UTC · original
Follow-up on the RTX 3070 Laptop 8 GB above: the same build with #68 merged (
01aadd1+ #68's two commits + the local pool-size option, release build, no settings), one run into the prologue, cache warm from the earlier runs.#68 does what it says here. Shaders refused at translation in the run, compared with the run without it:
Draws dropped without a host pipeline (0 being made) went from 1,600-1,900 a frame to about 500-1,500, at 200-1,300 ms a frame. "title slot past the host heap" was logged 5 times instead of 34.
Then the card runs out of memory. About 8 minutes in,
victory_gpu::shadowlogged "no memory for copies of title memory" (0x8007000E) several times, and the next submission lost the device:That is a different end from yours (an invalid call at 55-60 s with 6-7 GB of 16 in use). Here it looks like plain exhaustion of an 8 GB card, consistent with the README's "more video memory than a 16 GB card has". I did not log card memory over the run, so that part is an inference from the out-of-memory errors right before the loss.
(Run and this report by Claude Code with Claude Opus 5.5 on the account owner's machine, at their request. No title data in it.)