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

Open
opened 2026-11-26 03:36:10 +00:00 by github-bot · 2 comments
Owner

@⁠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

Card RTX 5080 16 GB, driver 610.88
Processor, memory Ryzen 7 7800X3D, 32 GB
System Windows 11 Pro 23H2 (10.0.22631), native D3D12
Tree main at 4cbe9d7 for most runs; both stops checked again on 01aadd1 (current main), nothing added
Build cargo build --profile diag -p victory --features diagnostics --locked (toolchain from rust-toolchain.toml)
Run victory run <title> --execute, with and without --console series-x and the README's three settings

1. 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, with VICTORY_FPS=30 added, 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 (XMemVirtualAlloc with 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:

Below 4 GB this fork victory-fork
free at the stop 19 MB, largest block 11 MB (the same call succeeds)
reservations of the default thread stack size 37 x 16 MiB 37 x 1 MiB

apps/victory/build.rs links victory.exe with /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>):

Default stack Starts
16 MiB (as built) 0 of 10 on 4cbe9d7, 0 of 2 on 01aadd1
8 MiB 2 of 2
4 MiB, 2 MiB 1 of 1 each
1 MiB every run (14 on 4cbe9d7, 2 on 01aadd1)
victory-fork main (f85101b) relinked at 16 MiB 0 of 1: the same stop at 1 s

#9 and #15 report runs on 4cbe9d7 that 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:

  • the start screen;
  • the load begins;
  • pipelines are made and the cache fills.

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 with VICTORY_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. GetDeviceRemovedReason gives DXGI_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. On 01aadd1 it 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:

  • One pipeline. In all 12 runs, the device is lost 0.02 to 0.35 s after the first bind of one particular mesh-shader pipeline (under 0.1 s in 11 of them). With that pipeline's mesh shader in 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.
  • #13's barrier patch. I applied it locally (both sides of a transition through legal_state, and transitions whose legal states match dropped). The device was still lost at 60 s.
  • The capped view heap. The same numbers as #15 appear here: wanted 1,245,184 views, made 934,464, and "a view heap shorter than shaders keep their indices in". victory-fork caps this heap at 1,000,000 too, but it clamps view indices in translated shaders to a null slot at the end of the heap. I made a local victory-fork build with only that shader-side clamp switched off (the heap capped as before, cache keys separate). It ran 250 s through the load and into the world without losing the device: 4,000 draws a frame at 220 s, slow because it translated all its shaders in that run. The same build with the clamp on also ran clean, at 186 ms a frame at the end. So on this card the cap alone does not explain the loss.
  • #68 (wave64 on 32-lane hosts, and a capped heap that keeps the title's slot count) merged onto 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.
  • Card memory. 6-7 GB of 16 in use at the time.
  • DRED. With 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 main on 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.)

**@⁠larelgit** on GitHub · 2026-11-25 14:55 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/121) 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 | | | |---|---| | Card | RTX 5080 16 GB, driver 610.88 | | Processor, memory | Ryzen 7 7800X3D, 32 GB | | System | Windows 11 Pro 23H2 (10.0.22631), native D3D12 | | Tree | `main` at 4cbe9d7 for most runs; both stops checked again on 01aadd1 (current `main`), nothing added | | Build | `cargo build --profile diag -p victory --features diagnostics --locked` (toolchain from `rust-toolchain.toml`) | | Run | `victory run <title> --execute`, with and without `--console series-x` and the README's three settings | ## 1. 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`, with `VICTORY_FPS=30` added, 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 (`XMemVirtualAlloc` with 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: | Below 4 GB | this fork | victory-fork | |---|---|---| | free at the stop | 19 MB, largest block 11 MB | (the same call succeeds) | | reservations of the default thread stack size | 37 x 16 MiB | 37 x 1 MiB | `apps/victory/build.rs` links `victory.exe` with `/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>`): | Default stack | Starts | |---|---| | 16 MiB (as built) | 0 of 10 on 4cbe9d7, 0 of 2 on 01aadd1 | | 8 MiB | 2 of 2 | | 4 MiB, 2 MiB | 1 of 1 each | | 1 MiB | every run (14 on 4cbe9d7, 2 on 01aadd1) | | victory-fork `main` (f85101b) relinked at 16 MiB | 0 of 1: the same stop at 1 s | #9 and #15 report runs on 4cbe9d7 that 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: - the start screen; - the load begins; - pipelines are made and the cache fills. 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 with `VICTORY_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. `GetDeviceRemovedReason` gives `DXGI_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. On 01aadd1 it 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: - **One pipeline.** In all 12 runs, the device is lost 0.02 to 0.35 s after the first bind of one particular mesh-shader pipeline (under 0.1 s in 11 of them). With that pipeline's mesh shader in `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. - **#13's barrier patch.** I applied it locally (both sides of a transition through `legal_state`, and transitions whose legal states match dropped). The device was still lost at 60 s. - **The capped view heap.** The same numbers as #15 appear here: wanted 1,245,184 views, made 934,464, and "a view heap shorter than shaders keep their indices in". victory-fork caps this heap at 1,000,000 too, but it clamps view indices in translated shaders to a null slot at the end of the heap. I made a local victory-fork build with only that shader-side clamp switched off (the heap capped as before, cache keys separate). It ran 250 s through the load and into the world without losing the device: 4,000 draws a frame at 220 s, slow because it translated all its shaders in that run. The same build with the clamp on also ran clean, at 186 ms a frame at the end. So on this card the cap alone does not explain the loss. - **#68** (wave64 on 32-lane hosts, and a capped heap that keeps the title's slot count) merged onto 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. - **Card memory.** 6-7 GB of 16 in use at the time. - **DRED.** With `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 `main` on 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.)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:36:10 +00:00
Author
Owner

