Card copies: a census, and an opt-in switch that leaves write-combining memory on the card (−11…−20 % frame, 3 GPUs) #867

Closed
Chipsraine wants to merge 4 commits from upstream-pr/868 into main
Chipsraine commented 2026-11-25 11:10:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Chipsraine on 2026-11-25T11:10:04Z.


Summary

Two opt-in additions about the card copies of title buffers (crate::shadow::cards). Nothing changes without the switches. Rebased on 0b0074e.

  • VICTORY_CENSUS=1 (logging only): every 10 s (VICTORY_CENSUS_SECONDS) a census of those copies: the XMemVirtualAlloc reservation each lies in with the flags the title asked for (the runtime drops write-combining, uncached and the GPU access bits; the census keeps them), how much of it is physical-page views and how much shows a page at more than one address, and per frame the bytes sent up, pieces compared and bytes fetched back; plus host resources made per frame by kind.
  • VICTORY_SKIP_WC_BACK=1 (experiment): what shaders wrote to copies of write-combining title memory is not fetched back into title memory. Declared ranges that cross a reservation boundary or touch ordinary memory still take the normal path (fix by @iGoldenNinja, f9c43fa).
  • VICTORY_SKIP_WC_COMPARE=1 (implies it; marked UNSAFE): those copies are not hashed or compared on the card either. One device removal was reported with it (see below); kept only for measurement.

Why

The census found ~100 copies (~1 GB) on the card, and per frame ~100 MB fetched back of which 97–99 % comes from memory the title reserved write-combining, i.e. memory the console's CPU writes but does not read back. About half of the uploads were an echo: a fetched piece makes title memory differ from the CPU side, and the next submission sends it up again.

Results for VICTORY_SKIP_WC_BACK=1 (independent testers)

All on 0b0074e-era trees with the author's speed set (ASYNC_SUBMIT QUEUE2 INDIRECT_WINDOW TEXTURE_NO_WAIT COPY_PLAIN), warm caches, Series X profile.

