A 6-core CPU is the wall in the world: 0.4-0.8 fps, 684-3,186 ms/frame of texture preparation against 43-265 ms of GPU #612

Open
opened 2026-11-26 03:47:24 +00:00 by github-bot · 6 comments
Owner

@⁠WuDiXiaoBo on GitHub · 2026-11-25 03:14 UTC · original

A 6-core CPU is the wall in the world: 0.4-0.8 fps, 684-3,186 ms/frame of texture preparation against 43-265 ms of GPU

First: thank you for this fork. On my machine it goes from the menus into the opening credits and the world, which upstream does not do here at all. This report is only about where the time goes on a smaller CPU than the one in your README, in case it is useful for the "playable on more than one PC" goal.

Environment

CPU Intel Core i5-12400, 6 cores / 12 threads
RAM 31.8 GB, paging file 32 GB (commit limit 63.8 GB)
GPU NVIDIA RTX 4060 Ti 16 GB, driver 32.0.16.2114, Ada, 32-lane waves
OS Windows 11 Pro build 26300
Build cargo build --release -p victory, 2119b0e-era tree (before c96b4f2); the numbers below are from two runs on that tree

What happens

Menus are 30 fps as advertised. Leaving the menu into the opening, frames take 1.2-4.2 s. The frame-time breakdown that the host logs makes it fairly clear that the GPU is waiting for the CPU:

frame fps draws/frame on the GPU textures uploaded/frame
1,198 ms 0.8 2,187 78 ms 996 ms 173 MB
1,555 ms 0.6 1,641 - - -
2,400 ms 0.4 2,730 89 ms 684 ms 108 MB
3,534 ms 0.3 4,536 43 ms 3,186 ms 364 MB
4,245 ms 0.2 1,566 143 ms 3,166 ms 242 MB

So the GPU is busy 43-265 ms of a 1.2-4.2 s frame, and preparing takes the rest, dominated by textures and by copies (50-91 ms, 70-213 MB/frame, plus 12-19 MB/frame copied back). At the same time the log shows 900-1,550 draws/frame dropped as "being made" (pipelines still compiling) and about 1,000/frame dropped for "a stage of the ray-tracing structure builder, which is off".

Memory was not the problem: 23-24 GB private commit, and the paging file now has room; there was no crash and no device loss in these runs.

What I tried

  • VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024: early frames went from 1,107 ms to 502 ms, but the world frames stayed at 2.5-3.5 s. (Possibly because the remaining cost is not submission-related.)
  • VICTORY_TEXTURE_STAGE_MS=120 VICTORY_BAKE_TEXTURES_MS=250 VICTORY_TEXTURE_CATCHUP=0: not validated - the run with those set did not reach the world, because the scripted key presses land at the wrong time when the start-up time changes with the shader cache. I will repeat it with someone at the keyboard and report back if it helps.

Questions

  1. Is the pass that detiles and uploads textures (the by-index texture pass, plus the bake) single-threaded? On this 6-core part it is 0.7-3.2 s per frame on its own, so a worker pool there would be the difference between "0.5 fps" and "something watchable" here.
  2. Would you take a core-count-aware default for VICTORY_TEXTURE_STAGE_MS / VICTORY_BAKE_TEXTURES_MS? The 250/1,500 ms defaults look tuned for a 20-thread CPU; at 6 cores a smaller default would trade a longer texture backlog for a frame rate that is not 0.5 fps.
  3. Of the 142 VICTORY_* switches, is there one aimed at exactly this that I have missed? I read the ones near the texture budgets and the late-wait/relay pair, but not the rest.

If you would rather not take reports about slower machines: say so and I will keep this to myself rather than filing follow-ups.

AI-assisted: the runs, the log extraction and this text were produced with DeepSeek Harness (DeepSeek-V4-Flash) on my machine, at my request. Every number is from the runs described; no game data is included.