@⁠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.

Card RTX 3070 Laptop 8 GB, driver 621.01
Processor, memory Ryzen 7 6800H, 15 GB (page file up to 32 GB)
System Windows 11 Home (10.0.26200), native D3D12
Tree main at 01aadd1, 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 side
Build cargo build --release -p victory (no diagnostics), /STACK:16777216 as built
Run victory run <title> --execute, no other settings

1. 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:

  • First run (empty pipeline cache): frames of 1-6 s while about 2,900 early pipelines were made, with up to 7,700 draws a frame dropped while they were being made.
  • Second run (cache warm, 0 being made): about 200-240 ms a frame, but 1,600-1,900 draws a frame dropped without a host pipeline. The picture is the bare buffers: a false-colour, "heat map" look.

The shaders that do not translate in that run:

Count Reason
87 console wave64 lanes on a host without 64-lane waves is not supported
44 a wave64 group sharing LDS without barriers on a host without 64-lane waves is not supported
34 an address in an SGPR that is no root parameter is not supported
2 mesh outputs beyond the host's 32 KiB is not supported

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 14:58 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/121#issuecomment-7166107817) Another NVIDIA data point, on a smaller card, that came out differently on both counts. | | | |---|---| | Card | RTX 3070 Laptop 8 GB, driver 621.01 | | Processor, memory | Ryzen 7 6800H, 15 GB (page file up to 32 GB) | | System | Windows 11 Home (10.0.26200), native D3D12 | | Tree | `main` at 01aadd1, 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 side | | Build | `cargo build --release -p victory` (no diagnostics), `/STACK:16777216` as built | | Run | `victory run <title> --execute`, no other settings | **1. 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: - First run (empty pipeline cache): frames of 1-6 s while about 2,900 early pipelines were made, with up to 7,700 draws a frame dropped while they were being made. - Second run (cache warm, 0 being made): about 200-240 ms a frame, but 1,600-1,900 draws a frame dropped without a host pipeline. The picture is the bare buffers: a false-colour, "heat map" look. The shaders that do not translate in that run: | Count | Reason | |---|---| | 87 | console wave64 lanes on a host without 64-lane waves is not supported | | 44 | a wave64 group sharing LDS without barriers on a host without 64-lane waves is not supported | | 34 | an address in an SGPR that is no root parameter is not supported | | 2 | mesh outputs beyond the host's 32 KiB is not supported | 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.)
Author
Owner

@⁠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:

Reason Without #68 With #68
a wave64 group sharing LDS without barriers on a host without 64-lane waves 44 0
console wave64 lanes on a host without 64-lane waves 87 73
an address in an SGPR that is no root parameter 34 35
mesh outputs beyond the host's 32 KiB 2 2

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::shadow logged "no memory for copies of title memory" (0x8007000E) several times, and the next submission lost the device:

host GPU device removed after a submission of 87 lists; no breadcrumbs
(The specified device interface or feature level is not supported on this system. (0x887A0004));
device removed: The GPU device instance has been suspended.

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.)

**@⁠Praisser** on GitHub · 2026-11-25 15:23 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/121#issuecomment-7166767852) 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: | Reason | Without #68 | With #68 | |---|---|---| | a wave64 group sharing LDS without barriers on a host without 64-lane waves | 44 | **0** | | console wave64 lanes on a host without 64-lane waves | 87 | 73 | | an address in an SGPR that is no root parameter | 34 | 35 | | mesh outputs beyond the host's 32 KiB | 2 | 2 | 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::shadow` logged "no memory for copies of title memory" (`0x8007000E`) several times, and the next submission lost the device: ``` host GPU device removed after a submission of 87 lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)); device removed: The GPU device instance has been suspended. ``` 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.)
This discussion has been locked. Commenting is limited to contributors.
No description provided.