Who GPU / CPU Method Frame Copy-back Device loss
@xunbreakablex RTX 4070 / Ryzen 5 5600 A-B-A-B, 480 s each 184 → 148 ms (−20 %); per 1,000 draws 38.6 → 31.7 ms 76–100 → ~20 ms none
@Chipsraine RTX 5080 / Ryzen 5 5600 two long runs to chapter 1, draw-matched −11 to −13 % (e.g. 194 → 172 ms at 5,500–7,000 draws) 65–68 → 22 ms none (22.6 min)
@Chipsraine RTX 5080 / Ryzen 5 5600 short pair, same room 192 → 149 ms (−22 %) 71 → 21 ms none
@iGoldenNinja RTX 5080 / Ryzen 9 5900X pair, 90 s each 2.84 → 3.82 fps 200 → 99 ms none
@ExoCalibra (#770) RTX 3080 Ti integration stack (with SKIP_WC_COMPARE) — 40 → 5 ms none reported

Uploads to the card fall by about half in every report (e.g. 161 → 77 MB/frame here, 140 → 27 MB/frame for @iGoldenNinja).

Known issues and caveats

  • This is an experiment, not a fix. It assumes the title's CPU never reads write-combining memory the card wrote, and never writes part of a 64 KiB piece the card wrote (the next upload would send stale bytes there; #786 is related). A correct form would keep such pieces on the card and fetch one on the CPU's first touch (a no-access guard) instead of every frame.
  • VICTORY_SKIP_WC_COMPARE=1: one device removal ~75 s into the world on a 5080 (@Ym1r1710); none in other runs. Cause unknown; do not use for play.
  • Picture: no difference spotted by eye or by simple frame measures (@xunbreakablex), which is a weak check.
  • Game logic: on long runs the story script broke in two places (control back in a police car after its cutscene; a switch to Jason in a barely streamed world). A control run without the switch broke at the same places, so this is not the switch; most likely scripts advancing while streaming lags at 3–7 fps.
  • Present timing: @iGoldenNinja saw a worse P99 in one pair (composed flip); per-present WPR analysis here found no interval over 500 ms in either flip mode with the switch (p50 130 ms, p99 223 ms).

Verification

cargo build --release -p victory; cargo clippy -p victory-gpu -p victory-hle --all-targets (no new warnings); cargo test --release -p victory-gpu --lib (census, shadow, inplace; @iGoldenNinja's reservation tests included); cargo xtask policy (180 files ok). Numbers only; no game data, captures or screenshots.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:5490182532 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868). Originally posted by [Chipsraine](https://github.com/Chipsraine) on 2026-11-25T11:10:04Z. --- ## Summary Two opt-in additions about the card copies of title buffers (`crate::shadow::cards`). **Nothing changes without the switches.** Rebased on `0b0074e`. - **`VICTORY_CENSUS=1`** (logging only): every 10 s (`VICTORY_CENSUS_SECONDS`) a census of those copies: the `XMemVirtualAlloc` reservation each lies in **with the flags the title asked for** (the runtime drops write-combining, uncached and the GPU access bits; the census keeps them), how much of it is physical-page views and how much shows a page at more than one address, and per frame the bytes sent up, pieces compared and bytes fetched back; plus host resources made per frame by kind. - **`VICTORY_SKIP_WC_BACK=1`** (experiment): what shaders wrote to copies of **write-combining** title memory is not fetched back into title memory. Declared ranges that cross a reservation boundary or touch ordinary memory still take the normal path (fix by @iGoldenNinja, `f9c43fa`). - **`VICTORY_SKIP_WC_COMPARE=1`** (implies it; **marked UNSAFE**): those copies are not hashed or compared on the card either. One device removal was reported with it (see below); kept only for measurement. ## Why The census found ~100 copies (~1 GB) on the card, and per frame ~100 MB fetched back of which **97–99 % comes from memory the title reserved write-combining**, i.e. memory the console's CPU writes but does not read back. About half of the uploads were an echo: a fetched piece makes title memory differ from the CPU side, and the next submission sends it up again. ## Results for `VICTORY_SKIP_WC_BACK=1` (independent testers) All on `0b0074e`-era trees with the author's speed set (`ASYNC_SUBMIT QUEUE2 INDIRECT_WINDOW TEXTURE_NO_WAIT COPY_PLAIN`), warm caches, Series X profile. | Who | GPU / CPU | Method | Frame | Copy-back | Device loss | |---|---|---|---|---|---| | @xunbreakablex | RTX 4070 / Ryzen 5 5600 | A-B-A-B, 480 s each | **184 → 148 ms (−20 %)**; per 1,000 draws 38.6 → 31.7 ms | 76–100 → ~20 ms | none | | @Chipsraine | RTX 5080 / Ryzen 5 5600 | two long runs to chapter 1, draw-matched | **−11 to −13 %** (e.g. 194 → 172 ms at 5,500–7,000 draws) | 65–68 → 22 ms | none (22.6 min) | | @Chipsraine | RTX 5080 / Ryzen 5 5600 | short pair, same room | 192 → 149 ms (−22 %) | 71 → 21 ms | none | | @iGoldenNinja | RTX 5080 / Ryzen 9 5900X | pair, 90 s each | 2.84 → 3.82 fps | 200 → 99 ms | none | | @ExoCalibra (#770) | RTX 3080 Ti | integration stack (with `SKIP_WC_COMPARE`) | — | 40 → 5 ms | none reported | Uploads to the card fall by about half in every report (e.g. 161 → 77 MB/frame here, 140 → 27 MB/frame for @iGoldenNinja). ## Known issues and caveats - **This is an experiment, not a fix.** It assumes the title's CPU never reads write-combining memory the card wrote, and never writes part of a 64 KiB piece the card wrote (the next upload would send stale bytes there; #786 is related). A correct form would keep such pieces on the card and fetch one on the CPU's **first touch** (a no-access guard) instead of every frame. - `VICTORY_SKIP_WC_COMPARE=1`: one device removal ~75 s into the world on a 5080 (@Ym1r1710); none in other runs. Cause unknown; do not use for play. - Picture: no difference spotted by eye or by simple frame measures (@xunbreakablex), which is a weak check. - Game logic: on long runs the story script broke in two places (control back in a police car after its cutscene; a switch to Jason in a barely streamed world). A control run **without** the switch broke at the same places, so this is not the switch; most likely scripts advancing while streaming lags at 3–7 fps. - Present timing: @iGoldenNinja saw a worse P99 in one pair (composed flip); per-present WPR analysis here found no interval over 500 ms in either flip mode with the switch (p50 130 ms, p99 223 ms). ## Verification `cargo build --release -p victory`; `cargo clippy -p victory-gpu -p victory-hle --all-targets` (no new warnings); `cargo test --release -p victory-gpu --lib` (census, shadow, inplace; @iGoldenNinja's reservation tests included); `cargo xtask policy` (180 files ok). Numbers only; no game data, captures or screenshots. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Ym1r1710 commented 2026-11-25 12:07:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Ym1r1710 on 2026-11-25T11:24:08Z.


Tried this on a 5080 (16 GB, Win11, Series X profile), on top of f85101b with VICTORY_RELAY=2, VICTORY_ASYNC_SUBMIT=1 and VICTORY_QUEUE2=1.

With VICTORY_SKIP_WC_COMPARE=1 I got a device removed about 75 s into the world (first cell). Breadcrumbs say it died in the middle of a list, 247 of 516 done, and the next one 0/1. The driver recovered by itself, no black screen. My tree without this PR has done several runs on the same settings with no removals (~6 fps).

Only one run, so I can't say for sure it's the switch. But your caveat about the CPU writing part of a 64 KiB piece the card wrote would fit. I haven't tried SKIP_WC_BACK=1 on its own.

FYI there's a small conflict in host.rs against current main, next to the VICTORY_CARD_WHOLE_MB loop. I kept both blocks, whole-compare first and then your WC filter.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7160998134 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7160998134). Originally posted by [Ym1r1710](https://github.com/Ym1r1710) on 2026-11-25T11:24:08Z. --- Tried this on a 5080 (16 GB, Win11, Series X profile), on top of f85101b with `VICTORY_RELAY=2`, `VICTORY_ASYNC_SUBMIT=1` and `VICTORY_QUEUE2=1`. With `VICTORY_SKIP_WC_COMPARE=1` I got a device removed about 75 s into the world (first cell). Breadcrumbs say it died in the middle of a list, 247 of 516 done, and the next one 0/1. The driver recovered by itself, no black screen. My tree without this PR has done several runs on the same settings with no removals (~6 fps). Only one run, so I can't say for sure it's the switch. But your caveat about the CPU writing part of a 64 KiB piece the card wrote would fit. I haven't tried `SKIP_WC_BACK=1` on its own. FYI there's a small conflict in host.rs against current main, next to the `VICTORY_CARD_WHOLE_MB` loop. I kept both blocks, whole-compare first and then your WC filter.
MamaLeVrai commented 2026-11-25 13:06:00 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T12:23:19Z.


Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head 4e34eb0 into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with exactly the errors main itself has on this machine (placed_filler_twins, depth_written, a sort; PR #841 fixes them), also with --all-features; this PR adds none. cargo test --workspace --locked: run 1: 555 passed, 0 failed, 11 ignored; run 2: stopped at indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields (the one that fails on main itself most runs here (PR #849 and #847 fix its assertion)) (main alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162305210 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7162305210). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T12:23:19Z. --- Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `4e34eb0` into `main` `f85101b` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with exactly the errors `main` itself has on this machine (`placed_filler_twins`, `depth_written`, a sort; PR #841 fixes them), also with `--all-features`; this PR adds none. `cargo test --workspace --locked`: run 1: 555 passed, 0 failed, 11 ignored; run 2: stopped at `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` (the one that fails on `main` itself most runs here (PR #849 and #847 fix its assertion)) (`main` alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
Chipsraine commented 2026-11-25 13:06:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Chipsraine on 2026-11-25T12:52:33Z.


Thanks both for testing. @Ym1r1710: a device removal is exactly the failure the caveat predicts (stale bytes sent up over a piece the card wrote, e.g. indirect arguments), so I'd treat SKIP_WC_COMPARE as unsafe until shown otherwise. My own 12-min run on a 5080 had no removal, but that was on 9376fd6 without ASYNC_SUBMIT/QUEUE2/windows. If you have time, a run with VICTORY_SKIP_WC_BACK=1 alone would tell whether the compare skip is the trigger. I'll rebase onto 0b0074e (resolving the VICTORY_CARD_WHOLE_MB conflict), re-measure against VICTORY_QUEUE2=1, which attacks the same copy-back wait without the assumption, and report back. Converting to draft meanwhile; the census part (VICTORY_CENSUS) is logging only and safe. @MamaLeVrai: thanks for the build/test check.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162978180 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7162978180). Originally posted by [Chipsraine](https://github.com/Chipsraine) on 2026-11-25T12:52:33Z. --- Thanks both for testing. @Ym1r1710: a device removal is exactly the failure the caveat predicts (stale bytes sent up over a piece the card wrote, e.g. indirect arguments), so I'd treat `SKIP_WC_COMPARE` as unsafe until shown otherwise. My own 12-min run on a 5080 had no removal, but that was on `9376fd6` without `ASYNC_SUBMIT`/`QUEUE2`/windows. If you have time, a run with `VICTORY_SKIP_WC_BACK=1` alone would tell whether the compare skip is the trigger. I'll rebase onto `0b0074e` (resolving the `VICTORY_CARD_WHOLE_MB` conflict), re-measure against `VICTORY_QUEUE2=1`, which attacks the same copy-back wait without the assumption, and report back. Converting to draft meanwhile; the census part (`VICTORY_CENSUS`) is logging only and safe. @MamaLeVrai: thanks for the build/test check.
iGoldenNinja commented 2026-11-25 13:06:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by iGoldenNinja on 2026-11-25T13:04:30Z.


Chipsraine, we reproduced a separate census accounting gap on PR head 4e34eb042e781bc046ca4f06858da1ee0302fe2d. With VICTORY_CENSUS=1, relay_card_inflight adds usable landed bytes to the global in-flight total but omits them from the per-copy fetched counters. The correction credits each accepted span to its shadow copy after duplicate and superseded ranges have been excluded.

The CPU-only regression on Windows 11 25H2 (26200.9974) exercises the production landing loop with synthetic slot buffers and a stub merge. On the parent, copy A records 0 fetched bytes despite 17 bytes landing. On the correction, A records 17 bytes across two spans and B records 14 bytes in one span, matching the global 31 bytes. The stub reports zero title bytes changed. The rejected batch records zero on both revisions. Both regression cases pass with the correction.

Correction commit · Reproduction fixture

Reservation-range correctness

Two CPU regressions expose a separate classification defect on the same PR head. In a synthetic 4 MiB card window spanning two adjacent 2 MiB reservations, the parent classified a 64 KiB write in the ordinary reservation using the write-combining flag at the start of the window. The correction classifies each declared guest interval. Declarations that cross a reservation boundary or include ordinary memory use the normal comparison and readback paths. Writes entirely inside a write-combining reservation still qualify for the experiment. Both regressions pass, covering exact end boundaries, adjacent reservations and integer overflow. Synthetic checks also exercised the direct, relay and compare gates.

The separate local RTX 5080 control used default card-window settings. All 99 recorded exact buffer extents fit inside individual observed reservations. The synthetic tests establish the classifier defect, and its effect on the rendered scene remains unmeasured.

Reservation-range correction and CPU tests

Live RTX 5080 back-only comparison

Following Chipsraine’s back-only request, we ran one control-first pair at the same 2542 × 1396 prison window, about 90 seconds per arm, with no replay input during measurement. Both used dc3c191953f0c8e4adfad5260331ddbc6ec21910 (early-depth integration plus 4e34eb0), a warm cache, Series X profile, ASUS ROG Astral RTX 5080 16 GB / 617.14, Ryzen 9 5900X, 32 GB, Windows 11 Pro 25H2 build 26200.9974. The census and comparisons were on, in-flight fetch was off, and only VICTORY_SKIP_WC_BACK changed from 0 to 1. Median draws were 4,985 and 4,996.

  • Fetched MB/frame fell from 96.07 to 3.59, with the WC portion 92.52 to 0. Uploads fell from 140.08 to 27.33 MB/frame. Compared pieces were 16,780 and 16,763 per frame.
  • Median renderer copy-back fell from 199.7 to 98.9 ms and average displayed application FPS rose from 2.839 to 3.818.
  • Full-sample P99 display interval worsened from 429.25 to 1,217.15 ms. Five consecutive back-only intervals over one second started in composed-flip mode. The control had no intervals over 500 ms. The cause of the presentation-mode change is unknown. A diagnostic subset with independent-flip on both endpoints gave 429.25 to 305.77 ms (256 and 337 intervals).

Sampled geometry and lighting looked similar and dark areas remained. We stopped both runs deliberately without a logged device removal. This pair measures traffic and display timing in one stationary scene. Guest CPU reads of skipped GPU-written data and later gameplay remain untested.

Pinned comparison report

November 25 follow-up. A retrospective check of four matched-view bottom-fifth crops per arm from our single 90-second RTX 5080 pair on dc3c191 found zero pixels meeting our light-grey or cyan definitions, with a different metric, shorter observation window and earlier build than the RTX 4070 comparison. Pinned report

<!-- greyfinch-sync:fxceless/victory-fork:comment:7163254204 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7163254204). Originally posted by [iGoldenNinja](https://github.com/iGoldenNinja) on 2026-11-25T13:04:30Z. --- Chipsraine, we reproduced a separate census accounting gap on PR head `4e34eb042e781bc046ca4f06858da1ee0302fe2d`. With `VICTORY_CENSUS=1`, `relay_card_inflight` adds usable landed bytes to the global in-flight total but omits them from the per-copy fetched counters. The correction credits each accepted span to its shadow copy after duplicate and superseded ranges have been excluded. The CPU-only regression on Windows 11 25H2 (26200.9974) exercises the production landing loop with synthetic slot buffers and a stub merge. On the parent, copy A records 0 fetched bytes despite 17 bytes landing. On the correction, A records 17 bytes across two spans and B records 14 bytes in one span, matching the global 31 bytes. The stub reports zero title bytes changed. The rejected batch records zero on both revisions. Both regression cases pass with the correction. [Correction commit](https://github.com/iGoldenNinja/victory-fork/commit/49039ced23d922d0e04112b02f0dc690da329d8f) · [Reproduction fixture](https://github.com/iGoldenNinja/victory-fork/tree/c6fb6d49e3106aa54999f2c1ad6eb2cdcfa9bde9/tests/fixtures/inflight-census) **Reservation-range correctness** Two CPU regressions expose a separate classification defect on the same PR head. In a synthetic 4 MiB card window spanning two adjacent 2 MiB reservations, the parent classified a 64 KiB write in the ordinary reservation using the write-combining flag at the start of the window. The correction classifies each declared guest interval. Declarations that cross a reservation boundary or include ordinary memory use the normal comparison and readback paths. Writes entirely inside a write-combining reservation still qualify for the experiment. Both regressions pass, covering exact end boundaries, adjacent reservations and integer overflow. Synthetic checks also exercised the direct, relay and compare gates. The separate local RTX 5080 control used default card-window settings. All 99 recorded exact buffer extents fit inside individual observed reservations. The synthetic tests establish the classifier defect, and its effect on the rendered scene remains unmeasured. [Reservation-range correction and CPU tests](https://github.com/iGoldenNinja/victory-fork/commit/05a776c795d71ef5159606d9888816322dc5c42f) **Live RTX 5080 back-only comparison** Following [Chipsraine’s back-only request](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7162978180), we ran one control-first pair at the same 2542 × 1396 prison window, about 90 seconds per arm, with no replay input during measurement. Both used `dc3c191953f0c8e4adfad5260331ddbc6ec21910` (early-depth integration plus `4e34eb0`), a warm cache, Series X profile, ASUS ROG Astral RTX 5080 16 GB / 617.14, Ryzen 9 5900X, 32 GB, Windows 11 Pro 25H2 build 26200.9974. The census and comparisons were on, in-flight fetch was off, and only `VICTORY_SKIP_WC_BACK` changed from 0 to 1. Median draws were 4,985 and 4,996. - Fetched MB/frame fell from **96.07 to 3.59**, with the WC portion **92.52 to 0**. Uploads fell from **140.08 to 27.33 MB/frame**. Compared pieces were 16,780 and 16,763 per frame. - Median renderer copy-back fell from **199.7 to 98.9 ms** and average displayed application FPS rose from **2.839 to 3.818**. - Full-sample P99 display interval worsened from **429.25 to 1,217.15 ms**. Five consecutive back-only intervals over one second started in composed-flip mode. The control had no intervals over 500 ms. The cause of the presentation-mode change is unknown. A diagnostic subset with independent-flip on both endpoints gave **429.25 to 305.77 ms** (256 and 337 intervals). Sampled geometry and lighting looked similar and dark areas remained. We stopped both runs deliberately without a logged device removal. This pair measures traffic and display timing in one stationary scene. Guest CPU reads of skipped GPU-written data and later gameplay remain untested. [Pinned comparison report](https://github.com/iGoldenNinja/victory-fork/blob/7dd8e2bda66f22f0efa3cf57486c6a474b862e67/docs/rtx5080-pr868-back-only.md) **November 25 follow-up.** A retrospective check of four matched-view bottom-fifth crops per arm from our single 90-second RTX 5080 pair on `dc3c191` found zero pixels meeting our light-grey or cyan definitions, with a different metric, shorter observation window and earlier build than the RTX 4070 comparison. [Pinned report](https://github.com/iGoldenNinja/victory-fork/blob/9a98ff4121472950ab5c81d9234919eb294afe75/docs/rtx5080-pr868-back-only.md)
Chipsraine commented 2026-11-25 14:10:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Chipsraine on 2026-11-25T13:34:06Z.


Rebased onto 0b0074e (no conflicts there; new head 7e64279) and re-measured on the RTX 5080 (Ryzen 5 5600, Win11, Series X profile), same room, release build, with the author's speed set: VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_TEXTURE_NO_WAIT=1 VICTORY_COPY_PLAIN=1 (+ VICTORY_TEXTURE_CATCHUP=0).

Steady world frames (≥3,000 draws, no pipelines being made), p50:

author's set + VICTORY_SKIP_WC_BACK=1
frame 192 ms (5.3 fps) 149 ms (6.7 fps)
copy-back 71 ms / 63 MB 21 ms / 3 MB
sent up to the card 159 MB 73 MB
copy-back thread waiting for fetches 12 ms 1 ms
submitting thread waiting for the card 50 ms 19 ms
draws per frame ~5,600 ~6,100

So QUEUE2 and this switch add up: QUEUE2 removes the wait for the fetch, this removes the fetch itself and the echo upload that follows it.

SKIP_WC_BACK=1 alone (no SKIP_WC_COMPARE) ran ~8.5 min on top of windows/async/queue2 with no device removal and no display-driver events in the System log. One run each (55 and 65 steady samples), so treat as indicative. SKIP_WC_COMPARE I still consider unsafe after @Ym1r1710's report; staying in draft until the lazy (first-touch) form exists.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7163965228 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7163965228). Originally posted by [Chipsraine](https://github.com/Chipsraine) on 2026-11-25T13:34:06Z. --- Rebased onto `0b0074e` (no conflicts there; new head `7e64279`) and re-measured on the RTX 5080 (Ryzen 5 5600, Win11, Series X profile), same room, release build, with the author's speed set: `VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_TEXTURE_NO_WAIT=1 VICTORY_COPY_PLAIN=1` (+ `VICTORY_TEXTURE_CATCHUP=0`). Steady world frames (≥3,000 draws, no pipelines being made), p50: | | author's set | + `VICTORY_SKIP_WC_BACK=1` | |---|---:|---:| | frame | 192 ms (5.3 fps) | **149 ms (6.7 fps)** | | copy-back | 71 ms / 63 MB | 21 ms / 3 MB | | sent up to the card | 159 MB | 73 MB | | copy-back thread waiting for fetches | 12 ms | 1 ms | | submitting thread waiting for the card | 50 ms | 19 ms | | draws per frame | ~5,600 | ~6,100 | So `QUEUE2` and this switch add up: `QUEUE2` removes the wait for the fetch, this removes the fetch itself and the echo upload that follows it. `SKIP_WC_BACK=1` alone (no `SKIP_WC_COMPARE`) ran ~8.5 min on top of windows/async/queue2 with no device removal and no display-driver events in the System log. One run each (55 and 65 steady samples), so treat as indicative. `SKIP_WC_COMPARE` I still consider unsafe after @Ym1r1710's report; staying in draft until the lazy (first-touch) form exists.
Chipsraine commented 2026-11-25 14:10:52 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Chipsraine on 2026-11-25T13:56:02Z.


@iGoldenNinja thanks — both fixes are right and I've taken your two commits as they are (b57479c, f9c43fa, authorship kept): the in-flight path was simply not credited per copy, and classifying by the copy's start address was wrong for windows spanning two reservations (on my runs all ~100 copies sat inside one reservation, so my numbers are unaffected, but the experiment must not depend on that). Your 5080 pair matches mine in direction (fetch −93 MB, uploads −110 MB/frame, copy-back halved) — thanks for the independent check.

On the P99 / composed-flip regression: from one 30 s WPR trace of my SKIP_WC_BACK=1 run (author's speed set on 0b0074e) I classified each of the title's 202 presents by whether an MMIO overlay flip from the process followed it before the next present: 67 independent, 134 composed, interval p50 150 / 155 ms, p99 234 / 241 ms, no interval over 500 ms in either mode. So it does not reproduce here in that window; I'll keep logging every frame (VICTORY_FRAME_LOG=1) and the flip mode in the next runs.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7164502447 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7164502447). Originally posted by [Chipsraine](https://github.com/Chipsraine) on 2026-11-25T13:56:02Z. --- @iGoldenNinja thanks — both fixes are right and I've taken your two commits as they are (`b57479c`, `f9c43fa`, authorship kept): the in-flight path was simply not credited per copy, and classifying by the copy's start address was wrong for windows spanning two reservations (on my runs all ~100 copies sat inside one reservation, so my numbers are unaffected, but the experiment must not depend on that). Your 5080 pair matches mine in direction (fetch −93 MB, uploads −110 MB/frame, copy-back halved) — thanks for the independent check. On the P99 / composed-flip regression: from one 30 s WPR trace of my `SKIP_WC_BACK=1` run (author's speed set on `0b0074e`) I classified each of the title's 202 presents by whether an MMIO overlay flip from the process followed it before the next present: 67 independent, 134 composed, interval p50 150 / 155 ms, p99 234 / 241 ms, no interval over 500 ms in either mode. So it does not reproduce here in that window; I'll keep logging every frame (`VICTORY_FRAME_LOG=1`) and the flip mode in the next runs.
upstream-sync changed title from [PR #868] Card copies: a census, and an opt-in experiment that leaves write-combining memory on the card (−24 % frame on RTX 5080) to [PR #868] Card copies: a census, and an opt-in switch that leaves write-combining memory on the card (−11…−20 % frame, 3 GPUs) 2026-11-25 16:12:33 +00:00
xunbreakablex commented 2026-11-25 16:12:52 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by xunbreakablex on 2026-11-25T15:37:45Z.


Second machine with the same CPU class, for VICTORY_SKIP_WC_BACK=1 only (AI-assisted, Claude; runs on my machine): RTX 4070 (undervolted, 100 W limit), Ryzen 5 5600 at 3.95 GHz, Windows 11, driver 621.01, Series X profile, diagnostics build of this PR's head f9c43fa (on 0b0074e), warm cache. Both arms use the same binary and the set ASYNC_SUBMIT=1 QUEUE2=1 INDIRECT_WINDOW=1 MERGE_GAP=64 MERGE_RUNS=4096 COPY_PLAIN=1 TEXTURE_NO_WAIT=1; 480 s runs in A-B-A-B order, steady window world +300..+480 s. SKIP_WC_COMPARE was not used.

run frame (mean ± sd) ms per 1,000 draws copy-back copies
A1 195.8 ± 10.1 ms 40.6 99.6 ms 80.6 ms
B1 SKIP_WC_BACK=1 140.2 ± 5.0 ms 30.1 20.2 ms 46.3 ms
A2 172.1 ± 10.3 ms 36.6 76.2 ms 61.8 ms
B2 SKIP_WC_BACK=1 155.8 ± 7.3 ms 33.3 19.0 ms 49.1 ms
  • B faster in both pairs: -28% and -9%, -20% over the two (148 vs 184 ms); per 1,000 draws 31.7 vs 38.6 ms. Copy-back drops from 76-100 ms to ~20 ms every time, which matches your numbers; the default arm itself moves a lot between runs here, which is why the second pair is smaller.
  • No device removal, no driver-watch entry, no error line in either B run (2 x 480 s).
  • Picture: I compared the captured world frames of each pair by simple measures (black-pixel ratio, brightness, a block/stair-edge measure on a character's shoulder) and found no difference that stands out; frames are hard to match one to one because the scene timing differs between runs, so this is a weak check, not a clean bill. I did not look for the specific failure the caveat describes (stale bytes over something the card wrote).
<!-- greyfinch-sync:fxceless/victory-fork:comment:7167136420 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7167136420). Originally posted by [xunbreakablex](https://github.com/xunbreakablex) on 2026-11-25T15:37:45Z. --- Second machine with the same CPU class, for `VICTORY_SKIP_WC_BACK=1` only (AI-assisted, Claude; runs on my machine): RTX 4070 (undervolted, 100 W limit), Ryzen 5 5600 at 3.95 GHz, Windows 11, driver 621.01, Series X profile, diagnostics build of this PR's head `f9c43fa` (on `0b0074e`), warm cache. Both arms use the same binary and the set `ASYNC_SUBMIT=1 QUEUE2=1 INDIRECT_WINDOW=1 MERGE_GAP=64 MERGE_RUNS=4096 COPY_PLAIN=1 TEXTURE_NO_WAIT=1`; 480 s runs in A-B-A-B order, steady window world +300..+480 s. `SKIP_WC_COMPARE` was not used. | run | frame (mean ± sd) | ms per 1,000 draws | copy-back | copies | |---|---|---|---|---| | A1 | 195.8 ± 10.1 ms | 40.6 | 99.6 ms | 80.6 ms | | B1 `SKIP_WC_BACK=1` | 140.2 ± 5.0 ms | 30.1 | 20.2 ms | 46.3 ms | | A2 | 172.1 ± 10.3 ms | 36.6 | 76.2 ms | 61.8 ms | | B2 `SKIP_WC_BACK=1` | 155.8 ± 7.3 ms | 33.3 | 19.0 ms | 49.1 ms | - B faster in both pairs: -28% and -9%, -20% over the two (148 vs 184 ms); per 1,000 draws 31.7 vs 38.6 ms. Copy-back drops from 76-100 ms to ~20 ms every time, which matches your numbers; the default arm itself moves a lot between runs here, which is why the second pair is smaller. - No device removal, no driver-watch entry, no error line in either B run (2 x 480 s). - Picture: I compared the captured world frames of each pair by simple measures (black-pixel ratio, brightness, a block/stair-edge measure on a character's shoulder) and found no difference that stands out; frames are hard to match one to one because the scene timing differs between runs, so this is a weak check, not a clean bill. I did not look for the specific failure the caveat describes (stale bytes over something the card wrote).
Chipsraine commented 2026-11-25 16:12:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Chipsraine on 2026-11-25T15:41:32Z.


Long runs on the RTX 5080 (Ryzen 5 5600), from the prologue to the start of chapter 1, on 0b0074e + this PR (with @iGoldenNinja's fixes) + #911 #916 #834, author's speed set (ASYNC_SUBMIT QUEUE2 INDIRECT_WINDOW TEXTURE_NO_WAIT COPY_PLAIN), warm caches:

  • with VICTORY_SKIP_WC_BACK=1: 22.6 min, no device removal, no display-driver events;
  • control without it, same route: 30.3 min, also no removal.

Draw-matched comparison (the scenes differ a lot in draws, so frames are binned by draws per frame; steady world frames, no pipelines being made), p50:

draws per frame SKIP_WC_BACK=1 without
4,000–5,500 190 ms 219 ms −13 %
5,500–7,000 172 ms 194 ms −11 %
copy-back 22 ms 65–68 ms
sent up to the card 76–78 MB 161–163 MB −52 %

So on top of the author's set the gain is ~11–13 %, smaller than the 22 % of my earlier short pair: with ASYNC_SUBMIT/QUEUE2 much of the copy-back already overlaps other work (−43 ms of copy-back gave ~−20 ms of frame).

Game logic: in the switch run the story broke twice (control returned to Lucia in the police car after the cutscene, a scene that does not exist on console; later a switch to Jason in a barely streamed world). The control run without the switch broke at the same two places, so these are not caused by SKIP_WC_BACK; most likely the mission scripts advance on time while streaming/cutscenes lag at 3–7 fps.

Present timing from WPR (flip mode per present, ~30 s windows in the cell): with the switch p50 130 ms, p99 223 ms, no interval over 500 ms in either independent or composed flip, so the P99 regression reported above did not reproduce here.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167233037 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7167233037). Originally posted by [Chipsraine](https://github.com/Chipsraine) on 2026-11-25T15:41:32Z. --- Long runs on the RTX 5080 (Ryzen 5 5600), from the prologue to the start of chapter 1, on `0b0074e` + this PR (with @iGoldenNinja's fixes) + #911 #916 #834, author's speed set (`ASYNC_SUBMIT QUEUE2 INDIRECT_WINDOW TEXTURE_NO_WAIT COPY_PLAIN`), warm caches: - with `VICTORY_SKIP_WC_BACK=1`: 22.6 min, no device removal, no display-driver events; - control without it, same route: 30.3 min, also no removal. Draw-matched comparison (the scenes differ a lot in draws, so frames are binned by draws per frame; steady world frames, no pipelines being made), p50: | draws per frame | `SKIP_WC_BACK=1` | without | | |---|---:|---:|---:| | 4,000–5,500 | 190 ms | 219 ms | −13 % | | 5,500–7,000 | 172 ms | 194 ms | −11 % | | copy-back | 22 ms | 65–68 ms | | | sent up to the card | 76–78 MB | 161–163 MB | −52 % | So on top of the author's set the gain is **~11–13 %**, smaller than the 22 % of my earlier short pair: with `ASYNC_SUBMIT`/`QUEUE2` much of the copy-back already overlaps other work (−43 ms of copy-back gave ~−20 ms of frame). **Game logic:** in the switch run the story broke twice (control returned to Lucia in the police car after the cutscene, a scene that does not exist on console; later a switch to Jason in a barely streamed world). The control run without the switch broke **at the same two places**, so these are not caused by `SKIP_WC_BACK`; most likely the mission scripts advance on time while streaming/cutscenes lag at 3–7 fps. Present timing from WPR (flip mode per present, ~30 s windows in the cell): with the switch p50 130 ms, p99 223 ms, no interval over 500 ms in either independent or composed flip, so the P99 regression reported above did not reproduce here.
xunbreakablex commented 2026-11-25 16:12:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by xunbreakablex on 2026-11-25T15:56:14Z.


Correction to my comment above, after looking at the captures properly (AI-assisted, Claude; same RTX 4070 / Ryzen 5 5600 machine).

Picture: I wrote that I found no difference that stands out. That was wrong. In the cell-window shot (world +300, +600, +900), two of the three SKIP_WC_BACK=1 runs show light-grey rectangular patches with stair-stepped edges in the lower part of the frame (to the sides of and below the character, roughly the bottom fifth of the screen), and one of them also small cyan specks at the right edge. Neither of the two runs without the switch has them (same binary, same set, same capture method). A simple measure of strong 8-pixel-aligned edges in that region: without the switch 0.001 and 0.051; with it 0.163, 0.089 and 0.174. That looks like the failure your caveat predicts (bytes the card wrote into write-combining memory not coming back, and something later reading the stale copy), but I have not proven the mechanism; it is 3 vs 2 runs on one machine.

Speed: the third SKIP_WC_BACK run (with VICTORY_CENSUS=1) gave 156.1 ms, so B is 140.2 / 155.8 / 156.1 ms (mean 150.7) against 195.8 / 172.1 ms without the switch. An earlier run of the same set on plain 0b0074e gave 159.0 ms, so against that the gain is only ~5%; against the two A runs of this binary it is ~18%. The direction is consistent (every B run faster than every A-type run), the size is not: please read it as 5-18%, not 20%.

Census in the B run, world part: per frame about 22-24 MB sent up and 5.5-5.9 MB fetched back, of which 0.0 MB from write-combining memory (as expected with the switch on). I have not run the census with the switch off yet, so I cannot say yet how much write-combining read-back the switch skips; that run is queued.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167445429 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7167445429). Originally posted by [xunbreakablex](https://github.com/xunbreakablex) on 2026-11-25T15:56:14Z. --- Correction to my comment above, after looking at the captures properly (AI-assisted, Claude; same RTX 4070 / Ryzen 5 5600 machine). **Picture:** I wrote that I found no difference that stands out. That was wrong. In the cell-window shot (world +300, +600, +900), **two of the three `SKIP_WC_BACK=1` runs show light-grey rectangular patches with stair-stepped edges in the lower part of the frame** (to the sides of and below the character, roughly the bottom fifth of the screen), and one of them also small cyan specks at the right edge. **Neither of the two runs without the switch has them** (same binary, same set, same capture method). A simple measure of strong 8-pixel-aligned edges in that region: without the switch 0.001 and 0.051; with it 0.163, 0.089 and 0.174. That looks like the failure your caveat predicts (bytes the card wrote into write-combining memory not coming back, and something later reading the stale copy), but I have not proven the mechanism; it is 3 vs 2 runs on one machine. **Speed:** the third `SKIP_WC_BACK` run (with `VICTORY_CENSUS=1`) gave 156.1 ms, so B is 140.2 / 155.8 / 156.1 ms (mean 150.7) against 195.8 / 172.1 ms without the switch. An earlier run of the same set on plain `0b0074e` gave 159.0 ms, so against that the gain is only ~5%; against the two A runs of this binary it is ~18%. The direction is consistent (every B run faster than every A-type run), the size is not: please read it as 5-18%, not 20%. **Census** in the B run, world part: per frame about 22-24 MB sent up and 5.5-5.9 MB fetched back, of which 0.0 MB from write-combining memory (as expected with the switch on). I have not run the census with the switch off yet, so I cannot say yet how much write-combining read-back the switch skips; that run is queued.
Chipsraine commented 2026-11-25 16:12:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Chipsraine on 2026-11-25T15:59:55Z.


@xunbreakablex thank you — A-B-A-B at 480 s on a 4070 with the same CPU class is the cleanest measurement in this thread; I've put it at the top of the summary table in the description, next to the other reports. VICTORY_SKIP_WC_COMPARE is now marked unsafe in its comment and log line (fef9592), and with four independent SKIP_WC_BACK reports and no device loss I'm taking this out of draft for review, as an opt-in switch, off by default.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7167501017 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7167501017). Originally posted by [Chipsraine](https://github.com/Chipsraine) on 2026-11-25T15:59:55Z. --- @xunbreakablex thank you — A-B-A-B at 480 s on a 4070 with the same CPU class is the cleanest measurement in this thread; I've put it at the top of the summary table in the description, next to the other reports. `VICTORY_SKIP_WC_COMPARE` is now marked unsafe in its comment and log line (`fef9592`), and with four independent `SKIP_WC_BACK` reports and no device loss I'm taking this out of draft for review, as an opt-in switch, off by default.
xunbreakablex commented 2026-11-25 17:08:02 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by xunbreakablex on 2026-11-25T16:28:45Z.


One more caveat on the speed numbers above (AI-assisted, Claude): on this machine the first game run after each new build looks systematically slow. In two separate chains the first run of the default arm came out at 195.8 and 195.4 ms, while the later default runs of the same binaries were 172.1, 160.1 and 159.0 ms. Both of my comparisons started with such a first run, so the "about 18%" is inflated; against the later default runs the SKIP_WC_BACK=1 gain is closer to 5%. The picture finding (grey stepped patches in 2 of 3 runs with the switch, none without) is unaffected by this.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7168045873 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7168045873). Originally posted by [xunbreakablex](https://github.com/xunbreakablex) on 2026-11-25T16:28:45Z. --- One more caveat on the speed numbers above (AI-assisted, Claude): on this machine the first game run after each new build looks systematically slow. In two separate chains the first run of the default arm came out at 195.8 and 195.4 ms, while the later default runs of the same binaries were 172.1, 160.1 and 159.0 ms. Both of my comparisons started with such a first run, so the "about 18%" is inflated; against the later default runs the `SKIP_WC_BACK=1` gain is closer to 5%. The picture finding (grey stepped patches in 2 of 3 runs with the switch, none without) is unaffected by this.
xunbreakablex commented 2026-11-25 18:05:10 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by xunbreakablex on 2026-11-25T17:08:17Z.


@Chipsraine thanks. Before it goes in on my numbers, please see my two follow-ups just above yours: (1) two of my three SKIP_WC_BACK=1 runs showed light-grey stepped rectangular patches in the lower part of the cell-window shot (one also cyan specks at the right edge), and neither run without the switch did — same binary, same capture method; (2) my first default run was a first-run-after-build outlier, so against the later default runs the gain here is nearer 5% than 18%. Your draw-binned 11-13% from long runs is the better speed number. The patches are 3 vs 2 runs on one machine, so not proof, but it is the failure your caveat describes, so it may be worth a look in your own captures of that shot (around the bottom fifth of the screen, beside and below the character) before review. (AI-assisted, Claude.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7169060463 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7169060463). Originally posted by [xunbreakablex](https://github.com/xunbreakablex) on 2026-11-25T17:08:17Z. --- @Chipsraine thanks. Before it goes in on my numbers, please see my two follow-ups just above yours: (1) **two of my three `SKIP_WC_BACK=1` runs showed light-grey stepped rectangular patches in the lower part of the cell-window shot (one also cyan specks at the right edge), and neither run without the switch did** — same binary, same capture method; (2) my first default run was a first-run-after-build outlier, so against the later default runs the gain here is nearer 5% than 18%. Your draw-binned 11-13% from long runs is the better speed number. The patches are 3 vs 2 runs on one machine, so not proof, but it is the failure your caveat describes, so it may be worth a look in your own captures of that shot (around the bottom fifth of the screen, beside and below the character) before review. (AI-assisted, Claude.)
xunbreakablex commented 2026-11-25 18:05:12 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by xunbreakablex on 2026-11-25T17:29:19Z.


@Chipsraine a further correction, in your favour: I can no longer attribute the grey stepped patches to SKIP_WC_BACK. On 465b94f (no #868 in that binary at all) I ran five more captures of the same cell-window shot with the default speed set and with JOIN_PARTS/BACK_OWN_VIEW/INDIRECT_GATHER, and the same kind of light-grey stepped blocks with cyan specks in the lower part of the frame show up in a run without any of these switches (and in some of the others), at random. So my earlier "2 of 3 with the switch, 0 of 2 without" split was most likely the run-to-run randomness the README mentions, not this PR. Sorry for the noise; the speed numbers in my last note stand (gain nearer 5% than 18% on my machine, your long-run 11-13% is the better figure). (AI-assisted, Claude.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7169574807 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7169574807). Originally posted by [xunbreakablex](https://github.com/xunbreakablex) on 2026-11-25T17:29:19Z. --- @Chipsraine a further correction, in your favour: I can no longer attribute the grey stepped patches to `SKIP_WC_BACK`. On `465b94f` (no #868 in that binary at all) I ran five more captures of the same cell-window shot with the default speed set and with `JOIN_PARTS`/`BACK_OWN_VIEW`/`INDIRECT_GATHER`, and the same kind of light-grey stepped blocks with cyan specks in the lower part of the frame show up in a run **without** any of these switches (and in some of the others), at random. So my earlier "2 of 3 with the switch, 0 of 2 without" split was most likely the run-to-run randomness the README mentions, not this PR. Sorry for the noise; the speed numbers in my last note stand (gain nearer 5% than 18% on my machine, your long-run 11-13% is the better figure). (AI-assisted, Claude.)
Ym1r1710 commented 2026-11-25 19:09:45 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Ym1r1710 on 2026-11-25T18:16:56Z.


Did the run you asked for, SKIP_WC_BACK=1 alone (no COMPARE), on the current head merged into my tree (ca8829f + #1043), RTX 5080 + 7800X3D, Win11. Base switches RELAY=2, QUEUE2, ASYNC_SUBMIT, INDIRECT_WINDOW, TEXTURE_NO_WAIT, COPY_PLAIN.

Three runs to world+800 on the same binary: one with DRED armed (no removal, no warnings), then without DRED with and without the switch. With it: 105 ms median, copy-back ~11 ms. Without: 116.8 ms, copy-back ~49 ms. So about 10% here, close to your draw-binned number.

Looked at the captures at world+250, +400 and +800 next to the control run: same picture, no grey blocks or specks. Only the first cell scene though, I haven't played further with it yet. Keeping it on in my build for now.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7170693891 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7170693891). Originally posted by [Ym1r1710](https://github.com/Ym1r1710) on 2026-11-25T18:16:56Z. --- Did the run you asked for, SKIP_WC_BACK=1 alone (no COMPARE), on the current head merged into my tree (ca8829f + #1043), RTX 5080 + 7800X3D, Win11. Base switches RELAY=2, QUEUE2, ASYNC_SUBMIT, INDIRECT_WINDOW, TEXTURE_NO_WAIT, COPY_PLAIN. Three runs to world+800 on the same binary: one with DRED armed (no removal, no warnings), then without DRED with and without the switch. With it: 105 ms median, copy-back ~11 ms. Without: 116.8 ms, copy-back ~49 ms. So about 10% here, close to your draw-binned number. Looked at the captures at world+250, +400 and +800 next to the control run: same picture, no grey blocks or specks. Only the first cell scene though, I haven't played further with it yet. Keeping it on in my build for now.
Exopus-0x65f7ad0 commented 2026-11-25 20:09:29 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Exopus-0x65f7ad0 on 2026-11-25T19:43:28Z.


Tested on RTX 5060 Ti 8 GB, 16 GB RAM, Windows 11. The base was fork main d510ee4 plus #911/#1006/#1014/#1043/#1058/#1059/#1067/#1007/#188, Series S, with VICTORY_SKIP_WC_BACK=1 only (not SKIP_WC_COMPARE). Copy-back fell from 63 to 5 MB per frame and the frame line's "copying back" from ~100 to ~20 ms. No visible defect in the first room or the cutscenes, and no device loss over 4 runs of 8-10 min. First room, standing: median 8.6 fps.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:comment:7172682440 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7172682440). Originally posted by [Exopus-0x65f7ad0](https://github.com/Exopus-0x65f7ad0) on 2026-11-25T19:43:28Z. --- Tested on RTX 5060 Ti 8 GB, 16 GB RAM, Windows 11. The base was fork `main` d510ee4 plus #911/#1006/#1014/#1043/#1058/#1059/#1067/#1007/#188, Series S, with `VICTORY_SKIP_WC_BACK=1` only (not `SKIP_WC_COMPARE`). Copy-back fell from 63 to 5 MB per frame and the frame line's "copying back" from ~100 to ~20 ms. No visible defect in the first room or the cutscenes, and no device loss over 4 runs of 8-10 min. First room, standing: median 8.6 fps. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
HLVM04 commented 2026-11-25 21:05:56 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HLVM04 on 2026-11-25T20:57:15Z.


A Series S data point on an RTX 5070 Ti (Ryzen 7 9800X3D, Windows 11 build 26200), first gameplay scene, on our own stack: an older fork main plus several open PRs and local changes, including the 2 MiB section patch from #1089. VICTORY_SKIP_WC_BACK=1 only, not SKIP_WC_COMPARE:

without SKIP_WC_BACK=1
copy-back per frame 18 ms 2 ms
median frame 73 ms 71–72 ms
  • No crash or device loss in 2 runs of 200 s with the switch, and nothing visibly broken compared with the run without it (see the correction below).
  • So on this stack, 16 ms less copy-back gave only 1–2 ms on the median frame.

It's few runs in one scene, so read the frame-time difference as small, not as measured exactly.

Edit (2026-11-26), correction: on our stack VICTORY_SKIP_WC_BACK=1 does break the picture: the room's lamp light goes missing and rooms render dark. Our earlier runs were judged only by the character, not by the room lighting, so the "nothing visibly broken" above was wrong.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7174412852 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7174412852). Originally posted by [HLVM04](https://github.com/HLVM04) on 2026-11-25T20:57:15Z. --- A Series S data point on an RTX 5070 Ti (Ryzen 7 9800X3D, Windows 11 build 26200), first gameplay scene, on our own stack: an older fork main plus several open PRs and local changes, including the 2 MiB section patch from #1089. `VICTORY_SKIP_WC_BACK=1` only, not `SKIP_WC_COMPARE`: | | without | `SKIP_WC_BACK=1` | |---|---:|---:| | copy-back per frame | 18 ms | 2 ms | | median frame | 73 ms | 71–72 ms | - No crash or device loss in 2 runs of 200 s with the switch, ~~and nothing visibly broken compared with the run without it~~ (see the correction below). - So on this stack, 16 ms less copy-back gave only 1–2 ms on the median frame. It's few runs in one scene, so read the frame-time difference as small, not as measured exactly. **Edit (2026-11-26), correction:** on our stack `VICTORY_SKIP_WC_BACK=1` does break the picture: the room's lamp light goes missing and rooms render dark. Our earlier runs were judged only by the character, not by the room lighting, so the "nothing visibly broken" above was wrong.
milesah3ad commented 2026-11-26 05:05:55 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by milesah3ad on 2026-11-26T05:03:16Z.


@Chipsraine a data point from a setup that isn't in this thread yet: RTX 5080 without ASYNC_SUBMIT / QUEUE2 (every 5080 report above has them on), and the PR on current main.

Tree. This PR (fef9592) merged onto main 988aa41: milesah3ad:pr868-on-988aa41 (c686ab8). The only conflict was in host.rs, against main's three-step send-and-hash: I kept main's version and added this PR's census::sent(...) call before synced.push. Builds; cargo test -p victory-gpu 206 passed; clippy clean. Feel free to take the merge if it saves you a rebase.

Machine. RTX 5080 16 GB (driver 621.24, 32-lane), Ryzen 7 9800X3D, 64 GB, Windows 11 26300, Series X profile, release build with diagnostics. Settings in every run: RELAY=1 TEXTURE_BACK=1 TEXTURE_NO_WAIT=1 COPY_PLAIN=1 JOIN_COPIES=1 CARD_REHASH_RUNS=1 LEVELS_ON_DEMAND=1 D3D12_DRED=faults. The only difference between arms is VICTORY_SKIP_WC_BACK=1 (not SKIP_WC_COMPARE).

Runs. A-B-A-B, same binary, 10 minutes each from launch, scripted Enter from the same prologue save (world after 60-120 s). Steady world frames only (≥1,000 draws, no pipelines being made), medians:

run copy-back copied back / frame usual frame fps at 4-6k draws
1 off (first run after the build) 178 ms 67 MB 234 ms 4.4
2 SKIP_WC_BACK=1 91 ms 5 MB 181 ms 5.5
3 off 172 ms 46 MB 233 ms 4.3
4 SKIP_WC_BACK=1 96 ms 4 MB 212 ms 5.3

So on this machine: copy-back about −45 %, the usual frame −9 to −22 %, about +22 % fps at 4-6k draws. No device removal in any of the four runs. In two screenshots from run 4 (the cell door with the guard, the common room) there are no grey stepped blocks or specks; the scripted input carried the runs to different scenes, so I don't have same-frame comparisons. Two pairs on one machine, so take the size of the gain as approximate.

AI-assisted (Claude Code); the numbers are from the run logs.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7183138289 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7183138289). Originally posted by [milesah3ad](https://github.com/milesah3ad) on 2026-11-26T05:03:16Z. --- @Chipsraine a data point from a setup that isn't in this thread yet: RTX 5080 **without** `ASYNC_SUBMIT` / `QUEUE2` (every 5080 report above has them on), and the PR on current main. **Tree.** This PR (`fef9592`) merged onto `main` `988aa41`: [milesah3ad:pr868-on-988aa41](https://github.com/milesah3ad/victory-fork/tree/pr868-on-988aa41) (`c686ab8`). The only conflict was in `host.rs`, against main's three-step send-and-hash: I kept main's version and added this PR's `census::sent(...)` call before `synced.push`. Builds; `cargo test -p victory-gpu` 206 passed; clippy clean. Feel free to take the merge if it saves you a rebase. **Machine.** RTX 5080 16 GB (driver 621.24, 32-lane), Ryzen 7 9800X3D, 64 GB, Windows 11 26300, Series X profile, release build with `diagnostics`. Settings in every run: `RELAY=1 TEXTURE_BACK=1 TEXTURE_NO_WAIT=1 COPY_PLAIN=1 JOIN_COPIES=1 CARD_REHASH_RUNS=1 LEVELS_ON_DEMAND=1 D3D12_DRED=faults`. The only difference between arms is `VICTORY_SKIP_WC_BACK=1` (not `SKIP_WC_COMPARE`). **Runs.** A-B-A-B, same binary, 10 minutes each from launch, scripted Enter from the same prologue save (world after 60-120 s). Steady world frames only (≥1,000 draws, no pipelines being made), medians: | run | copy-back | copied back / frame | usual frame | fps at 4-6k draws | |---|---:|---:|---:|---:| | 1 off (first run after the build) | 178 ms | 67 MB | 234 ms | 4.4 | | 2 `SKIP_WC_BACK=1` | 91 ms | 5 MB | 181 ms | 5.5 | | 3 off | 172 ms | 46 MB | 233 ms | 4.3 | | 4 `SKIP_WC_BACK=1` | 96 ms | 4 MB | 212 ms | 5.3 | So on this machine: copy-back about −45 %, the usual frame −9 to −22 %, about +22 % fps at 4-6k draws. No device removal in any of the four runs. In two screenshots from run 4 (the cell door with the guard, the common room) there are no grey stepped blocks or specks; the scripted input carried the runs to different scenes, so I don't have same-frame comparisons. Two pairs on one machine, so take the size of the gain as approximate. *AI-assisted (Claude Code); the numbers are from the run logs.*
KyleS98 commented 2026-11-26 23:07:48 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by KyleS98 on 2026-11-26T23:07:48Z.


A data point for VICTORY_SKIP_WC_BACK=1 on an RTX 3090 Ti (Ryzen 9 9950X3D, Windows 11), cherry-picked onto #994's head + #911, Series S profile, ray-tracing resolve shaders skipped, small buffers on the card (VICTORY_CARD_BUFFERS_MIN_KB=64), prologue cell, hands-off, one 6-minute run each way.

With small buffers on the card I added the size gate that #1268 and #1379 found necessary (copies under 1 MiB are left alone; 94b43cb, VICTORY_SKIP_WC_MIN_KB, default 1024), so the numbers are for the gated form:

off SKIP_WC_BACK=1
frame 73 ms 67 ms
copying back 15 ms, 34 MB a frame 5 ms, 5.5 MB
sent up to the card 98 MB a frame 68 MB

The picture in the cell is the same in both (hair, the window, the walls; I compared four frames of each side by side), and with the room lamp caution from #1268 in mind: the cell's lighting did not change here, with the gate. No device loss in about a dozen further runs with it on.

VICTORY_SKIP_WC_COMPARE=1 (gated the same way) did not move the frame on this card: pieces compared 10,769 → 4,136 a frame, compare passes 388 → 338, frame unchanged. I leave it off.

Numbers and text only. AI-assisted (Claude Code, Claude Fable 5.2).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7205279429 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7205279429). Originally posted by [KyleS98](https://github.com/KyleS98) on 2026-11-26T23:07:48Z. --- A data point for `VICTORY_SKIP_WC_BACK=1` on an RTX 3090 Ti (Ryzen 9 9950X3D, Windows 11), cherry-picked onto #994's head + #911, Series S profile, ray-tracing resolve shaders skipped, small buffers on the card (`VICTORY_CARD_BUFFERS_MIN_KB=64`), prologue cell, hands-off, one 6-minute run each way. With small buffers on the card I added the size gate that #1268 and #1379 found necessary (copies under 1 MiB are left alone; [94b43cb](https://github.com/KyleS98/VIctory-Neo/commit/94b43cb), `VICTORY_SKIP_WC_MIN_KB`, default 1024), so the numbers are for the gated form: | | off | `SKIP_WC_BACK=1` | |---|---|---| | frame | 73 ms | 67 ms | | copying back | 15 ms, 34 MB a frame | 5 ms, 5.5 MB | | sent up to the card | 98 MB a frame | 68 MB | The picture in the cell is the same in both (hair, the window, the walls; I compared four frames of each side by side), and with the room lamp caution from #1268 in mind: the cell's lighting did not change here, with the gate. No device loss in about a dozen further runs with it on. `VICTORY_SKIP_WC_COMPARE=1` (gated the same way) did not move the frame on this card: pieces compared 10,769 → 4,136 a frame, compare passes 388 → 338, frame unchanged. I leave it off. Numbers and text only. AI-assisted (Claude Code, Claude Fable 5.2).
brunofgmag commented 2026-11-27 12:04:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by brunofgmag on 2026-11-27T12:04:54Z.


Measurements on an RTX 4080 (Ada) with a Ryzen 9 9950X3D, under Proton on Linux, Series X profile, in the prologue. The tree is a fork of victory-fork with this PR's skip ported in: the reservation flags are kept from XMemVirtualAlloc, a piece is skipped only when it lies inside one write-combining reservation, and Zignixx's VICTORY_SKIP_WC_BACK_MIN_KB defaults to 1024. Two runs each, warm caches, all other switches the same.

In the cell (75 s on) a frame took 78-79 ms without the skip and 66.8-68.5 ms with it; p90 went from 111 to 96 ms. In the opening cutscene (first 60 s) it went from 109-118 ms to 96-99 ms. On the submitting thread, copy-back fell from about 33 ms to 6 ms a frame and preparing from 52.7 ms to 37-38 ms. About 86 MB a frame of write-combining pieces stay on the card, and about 14 MB are still fetched.

Draws per frame stayed at about 5,050, and the captured frames of the cell match the run without the switch. With MIN_KB=256 and with MIN_KB=64 (every copy) draws also stayed at about 5,030 and the picture matched here, unlike what Zignixx saw on the 5080. Frame times were within run-to-run noise of 1024, so we kept 1024.

Thanks to everyone in this PR, and to Zignixx for the size threshold.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7217816369 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/868#issuecomment-7217816369). Originally posted by [brunofgmag](https://github.com/brunofgmag) on 2026-11-27T12:04:54Z. --- Measurements on an RTX 4080 (Ada) with a Ryzen 9 9950X3D, under Proton on Linux, Series X profile, in the prologue. The tree is a fork of victory-fork with this PR's skip ported in: the reservation flags are kept from XMemVirtualAlloc, a piece is skipped only when it lies inside one write-combining reservation, and Zignixx's VICTORY_SKIP_WC_BACK_MIN_KB defaults to 1024. Two runs each, warm caches, all other switches the same. In the cell (75 s on) a frame took 78-79 ms without the skip and 66.8-68.5 ms with it; p90 went from 111 to 96 ms. In the opening cutscene (first 60 s) it went from 109-118 ms to 96-99 ms. On the submitting thread, copy-back fell from about 33 ms to 6 ms a frame and preparing from 52.7 ms to 37-38 ms. About 86 MB a frame of write-combining pieces stay on the card, and about 14 MB are still fetched. Draws per frame stayed at about 5,050, and the captured frames of the cell match the run without the switch. With MIN_KB=256 and with MIN_KB=64 (every copy) draws also stayed at about 5,030 and the picture matched here, unlike what Zignixx saw on the 5080. Frame times were within run-to-run noise of 1024, so we kept 1024. Thanks to everyone in this PR, and to Zignixx for the size threshold.

Pull request closed

Sign in to join this conversation.
No reviewers
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
fxceless/victory-fork!867
No description provided.