**@⁠WuDiXiaoBo** on GitHub · 2026-11-25 03:14 UTC · [original](https://github.com/fxceless/victory-fork/issues/612) A 6-core CPU is the wall in the world: 0.4-0.8 fps, 684-3,186 ms/frame of texture preparation against 43-265 ms of GPU First: thank you for this fork. On my machine it goes from the menus into the opening credits and the world, which upstream does not do here at all. This report is only about where the time goes on a smaller CPU than the one in your README, in case it is useful for the "playable on more than one PC" goal. **Environment** | | | |---|---| | CPU | Intel Core i5-12400, 6 cores / 12 threads | | RAM | 31.8 GB, paging file 32 GB (commit limit 63.8 GB) | | GPU | NVIDIA RTX 4060 Ti 16 GB, driver 32.0.16.2114, Ada, 32-lane waves | | OS | Windows 11 Pro build 26300 | | Build | `cargo build --release -p victory`, `2119b0e`-era tree (before `c96b4f2`); the numbers below are from two runs on that tree | **What happens** Menus are 30 fps as advertised. Leaving the menu into the opening, frames take 1.2-4.2 s. The frame-time breakdown that the host logs makes it fairly clear that the GPU is waiting for the CPU: | frame | fps | draws/frame | on the GPU | textures | uploaded/frame | |---|---|---|---|---|---| | 1,198 ms | 0.8 | 2,187 | 78 ms | 996 ms | 173 MB | | 1,555 ms | 0.6 | 1,641 | - | - | - | | 2,400 ms | 0.4 | 2,730 | 89 ms | 684 ms | 108 MB | | 3,534 ms | 0.3 | 4,536 | 43 ms | 3,186 ms | 364 MB | | 4,245 ms | 0.2 | 1,566 | 143 ms | 3,166 ms | 242 MB | So the GPU is busy 43-265 ms of a 1.2-4.2 s frame, and `preparing` takes the rest, dominated by `textures` and by `copies` (50-91 ms, 70-213 MB/frame, plus 12-19 MB/frame copied back). At the same time the log shows 900-1,550 draws/frame dropped as "being made" (pipelines still compiling) and about 1,000/frame dropped for "a stage of the ray-tracing structure builder, which is off". Memory was not the problem: 23-24 GB private commit, and the paging file now has room; there was no crash and no device loss in these runs. **What I tried** - `VICTORY_RELAY=2` `VICTORY_LATE_WAIT=3` `VICTORY_WIDE_BACK=1` `VICTORY_CARD_BUFFERS_MIN_MB=1` `VICTORY_CARD_BUFFERS_MB=1024`: early frames went from 1,107 ms to 502 ms, but the world frames stayed at 2.5-3.5 s. (Possibly because the remaining cost is not submission-related.) - `VICTORY_TEXTURE_STAGE_MS=120` `VICTORY_BAKE_TEXTURES_MS=250` `VICTORY_TEXTURE_CATCHUP=0`: not validated - the run with those set did not reach the world, because the scripted key presses land at the wrong time when the start-up time changes with the shader cache. I will repeat it with someone at the keyboard and report back if it helps. **Questions** 1. Is the pass that detiles and uploads textures (the by-index texture pass, plus the bake) single-threaded? On this 6-core part it is 0.7-3.2 s per frame on its own, so a worker pool there would be the difference between "0.5 fps" and "something watchable" here. 2. Would you take a core-count-aware default for `VICTORY_TEXTURE_STAGE_MS` / `VICTORY_BAKE_TEXTURES_MS`? The 250/1,500 ms defaults look tuned for a 20-thread CPU; at 6 cores a smaller default would trade a longer texture backlog for a frame rate that is not 0.5 fps. 3. Of the 142 `VICTORY_*` switches, is there one aimed at exactly this that I have missed? I read the ones near the texture budgets and the late-wait/relay pair, but not the rest. If you would rather not take reports about slower machines: say so and I will keep this to myself rather than filing follow-ups. *AI-assisted: the runs, the log extraction and this text were produced with DeepSeek Harness (DeepSeek-V4-Flash) on my machine, at my request. Every number is from the runs described; no game data is included.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:47:24 +00:00
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-11-25 03:33 UTC · original

Numbers from a bigger CPU on the same tree as yours, to help separate "6 cores" from something else. They use the same counters as your table (the host's frame line).

Machine: i5-13600K (14 cores / 20 threads), 32 GB RAM, RTX 4080 16 GB (driver 621.01), Windows 10 22H2, Series X profile, diag build, cold shader cache, 1,500 s runs.

Same code as yours. Zettrox/ztrx 90b529f is fxceless 2119b0e plus a README and scripts/play.ps1 (GitHub compare: 1 commit ahead, 0 behind, those two files only). I ran it with #175 (Agility SDK on Windows 10):

frame (entering the world) ms/frame textures MB MB/s
worst 1,850 119 ms 140 ~1,170
932 84 ms 166 ~1,970
1,171 73 ms 149 ~2,020
steady (median of the last 60 lines) 427 (2.3 fps) 3.5 ms 10

Your rows, if your "uploaded/frame" is the MB of the same textures field, work out to 76-174 MB/s (173 MB in 996 ms; 108 in 684; 364 in 3,186; 242 in 3,166). The same counter on the same code runs at 0.7-2.2 GB/s here, roughly 10x faster per MB.

Q1: yes, that work is single-threaded in this code, so the core count by itself should not decide it:

  • The frame line's textures time is Staging::refresh, which detiles a texture's title memory into its staging buffer: texture.rs:664-671. The submission's step loop calls it one texture after another: host.rs:5226-5229. At 2119b0e the same code sits at texture.rs:602-607 and host.rs:5145.
  • VICTORY_WIDE_REFRESH=1 spreads only the title-memory copies over worker threads (host.rs:5346-5359). It does not touch the textures.
  • The by-index pass that makes and stages textures is also a loop on the recording thread: draw.rs:1633-1657.

A gap of 10x per MB looks like something per byte, not per core. One guess, unmeasured: the detile reads title memory, and pages trimmed to the paging file would make each read a hard fault. For scale: here, 22 minutes in on c96b4f2, victory.exe had 23.7 GB private but a 4.3 GB working set, with 8.3 GB of RAM free. During one of your 3-second frames, Resource Monitor → Memory → "Hard Faults/sec" for victory.exe would show whether that is it.

Q3, one thing to know about the switches you tried: none of them exists at 2119b0e (no match anywhere in that tree). VICTORY_TEXTURE_STAGE_MS and VICTORY_TEXTURE_CATCHUP arrived in 3bff182e, and VICTORY_BAKE_TEXTURES_MS only in c96b4f2. So on a tree before c96b4f2 the bake switch does nothing, and on 2119b0e itself none of the three does.

c96b4f2 is clearly faster here. fxceless c96b4f2b + #175 on the same machine, cold cache, 1,500 s, gives a steady 3.2 fps / 316 ms. On the same machine, 2119b0e gives 2.3 fps / 427 ms and a803c87c gives 2.6 fps / 383 ms. Most of the gain is copy-back: 35 ms against 71-74 ms. VICTORY_WIDE_BACK is on by default since c96b4f2 (shadow.rs:971; at 2119b0e it was opt-in, shadow.rs:961), which matches your early-frame gain when you set it by hand. Entering the world, c96b4f2 spends more on textures up front (186-355 ms at 293-333 MB, from "textures are on the card before the character bake"). That fell under 50 ms within about 15 s and to 7 ms steady.

AI-assisted (Claude Code, Claude Opus 5.5); measured on my own machine. No game files attached.

**@⁠Proudnoob4** on GitHub · 2026-11-25 03:33 UTC · [original](https://github.com/fxceless/victory-fork/issues/612#issuecomment-7152018581) Numbers from a bigger CPU on the same tree as yours, to help separate "6 cores" from something else. They use the same counters as your table (the host's frame line). **Machine:** i5-13600K (14 cores / 20 threads), 32 GB RAM, RTX 4080 16 GB (driver 621.01), Windows 10 22H2, Series X profile, diag build, cold shader cache, 1,500 s runs. **Same code as yours.** Zettrox/ztrx `90b529f` is fxceless `2119b0e` plus a README and `scripts/play.ps1` (GitHub compare: 1 commit ahead, 0 behind, those two files only). I ran it with #175 (Agility SDK on Windows 10): | frame (entering the world) | ms/frame | textures | MB | MB/s | |---|---|---|---|---| | worst | 1,850 | 119 ms | 140 | ~1,170 | | | 932 | 84 ms | 166 | ~1,970 | | | 1,171 | 73 ms | 149 | ~2,020 | | steady (median of the last 60 lines) | 427 (2.3 fps) | 3.5 ms | 10 | | Your rows, if your "uploaded/frame" is the MB of the same `textures` field, work out to 76-174 MB/s (173 MB in 996 ms; 108 in 684; 364 in 3,186; 242 in 3,166). The same counter on the same code runs at 0.7-2.2 GB/s here, roughly 10x faster per MB. **Q1: yes, that work is single-threaded in this code**, so the core count by itself should not decide it: - The frame line's `textures` time is `Staging::refresh`, which detiles a texture's title memory into its staging buffer: [texture.rs:664-671](https://github.com/fxceless/victory-fork/blob/c96b4f2b8365bf43d54ab074940923ef8267f4c6/crates/victory-gpu/src/texture.rs#L664-L671). The submission's step loop calls it one texture after another: [host.rs:5226-5229](https://github.com/fxceless/victory-fork/blob/c96b4f2b8365bf43d54ab074940923ef8267f4c6/crates/victory-gpu/src/host.rs#L5226-L5229). At `2119b0e` the same code sits at [texture.rs:602-607](https://github.com/fxceless/victory-fork/blob/2119b0e44c53aa9648307b0c5c73590290305b1f/crates/victory-gpu/src/texture.rs#L602-L607) and [host.rs:5145](https://github.com/fxceless/victory-fork/blob/2119b0e44c53aa9648307b0c5c73590290305b1f/crates/victory-gpu/src/host.rs#L5145). - `VICTORY_WIDE_REFRESH=1` spreads only the title-memory `copies` over worker threads ([host.rs:5346-5359](https://github.com/fxceless/victory-fork/blob/c96b4f2b8365bf43d54ab074940923ef8267f4c6/crates/victory-gpu/src/host.rs#L5346-L5359)). It does not touch the textures. - The by-index pass that makes and stages textures is also a loop on the recording thread: [draw.rs:1633-1657](https://github.com/fxceless/victory-fork/blob/c96b4f2b8365bf43d54ab074940923ef8267f4c6/crates/victory-gpu/src/draw.rs#L1633-L1657). A gap of 10x per MB looks like something per byte, not per core. One guess, **unmeasured**: the detile reads title memory, and pages trimmed to the paging file would make each read a hard fault. For scale: here, 22 minutes in on `c96b4f2`, victory.exe had 23.7 GB private but a 4.3 GB working set, with 8.3 GB of RAM free. During one of your 3-second frames, Resource Monitor → Memory → "Hard Faults/sec" for victory.exe would show whether that is it. **Q3, one thing to know about the switches you tried:** none of them exists at `2119b0e` (no match anywhere in that tree). `VICTORY_TEXTURE_STAGE_MS` and `VICTORY_TEXTURE_CATCHUP` arrived in `3bff182e`, and `VICTORY_BAKE_TEXTURES_MS` only in `c96b4f2`. So on a tree before `c96b4f2` the bake switch does nothing, and on `2119b0e` itself none of the three does. **`c96b4f2` is clearly faster here.** fxceless `c96b4f2b` + #175 on the same machine, cold cache, 1,500 s, gives a steady **3.2 fps / 316 ms**. On the same machine, `2119b0e` gives 2.3 fps / 427 ms and `a803c87c` gives 2.6 fps / 383 ms. Most of the gain is copy-back: 35 ms against 71-74 ms. `VICTORY_WIDE_BACK` is on by default since `c96b4f2` (`shadow.rs:971`; at `2119b0e` it was opt-in, `shadow.rs:961`), which matches your early-frame gain when you set it by hand. Entering the world, `c96b4f2` spends more on textures up front (186-355 ms at 293-333 MB, from "textures are on the card before the character bake"). That fell under 50 ms within about 15 s and to 7 ms steady. AI-assisted (Claude Code, Claude Opus 5.5); measured on my own machine. No game files attached.
Author
Owner

@⁠maplerouteadmin-dev on GitHub · 2026-11-25 03:54 UTC · original

Same wall on another 6-core machine at 310c6eb, and VICTORY_TEXTURE_NO_WAIT=1 takes most of it away here.

Setup: Ryzen 5 5600X (6 cores / 12 threads), 32 GB, RTX 5070 12 GB (Blackwell, driver 32.0.16.2114), Windows 11; Series X profile; diag build of 310c6eb, warm shader cache, VICTORY_PIPELINE_WAIT_MS=4000, VICTORY_SHADER_LOOP_LIMIT=256, the new defaults otherwise. Same scripted input both runs, 300 s each, world reached about 3 min in.

Default (VICTORY_TEXTURE_NO_WAIT unset), last minute in the world: 1.8-6.1 s a frame (0.2-0.5 fps), with lines up to 10.5 and 14.9 s while streaming in. Typical line:

0.5 fps, 2087.4 ms/frame (1251.3 preparing: copies 104.3 ms 134.0 MB, textures 946.4 ms 15.4 MB; 370.1 on the GPU; 443.2 copying back 78.3 MB)

and of those 946 ms of texture refreshes, 938.9 ms waiting for title memory to hold still, 1.7 ms asking the write watch, 0 ms on the texture's own lock. The card was about 12-16% busy by the host's count. The texture queue at the end: 19,393 slots, 9,948 due, 6,463 waiting for their memory.

With VICTORY_TEXTURE_NO_WAIT=1, last minute in the world: 0.8-1.1 s a frame (0.9-1.3 fps). Typical line:

1.1 fps, 890.2 ms/frame (254.3 preparing: copies 95.0 ms 150.6 MB, textures 7.8 ms 18.6 MB; 474.3 on the GPU; 140.0 copying back)

Textures 3-100 ms a frame instead of 0.9-8 s; 12-22 refreshes a frame read through the kernel, 1-1.5 left for the next refresh. The card about 50% busy. No crash, no device removal. I did not see anything wrong in the picture that I could pin on the switch (the faceless low-detail characters and white haze are there either way).

So on this machine the "textures" part of the 6-core wall is the remap lock, not CPU work; what is left is copies + copy-back (~250-400 ms) and the GPU (~350-480 ms). Maybe worth making the switch the default?

Also seen, unrelated: one launch of the same build crashed while loading the world (~frame 1,726) with 0xc0000005 at <image>+0x164a298 (read 0x2c: nothing mapped there). The same address crashed an upstream build here once yesterday, so it looks like an intermittent title-side null read rather than something new in this commit.

**@⁠maplerouteadmin-dev** on GitHub · 2026-11-25 03:54 UTC · [original](https://github.com/fxceless/victory-fork/issues/612#issuecomment-7152350396) Same wall on another 6-core machine at `310c6eb`, and `VICTORY_TEXTURE_NO_WAIT=1` takes most of it away here. **Setup:** Ryzen 5 5600X (6 cores / 12 threads), 32 GB, RTX 5070 12 GB (Blackwell, driver 32.0.16.2114), Windows 11; Series X profile; diag build of `310c6eb`, warm shader cache, `VICTORY_PIPELINE_WAIT_MS=4000`, `VICTORY_SHADER_LOOP_LIMIT=256`, the new defaults otherwise. Same scripted input both runs, 300 s each, world reached about 3 min in. **Default (`VICTORY_TEXTURE_NO_WAIT` unset), last minute in the world:** 1.8-6.1 s a frame (0.2-0.5 fps), with lines up to 10.5 and 14.9 s while streaming in. Typical line: `0.5 fps, 2087.4 ms/frame (1251.3 preparing: copies 104.3 ms 134.0 MB, textures 946.4 ms 15.4 MB; 370.1 on the GPU; 443.2 copying back 78.3 MB)` and of those 946 ms of texture refreshes, **938.9 ms waiting for title memory to hold still**, 1.7 ms asking the write watch, 0 ms on the texture's own lock. The card was about 12-16% busy by the host's count. The texture queue at the end: 19,393 slots, 9,948 due, 6,463 waiting for their memory. **With `VICTORY_TEXTURE_NO_WAIT=1`, last minute in the world:** 0.8-1.1 s a frame (0.9-1.3 fps). Typical line: `1.1 fps, 890.2 ms/frame (254.3 preparing: copies 95.0 ms 150.6 MB, textures 7.8 ms 18.6 MB; 474.3 on the GPU; 140.0 copying back)` Textures 3-100 ms a frame instead of 0.9-8 s; 12-22 refreshes a frame read through the kernel, 1-1.5 left for the next refresh. The card about 50% busy. No crash, no device removal. I did not see anything wrong in the picture that I could pin on the switch (the faceless low-detail characters and white haze are there either way). So on this machine the "textures" part of the 6-core wall is the remap lock, not CPU work; what is left is copies + copy-back (~250-400 ms) and the GPU (~350-480 ms). Maybe worth making the switch the default? Also seen, unrelated: one launch of the same build crashed while loading the world (~frame 1,726) with `0xc0000005 at <image>+0x164a298 (read 0x2c: nothing mapped there)`. The same address crashed an upstream build here once yesterday, so it looks like an intermittent title-side null read rather than something new in this commit.
Author
Owner

@⁠0xmp3 on GitHub · 2026-11-25 03:55 UTC · original

A third 6-core datapoint, and one that may reconcile your finding with the VICTORY_TEXTURE_NO_WAIT result just above — because on my machine that switch makes the frame worse, not better, and I think the difference is whether the GPU or the copy lane is the limiter.

Machine: Ryzen 5 5600 (6 cores / 12 threads, same family as the 5600X above), 64 GB, RX 9070 XT (RDNA4, driver 32.0.32015.7029), Windows 11 26300, fork c96b4f2, diag build, VICTORY_SHADER_OPT=59 (required on this driver, see #422), VICTORY_RELAY=2, VICTORY_SHADER_LOOP_LIMIT=256, VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1, VICTORY_INPLACE=1.

Your conclusion holds in the default configuration. Menu frames here read gpu=0.0 ms with 12–15 draws, and world frames 2,200–5,000 ms with the GPU mostly waiting.

But VICTORY_BVH_BUILDER=1 changes the split, because the ray-tracing traversal becomes real GPU work. Warm world frames on this card:

frame p50 GPU p50 GPU p90 draws p50
builder off (run 3) 499–788 ms 12.7–73 ms – 1,031–1,486
builder on 2,282 ms 1,018 ms 1,206 ms 4,969

So the GPU is ~45% of the frame once the builder runs, not 4–6%. That is also the configuration where the game actually looks right (lit interior, sun through a doorway, shadowed side of the room), which is why I would not read the builder-off numbers as the target state.

VICTORY_TEXTURE_NO_WAIT=1 here:

frame p50 frame p90 GPU p50 GPU p90 hold-still p90 hold-still max
INPLACE=1 (base) 2,282 2,771 1,018 1,206 208 ms 914 ms
+ NO_WAIT=1 2,726 3,686 1,165 1,635 0 ms 0 ms

The switch does exactly what its name says — the remap wait is zero in every one of 36 frames, where the base run had it in 15 of 114 — but the frame gets ~20% slower and GPU p90 rises 1,206 → 1,635 ms. My reading: when the GPU has real work queued (builder on), overlapping refreshes with it costs cache locality and coherence, so removing the stall spends more than it saves. When the GPU is idle (builder off, or on hardware where the GPU absorbs a 43–265 ms frame), there is nothing to disturb and the switch is pure win.

So both results can be right, and the deciding variable is the builder, not the CPU. Worth stating explicitly in any guidance, because "6-core = the wall" plus "NO_WAIT fixes it" would send people with the builder on in the wrong direction.

On the CPU wall itself, two numbers that may be useful. The copy lane is not short of cores — this process sits at about 0.9 of 12 cores — it is serialised onto the thread that records the frame, which is why the GPU reads 0.0 ms while frames crawl. And the texture queue it feeds is losing ground: over ten minutes, 455 → 49,169 textures uploaded (82/s, 34 MB/s) while the backlog of textures waiting grew 431 → 13,357 (+22/s). Demand runs ~104/s against supply ~82/s, so a scene never finishes texturing — which is what "surfaces resolving slowly" looks like on screen.

I also tried the obvious fix for the supply side, and it backfires: VICTORY_TEXTURE_STAGE_MS=500 (1,500 ms per pass, since catch-up triples 250) crashed both runs inside the title — 0xffffffffffffffff reads at +0x4f400a9 and +0x108557 — with private memory climbing 12.7 → 28 GB and one frame copying 4.3 GB in 5.3 s. Details are on #178. Short version: a longer pass on the same thread grows the staging buffers faster than the backlog drains.

No game data; all numbers from VIctory's own frame and copystat lines. AI-assisted (Hermes Agent).

**@⁠0xmp3** on GitHub · 2026-11-25 03:55 UTC · [original](https://github.com/fxceless/victory-fork/issues/612#issuecomment-7152372929) A third 6-core datapoint, and one that may reconcile your finding with the `VICTORY_TEXTURE_NO_WAIT` result just above — because on my machine that switch makes the frame **worse**, not better, and I think the difference is whether the GPU or the copy lane is the limiter. **Machine:** Ryzen 5 5600 (6 cores / 12 threads, same family as the 5600X above), 64 GB, **RX 9070 XT (RDNA4, driver 32.0.32015.7029)**, Windows 11 26300, fork `c96b4f2`, diag build, `VICTORY_SHADER_OPT=59` (required on this driver, see #422), `VICTORY_RELAY=2`, `VICTORY_SHADER_LOOP_LIMIT=256`, `VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1`, `VICTORY_INPLACE=1`. **Your conclusion holds in the default configuration.** Menu frames here read `gpu=0.0 ms` with 12–15 draws, and world frames 2,200–5,000 ms with the GPU mostly waiting. **But `VICTORY_BVH_BUILDER=1` changes the split**, because the ray-tracing traversal becomes real GPU work. Warm world frames on this card: | | frame p50 | GPU p50 | GPU p90 | draws p50 | |---|---:|---:|---:|---:| | builder off (run 3) | 499–788 ms | 12.7–73 ms | – | 1,031–1,486 | | builder on | 2,282 ms | 1,018 ms | 1,206 ms | 4,969 | So the GPU is ~45% of the frame once the builder runs, not 4–6%. That is also the configuration where the game actually looks right (lit interior, sun through a doorway, shadowed side of the room), which is why I would not read the builder-off numbers as the target state. **`VICTORY_TEXTURE_NO_WAIT=1` here:** | | frame p50 | frame p90 | GPU p50 | GPU p90 | hold-still p90 | hold-still max | |---|---:|---:|---:|---:|---:|---:| | INPLACE=1 (base) | **2,282** | **2,771** | **1,018** | **1,206** | 208 ms | 914 ms | | + NO_WAIT=1 | 2,726 | 3,686 | 1,165 | 1,635 | **0 ms** | **0 ms** | The switch does exactly what its name says — the remap wait is zero in every one of 36 frames, where the base run had it in 15 of 114 — but the frame gets ~20% *slower* and GPU p90 rises 1,206 → 1,635 ms. My reading: when the GPU has real work queued (builder on), overlapping refreshes with it costs cache locality and coherence, so removing the stall spends more than it saves. When the GPU is idle (builder off, or on hardware where the GPU absorbs a 43–265 ms frame), there is nothing to disturb and the switch is pure win. So both results can be right, and the deciding variable is the builder, not the CPU. Worth stating explicitly in any guidance, because "6-core = the wall" plus "NO_WAIT fixes it" would send people with the builder on in the wrong direction. **On the CPU wall itself, two numbers that may be useful.** The copy lane is not short of cores — this process sits at about **0.9 of 12 cores** — it is serialised onto the thread that records the frame, which is why the GPU reads 0.0 ms while frames crawl. And the texture queue it feeds is losing ground: over ten minutes, 455 → 49,169 textures uploaded (**82/s, 34 MB/s**) while the backlog of textures waiting grew 431 → 13,357 (**+22/s**). Demand runs ~104/s against supply ~82/s, so a scene never finishes texturing — which is what "surfaces resolving slowly" looks like on screen. I also tried the obvious fix for the supply side, and it backfires: `VICTORY_TEXTURE_STAGE_MS=500` (1,500 ms per pass, since catch-up triples 250) crashed both runs inside the title — `0xffffffffffffffff` reads at `+0x4f400a9` and `+0x108557` — with private memory climbing 12.7 → 28 GB and one frame copying **4.3 GB in 5.3 s**. Details are on #178. Short version: a longer pass on the same thread grows the staging buffers faster than the backlog drains. No game data; all numbers from VIctory's own frame and copystat lines. AI-assisted (Hermes Agent).
Author
Owner

@⁠WuDiXiaoBo on GitHub · 2026-11-25 05:27 UTC · original

Third 6-core machine, and VICTORY_TEXTURE_NO_WAIT=1 is the whole difference here: 4.7 s -> 0.18-0.40 s a frame

Answering @⁠Proudnoob4's MB/s question and running the switch that @⁠maplerouteadmin-dev and @⁠0xmp3 asked about, on the card from the report (RTX 4060 Ti 16 GB, Ada, 32-lane, driver 32.0.16.2114; i5-12400 6C/12T; Windows 11 26300; branch c96b4f2, BVH builder off, so the builder-on caveat in the comment above does not apply here).

The MB/s figures, as asked. My four rows work out to 174, 158, 114 and 76 MB/s (173 MB in 996 ms; 108 in 684; 364 in 3,186; 242 in 3,166). So yes: the same counter runs ~10x slower per byte here than the 0.7-2.2 GB/s you measured, which fits "something per byte" rather than "6 cores".

A/B, same diag build, same save, same scripted input, 200 s each, last 60 s in the world

frame textures/frame of which waiting for title memory to hold still private working set
default 4,682-5,038 ms (log median 5,038) 890.5 ms 844.6 ms 23.6 GB 15.8 GB
VICTORY_TEXTURE_NO_WAIT=1 180-403 ms (log median 403) 56.7 ms 0.0 ms 22.6 GB 14.5 GB

That is 12-25x on the median, no crash and no device removal in either run, and it matches maplerouteadmin-dev's reading ("the 6-core wall is the remap lock, not CPU work") on a third 6-core machine and a different vendor. On this card the card is idle-ish in the default case (the host's own line reports 43-265 ms of GPU in a multi-second frame), which is the state where 0xmp3 says the switch is a pure win — and it is.

Hard faults. @⁠Proudnoob4's guess looks right in direction, with the caveat that the counter I can read is system-wide. During the baseline run's slow frames the system's Pages Input/sec spiked to 85,745 / 181,570 / 155,803 (0 in the quiet samples), with victory.exe at 23.6 GB private against a 15.8 GB working set; with NO_WAIT=1 both the stall and those spikes mostly disappear (0-1,240 in the same period). Process(victory)\PageReads/sec came back empty on this machine, so I could not isolate it per process — a Resource Monitor trace during one 5 s frame would settle it.

A correction to my own report. You are right that VICTORY_TEXTURE_STAGE_MS, VICTORY_TEXTURE_CATCHUP and VICTORY_BAKE_TEXTURES_MS do not exist at 2119b0e: the switch test I described as "not validated" actually ran on a c96b4f2 build, while the table's numbers are from the 2119b0e-era runs. That is my mistake, and it makes the "not validated" line misleading — on an 2119b0e tree there was nothing to validate. Sorry for the noise.

On c96b4f2 vs 2119b0e: I cannot confirm the tree-to-tree gain from my data, because my 2119b0e runs and today's baseline differ in how much of the scene had streamed in by the time I sampled (today's baseline is 3,400-7,700 draws a frame). What I can say is that on this machine the difference between NO_WAIT=1 and not is an order of magnitude larger than any tree difference I have measured.

A question for the fork's owner: given the above and 0xmp3's builder-on result, would it make sense for VICTORY_TEXTURE_NO_WAIT=1 to be the default when the BVH builder is off, with the caveat written next to VICTORY_BVH_BUILDER? Right now the person with the weaker card has to find an undocumented switch to get 4 fps instead of 0.2.

Numbers only from VIctory's own frame and copystat lines; no game data. AI-assisted (DeepSeek Harness, DeepSeek-V4-Flash) on my machine, at my request.

**@⁠WuDiXiaoBo** on GitHub · 2026-11-25 05:27 UTC · [original](https://github.com/fxceless/victory-fork/issues/612#issuecomment-7153795262) Third 6-core machine, and `VICTORY_TEXTURE_NO_WAIT=1` is the whole difference here: 4.7 s -> 0.18-0.40 s a frame Answering @⁠Proudnoob4's MB/s question and running the switch that @⁠maplerouteadmin-dev and @⁠0xmp3 asked about, on the card from the report (RTX 4060 Ti 16 GB, Ada, 32-lane, driver 32.0.16.2114; i5-12400 6C/12T; Windows 11 26300; branch `c96b4f2`, **BVH builder off**, so the builder-on caveat in the comment above does not apply here). **The MB/s figures, as asked.** My four rows work out to 174, 158, 114 and 76 MB/s (173 MB in 996 ms; 108 in 684; 364 in 3,186; 242 in 3,166). So yes: the same counter runs ~10x slower per byte here than the 0.7-2.2 GB/s you measured, which fits "something per byte" rather than "6 cores". **A/B, same diag build, same save, same scripted input, 200 s each, last 60 s in the world** | | frame | `textures`/frame | of which *waiting for title memory to hold still* | private | working set | |---|---|---|---|---|---| | default | **4,682-5,038 ms** (log median 5,038) | 890.5 ms | **844.6 ms** | 23.6 GB | 15.8 GB | | `VICTORY_TEXTURE_NO_WAIT=1` | **180-403 ms** (log median 403) | 56.7 ms | **0.0 ms** | 22.6 GB | 14.5 GB | That is 12-25x on the median, no crash and no device removal in either run, and it matches maplerouteadmin-dev's reading ("the 6-core wall is the remap lock, not CPU work") on a third 6-core machine and a different vendor. On this card the card is idle-ish in the default case (the host's own line reports 43-265 ms of GPU in a multi-second frame), which is the state where 0xmp3 says the switch is a pure win — and it is. **Hard faults.** @⁠Proudnoob4's guess looks right in direction, with the caveat that the counter I can read is system-wide. During the baseline run's slow frames the system's `Pages Input/sec` spiked to 85,745 / 181,570 / 155,803 (0 in the quiet samples), with victory.exe at 23.6 GB private against a 15.8 GB working set; with `NO_WAIT=1` both the stall and those spikes mostly disappear (0-1,240 in the same period). `Process(victory)\PageReads/sec` came back empty on this machine, so I could not isolate it per process — a Resource Monitor trace during one 5 s frame would settle it. **A correction to my own report.** You are right that `VICTORY_TEXTURE_STAGE_MS`, `VICTORY_TEXTURE_CATCHUP` and `VICTORY_BAKE_TEXTURES_MS` do not exist at `2119b0e`: the switch test I described as "not validated" actually ran on a `c96b4f2` build, while the table's numbers are from the `2119b0e`-era runs. That is my mistake, and it makes the "not validated" line misleading — on an `2119b0e` tree there was nothing to validate. Sorry for the noise. **On `c96b4f2` vs `2119b0e`:** I cannot confirm the tree-to-tree gain from my data, because my `2119b0e` runs and today's baseline differ in how much of the scene had streamed in by the time I sampled (today's baseline is 3,400-7,700 draws a frame). What I can say is that on this machine the difference between `NO_WAIT=1` and not is an order of magnitude larger than any tree difference I have measured. **A question for the fork's owner:** given the above and 0xmp3's builder-on result, would it make sense for `VICTORY_TEXTURE_NO_WAIT=1` to be the default *when the BVH builder is off*, with the caveat written next to `VICTORY_BVH_BUILDER`? Right now the person with the weaker card has to find an undocumented switch to get 4 fps instead of 0.2. *Numbers only from VIctory's own frame and copystat lines; no game data. AI-assisted (DeepSeek Harness, DeepSeek-V4-Flash) on my machine, at my request.*
Author
Owner

@⁠WuDiXiaoBo on GitHub · 2026-11-25 07:12 UTC · original

After a26859f + VICTORY_TEXTURE_NO_WAIT=1: the texture stall is gone, and here is what is left on the same 6-core machine

Two things, both from the machine in the report (i5-12400 6C/12T, RTX 4060 Ti 16 GB, Windows 11 26300, branch a26859f, BVH builder off):

1. The prologue is now playable through on this machine. With VICTORY_TEXTURE_NO_WAIT=1 I played the whole prologue start to finish at about 3 fps (the checkpoint the game made is in the save folder). Two hours ago, before the switch, the same place was 0.2-0.8 fps. It is slow, but it is a playthrough, not a slideshow of one room.

2. Where the time goes now. Same diag build, loaded the checkpoint, 11 in-game frame lines at 2,000-6,300 draws/frame:

p10 median p90 average per frame
frame 251 ms 770 ms 7,067 ms -
preparing 108 155 245 -
of it copies 48 64 86 107 MB
of it textures 12 32 124 53 MB
on the GPU 31 71 107 -
copying back 61 96 110 22 MB

textures went from 890 ms a frame (844 of it waiting for title memory to hold still) to 32 ms, so the switch does the same thing on the new tree as it did on c96b4f2 — that part is settled.

What is left is a different shape than before:

  • the card is still idle: 71 ms of a 770 ms frame;
  • copying back is now the second-largest logged item (96 ms, 22 MB a frame), after preparing;
  • copies are 107 MB a frame, which at the 0.7-2.2 GB/s @⁠Proudnoob4 measured should be ~50-150 ms — it is 64, so that part is running at his speed now;
  • about 450 ms of the median frame is not in any of those lines (submission, waits, or the title itself).

And one thing a player notices more than the median: a 7.1 s single frame at 6,299 draws while new geometry streamed in, which is the p90 of the table.

Dropped draws are quiet: 267 a frame for the ray-tracing structure-builder stage (off, expected), plus 3-4 refused compute programs.

Question: with the card this idle and copying back + copies now the biggest named items, is the next thing the copy-back path, or is the unaccounted ~450 ms the title waiting on something we can see with a different counter? Happy to run whatever switch you want measured — VICTORY_LEVELS_ON_DEMAND=1 is the obvious one to try here next, since 3.1 GB of card memory are being held for levels the title does not use.

Numbers only from VIctory's own frame lines; no game data. AI-assisted (DeepSeek Harness, DeepSeek-V4-Flash) on my machine, at my request.

**@⁠WuDiXiaoBo** on GitHub · 2026-11-25 07:12 UTC · [original](https://github.com/fxceless/victory-fork/issues/612#issuecomment-7155605414) After `a26859f` + `VICTORY_TEXTURE_NO_WAIT=1`: the texture stall is gone, and here is what is left on the same 6-core machine Two things, both from the machine in the report (i5-12400 6C/12T, RTX 4060 Ti 16 GB, Windows 11 26300, branch `a26859f`, BVH builder off): **1. The prologue is now playable through on this machine.** With `VICTORY_TEXTURE_NO_WAIT=1` I played the whole prologue start to finish at about **3 fps** (the checkpoint the game made is in the save folder). Two hours ago, before the switch, the same place was 0.2-0.8 fps. It is slow, but it is a playthrough, not a slideshow of one room. **2. Where the time goes now.** Same diag build, loaded the checkpoint, 11 in-game frame lines at 2,000-6,300 draws/frame: | | p10 | median | p90 | average per frame | |---|---:|---:|---:|---| | frame | 251 ms | **770 ms** | 7,067 ms | - | | `preparing` | 108 | 155 | 245 | - | | of it `copies` | 48 | 64 | 86 | 107 MB | | of it `textures` | 12 | **32** | 124 | 53 MB | | on the GPU | 31 | **71** | 107 | - | | `copying back` | 61 | **96** | 110 | 22 MB | `textures` went from 890 ms a frame (844 of it waiting for title memory to hold still) to 32 ms, so the switch does the same thing on the new tree as it did on `c96b4f2` — that part is settled. What is left is a different shape than before: - the card is still **idle**: 71 ms of a 770 ms frame; - **`copying back` is now the second-largest logged item** (96 ms, 22 MB a frame), after `preparing`; - **`copies` are 107 MB a frame**, which at the 0.7-2.2 GB/s @⁠Proudnoob4 measured should be ~50-150 ms — it is 64, so that part is running at his speed now; - about **450 ms of the median frame is not in any of those lines** (submission, waits, or the title itself). And one thing a player notices more than the median: a **7.1 s single frame at 6,299 draws** while new geometry streamed in, which is the p90 of the table. Dropped draws are quiet: 267 a frame for the ray-tracing structure-builder stage (off, expected), plus 3-4 refused compute programs. **Question:** with the card this idle and `copying back` + `copies` now the biggest named items, is the next thing the copy-back path, or is the unaccounted ~450 ms the title waiting on something we can see with a different counter? Happy to run whatever switch you want measured — `VICTORY_LEVELS_ON_DEMAND=1` is the obvious one to try here next, since 3.1 GB of card memory are being held for levels the title does not use. *Numbers only from VIctory's own frame lines; no game data. AI-assisted (DeepSeek Harness, DeepSeek-V4-Flash) on my machine, at my request.*
Author
Owner

@⁠mehmetarslanca on GitHub · 2026-11-25 13:13 UTC · original

Another 6C/12T data point, with a different platform and much less RAM: Ryzen 5 5500, RTX 3060 12 GB, 16 GB RAM, CachyOS / Proton / VKD3D-Proton 3.2.

The earlier Linux evaluation (vongikkingen/victory-gikkingen@c0487ce) with the texture no-wait path reported texture preparation around 94–302 ms/frame, versus several seconds in an older 2119b0e-based evaluation. It still did not produce a visible world before that session ended.

After integrating the fork's a253706 changes into the Linux tree, plus selected existing community fixes, the world finally rendered. I re-extracted 115 logged world-stage samples (at least 500 draws/frame) from the resulting session:

Metric Median
Frame time 3,786.0 ms
CPU preparing 1,898.9 ms
Copies 912.8 ms / 155.5 MB
Textures 323.3 ms / 25.3 MB
On the GPU 151.0 ms
Copying back 763.6 ms / 12.3 MB
Draws/frame 2,257

Copies and textures are components of preparation, not additional independent frame costs.

One late sample was 1,324.6 ms/frame with 1,094.3 ms preparation, 220.0 ms copies, 6.7 ms textures, 29.1 ms GPU time and 758.7 ms copy-back; 3,627 draws/frame.

In other words, the texture cost can become relatively small while copies and copy-back remain expensive. In this run the integration report also records zero card-side buffer copies. The session ended in a global OOM kill after ~23 minutes, with ~95.4 GiB of system-wide swap traffic (#109). That makes this a heavily memory-confounded data point, not a controlled comparison with your 32 GB Windows machine. The earlier evaluations also used different revisions, cache states and scenes, so I would not interpret the texture numbers as an isolated speedup benchmark.

The Linux integration provenance is in #6. The result suggests it may be useful to profile copy/backing residency and paging separately from texture worker contention on small machines.

AI-assisted integration, testing and reporting; the 115-sample statistics and last-frame line were rechecked directly against local logs. No assets attached.

**@⁠mehmetarslanca** on GitHub · 2026-11-25 13:13 UTC · [original](https://github.com/fxceless/victory-fork/issues/612#issuecomment-7163462991) Another 6C/12T data point, with a different platform and much less RAM: Ryzen 5 5500, RTX 3060 12 GB, 16 GB RAM, CachyOS / Proton / VKD3D-Proton 3.2. The earlier Linux evaluation (`vongikkingen/victory-gikkingen@c0487ce`) with the texture no-wait path reported texture preparation around 94–302 ms/frame, versus several seconds in an older `2119b0e`-based evaluation. It still did not produce a visible world before that session ended. After integrating the fork's `a253706` changes into the Linux tree, plus selected existing community fixes, the world finally rendered. I re-extracted 115 logged world-stage samples (at least 500 draws/frame) from the resulting session: | Metric | Median | |---|---:| | Frame time | 3,786.0 ms | | CPU preparing | 1,898.9 ms | | Copies | 912.8 ms / 155.5 MB | | Textures | 323.3 ms / 25.3 MB | | On the GPU | 151.0 ms | | Copying back | 763.6 ms / 12.3 MB | | Draws/frame | 2,257 | Copies and textures are components of preparation, not additional independent frame costs. One late sample was 1,324.6 ms/frame with 1,094.3 ms preparation, 220.0 ms copies, 6.7 ms textures, 29.1 ms GPU time and 758.7 ms copy-back; 3,627 draws/frame. In other words, the texture cost can become relatively small while copies and copy-back remain expensive. In this run the integration report also records zero card-side buffer copies. The session ended in a global OOM kill after ~23 minutes, with ~95.4 GiB of system-wide swap traffic (#109). That makes this a heavily memory-confounded data point, not a controlled comparison with your 32 GB Windows machine. The earlier evaluations also used different revisions, cache states and scenes, so I would not interpret the texture numbers as an isolated speedup benchmark. The Linux integration provenance is in #6. The result suggests it may be useful to profile copy/backing residency and paging separately from texture worker contention on small machines. AI-assisted integration, testing and reporting; the 115-sample statistics and last-frame line were rechecked directly against local logs. No assets attached.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#612
No description provided.