Profiling notes on an RTX 3090 Ti: what limits the frame, and what did not help (measured) #2098

Open
opened 2026-11-29 09:29:24 +00:00 by gioeleBrancaleoni · 6 comments
gioeleBrancaleoni commented 2026-11-29 09:29:24 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gioeleBrancaleoni on 2026-11-29T09:29:24Z.


Sharing measurements from two days of profiling, in case they save someone the same runs. All numbers are from a
branch of 2026-11-27/28 (before the big 11-28 integration), so some may have moved since; the method and the
negative results should still hold.

Setup and method

  • RTX 3090 Ti, Ryzen 7 9800X3D (8 cores / 16 threads), 32 GB, Windows 11 24H2, driver 610.88, Resizable BAR on.
  • Opening of a new game from fixed saves (no save slots), 6-minute runs, frame-stats with the first 150 s left
    out; Series S profile (1080p) and Series X profile (1440p, DLSS Quality). REFLECTION ESTIMATE on.
  • Every new build gets a warm-up run first (pipelines are made again). Run-to-run noise ~1-1.5 fps, session to
    session ~3 fps: only same-session comparisons count.
  • GPU: Nsight Graphics 2026.4 GPU Trace (top-level triage metrics + real-time shader profiler), read with
    Nsight's own MCP server (ngfx-mcp.exe, stdio) to attribute metrics to marker ranges. CPU: the diagnostics
    build's timeline (VICTORY_TIMELINE).

The one change that helped: VICTORY_CARD_AWAKE=0

Same conclusion as 42c064de, measured independently:

spinner on spinner off
Series S fps 30.9 / 29.9 39.2 / 38.1 / 40.1 / 39.7
Series X fps 27.4 32.5 / 34.8 / 36.4
GPU frame in a trace (S) 26-28 ms 16-17 ms

With it off the card stays at full clocks anyway (nvidia-smi every 0.5 s through a run: 1995-2000 MHz, P0, no
throttle reasons), so "prefer maximum performance" adds nothing here.

What the GPU is doing (Series S, spinner off)

  • Graphics engine active ~99%, SM throughput only 10-20%, compute warps ~13-17% of peak, L2 ~6%, DRAM ~11%.
  • Front end stalled in wait-for-idle ~29% of the frame; ~650 go-idle and ~320 graphics/compute switches a frame;
    ~5,200 dispatches and ~1,000-3,000 draws a frame.
  • ~560 of ~650 go-idles fall where a barrier call is. Barrier calls cluster into ~980 sync points a frame: the
    title's own barrier groups (~720), batched clamp passes (~150), copies (alias copies ~75, uploads). Lazy texture
    transitions mostly share the sync point of the barrier before them.
  • Graphics executions (indirect mesh especially) are WFI-stalled for nearly all of their time; compute dispatches
    are not. Not PSO changes (same-PSO executions stall alike), not count buffers (the title's executions are one
    record, no count). Some mesh draws run 100-300 us at 2-20% SM (one mesh program is 15k DXIL lines, long-scoreboard
    bound).
  • GPU time by title queue: the title's compute queues are ~3.5-4 ms of ~20 ms, so a host compute queue could hide at
    most that, minus ~10 cross-queue waits a frame (VICTORY_ASYNC_QUEUE=plan: ~8 of ~16 submissions a frame come
    from the compute queues).

What the frame waits for (CPU timeline at 4 moments per profile)

The chain each present waits for runs mostly through the title's own threads (8-19 ms a frame, its native code), a
DirectStorage worker during streaming bursts (41 ms in one stretch in one sample) and, in some samples, the card
(7-16 ms). The submitting thread is busy (~20-30 ms of work a frame) but is rarely on that chain, so pipelining it
would lower its busy time without shortening most frames (we designed it and shelved it after this measurement).

Tried and measured, no gain (same session, ±1 fps noise)

idea result
ExecuteIndirect joins with root constants per record (bindings carried) slower: 30.2 vs 33.5 fps; 30.8 even with no joins (the signature itself costs ~3 ms GPU)
dropping all global UAV barriers (unsafe, measuring only) go-idle 850 -> 770, fps unchanged
VICTORY_GROUP_SYNC=0 (unsafe) slower
VICTORY_SHADER_OPT=127 40.1 vs 40.1
VICTORY_WIDE_THREADS=6/8 39.9 / 39.8 vs 40.1
VICTORY_WIDE_SPIN=100/300 39.3 / 39.5 vs 40.1; X 34.6 vs 34.2
VICTORY_JOIN_PARTS=16 39.9 / 40.2 vs 39.6
VICTORY_HELPER_PRIORITY=2 40.7 / 39.8 vs 40.0; X 35.2 vs 34.5
VICTORY_THIN_THREADS=4/6/12 (default 8) 39.3 / 40.2 / 37.6 vs 38.9
resetting landed lists on the helper thread 38.6 / 39.8 vs 39.6 / 39.9

Texture lateness

