Works on i7-9700F + RTX 5070 Ti: opening cutscene renders lit (report + pipeline worker tweak) #70

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

@⁠tadymila on GitHub · 2026-11-24 21:09 UTC · original

Thanks for the fork — it's the first layer that renders the world on my machine.

Setup: Intel i7-9700F (8C/8T, Coffee Lake), RTX 5070 Ti 16 GB, 64 GB RAM, Windows 11, 3 monitors (2× QHD 144 Hz, 1× 4K 60 Hz). Game 1.0.2.1, Series X profile, release build of current main.

Result:

  • Boot, menus, intro: fine (30 fps in menus). Console-only instructions (CLWB, CLZERO loop, MONITORX/MWAITX, INSERTQ) are emulated, no crashes.
  • Opening cutscene renders lit with credit cards (fog, lamps, car, foliage). Unlit areas are black, as the README says. ~1 fps / ~1400 ms per frame, ~1800 draws/frame on the first run.

What helped:

  • First run in the world drops thousands of draws per frame while ~1,100+ host pipelines are still queued (dropped … without a host pipeline (1146 being made)), at ~100 pipelines/min. I changed the worker count in crates/victory-gpu/src/pipeline/make.rs from (n/2).clamp(2, 8) to n.clamp(2, 16) (8 workers instead of 4 on an 8-thread CPU). The workers run below the title's threads, so the game stays responsive and the queue drains noticeably faster. Maybe worth an env switch (e.g. VICTORY_PIPELINE_WORKERS).

Issues seen:

  • With VICTORY_RELAY=2 the intro video and menus flicker heavily on a 144 Hz monitor. With VICTORY_RELAY=0 VICTORY_LATE_WAIT=0 the menus are fine, only the intro video still flickers a bit (probably 30 fps on 144 Hz pacing).

Happy to test builds or switches on this hardware.