With VICTORY_TEXTURE_STAGE_MS=16 and VICTORY_TEXTURE_CATCHUP=0 the queue of textures picked by index holds
1,200-1,900 due slots on average and 7,000-9,000 at the 95th percentile; the oldest due slot waits 100-200 frames on
average and up to ~600; first servings come 4-9 frames late on average, up to 400+. Same session:

run fps due slots mean / p95 first serving late, frames (mean)
base (2 runs) 38.6-38.9 1,700-1,900 / 7,600-7,900 8.5-11
VICTORY_TEXTURE_CATCHUP=1 39.8 1,100 / 7,500 5.0
VICTORY_TEXTURE_STAGE_MS=32 37.6 (low5 13.8) 2,200 / 9,300 11.5

So catch-up helps (as play.rs now has it) at no fps cost, a larger plain budget does not, and the peaks at scene
changes stay high. These lateness numbers vary a lot between runs (scene timing), treat them as a trend.

Tools, if useful upstream

  • Nsight GPU Trace from the command line (note: ngfx.exe --platform ... is taken by Qt as its own -platform
    option and fails; leave it out) and a small stdio client for ngfx-mcp.exe (protocol 2026-07-28, _meta with
    protocol version / client capabilities / client info on every request) that attributes WFI stall, go-idles, SM
    throughput to marker ranges.
  • Diagnostics switches we added locally: VICTORY_MARKERS=1 (each noted command opens a marker range named by its
    kind, so a trace sums time and stalls per kind), the card's own stamps split by the title queue that sent each
    submission, barrier/transition census by host state pair, the submitting thread's list steps timed by kind.
    Happy to port them onto current main if wanted.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6677116562 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2098). Originally posted by [gioeleBrancaleoni](https://github.com/gioeleBrancaleoni) on 2026-11-29T09:29:24Z. --- Sharing measurements from two days of profiling, in case they save someone the same runs. All numbers are from a branch of 2026-11-27/28 (before the big 11-28 integration), so some may have moved since; the method and the negative results should still hold. ## Setup and method - RTX 3090 Ti, Ryzen 7 9800X3D (8 cores / 16 threads), 32 GB, Windows 11 24H2, driver 610.88, Resizable BAR on. - Opening of a new game from fixed saves (no save slots), 6-minute runs, `frame-stats` with the first 150 s left out; Series S profile (1080p) and Series X profile (1440p, DLSS Quality). REFLECTION ESTIMATE on. - Every new build gets a warm-up run first (pipelines are made again). Run-to-run noise ~1-1.5 fps, session to session ~3 fps: only same-session comparisons count. - GPU: Nsight Graphics 2026.4 GPU Trace (top-level triage metrics + real-time shader profiler), read with Nsight's own MCP server (`ngfx-mcp.exe`, stdio) to attribute metrics to marker ranges. CPU: the diagnostics build's timeline (`VICTORY_TIMELINE`). ## The one change that helped: `VICTORY_CARD_AWAKE=0` Same conclusion as 42c064de, measured independently: | | spinner on | spinner off | |---|---|---| | Series S fps | 30.9 / 29.9 | 39.2 / 38.1 / 40.1 / 39.7 | | Series X fps | 27.4 | 32.5 / 34.8 / 36.4 | | GPU frame in a trace (S) | 26-28 ms | 16-17 ms | With it off the card stays at full clocks anyway (nvidia-smi every 0.5 s through a run: 1995-2000 MHz, P0, no throttle reasons), so "prefer maximum performance" adds nothing here. ## What the GPU is doing (Series S, spinner off) - Graphics engine active ~99%, SM throughput only 10-20%, compute warps ~13-17% of peak, L2 ~6%, DRAM ~11%. - Front end stalled in wait-for-idle ~29% of the frame; ~650 go-idle and ~320 graphics/compute switches a frame; ~5,200 dispatches and ~1,000-3,000 draws a frame. - ~560 of ~650 go-idles fall where a barrier call is. Barrier calls cluster into ~980 sync points a frame: the title's own barrier groups (~720), batched clamp passes (~150), copies (alias copies ~75, uploads). Lazy texture transitions mostly share the sync point of the barrier before them. - Graphics executions (indirect mesh especially) are WFI-stalled for nearly all of their time; compute dispatches are not. Not PSO changes (same-PSO executions stall alike), not count buffers (the title's executions are one record, no count). Some mesh draws run 100-300 us at 2-20% SM (one mesh program is 15k DXIL lines, long-scoreboard bound). - GPU time by title queue: the title's compute queues are ~3.5-4 ms of ~20 ms, so a host compute queue could hide at most that, minus ~10 cross-queue waits a frame (`VICTORY_ASYNC_QUEUE=plan`: ~8 of ~16 submissions a frame come from the compute queues). ## What the frame waits for (CPU timeline at 4 moments per profile) The chain each present waits for runs mostly through the title's own threads (8-19 ms a frame, its native code), a DirectStorage worker during streaming bursts (41 ms in one stretch in one sample) and, in some samples, the card (7-16 ms). The submitting thread is busy (~20-30 ms of work a frame) but is rarely on that chain, so pipelining it would lower its busy time without shortening most frames (we designed it and shelved it after this measurement). ## Tried and measured, no gain (same session, ±1 fps noise) | idea | result | |---|---| | ExecuteIndirect joins with root constants per record (bindings carried) | slower: 30.2 vs 33.5 fps; 30.8 even with no joins (the signature itself costs ~3 ms GPU) | | dropping all global UAV barriers (unsafe, measuring only) | go-idle 850 -> 770, fps unchanged | | `VICTORY_GROUP_SYNC=0` (unsafe) | slower | | `VICTORY_SHADER_OPT=127` | 40.1 vs 40.1 | | `VICTORY_WIDE_THREADS=6/8` | 39.9 / 39.8 vs 40.1 | | `VICTORY_WIDE_SPIN=100/300` | 39.3 / 39.5 vs 40.1; X 34.6 vs 34.2 | | `VICTORY_JOIN_PARTS=16` | 39.9 / 40.2 vs 39.6 | | `VICTORY_HELPER_PRIORITY=2` | 40.7 / 39.8 vs 40.0; X 35.2 vs 34.5 | | `VICTORY_THIN_THREADS=4/6/12` (default 8) | 39.3 / 40.2 / 37.6 vs 38.9 | | resetting landed lists on the helper thread | 38.6 / 39.8 vs 39.6 / 39.9 | ## Texture lateness With `VICTORY_TEXTURE_STAGE_MS=16` and `VICTORY_TEXTURE_CATCHUP=0` the queue of textures picked by index holds 1,200-1,900 due slots on average and 7,000-9,000 at the 95th percentile; the oldest due slot waits 100-200 frames on average and up to ~600; first servings come 4-9 frames late on average, up to 400+. Same session: | run | fps | due slots mean / p95 | first serving late, frames (mean) | |---|---|---|---| | base (2 runs) | 38.6-38.9 | 1,700-1,900 / 7,600-7,900 | 8.5-11 | | `VICTORY_TEXTURE_CATCHUP=1` | 39.8 | 1,100 / 7,500 | 5.0 | | `VICTORY_TEXTURE_STAGE_MS=32` | 37.6 (low5 13.8) | 2,200 / 9,300 | 11.5 | So catch-up helps (as play.rs now has it) at no fps cost, a larger plain budget does not, and the peaks at scene changes stay high. These lateness numbers vary a lot between runs (scene timing), treat them as a trend. ## Tools, if useful upstream - Nsight GPU Trace from the command line (note: `ngfx.exe --platform ...` is taken by Qt as its own `-platform` option and fails; leave it out) and a small stdio client for `ngfx-mcp.exe` (protocol 2026-07-28, `_meta` with protocol version / client capabilities / client info on every request) that attributes WFI stall, go-idles, SM throughput to marker ranges. - Diagnostics switches we added locally: `VICTORY_MARKERS=1` (each noted command opens a marker range named by its kind, so a trace sums time and stalls per kind), the card's own stamps split by the title queue that sent each submission, barrier/transition census by host state pair, the submitting thread's list steps timed by kind. Happy to port them onto current main if wanted.
github-actions[bot] commented 2026-11-29 09:29:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T09:29:32Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7253797948 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2098#issuecomment-7253797948). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T09:29:32Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
gioeleBrancaleoni commented 2026-11-29 12:16:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gioeleBrancaleoni on 2026-11-29T12:16:58Z.


Update: what limits the frame here (stack profile), and upstream main 829188e9 measured on the same PC

Same PC as above (RTX 3090 Ti, 9800X3D, 32 GB, Windows 11 24H2), 6-minute opening runs, frame-stats -SkipSeconds 150, same session for every comparison.

1. The title waits for our fence signals (the diag timeline hides it)

VICTORY_PROFILE=200,230,5,<file> (diagnostics build), stacks named with dbghelp against the diag PDB and the title image disassembled with dumpbin /disasm:

  • The title's main thread spends ~69 % of its samples in a monitorx/mwaitx loop (image +0x4fb0ac4 .. +0x4fb0c27, Series S) on a 64-bit value whose address comes from a virtual call at slot 0x60 of a fence, i.e. our fence::gpu_address (it waits until value - target is non-negative, with a yield when the mwaitx timer runs out). Another ~15 % is a kernel wait.
  • The title's job threads are 80-95 % idle.
  • The busy threads are ours: the submitting thread (queue::behind lane, ~90 % inside Host::submit) and the list workers.

The diag timeline only sees fence polling through GetCompletedValue, so this direct memory polling looks like the title's own work there; earlier we concluded from timelines that "the title's threads are the chain" — that was wrong. The release frame lines agree with the profile: prep ~19 ms + copy ~7 ms a frame on the submitting thread ≈ the whole 25.6 ms frame (Series S, ~39 fps), waiting on the card ~1.4 ms.

Causality check: a local, temporary spin at the start of Host::submit (500 µs a submission, ~5-8 ms a frame) took Series S from 38.0 / 40.0 fps to 32.0 (frame ~25.6 -> ~31.3 ms), so the frame follows the submitting thread almost 1:1. Overlapping the preparation of submission N+1 with the sending of N (or taking work off that thread) is where the frame rate is, not the title's threads and not the card (gpu wait ~1.4 ms a frame).

(Side note: one run with a 250 µs spin ended after 3 min with a host command list that did not close, 0x80070057, then DXGI_ERROR_DEVICE_REMOVED — looks like a latent timing-dependent bug; not chased yet.)

Where the submitting thread's time goes (inclusive, diag build, Series S): shadow::wide 19.5 %, Host::take_steps 9.9 %, Shadow::merge_under_writes 8.3 %, watch::ask_once/ask_ahead/ask_run ~8-13 %, Batch::update 7.2 %, Shadow::update 6.9 %, host::read 5.4 %, land::Pool::each 4.9 %, copy_mapped 4.3 %.

2. upstream main 829188e9 on this PC

fps (S) low5 prep ms copy ms gpu ms
our branch (f3534e6b + 19 fixes picked from main) 38.1-39.2 16.7-17.9 18-19 6.8-7.2 1.3-1.6
829188e9 36.6 16.5 22.3 9.4 3.0
  • Series X on 829188e9 does not start: XMemVirtualAlloc refused size=6538919936 kind=0x42000 flags=0x23 (os error 8), then the title's breakpoint at +0x1e6c284. Our branch starts Series X every time on the same PC.
  • Glass glitches (car windows full of yellow/green sparkles in the opening, e.g. the "il mio ragazzo" scene ~100 s in, with or without VICTORY_AMBIENT_SPECULAR): not caused by VICTORY_BVH_MISS (=0: same) nor by the HDR clamp / NaN scrub (VICTORY_HDR_CLAMP=0 VICTORY_COMPOSE_NAN=0: worse, green noise over the whole window). f3534e6b is clean in the same scene, so the regression is in f3534e6b..829188e9 (minus the fixes we picked: e530c003 3f6ba011 3a9f195b 71add4c9 cfa18bfb c8f08560, which do not bring it).
  • Mesh pipelines fail to build with E_OUTOFMEMORY (0x8007000e) on 829188e9 here: 137-315 such log lines per Series S run (44 distinct pipelines in the first run); 0 in each of the 20 runs of our branch today.

3. Measured, no gain here

Happy to share the profile tooling (a dbghelp symbolizer and a script that splits samples by waiting/working per first own frame) if useful.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7255698900 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2098#issuecomment-7255698900). Originally posted by [gioeleBrancaleoni](https://github.com/gioeleBrancaleoni) on 2026-11-29T12:16:58Z. --- ## Update: what limits the frame here (stack profile), and upstream main 829188e9 measured on the same PC Same PC as above (RTX 3090 Ti, 9800X3D, 32 GB, Windows 11 24H2), 6-minute opening runs, `frame-stats -SkipSeconds 150`, same session for every comparison. ### 1. The title waits for our fence signals (the diag timeline hides it) `VICTORY_PROFILE=200,230,5,<file>` (diagnostics build), stacks named with dbghelp against the diag PDB and the title image disassembled with `dumpbin /disasm`: - The title's main thread spends **~69 % of its samples in a `monitorx`/`mwaitx` loop** (image `+0x4fb0ac4` .. `+0x4fb0c27`, Series S) on a 64-bit value whose address comes from a virtual call at slot `0x60` of a fence, i.e. our `fence::gpu_address` (it waits until `value - target` is non-negative, with a yield when the `mwaitx` timer runs out). Another ~15 % is a kernel wait. - The title's job threads are 80-95 % idle. - The busy threads are ours: the submitting thread (`queue::behind` lane, ~90 % inside `Host::submit`) and the list workers. The diag timeline only sees fence polling through `GetCompletedValue`, so this direct memory polling looks like the title's own work there; earlier we concluded from timelines that "the title's threads are the chain" — that was wrong. The release frame lines agree with the profile: `prep` ~19 ms + `copy` ~7 ms a frame on the submitting thread ≈ the whole 25.6 ms frame (Series S, ~39 fps), waiting on the card ~1.4 ms. Causality check: a local, temporary spin at the start of `Host::submit` (500 µs a submission, ~5-8 ms a frame) took Series S from 38.0 / 40.0 fps to 32.0 (frame ~25.6 -> ~31.3 ms), so the frame follows the submitting thread almost 1:1. Overlapping the preparation of submission N+1 with the sending of N (or taking work off that thread) is where the frame rate is, not the title's threads and not the card (`gpu` wait ~1.4 ms a frame). (Side note: one run with a 250 µs spin ended after 3 min with a host command list that did not close, `0x80070057`, then `DXGI_ERROR_DEVICE_REMOVED` — looks like a latent timing-dependent bug; not chased yet.) Where the submitting thread's time goes (inclusive, diag build, Series S): `shadow::wide` 19.5 %, `Host::take_steps` 9.9 %, `Shadow::merge_under_writes` 8.3 %, `watch::ask_once`/`ask_ahead`/`ask_run` ~8-13 %, `Batch::update` 7.2 %, `Shadow::update` 6.9 %, `host::read` 5.4 %, `land::Pool::each` 4.9 %, `copy_mapped` 4.3 %. ### 2. upstream main 829188e9 on this PC | | fps (S) | low5 | prep ms | copy ms | gpu ms | |---|---|---|---|---|---| | our branch (f3534e6b + 19 fixes picked from main) | 38.1-39.2 | 16.7-17.9 | 18-19 | 6.8-7.2 | 1.3-1.6 | | 829188e9 | 36.6 | 16.5 | 22.3 | 9.4 | 3.0 | - **Series X on 829188e9 does not start**: `XMemVirtualAlloc refused size=6538919936 kind=0x42000 flags=0x23 (os error 8)`, then the title's breakpoint at `+0x1e6c284`. Our branch starts Series X every time on the same PC. - **Glass glitches** (car windows full of yellow/green sparkles in the opening, e.g. the "il mio ragazzo" scene ~100 s in, with or without `VICTORY_AMBIENT_SPECULAR`): not caused by `VICTORY_BVH_MISS` (`=0`: same) nor by the HDR clamp / NaN scrub (`VICTORY_HDR_CLAMP=0 VICTORY_COMPOSE_NAN=0`: worse, green noise over the whole window). f3534e6b is clean in the same scene, so the regression is in f3534e6b..829188e9 (minus the fixes we picked: e530c003 3f6ba011 3a9f195b 71add4c9 cfa18bfb c8f08560, which do not bring it). - Mesh pipelines fail to build with `E_OUTOFMEMORY` (0x8007000e) on 829188e9 here: 137-315 such log lines per Series S run (44 distinct pipelines in the first run); 0 in each of the 20 runs of our branch today. ### 3. Measured, no gain here - 9a8249b2 (descriptor `VIEW_SHAPES` lock split), ported onto our branch: S 37.9 / 38.4 vs 38.1 / 40.4 without, X 32.6 vs 33.8, low5 a little worse. The descriptor lock is not where the time goes on this machine. - 3269180b (counting allocator diagnostics-only): our branch already had `copystat` behind `diagnostics`, nothing to gain. - The 19 crash/picture/loading fixes we picked (aee4c45a 564a46d2 4f5ae578 e205498c 6ea4529f 74d6f240 879558a3 3f054e46 e530c003 3f6ba011 3a9f195b 71add4c9 cfa18bfb c8f08560 def7cda6 0f0c2ad8 5b7ce88b c0ab82aa 96270e51) applied cleanly and cost nothing (S 39.2 vs 39.2/38.8). Happy to share the profile tooling (a dbghelp symbolizer and a script that splits samples by waiting/working per first own frame) if useful.
trustno1-coder commented 2026-11-29 20:36:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T20:36:30Z.


This issue has the start-up crash where Windows refuses the game's 6.5 GB reservation (XMemVirtualAlloc refused size=6538919936 ... os error 8, then +0x1e6c284). v2026.11.29.04 is a build with only one fix aimed at exactly this crash.

We couldn't reproduce the real crash here, so it may not fix it for you. Please try it and tell us here whether the game now starts, and attach the play log and crashes.log either way. If the play log has a line with no room at first in the title's window, include that line; it tells us whether this was the cause.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7262215960 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2098#issuecomment-7262215960). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-29T20:36:30Z. --- This issue has the start-up crash where Windows refuses the game's 6.5 GB reservation (`XMemVirtualAlloc refused size=6538919936 ... os error 8`, then `+0x1e6c284`). [v2026.11.29.04](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.29.04) is a build with only one fix aimed at exactly this crash. We couldn't reproduce the real crash here, so it may not fix it for you. Please try it and tell us here whether the game now starts, and attach the play log and crashes.log either way. If the play log has a line with `no room at first in the title's window`, include that line; it tells us whether this was the cause.
gioeleBrancaleoni commented 2026-11-29 20:49:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gioeleBrancaleoni on 2026-11-29T20:49:19Z.


Tried v2026.11.29.04 (f72cec77, release build, Series X profile, same PC: RTX 3090 Ti, 9800X3D, 32 GB, Windows 11 26100.8737). The game now starts on Series X.

  • The 6.5 GB heap is granted: XMemVirtualAlloc without write watching (the title's own address, or a placeholder) at=0x1800000000 size=6538919936 kind=0x42000 flags=0x23.
  • There is no no room at first line in the play log.
  • It ran into the world normally (32.1 fps in the 150-200 s window of the opening).

It then ended at 3 min 25 s, with a different error:

ERROR victory_gpu::host: a host command list did not close (Parametro non corretto. (0x80070057)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
health/bad: run ended after 3 min: 0x887A0005, DXGI_ERROR_DEVICE_REMOVED

crashes.log holds only that host GPU failure line. Full logs not attached (they name the title and local paths); happy to send specific lines.

This close failure is not specific to the XMem fix. Our own branch (f3534e6b base) hits the same error at the same moment of the opening, ~3:20-3:25 in. It is timing-dependent there: about 1 run in 5-8 in our normal configuration, and every run with settings that change the submitting thread's timing (VICTORY_SUBMIT_FRAMES=2, preparing ahead, CPU load).

  • What we can see before it: the first texture read-backs of the run (R32_FLOAT, R32G32_FLOAT x2 at 256x256, R16G16_UINT at 128x128), and four small buffers getting card copies.
  • Ported #2395, #2542 and #2305: they did not stop it.
  • D3D12 debug layer: cannot be used here, because device creation fails with it on, both with the Windows Graphics Tools layer and with the Agility SDK 1.620.2 runtime and layers.
  • Next: a journal of the last 128 commands per host list, with eager parameter checks, dumped when Close fails. It does not catch the error in our diagnostics build, which is too slow to reach the timing, so we are moving it into a release-timing build. We will post the command it names.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7262384055 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2098#issuecomment-7262384055). Originally posted by [gioeleBrancaleoni](https://github.com/gioeleBrancaleoni) on 2026-11-29T20:49:19Z. --- Tried v2026.11.29.04 (f72cec77, release build, Series X profile, same PC: RTX 3090 Ti, 9800X3D, 32 GB, Windows 11 26100.8737). **The game now starts** on Series X. - The 6.5 GB heap is granted: `XMemVirtualAlloc without write watching (the title's own address, or a placeholder) at=0x1800000000 size=6538919936 kind=0x42000 flags=0x23`. - There is no `no room at first` line in the play log. - It ran into the world normally (32.1 fps in the 150-200 s window of the opening). It then ended at 3 min 25 s, with a different error: ``` ERROR victory_gpu::host: a host command list did not close (Parametro non corretto. (0x80070057)): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command health/bad: run ended after 3 min: 0x887A0005, DXGI_ERROR_DEVICE_REMOVED ``` crashes.log holds only that host GPU failure line. Full logs not attached (they name the title and local paths); happy to send specific lines. This close failure is not specific to the XMem fix. Our own branch (f3534e6b base) hits the same error at the same moment of the opening, ~3:20-3:25 in. It is timing-dependent there: about 1 run in 5-8 in our normal configuration, and every run with settings that change the submitting thread's timing (`VICTORY_SUBMIT_FRAMES=2`, preparing ahead, CPU load). - **What we can see before it:** the first texture read-backs of the run (R32_FLOAT, R32G32_FLOAT x2 at 256x256, R16G16_UINT at 128x128), and four small buffers getting card copies. - **Ported #2395, #2542 and #2305:** they did not stop it. - **D3D12 debug layer:** cannot be used here, because device creation fails with it on, both with the Windows Graphics Tools layer and with the Agility SDK 1.620.2 runtime and layers. - **Next:** a journal of the last 128 commands per host list, with eager parameter checks, dumped when Close fails. It does not catch the error in our diagnostics build, which is too slow to reach the timing, so we are moving it into a release-timing build. We will post the command it names.
gioeleBrancaleoni commented 2026-11-29 21:52:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gioeleBrancaleoni on 2026-11-29T21:52:22Z.


Found the command behind a host command list did not close (0x80070057) (the 3:20-3:30 crash on Series X, also in v2026.11.29.04).

How: a journal of every D3D12 call recorded into each host list (a per-object method table on the list, the call and its key arguments in a ring), written out when Close fails, in a release-timing build (the diagnostics build is too slow to hit it). Two full lists caught, 71 and 176 commands.

The bad call, same in both:

CopyTextureRegion dst: tex2d 256x256 mips 9 format 78 (BC3_UNORM_SRGB) sub 0 <- src: tex2d 2048x2048 mips 12 format 78 sub 3
CopyTextureRegion dst: tex2d 256x256 mips 7 format 98 (BC7_UNORM)      sub 0 <- src: (the same) format 78 sub 3
...one pair per level

The second copy of each pair comes from the placed_twins loop in list.rs copy_texture_region: a title copy into a texture is repeated into every view placed over the destination's memory. resource::placed_twins matches those views by block size only, so a BC7 view placed over BC3 blocks (both 16-byte blocks) is a twin, and gets a BC3 -> BC7 CopyTextureRegion. D3D12 refuses copies across format families; without the debug layer the list is just marked invalid and Close returns E_INVALIDARG, then device removed.

It is timing-dependent because the twin only exists while that BC7 view is alive: with VICTORY_SUBMIT_FRAMES=2 (and preparing ahead) it is almost every run on Series X here, about 1 in 5-8 in the default configuration.

Fix (our branch, small): in that loop, a twin whose host format is of another family than the destination's is not copied into; it takes the destination's levels through a buffer at its next use, with the existing texture::seed_later / seed_pending path (the one already written for "a BC3 texture's blocks read as BC7"). The CopyResource twin loop already skipped other families, but then left the twin stale; it now reseeds it the same way.

// list.rs, copy_texture_region, placed_twins loop, after host_resource(twin):
let (twin_format, own_format) = unsafe { (other.GetDesc().Format.0 as u32, to.GetDesc().Format.0 as u32) };
if !crate::resource::copies_between(own_format, twin_format) {   // family(a) == family(b)
    crate::texture::seed_again(twin, dst.resource);              // seed_later without the log, re-armed per copy
    continue;
}

Result (Series X, settings that crashed nearly every run): before, 2 of 3 runs with the journal ended in this error (and all earlier runs with these settings that evening); with the fix, 3 of 3 ran the full 6 minutes, no close failure. The new path fired in each run, and not only for BC7: twins of formats 98 (BC7_UNORM), 99 (BC7_UNORM_SRGB) and 95 (BC6H_UF16) over BC3_UNORM_SRGB (78) destinations.

Happy to open a PR with it if you want it.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7263218103 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2098#issuecomment-7263218103). Originally posted by [gioeleBrancaleoni](https://github.com/gioeleBrancaleoni) on 2026-11-29T21:52:22Z. --- Found the command behind `a host command list did not close (0x80070057)` (the 3:20-3:30 crash on Series X, also in v2026.11.29.04). **How:** a journal of every D3D12 call recorded into each host list (a per-object method table on the list, the call and its key arguments in a ring), written out when `Close` fails, in a release-timing build (the diagnostics build is too slow to hit it). Two full lists caught, 71 and 176 commands. **The bad call**, same in both: ``` CopyTextureRegion dst: tex2d 256x256 mips 9 format 78 (BC3_UNORM_SRGB) sub 0 <- src: tex2d 2048x2048 mips 12 format 78 sub 3 CopyTextureRegion dst: tex2d 256x256 mips 7 format 98 (BC7_UNORM) sub 0 <- src: (the same) format 78 sub 3 ...one pair per level ``` The second copy of each pair comes from the `placed_twins` loop in `list.rs` `copy_texture_region`: a title copy into a texture is repeated into every view placed over the destination's memory. `resource::placed_twins` matches those views by **block size** only, so a BC7 view placed over BC3 blocks (both 16-byte blocks) is a twin, and gets a BC3 -> BC7 `CopyTextureRegion`. D3D12 refuses copies across format families; without the debug layer the list is just marked invalid and `Close` returns `E_INVALIDARG`, then device removed. It is timing-dependent because the twin only exists while that BC7 view is alive: with `VICTORY_SUBMIT_FRAMES=2` (and preparing ahead) it is almost every run on Series X here, about 1 in 5-8 in the default configuration. **Fix** (our branch, small): in that loop, a twin whose host format is of another family than the destination's is not copied into; it takes the destination's levels through a buffer at its next use, with the existing `texture::seed_later` / `seed_pending` path (the one already written for "a BC3 texture's blocks read as BC7"). The `CopyResource` twin loop already skipped other families, but then left the twin stale; it now reseeds it the same way. ```rust // list.rs, copy_texture_region, placed_twins loop, after host_resource(twin): let (twin_format, own_format) = unsafe { (other.GetDesc().Format.0 as u32, to.GetDesc().Format.0 as u32) }; if !crate::resource::copies_between(own_format, twin_format) { // family(a) == family(b) crate::texture::seed_again(twin, dst.resource); // seed_later without the log, re-armed per copy continue; } ``` **Result (Series X, settings that crashed nearly every run):** before, 2 of 3 runs with the journal ended in this error (and all earlier runs with these settings that evening); with the fix, 3 of 3 ran the full 6 minutes, no close failure. The new path fired in each run, and not only for BC7: twins of formats 98 (BC7_UNORM), 99 (BC7_UNORM_SRGB) and 95 (BC6H_UF16) over BC3_UNORM_SRGB (78) destinations. Happy to open a PR with it if you want it.
gioeleBrancaleoni commented 2026-11-30 08:22:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gioeleBrancaleoni on 2026-11-30T08:22:15Z.


More measurements (Series S profile, RTX 3090 Ti + 9800X3D, opening of a new game, our branch with the twin fix above). Two findings that may save someone time, and one place where the submitting thread loses ~half of its refresh time.

1. There is no ~40 fps cap: frame time follows the submitting thread's preparing. Run means sat at 40-41 fps whatever we changed, so we looked for a cap. The per-5 s frame-rate lines show none: 16-58 fps by scene, and frame time tracks the "preparing" ms of the same line closely:

preparing ms/frame fps
12.4 17.0 58.7
13.8 22.2 45.0
15.6 29.5 33.9
30.1 54.9 18.2

(The "GPU" column stays at 0-7 ms.) The 150-290 s bench window is the letterboxed opening cinematic, a mix of these. Moving preparing to another thread (prepare N+1 while N is sent, SUBMIT_FRAMES=2) never changed fps here; only less preparing work will. Comparing per-5 s lines of the same scene shows gains that run means hide.

2. Things measured with no effect on S (each A/B in one session, ±1 fps noise): VICTORY_UAV_DROP=all, DLSS performance vs quality, VICTORY_DSTORAGE_PRIORITY 0/1, VICTORY_WIDE_THREADS=8, VICTORY_WIDE_SPIN=100, VICTORY_ASYNC_QUEUE=plan, VICTORY_FSR_FRAMEGEN=0 (plain swap chain; presents are not vsync-bound, loading screens log 500+ fps), VICTORY_FRAME_INTERVAL_MS=1 (the title's own rate patch; play-foxhound.ps1 only sets VICTORY_FRAME_INTERVAL_US, so that patch is never applied by the launcher: +0-1 fps, not a cap). VICTORY_INPLACE=1 is much worse (30 vs 41 fps, GPU 13 ms: shaders reading system memory over PCIe).

3. Where the refreshes' time goes (release counters, gameplay mean per frame, all threads summed):

  • Shadow::update_free: 27.6 ms asking the write watch (watch::writes), 6.3 ms copying 65 MB of written pages (44,000 blocks, ~10 GB/s, fine).
  • Inside watch::writes: 20.3 ms in guard() (252 calls, ~80 µs each); answered ahead/published 1.0, waiting in Asking::hold 0.6, GetWriteWatch 0.6, noting 1.2.
  • Inside guard(): is-it-a-view 0.8, holes asked (uncommitted_end/is_view) ~0, protect/cover loop 5.9, and ~13 ms of the "clean check" spent waiting for the guards' Mutex (guards_timed() before g.clean.range(first..last).count()). The count itself is cheap.

So the 4 wide threads plus the submitting thread mostly queue on one lock. Its holders are the other refreshes' protect()/cover() loops, which call VirtualProtect with the lock held (~750 calls, ~3.5 ms a frame), and the fault handler. We tried a lock-free copy of the clean bits for an "all clean" early answer, but it almost never applies (nearly every asked range has written blocks), so no gain. The next thing we will try is to change protections outside the guards' lock (the PROTECTED bits are already set ahead of the change) and to join runs into fewer calls. Ideas welcome if you know why it has to stay under the lock.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7272823144 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2098#issuecomment-7272823144). Originally posted by [gioeleBrancaleoni](https://github.com/gioeleBrancaleoni) on 2026-11-30T08:22:15Z. --- More measurements (Series S profile, RTX 3090 Ti + 9800X3D, opening of a new game, our branch with the twin fix above). Two findings that may save someone time, and one place where the submitting thread loses ~half of its refresh time. **1. There is no ~40 fps cap: frame time follows the submitting thread's preparing.** Run means sat at 40-41 fps whatever we changed, so we looked for a cap. The per-5 s frame-rate lines show none: 16-58 fps by scene, and frame time tracks the "preparing" ms of the same line closely: | preparing | ms/frame | fps | |---|---|---| | 12.4 | 17.0 | 58.7 | | 13.8 | 22.2 | 45.0 | | 15.6 | 29.5 | 33.9 | | 30.1 | 54.9 | 18.2 | (The "GPU" column stays at 0-7 ms.) The 150-290 s bench window is the letterboxed opening cinematic, a mix of these. Moving preparing to another thread (prepare N+1 while N is sent, `SUBMIT_FRAMES=2`) never changed fps here; only less preparing work will. Comparing per-5 s lines of the same scene shows gains that run means hide. **2. Things measured with no effect on S (each A/B in one session, ±1 fps noise):** `VICTORY_UAV_DROP=all`, DLSS performance vs quality, `VICTORY_DSTORAGE_PRIORITY` 0/1, `VICTORY_WIDE_THREADS=8`, `VICTORY_WIDE_SPIN=100`, `VICTORY_ASYNC_QUEUE=plan`, `VICTORY_FSR_FRAMEGEN=0` (plain swap chain; presents are not vsync-bound, loading screens log 500+ fps), `VICTORY_FRAME_INTERVAL_MS=1` (the title's own rate patch; `play-foxhound.ps1` only sets `VICTORY_FRAME_INTERVAL_US`, so that patch is never applied by the launcher: +0-1 fps, not a cap). `VICTORY_INPLACE=1` is much worse (30 vs 41 fps, GPU 13 ms: shaders reading system memory over PCIe). **3. Where the refreshes' time goes (release counters, gameplay mean per frame, all threads summed):** - `Shadow::update_free`: **27.6 ms asking the write watch** (`watch::writes`), 6.3 ms copying 65 MB of written pages (44,000 blocks, ~10 GB/s, fine). - Inside `watch::writes`: **20.3 ms in `guard()`** (252 calls, ~80 µs each); answered ahead/published 1.0, waiting in `Asking::hold` 0.6, `GetWriteWatch` 0.6, noting 1.2. - Inside `guard()`: is-it-a-view 0.8, holes asked (`uncommitted_end`/`is_view`) ~0, protect/cover loop 5.9, and **~13 ms of the "clean check" spent waiting for the guards' `Mutex`** (`guards_timed()` before `g.clean.range(first..last).count()`). The count itself is cheap. So the 4 wide threads plus the submitting thread mostly queue on one lock. Its holders are the other refreshes' `protect()`/`cover()` loops, which call `VirtualProtect` with the lock held (~750 calls, ~3.5 ms a frame), and the fault handler. We tried a lock-free copy of the clean bits for an "all clean" early answer, but it almost never applies (nearly every asked range has written blocks), so no gain. The next thing we will try is to change protections outside the guards' lock (the `PROTECTED` bits are already set ahead of the change) and to join runs into fewer calls. Ideas welcome if you know why it has to stay under the lock.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA#2098
No description provided.