**@⁠tadymila** on GitHub · 2026-11-24 21:09 UTC · [original](https://github.com/fxceless/victory-fork/issues/70) Thanks for the fork — it's the first layer that renders the world on my machine. **Setup:** Intel i7-9700F (8C/8T, Coffee Lake), RTX 5070 Ti 16 GB, 64 GB RAM, Windows 11, 3 monitors (2× QHD 144 Hz, 1× 4K 60 Hz). Game 1.0.2.1, Series X profile, release build of current main. **Result:** - Boot, menus, intro: fine (30 fps in menus). Console-only instructions (CLWB, CLZERO loop, MONITORX/MWAITX, INSERTQ) are emulated, no crashes. - Opening cutscene renders lit with credit cards (fog, lamps, car, foliage). Unlit areas are black, as the README says. ~1 fps / ~1400 ms per frame, ~1800 draws/frame on the first run. **What helped:** - First run in the world drops thousands of draws per frame while ~1,100+ host pipelines are still queued (`dropped … without a host pipeline (1146 being made)`), at ~100 pipelines/min. I changed the worker count in `crates/victory-gpu/src/pipeline/make.rs` from `(n/2).clamp(2, 8)` to `n.clamp(2, 16)` (8 workers instead of 4 on an 8-thread CPU). The workers run below the title's threads, so the game stays responsive and the queue drains noticeably faster. Maybe worth an env switch (e.g. `VICTORY_PIPELINE_WORKERS`). **Issues seen:** - With `VICTORY_RELAY=2` the intro video and menus flicker heavily on a 144 Hz monitor. With `VICTORY_RELAY=0 VICTORY_LATE_WAIT=0` the menus are fine, only the intro video still flickers a bit (probably 30 fps on 144 Hz pacing). Happy to test builds or switches on this hardware.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:36 +00:00
Author
Owner

@⁠rostaddotcc on GitHub · 2026-11-24 21:09 UTC · original

On the worker count, the arithmetic first, because it changes who the tweak helps:

make.rs:300 is (n.get() / 2).clamp(2, 8) on available_parallelism(). On your i7-9700F (8 threads) that is 4 workers, and n.clamp(2, 16) gives 8 — a real doubling. On a 16-thread machine (Ryzen 7 7700X here) today's formula already gives 8, so the same change would go 8 → 16: different effect, and a much easier place to oversubscribe, since each worker is calling into the driver through vkd3d-proton and the title's own threads are mostly waiting on the GPU.

Two reasons to make it an env switch rather than a new constant:

  1. The queue is not always the limiter. Here the loading phase reports dropped 1140/frame (21 being made) — thousands dropped, but only a couple of dozen in flight, because a frame takes 8 s and the workers are idle behind it. More workers would not have helped; the frame cost is host-side copying (measured separately: 60–100 MB/s copies against a runtime that does 21 GB/s of mapped writes). Your log has 1 146 being made at ~100 pipelines/min, which is the opposite regime — creation-bound, not frame-bound. One number in the log distinguishes the two, so a switch (and maybe a line saying how many were in flight) would let people pick without rebuilding.

  2. Where the ceiling is is machine-dependent. 8 workers on 8 threads is one per hardware thread with the title's threads on top; 16 on 16 threads is two per core. Both could be right on their own hardware and wrong on the other.

If it helps: on the 16-thread/RDNA3 machine I can build with a worker count baked in and report the drain rate per minute from dropped … (N being made) in the log — that is a comparable number to yours and does not need the world to be reached. Not run yet; no game data involved.

**@⁠rostaddotcc** on GitHub · 2026-11-24 21:09 UTC · [original](https://github.com/fxceless/victory-fork/issues/70#issuecomment-7144560403) On the worker count, the arithmetic first, because it changes who the tweak helps: `make.rs:300` is `(n.get() / 2).clamp(2, 8)` on `available_parallelism()`. On your i7-9700F (8 threads) that is 4 workers, and `n.clamp(2, 16)` gives 8 — a real doubling. On a 16-thread machine (Ryzen 7 7700X here) today's formula already gives 8, so the same change would go 8 → 16: different effect, and a much easier place to oversubscribe, since each worker is calling into the driver through vkd3d-proton and the title's own threads are mostly waiting on the GPU. Two reasons to make it an env switch rather than a new constant: 1. **The queue is not always the limiter.** Here the loading phase reports `dropped 1140/frame (21 being made)` — thousands dropped, but only a couple of dozen in flight, because a frame takes 8 s and the workers are idle behind it. More workers would not have helped; the frame cost is host-side copying (measured separately: 60–100 MB/s copies against a runtime that does 21 GB/s of mapped writes). Your log has `1 146 being made` at ~100 pipelines/min, which is the opposite regime — creation-bound, not frame-bound. One number in the log distinguishes the two, so a switch (and maybe a line saying how many were in flight) would let people pick without rebuilding. 2. **Where the ceiling is is machine-dependent.** 8 workers on 8 threads is one per hardware thread with the title's threads on top; 16 on 16 threads is two per core. Both could be right on their own hardware and wrong on the other. If it helps: on the 16-thread/RDNA3 machine I can build with a worker count baked in and report the drain rate per minute from `dropped … (N being made)` in the log — that is a comparable number to yours and does not need the world to be reached. Not run yet; no game data involved.
Author
Owner

@⁠rostaddotcc on GitHub · 2026-11-24 21:13 UTC · original

A second data point, on Linux (RX 7900 XT, RDNA3, Mesa 26.3.1 RADV, Proton Experimental experimental-11.0-20261112, this fork's main with no local patches, 60 min continuous run). It matches your result and refines where the worker count sits in it.

What came up on screen matches yours: boot, menus, splash at 30 fps, then a scene with a few lit areas and the rest black, with geometry missing — no crash, no device loss, no TDR in the hour.

The frame line tells a different story after about two minutes.

time fps ms/frame on the GPU draws/frame pipelines being made
20:52 34.8 29 1.2 3 721
20:53 30.1 33 2.0 12 1 283
20:54 15.0 67 1.7 11 3
20:55 0.2 4 154 150.2 3 046 3
20:56 0.2 6 354 241.0 6 309 3
20:58 0.1 9 310 59.2 696 3
20:59 0.2 5 582 61.3 441 3

Two things in that table:

  1. Creation is not the limiter here after the first two minutes. In flight goes 721 → 1 283 → 3, while fps drops from 35 to 0.2. By the time the frame is 5 s there is nothing queued, so extra workers cannot help; what helps is the frame path itself.
  2. The GPU is 1–4 % of the frame. 54–241 ms of GPU against 4 154–15 277 ms per frame. The rest is host-side: in the same run, copies 1644.9 ms / 102.0 MB and textures 2435.0 ms / 7.6 MB per frame — 62 MB/s and 3 MB/s. On the same prefix a 128 MiB probe does 21.3 GB/s of mapped upload writes and 143–163 GB/s of card copies, so the transfer itself is not the cost; the layer's own bookkeeping around it is (ranges gathered, pieces hashed and compared, waits).

So the two regimes in your report are both real and look identical from the outside: 1 146 pipelines queued at ~100/min is creation-bound, and more workers is the right lever there; 3 queued and 5 s frames is frame-bound, and no worker count changes it.

Your VICTORY_RELAY note reads the same way from this side: VICTORY_RELAY=2 flickered badly on a 144 Hz output here too, and VICTORY_RELAY=0 VICTORY_LATE_WAIT=0 is what the runs above used.

If it is useful I can report the per-frame numbers from builds with a different worker count baked in, so the two regimes can be compared on the same hardware — the drain rate is in the log as (N being made) and needs no new instrumentation.

**@⁠rostaddotcc** on GitHub · 2026-11-24 21:13 UTC · [original](https://github.com/fxceless/victory-fork/issues/70#issuecomment-7144651656) A second data point, on Linux (RX 7900 XT, RDNA3, Mesa 26.3.1 RADV, Proton Experimental `experimental-11.0-20261112`, this fork's `main` with no local patches, 60 min continuous run). It matches your result and refines where the worker count sits in it. **What came up on screen** matches yours: boot, menus, splash at 30 fps, then a scene with a few lit areas and the rest black, with geometry missing — no crash, no device loss, no TDR in the hour. **The frame line tells a different story after about two minutes.** | time | fps | ms/frame | on the GPU | draws/frame | pipelines being made | |---|---|---|---|---|---| | 20:52 | 34.8 | 29 | 1.2 | 3 | 721 | | 20:53 | 30.1 | 33 | 2.0 | 12 | 1 283 | | 20:54 | 15.0 | 67 | 1.7 | 11 | 3 | | 20:55 | 0.2 | 4 154 | 150.2 | 3 046 | 3 | | 20:56 | 0.2 | 6 354 | 241.0 | 6 309 | 3 | | 20:58 | 0.1 | 9 310 | 59.2 | 696 | 3 | | 20:59 | 0.2 | 5 582 | 61.3 | 441 | 3 | Two things in that table: 1. **Creation is not the limiter here after the first two minutes.** In flight goes 721 → 1 283 → 3, while fps drops from 35 to 0.2. By the time the frame is 5 s there is nothing queued, so extra workers cannot help; what helps is the frame path itself. 2. **The GPU is 1–4 % of the frame.** 54–241 ms of GPU against 4 154–15 277 ms per frame. The rest is host-side: in the same run, `copies 1644.9 ms / 102.0 MB` and `textures 2435.0 ms / 7.6 MB` per frame — 62 MB/s and 3 MB/s. On the same prefix a 128 MiB probe does 21.3 GB/s of mapped upload writes and 143–163 GB/s of card copies, so the transfer itself is not the cost; the layer's own bookkeeping around it is (ranges gathered, pieces hashed and compared, waits). So the two regimes in your report are both real and look identical from the outside: 1 146 pipelines queued at ~100/min is creation-bound, and more workers is the right lever there; 3 queued and 5 s frames is frame-bound, and no worker count changes it. Your `VICTORY_RELAY` note reads the same way from this side: `VICTORY_RELAY=2` flickered badly on a 144 Hz output here too, and `VICTORY_RELAY=0 VICTORY_LATE_WAIT=0` is what the runs above used. If it is useful I can report the per-frame numbers from builds with a different worker count baked in, so the two regimes can be compared on the same hardware — the drain rate is in the log as `(N being made)` and needs no new instrumentation.
Author
Owner

@⁠maplerouteadmin-dev on GitHub · 2026-11-24 21:15 UTC · original

Same "being made" drops on an RTX 5070 12 GB (driver 32.0.16.2114), Ryzen 5 5600X (12 threads, so 6 workers with the current formula), 32 GB, Windows 11, Series X profile, diag build of 90228a7, scripted input, 270 s runs. A switch that already exists fixed it here without a code change: VICTORY_PIPELINE_WAIT_MS=4000 (default 500).

Same settings otherwise (VICTORY_SHADER_LOOP_LIMIT=32 VICTORY_NO_WATCHDOG=1 VICTORY_RELAY=2), same warm cache, one run each, world frame-rate lines (frames over 500 ms):

wait 500 (default) wait 4000
draws dropped as "being made", per frame up to 1 596 4 to 117
median draws per frame 694 2 302
median ms/frame 3 610 4 250
world frames captured (VICTORY_CAPTURE_WORLD) all black (brightest pixel 1/255) the opening cutscene in 3D: lit exterior, characters, hair, haze
device removed no no

With the default the first world frames are drawn with most passes missing and come out black. The title then moves on, so on a first run with a cold library most of the opening is never seen. Waiting longer costs some frame time while the queue drains but every frame after that is complete. It may explain part of the "black on the first run, lit after a few runs" pattern in other reports.

Possibly worth a higher default, or a longer budget for the first frames after the scene changes, whichever fits better with the worker change above. Both together would probably be best on CPUs with few threads.

Also seen on this card: some textures in dusk shots show a coarse checker or dither pattern, and a few frames come out almost all white. I can capture specific frames with VICTORY_CAPTURE_FRAMES if that helps. No game data in this comment.

**@⁠maplerouteadmin-dev** on GitHub · 2026-11-24 21:15 UTC · [original](https://github.com/fxceless/victory-fork/issues/70#issuecomment-7144681368) Same "being made" drops on an **RTX 5070 12 GB** (driver 32.0.16.2114), Ryzen 5 5600X (12 threads, so 6 workers with the current formula), 32 GB, Windows 11, Series X profile, diag build of **90228a7**, scripted input, 270 s runs. A switch that already exists fixed it here without a code change: **`VICTORY_PIPELINE_WAIT_MS=4000`** (default 500). Same settings otherwise (`VICTORY_SHADER_LOOP_LIMIT=32 VICTORY_NO_WATCHDOG=1 VICTORY_RELAY=2`), same warm cache, one run each, world frame-rate lines (frames over 500 ms): | | wait 500 (default) | wait 4000 | |---|---|---| | draws dropped as "being made", per frame | up to 1 596 | **4 to 117** | | median draws per frame | 694 | **2 302** | | median ms/frame | 3 610 | 4 250 | | world frames captured (`VICTORY_CAPTURE_WORLD`) | all black (brightest pixel 1/255) | **the opening cutscene in 3D**: lit exterior, characters, hair, haze | | device removed | no | no | With the default the first world frames are drawn with most passes missing and come out black. The title then moves on, so on a first run with a cold library most of the opening is never seen. Waiting longer costs some frame time while the queue drains but every frame after that is complete. It may explain part of the "black on the first run, lit after a few runs" pattern in other reports. Possibly worth a higher default, or a longer budget for the first frames after the scene changes, whichever fits better with the worker change above. Both together would probably be best on CPUs with few threads. Also seen on this card: some textures in dusk shots show a coarse checker or dither pattern, and a few frames come out almost all white. I can capture specific frames with `VICTORY_CAPTURE_FRAMES` if that helps. No game data in this comment.
Author
Owner

@⁠maplerouteadmin-dev on GitHub · 2026-11-24 21:37 UTC · original

A correction to my comment above: the run where VICTORY_PIPELINE_WAIT_MS=4000 brought the world back was not a cold start. Its pipeline library had already filled over three earlier runs, so only a small backlog was left. With a truly empty cache, a longer wait does not help, and the worker count you raised here is the real limit.

Same machine (RTX 5070, Ryzen 5 5600X, 12 threads, so 6 workers), 90228a7 plus a local change that uses a 4 s budget while 64 or more pipelines are queued, empty VICTORY_CACHE_DIR, one 270 s run:

world time queued ("being made") draws dropped per frame
entry 1 280 up to 8 186
~1 min 1 040 ~1 400
~2.5 min 944 ~1 400

About 130 pipelines a minute, so roughly ten minutes to drain the first world queue on 6 workers. The world frames stayed black for the whole run. No device removal.

So, in short: on the first run compile throughput decides (more workers, as you did, or prewarming during loading). From the second run on, when the library holds most of them, a longer wait (VICTORY_PIPELINE_WAIT_MS=4000) turns the remaining drops into complete frames. Sorry for the overstatement above.

**@⁠maplerouteadmin-dev** on GitHub · 2026-11-24 21:37 UTC · [original](https://github.com/fxceless/victory-fork/issues/70#issuecomment-7145172816) A correction to my comment above: the run where `VICTORY_PIPELINE_WAIT_MS=4000` brought the world back was **not** a cold start. Its pipeline library had already filled over three earlier runs, so only a small backlog was left. With a truly empty cache, a longer wait does not help, and the worker count you raised here is the real limit. Same machine (RTX 5070, Ryzen 5 5600X, 12 threads, so 6 workers), 90228a7 plus a local change that uses a 4 s budget while 64 or more pipelines are queued, **empty** `VICTORY_CACHE_DIR`, one 270 s run: | world time | queued ("being made") | draws dropped per frame | |---|---|---| | entry | 1 280 | up to 8 186 | | ~1 min | 1 040 | ~1 400 | | ~2.5 min | 944 | ~1 400 | About 130 pipelines a minute, so roughly ten minutes to drain the first world queue on 6 workers. The world frames stayed black for the whole run. No device removal. So, in short: on the first run compile throughput decides (more workers, as you did, or prewarming during loading). From the second run on, when the library holds most of them, a longer wait (`VICTORY_PIPELINE_WAIT_MS=4000`) turns the remaining drops into complete frames. Sorry for the overstatement above.
Author
Owner

@⁠tadymila on GitHub · 2026-11-24 22:14 UTC · original

RT test on RTX 5070 Ti (wave32), current main + VICTORY_BVH_BUILDER=1 VICTORY_WAVE_WIDE=1 VICTORY_BVH_QUARANTINE=1:

  • The builder stays off: the ray-tracing structure builder stays off: not all of its programs have a host pipeline … missing=3 of=53.
  • The 3 missing are compute programs that fail to translate: GFX10 code at …: a first-lane read where not every lane runs is not supported (readfirstlane in divergent control flow).
  • With VICTORY_WAVE_WIDE=1 the run ended in a TDR (0x887A0006, no breadcrumbs) in the prologue cell, ~5.6 s after the last submission. Without it, no hangs.

If the first-lane read in divergent code is the only blocker for the builder on 32-lane GPUs, I'm happy to test a fix.

**@⁠tadymila** on GitHub · 2026-11-24 22:14 UTC · [original](https://github.com/fxceless/victory-fork/issues/70#issuecomment-7145984404) RT test on RTX 5070 Ti (wave32), current main + `VICTORY_BVH_BUILDER=1 VICTORY_WAVE_WIDE=1 VICTORY_BVH_QUARANTINE=1`: - The builder stays off: `the ray-tracing structure builder stays off: not all of its programs have a host pipeline … missing=3 of=53`. - The 3 missing are compute programs that fail to translate: `GFX10 code at …: a first-lane read where not every lane runs is not supported` (readfirstlane in divergent control flow). - With `VICTORY_WAVE_WIDE=1` the run ended in a TDR (`0x887A0006`, no breadcrumbs) in the prologue cell, ~5.6 s after the last submission. Without it, no hangs. If the first-lane read in divergent code is the only blocker for the builder on 32-lane GPUs, I'm happy to test a fix.
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#70
No description provided.