The card compare hashes a piece with a group of 64 threads: our passes on the card from about 35 to about 10 ms a frame #1014

Manually merged
github merged 1 commit from gh-pr/1014/head into gh-pr/1014/base 2026-11-26 03:55:59 +00:00
Owner

@⁠martindevbr on GitHub · 2026-11-25 16:14 UTC · original
martindevbr:pr/card-hash-wide → main · +160 −6 · 2 files · 1 commits · merged 2026-11-25 23:02 UTC

Problem

The compare of copies in the card's memory (CARD_COMPARE in host.rs) gives each 64 KiB piece one thread, which walks it 16 bytes at a time: 4,096 loads one after the other. A pass takes the time of one piece however few pieces it has, and the card runs next to nothing else meanwhile. These passes run before every submission's lists (hashes after ranges are sent up: 300 to 450 a frame here) and after them (compares: about 100 a frame). The comment on rehash_runs already notes the per-pass cost; on a card that is the frame's limit it shows.

On an RTX 3060 12 GB, first rooms, with the frame-rate switches on, the card was about 85 % busy and the frame log's card meter gave our own lists about 35 ms of each frame (send-and-hash 22–29 ms, compare 12–14 ms). VICTORY_CARD_REHASH_RUNS=1 did not change that here.

Change

CARD_COMPARE_WIDE: one group of 64 threads per piece. Thread t hashes the 16-byte steps t, t + 64, t + 128… of the piece (neighbouring threads read neighbouring bytes, so the loads coalesce), and the first thread folds the 64 lane hashes in lane order into the piece's 16-byte hash. Same root signature, same constants, same outputs; only the dispatch changes (card_compare_groups: a group per piece). A copy is under 1 GiB (shadow::card_for), so a pass has at most 16,385 pieces, within one dispatch.

It is a different hash from the old one, so a process uses one form for every hash it stores and compares; the choice is made once. VICTORY_CARD_HASH_WIDE=0 keeps the thread-a-piece form.

Tests

  • warp_card_compare_stores_the_hash_it_made_when_told runs on both forms.
  • New warp_card_compare_finds_every_byte_with_skew: a copy that does not start on a piece boundary (skew), a span that does not start at piece 0; single bytes changed at offsets 0 to 65,535 of the pieces; each change is flagged in its own piece and nowhere else, and changing it back flags nothing — both forms.
  • cargo test -p victory-gpu card passes; clippy adds no warnings in the changed code.

Measured

RTX 3060 12 GB, Ryzen 5 5600GT, 32 GB, Windows 11; first rooms; VICTORY_TEXTURE_NO_WAIT, VICTORY_INDIRECT_WINDOW, VICTORY_ASYNC_SUBMIT, VICTORY_QUEUE2 and VICTORY_COPY_PLAIN on; four runs of 330 s (old, new, old, new — the second pair in reverse order); median of the frame log's usual-frame lines after the first third of each run:

thread a piece group a piece
our send-and-hash lists 22.3 / 29.4 ms 5.5 / 8.5 ms
our compare lists 11.9 / 13.6 ms 2.3 / 3.3 ms
usual frame 197 / 231 ms 163 / 183 ms

The title's own lists vary between runs with the scene (74 to 129 ms), so the frame's share of the gain is approximate; the card's time in our lists is not. Pieces fetched after the compare: 7.6 % and 8.1 % of those compared with the old form, 7.2 % and 7.3 % with the new one (the second pair compared as many pieces); captured frames at the same point of the first room look alike; no device loss.

**@⁠martindevbr** on GitHub · 2026-11-25 16:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014) `martindevbr:pr/card-hash-wide` → `main` · +160 −6 · 2 files · 1 commits · merged 2026-11-25 23:02 UTC ## Problem The compare of copies in the card's memory (`CARD_COMPARE` in `host.rs`) gives each 64 KiB piece one thread, which walks it 16 bytes at a time: 4,096 loads one after the other. A pass takes the time of one piece however few pieces it has, and the card runs next to nothing else meanwhile. These passes run before every submission's lists (hashes after ranges are sent up: 300 to 450 a frame here) and after them (compares: about 100 a frame). The comment on `rehash_runs` already notes the per-pass cost; on a card that is the frame's limit it shows. On an RTX 3060 12 GB, first rooms, with the frame-rate switches on, the card was about 85 % busy and the frame log's card meter gave our own lists about 35 ms of each frame (send-and-hash 22–29 ms, compare 12–14 ms). `VICTORY_CARD_REHASH_RUNS=1` did not change that here. ## Change `CARD_COMPARE_WIDE`: one group of 64 threads per piece. Thread *t* hashes the 16-byte steps *t*, *t* + 64, *t* + 128… of the piece (neighbouring threads read neighbouring bytes, so the loads coalesce), and the first thread folds the 64 lane hashes in lane order into the piece's 16-byte hash. Same root signature, same constants, same outputs; only the dispatch changes (`card_compare_groups`: a group per piece). A copy is under 1 GiB (`shadow::card_for`), so a pass has at most 16,385 pieces, within one dispatch. It is a different hash from the old one, so a process uses one form for every hash it stores and compares; the choice is made once. `VICTORY_CARD_HASH_WIDE=0` keeps the thread-a-piece form. ## Tests - `warp_card_compare_stores_the_hash_it_made_when_told` runs on both forms. - New `warp_card_compare_finds_every_byte_with_skew`: a copy that does not start on a piece boundary (`skew`), a span that does not start at piece 0; single bytes changed at offsets 0 to 65,535 of the pieces; each change is flagged in its own piece and nowhere else, and changing it back flags nothing — both forms. - `cargo test -p victory-gpu card` passes; clippy adds no warnings in the changed code. ## Measured RTX 3060 12 GB, Ryzen 5 5600GT, 32 GB, Windows 11; first rooms; `VICTORY_TEXTURE_NO_WAIT`, `VICTORY_INDIRECT_WINDOW`, `VICTORY_ASYNC_SUBMIT`, `VICTORY_QUEUE2` and `VICTORY_COPY_PLAIN` on; four runs of 330 s (old, new, old, new — the second pair in reverse order); median of the frame log's usual-frame lines after the first third of each run: | | thread a piece | group a piece | |---|---|---| | our send-and-hash lists | 22.3 / 29.4 ms | 5.5 / 8.5 ms | | our compare lists | 11.9 / 13.6 ms | 2.3 / 3.3 ms | | usual frame | 197 / 231 ms | 163 / 183 ms | The title's own lists vary between runs with the scene (74 to 129 ms), so the frame's share of the gain is approximate; the card's time in our lists is not. Pieces fetched after the compare: 7.6 % and 8.1 % of those compared with the old form, 7.2 % and 7.3 % with the new one (the second pair compared as many pieces); captured frames at the same point of the first room look alike; no device loss.
The compare of copies in the card's memory (`CARD_COMPARE`) gave each
64 KiB piece one thread, which walked it 16 bytes at a time, 4,096 loads
one after the other: a pass took the time of one piece however few pieces
it had, and the card ran next to nothing else meanwhile. The passes run
before every submission's lists (hashes after ranges are sent up, 300 to
450 a frame here) and after them (compares, about 100).

`CARD_COMPARE_WIDE` gives a piece a group: thread t hashes the 16-byte
steps t, t + 64, t + 128... (neighbouring threads read neighbouring
bytes) and the first thread folds the 64 lane hashes in lane order. It is
another hash, so a process uses one form for everything it stores and
compares: VICTORY_CARD_HASH_WIDE=0 keeps the thread a piece. A copy is
under 1 GiB, so a pass has at most 16,385 pieces, a group each, within
one dispatch.

Tests: the existing WARP test of the compare's modes runs both forms, and
a new one changes single bytes at offsets 0 to 65,535 of pieces of a copy
that does not start on a piece boundary, from a span that does not start
at piece 0: each change is flagged in its piece alone, in both forms.

Measured on an RTX 3060 12 GB (Ryzen 5 5600GT), first rooms, with
VICTORY_TEXTURE_NO_WAIT, VICTORY_INDIRECT_WINDOW, VICTORY_ASYNC_SUBMIT,
VICTORY_QUEUE2 and VICTORY_COPY_PLAIN on, four runs of 330 s, the median
of the frame log's usual-frame lines after the first third:

                         thread a piece     group a piece
  our send-and-hash lists  22.3 / 29.4 ms    5.5 / 8.5 ms
  our compare lists        11.9 / 13.6 ms    2.3 / 3.3 ms
  usual frame               197 / 231 ms     163 / 183 ms

The title's own lists differ between runs with the scene (74 to 129 ms),
so the frame's share of the gain is not exact; the card's time in our
lists is. Pieces fetched after the compare: 7.6 % and 8.1 % of those
compared with the old form, 7.2 % and 7.3 % with the new one (as many
compared in the second pair); no device loss.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:55:56 +00:00
github manually merged commit 5557224686 into gh-pr/1014/base 2026-11-26 03:55:59 +00:00
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-11-25 17:39 UTC · original

Tested in-game on Windows 10 Pro (22H2), Intel i5-13600K (6P+8E), RTX 4080 16 GB (driver 621.01, Series X profile), 420 s run in the prison cell scene (ca8829f + #1014 + #1015 + #1016 + #1029 + #1032 stacked, compared against our 600 s 465b94f run with the same base switches VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_COPY_PLAIN=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_JOIN_PARTS=1 VICTORY_BACK_OWN_VIEW=1 VICTORY_INDIRECT_GATHER=1 plus VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_GROUP_SYNC=2 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024).

metric 465b94f (thread/piece) stacked w/ #1014 (64-thread group)
send-and-hash ( ramelog usual / tail) 14.0 ms 2.5 ms (2.5-5.9 ms)
compare ( ramelog usual / tail) 5.6 ms 1.3 ms (1.3-3.1 ms)
waiting for card ( ramelog usual) 35.8 ms 22.6 ms
world median / mean / max 7.90 / 7.05 / 9.00 fps 8.50 / 8.31 / 9.80 fps

Zero artifacts beyond main's bottom mosaic strip and clean completion (exit 0). Note this was a stacked run with #1015/#1016/#1029/#1032 active as well.

AI-assisted (Gemini 4 Hydrogen).

**@⁠Proudnoob4** on GitHub · 2026-11-25 17:39 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7169815045) Tested in-game on Windows 10 Pro (22H2), Intel i5-13600K (6P+8E), RTX 4080 16 GB (driver 621.01, Series X profile), 420 s run in the prison cell scene (ca8829f + #1014 + #1015 + #1016 + #1029 + #1032 stacked, compared against our 600 s 465b94f run with the same base switches VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_COPY_PLAIN=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_JOIN_PARTS=1 VICTORY_BACK_OWN_VIEW=1 VICTORY_INDIRECT_GATHER=1 plus VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_GROUP_SYNC=2 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024). | metric | 465b94f (thread/piece) | stacked w/ #1014 (64-thread group) | |---|---|---| | send-and-hash ( ramelog usual / tail) | 14.0 ms | 2.5 ms (2.5-5.9 ms) | | compare ( ramelog usual / tail) | 5.6 ms | 1.3 ms (1.3-3.1 ms) | | waiting for card ( ramelog usual) | 35.8 ms | 22.6 ms | | world median / mean / max | 7.90 / 7.05 / 9.00 fps | 8.50 / 8.31 / 9.80 fps | Zero artifacts beyond main's bottom mosaic strip and clean completion (exit 0). Note this was a stacked run with #1015/#1016/#1029/#1032 active as well. AI-assisted (Gemini 4 Hydrogen).
Author
Owner

@⁠grosterr on GitHub · 2026-11-25 19:30 UTC · original

A second RTX 3060 12 GB, A/B in one build with only VICTORY_CARD_HASH_WIDE changed. It confirms your numbers.

Machine: RTX 3060 12 GB, Ryzen 7 5700X (8 cores / 16 threads), 32 GB, Windows 11, Series X profile.
Tree: fxceless main d510ee4 + this PR (5557224), on top of the #770 stack. Switches: LEVELS_ON_DEMAND EARLY_TEXTURES_MS=40 TEXTURE_NO_WAIT WIDE_TEXTURES ASYNC_SUBMIT QUEUE2 INDIRECT_WINDOW COPY_PLAIN JOIN_PARTS BACK_OWN_VIEW INDIRECT_GATHER, plus CARD_METER=1 FRAME_LOG=1. Same save, standing in the first room. Medians of the frame log's usual-frame lines from the first minute in the world on (48 and 75 lines):

CARD_HASH_WIDE=0 (thread a piece) =1 (group a piece)
our send-and-hash lists 28.9 ms 4.3 ms
our compare lists 8.5 ms 2.7 ms
all other lists 136 ms 124 ms
submit thread waiting for the card 120 ms 77 ms
usual frame 221 ms 174 ms
  • Our lists on the card: 37.4 → 7.0 ms a frame. That is close to your 35 → 10.
  • The frame moved by 47 ms, more than the 30 ms our lists lost. Part of that is the scene (the second run had fewer draws per frame), so take the frame figure as approximate and the list figures as the measurement.
  • Pieces fetched after the compare: 9.4 % and 10.1 % of those compared (the last 40 report lines of each run).
  • No device loss and no errors in either run.

AI-assisted (Claude Code); the runs and observations are mine.

**@⁠grosterr** on GitHub · 2026-11-25 19:30 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7172402732) A second RTX 3060 12 GB, A/B in one build with only `VICTORY_CARD_HASH_WIDE` changed. It confirms your numbers. **Machine:** RTX 3060 12 GB, Ryzen 7 5700X (8 cores / 16 threads), 32 GB, Windows 11, Series X profile. **Tree:** fxceless main `d510ee4` + this PR (`5557224`), on top of the #770 stack. **Switches:** `LEVELS_ON_DEMAND EARLY_TEXTURES_MS=40 TEXTURE_NO_WAIT WIDE_TEXTURES ASYNC_SUBMIT QUEUE2 INDIRECT_WINDOW COPY_PLAIN JOIN_PARTS BACK_OWN_VIEW INDIRECT_GATHER`, plus `CARD_METER=1 FRAME_LOG=1`. Same save, standing in the first room. Medians of the frame log's usual-frame lines from the first minute in the world on (48 and 75 lines): | | `CARD_HASH_WIDE=0` (thread a piece) | `=1` (group a piece) | |---|---|---| | our send-and-hash lists | 28.9 ms | **4.3 ms** | | our compare lists | 8.5 ms | **2.7 ms** | | all other lists | 136 ms | 124 ms | | submit thread waiting for the card | 120 ms | 77 ms | | usual frame | 221 ms | **174 ms** | - Our lists on the card: **37.4 → 7.0 ms a frame**. That is close to your 35 → 10. - The frame moved by 47 ms, more than the 30 ms our lists lost. Part of that is the scene (the second run had fewer draws per frame), so take the frame figure as approximate and the list figures as the measurement. - Pieces fetched after the compare: 9.4 % and 10.1 % of those compared (the last 40 report lines of each run). - No device loss and no errors in either run. AI-assisted (Claude Code); the runs and observations are mine.
Author
Owner

@⁠gmankab on GitHub · 2026-11-25 19:44 UTC · original · edited 2026-11-25 20:04 UTC

I tested the two card hash shaders on an RX 6800 with RADV 26.2.5 and VKD3D-Proton (build 2576c0b4adfae4a). GPU timestamp queries bracketed a single hash-store dispatch over initialized device-local data. Each variant got three warmups, then 15 alternating pairs at each size. Two independent runs gave these medians, in microseconds per dispatch.

64 KiB pieces Serial Wide
1 586.20 / 586.96 25.92 / 25.92
4 603.64 / 603.76 25.72 / 25.80
16 678.36 / 677.84 26.00 / 26.04
64 1,408.68 / 1,371.68 27.12 / 27.12

Both existing hash correctness tests exercised both shaders and passed on RX 6800 and Lavapipe. I directed the harness to the selected DXGI adapter because Proton's EnumWarpAdapter fallback can return an adapter without the software flag and silently skip the tests. The timings are for an isolated hash dispatch. Frame-time savings on AMD still need an in-game A/B.

Tested-on: RX 6800 and Lavapipe, Fedora Linux 45
Assisted-by: gpt-6.2 sol xhigh

In-game follow-up on RX 6800

I ran the same executable for 420 s with each hash mode, cloning the same prefix for each run. Both reached 3D work. Among logged long frames with at least 200 draws and a measured compare pass, GPU time divided by compare lists was 2.727 ms/list for serial (19 frames) and 0.221 ms/list for wide (63 frames).

The runs reached 3D at different times and had different draw counts (median 4,037 and 1,577). The game-level measurements therefore corroborate cheaper compare lists but do not isolate an FPS gain. The GPU idle counter still accounted for over 90% of the median logged frame in both runs.

**@⁠gmankab** on GitHub · 2026-11-25 19:44 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7172695962) · edited 2026-11-25 20:04 UTC I tested the two card hash shaders on an RX 6800 with RADV 26.2.5 and VKD3D-Proton (build `2576c0b4adfae4a`). GPU timestamp queries bracketed a single hash-store dispatch over initialized device-local data. Each variant got three warmups, then 15 alternating pairs at each size. Two independent runs gave these medians, in microseconds per dispatch. | 64 KiB pieces | Serial | Wide | | ---: | ---: | ---: | | 1 | 586.20 / 586.96 | 25.92 / 25.92 | | 4 | 603.64 / 603.76 | 25.72 / 25.80 | | 16 | 678.36 / 677.84 | 26.00 / 26.04 | | 64 | 1,408.68 / 1,371.68 | 27.12 / 27.12 | Both existing hash correctness tests exercised both shaders and passed on RX 6800 and Lavapipe. I directed the harness to the selected DXGI adapter because Proton's `EnumWarpAdapter` fallback can return an adapter without the software flag and silently skip the tests. The timings are for an isolated hash dispatch. Frame-time savings on AMD still need an in-game A/B. Tested-on: RX 6800 and Lavapipe, Fedora Linux 45 Assisted-by: gpt-6.2 sol xhigh ### In-game follow-up on RX 6800 I ran the same executable for 420 s with each hash mode, cloning the same prefix for each run. Both reached 3D work. Among logged long frames with at least 200 draws and a measured compare pass, GPU time divided by compare lists was 2.727 ms/list for serial (19 frames) and 0.221 ms/list for wide (63 frames). The runs reached 3D at different times and had different draw counts (median 4,037 and 1,577). The game-level measurements therefore corroborate cheaper compare lists but do not isolate an FPS gain. The GPU idle counter still accounted for over 90% of the median logged frame in both runs.
Author
Owner

@⁠wildheathen on GitHub · 2026-11-25 21:15 UTC · original

An RTX 5080 data point on Windows. I ran an A/B in one build, changing only VICTORY_CARD_HASH_WIDE, with two pairs in A-B-A-B order.

Machine: RTX 5080 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11, Series X profile.

Build: diagnostics build of ca8829f with this PR applied (clean apply), on top of other local changes. Those changes are #868 and a few streaming ones: a range remap lock like #95, page mappings in runs like #823 §3, placed host textures like #903, and staging buffers cut from shared upload buffers. They are the same in both halves of every pair.

Settings: VICTORY_JOIN_PARTS VICTORY_BACK_OWN_VIEW VICTORY_INDIRECT_GATHER VICTORY_CARD_REHASH_RUNS VICTORY_RELAY=2 VICTORY_SKIP_WC_BACK, DRED off, warm pipeline cache, 480 s per run with the same scripted Enter presses through the prologue.

Results: means of the frame log's usual-frame lines over the last ~3 minutes of each run, and the profiler's mean frame.

thread a piece (1 / 2) group a piece (1 / 2)
our send-and-hash lists 5.3 / 4.6 ms 0.5 / 0.6 ms
our compare lists 8.0 / 6.9 ms 0.8 / 0.8 ms
"on the GPU" (frame-rate line, world) 51 / 45 ms 31 / 26 ms
copying back (world) 64 / 61 ms 49 / 43 ms
profiler mean frame 120.2 / 115.8 ms 114.9 / 110.3 ms

The card's time in our own lists drops about tenfold here, as on the 3060. The whole-frame gain is small and within the scene-to-scene noise of these runs: the world-frame medians go either way between pairs. No device loss and no errors in the four runs.

**@⁠wildheathen** on GitHub · 2026-11-25 21:15 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7174823244) An RTX 5080 data point on Windows. I ran an A/B in one build, changing only `VICTORY_CARD_HASH_WIDE`, with two pairs in A-B-A-B order. **Machine:** RTX 5080 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11, Series X profile. **Build:** diagnostics build of `ca8829f` with this PR applied (clean apply), on top of other local changes. Those changes are #868 and a few streaming ones: a range remap lock like #95, page mappings in runs like #823 §3, placed host textures like #903, and staging buffers cut from shared upload buffers. They are the same in both halves of every pair. **Settings:** `VICTORY_JOIN_PARTS VICTORY_BACK_OWN_VIEW VICTORY_INDIRECT_GATHER VICTORY_CARD_REHASH_RUNS VICTORY_RELAY=2 VICTORY_SKIP_WC_BACK`, DRED off, warm pipeline cache, 480 s per run with the same scripted Enter presses through the prologue. **Results:** means of the frame log's usual-frame lines over the last ~3 minutes of each run, and the profiler's mean frame. | | thread a piece (1 / 2) | group a piece (1 / 2) | |---|---|---| | our send-and-hash lists | 5.3 / 4.6 ms | **0.5 / 0.6 ms** | | our compare lists | 8.0 / 6.9 ms | **0.8 / 0.8 ms** | | "on the GPU" (frame-rate line, world) | 51 / 45 ms | **31 / 26 ms** | | copying back (world) | 64 / 61 ms | **49 / 43 ms** | | profiler mean frame | 120.2 / 115.8 ms | **114.9 / 110.3 ms** | The card's time in our own lists drops about tenfold here, as on the 3060. The whole-frame gain is small and within the scene-to-scene noise of these runs: the world-frame medians go either way between pairs. No device loss and no errors in the four runs.
Author
Owner

@⁠iGoldenNinja on GitHub · 2026-11-25 21:43 UTC · original

RTX 5080 Series X comparison at the boat and prison cell. Thanks to Martin Hartfelder for 5557224. On an RTX 5080 / 617.14, Ryzen 9 5900X and Windows 11 Pro 25H2 build 26200.9974, six fresh launches used one renderer (a0bb6f9) and the same warm cache seed per scene. Only VICTORY_CARD_HASH_WIDE changed. The boat's two flotation copy-backs and tile-list repair were active in both modes.

  • Boat, serial/wide/wide/serial: The stationary helm measured 3.995 / 4.806 / 4.921 / 3.977 displayed FPS. Median GPU hash plus compare time was 48.0 / 6.5 / 6.4 / 48.2 ms. Moving FPS rose by 24.5% and 15.8% across the two pairs. Moving P99 improved in the first pair and worsened in the reverse pair. Both occupants stayed afloat and the boat left wakes in all four trials. The old black rectangles stayed away in the sampled views. A cloudy, smooth-water appearance in the first wide run did not repeat in the second. Weather and illumination were uncontrolled.
  • Prison, one serial-to-wide pair: 3.204 to 3.696 displayed FPS (+15.4%), 358.7 to 323.4 ms P99, and 50.1 to 8.6 ms GPU hash plus compare. Ten matched-camera images in each arm gave mean absolute RGB differences of 0.18–0.61/255 in the fixed wall, bunk and window regions.
  • Native changed-piece check: Both exact kernels matched 2,412 of 2,412 CPU bytewise decisions per mode on the physical RTX 5080, including clipped ends, overlapping rounded loads and a nonzero flag-buffer offset. Two WARP checks passed. Thanks to PR #992 for the shared-boundary case. All six launches ended deliberately and verified the protected profiles. There were no recorded driver resets.

In the archived moving windows, all 14 displayed gaps above 500 ms clustered between 27.6 and 37.2 seconds of throttle, with no further such gaps through the full 52-second input. The specific host wait remains open. The checks cover these two scenes and a synthetic native parity fixture. Pinned six-run report · Native and WARP test source

**@⁠iGoldenNinja** on GitHub · 2026-11-25 21:43 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7175448916) **RTX 5080 Series X comparison at the boat and prison cell.** Thanks to Martin Hartfelder for `5557224`. On an RTX 5080 / 617.14, Ryzen 9 5900X and Windows 11 Pro 25H2 build 26200.9974, six fresh launches used one renderer (`a0bb6f9`) and the same warm cache seed per scene. Only `VICTORY_CARD_HASH_WIDE` changed. The boat's two flotation copy-backs and tile-list repair were active in both modes. - **Boat, serial/wide/wide/serial:** The stationary helm measured **3.995 / 4.806 / 4.921 / 3.977 displayed FPS**. Median GPU hash plus compare time was **48.0 / 6.5 / 6.4 / 48.2 ms**. Moving FPS rose by 24.5% and 15.8% across the two pairs. Moving P99 improved in the first pair and worsened in the reverse pair. Both occupants stayed afloat and the boat left wakes in all four trials. The old black rectangles stayed away in the sampled views. A cloudy, smooth-water appearance in the first wide run did not repeat in the second. Weather and illumination were uncontrolled. - **Prison, one serial-to-wide pair:** **3.204 to 3.696 displayed FPS (+15.4%)**, **358.7 to 323.4 ms P99**, and **50.1 to 8.6 ms** GPU hash plus compare. Ten matched-camera images in each arm gave mean absolute RGB differences of **0.18–0.61/255** in the fixed wall, bunk and window regions. - **Native changed-piece check:** Both exact kernels matched **2,412 of 2,412** CPU bytewise decisions per mode on the physical RTX 5080, including clipped ends, overlapping rounded loads and a nonzero flag-buffer offset. Two WARP checks passed. Thanks to PR #992 for the shared-boundary case. All six launches ended deliberately and verified the protected profiles. There were no recorded driver resets. In the archived moving windows, all 14 displayed gaps above 500 ms clustered between 27.6 and 37.2 seconds of throttle, with no further such gaps through the full 52-second input. The specific host wait remains open. The checks cover these two scenes and a synthetic native parity fixture. [Pinned six-run report](https://github.com/iGoldenNinja/victory-fork/blob/86bedba0bea11c7a59d8ad92125a8440a0730977/docs/rtx5080-buffer-hash.md) · [Native and WARP test source](https://github.com/iGoldenNinja/victory-fork/commit/d17bf6e148c3d0780cb522e202cc915ce5f5d539)
Author
Owner

@⁠xunbreakablex on GitHub · 2026-11-25 22:08 UTC · original

Data point from a 6-core CPU with an NVIDIA card (AI-assisted, Claude; run on my machine): RTX 4070 (undervolted, 100 W limit), Ryzen 5 5600 at 3.95 GHz (6 cores), Windows 11, driver 621.01, Series X profile, 465b94f + this PR as VICTORY_CARD_HASH_WIDE=1 (off by default in my tree), diagnostics build, card meter on, one run each, steady window world +300..+480 s.

With the switch (together with three other switches in the same run, so the frame number below is for the package): our send-and-hash lists 26.4 → 4.5 ms and compare lists 12.2 → 3.8 ms per frame on the card meter, i.e. ~38 → ~8 ms, in line with your ~35 → ~10 ms. The frame went 162.5 → 144.9 ms for the whole package; the card's 'all other lists' (the title's) stayed at ~140 ms, so on this machine the gain in our own passes does not fully reach the frame. No device loss, no visible change in the cell-window shot. A run with this switch alone is queued.

**@⁠xunbreakablex** on GitHub · 2026-11-25 22:08 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7175989779) Data point from a 6-core CPU with an NVIDIA card (AI-assisted, Claude; run on my machine): RTX 4070 (undervolted, 100 W limit), Ryzen 5 5600 at 3.95 GHz (6 cores), Windows 11, driver 621.01, Series X profile, `465b94f` + this PR as `VICTORY_CARD_HASH_WIDE=1` (off by default in my tree), diagnostics build, card meter on, one run each, steady window world +300..+480 s. With the switch (together with three other switches in the same run, so the frame number below is for the package): our send-and-hash lists **26.4 → 4.5 ms** and compare lists **12.2 → 3.8 ms** per frame on the card meter, i.e. ~38 → ~8 ms, in line with your ~35 → ~10 ms. The frame went 162.5 → 144.9 ms for the whole package; the card's 'all other lists' (the title's) stayed at ~140 ms, so on this machine the gain in our own passes does not fully reach the frame. No device loss, no visible change in the cell-window shot. A run with this switch alone is queued.
Author
Owner

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

AI-assisted testing (Gemini in OpenCode); measured locally on my own machine.

RTX 4080 follow-up: #1014 + c36971b (VICTORY_CARD_BUFFERS_MIN_KB=64) drops Series X GPU title lists from 59.8 to 36.4 ms (-39%)

Setup: Windows 10 Pro 22H2 (Agility SDK 1.620.2), i5-13600K, 32 GB RAM, RTX 4080 16 GB (driver 621.01), Series X profile, diagnostics release build, warm cache, bundled stack (9c184b3 + #1014 + #1016 + #1029 + #1032 + #1044 + #1059 + #1097 + #1117 + #1138), switches VICTORY_ASYNC_SUBMIT=1 VICTORY_JOIN_PARTS=1 VICTORY_QUEUE2=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_INDIRECT_GATHER=1 VICTORY_COPY_PLAIN=1 VICTORY_MWAITX_SLEEP=1 VICTORY_CARD_BUFFERS_MIN_KB=64 VICTORY_CARD_BUFFERS_MB=1536 VICTORY_CARD_HASH_LEN=1.

In c36971b, shadow.rs noted that putting every buffer on the card (VICTORY_CARD_BUFFERS_MIN_KB=64) raised send-and-hash to 19.7 ms/frame without #1014. Pairing VICTORY_CARD_BUFFERS_MIN_KB=64 with #1014 (CARD_HASH_WIDE, on by default) removes that overhead on the RTX 4080:

Metric (framelog usual frame / cardmeter) Prior stack (ca8829f + #1014, MIN_MB=1, CARD_BUFFERS_MB=1024) 9c184b3 + #1014 (MIN_KB=64, CARD_BUFFERS_MB=1536, CARD_HASH_LEN=1)
Title buffers on card ≥1 MiB only 3,896 buffers (1,210 MB); 0 in PC RAM
CPU shader-write compare 28.8 MB/frame 0.0 MB/frame
send-and-hash lists (GPU) 4.1 ms (7 lists) 6.9 ms (6 lists) (vs 19.7 ms in run 275 without #1014)
compare lists (GPU) 1.5 ms (7 lists) 1.4 ms (6 lists)
Title's own lists (all other lists / cardmeter) 59.8 ms / 60.0 ms 36.4 ms / 42.0 ms (-39% / -30%)
Total GPU time (send-and-hash + compare + lists) 65.4 ms 44.7 ms (22.4 fps GPU ceiling; card 47% busy, 66.8 ms idle)

Important caveat (CARD_BUFFERS_MB cap): with VICTORY_CARD_BUFFERS_MIN_KB=64 and the default VICTORY_CARD_BUFFERS_MB=1024, 3,381 small 64 KiB buffers filled the entire 1024 MB cap (1025 MB used) and evicted 17 large ≥1 MiB buffers (151 MB) back to PC RAM (122.6 MB/frame CPU shader-write compare, GPU lists blew up to 129.5 ms). Raising VICTORY_CARD_BUFFERS_MB=1536 fit all 3,896 buffers (1,210 MB) on the card with zero eviction.

**@⁠Proudnoob4** on GitHub · 2026-11-25 22:13 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7176083982) *AI-assisted testing (Gemini in OpenCode); measured locally on my own machine.* ### RTX 4080 follow-up: `#1014` + `c36971b` (`VICTORY_CARD_BUFFERS_MIN_KB=64`) drops Series X GPU title lists from `59.8` to `36.4 ms` (-39%) **Setup:** Windows 10 Pro 22H2 (Agility SDK 1.620.2), i5-13600K, 32 GB RAM, RTX 4080 16 GB (driver 621.01), Series X profile, diagnostics release build, warm cache, bundled stack (`9c184b3` + `#1014` + `#1016` + `#1029` + `#1032` + `#1044` + `#1059` + `#1097` + `#1117` + `#1138`), switches `VICTORY_ASYNC_SUBMIT=1 VICTORY_JOIN_PARTS=1 VICTORY_QUEUE2=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_INDIRECT_GATHER=1 VICTORY_COPY_PLAIN=1 VICTORY_MWAITX_SLEEP=1 VICTORY_CARD_BUFFERS_MIN_KB=64 VICTORY_CARD_BUFFERS_MB=1536 VICTORY_CARD_HASH_LEN=1`. In `c36971b`, `shadow.rs` noted that putting every buffer on the card (`VICTORY_CARD_BUFFERS_MIN_KB=64`) raised `send-and-hash` to `19.7 ms/frame` without `#1014`. Pairing `VICTORY_CARD_BUFFERS_MIN_KB=64` with `#1014` (`CARD_HASH_WIDE`, on by default) removes that overhead on the RTX 4080: | Metric (`framelog` usual frame / `cardmeter`) | Prior stack (`ca8829f` + `#1014`, `MIN_MB=1`, `CARD_BUFFERS_MB=1024`) | `9c184b3` + `#1014` (`MIN_KB=64`, `CARD_BUFFERS_MB=1536`, `CARD_HASH_LEN=1`) | |---|---|---| | Title buffers on card | ≥1 MiB only | **3,896 buffers (1,210 MB)**; 0 in PC RAM | | CPU shader-write compare | `28.8 MB/frame` | **`0.0 MB/frame`** | | `send-and-hash` lists (GPU) | `4.1 ms` (7 lists) | **`6.9 ms` (6 lists)** *(vs `19.7 ms` in run 275 without `#1014`)* | | `compare` lists (GPU) | `1.5 ms` (7 lists) | **`1.4 ms` (6 lists)** | | Title's own lists (`all other lists` / `cardmeter`) | `59.8 ms` / `60.0 ms` | **`36.4 ms` / `42.0 ms`** (-39% / -30%) | | Total GPU time (`send-and-hash + compare + lists`) | `65.4 ms` | **`44.7 ms`** (`22.4 fps` GPU ceiling; card 47% busy, `66.8 ms` idle) | **Important caveat (`CARD_BUFFERS_MB` cap):** with `VICTORY_CARD_BUFFERS_MIN_KB=64` and the default `VICTORY_CARD_BUFFERS_MB=1024`, 3,381 small 64 KiB buffers filled the entire 1024 MB cap (`1025 MB` used) and evicted **17 large ≥1 MiB buffers (`151 MB`)** back to PC RAM (`122.6 MB/frame` CPU shader-write compare, GPU lists blew up to `129.5 ms`). Raising `VICTORY_CARD_BUFFERS_MB=1536` fit all 3,896 buffers (`1,210 MB`) on the card with zero eviction.
Author
Owner

@⁠Dathinel on GitHub · 2026-11-25 23:14 UTC · original

RTX 3050 Laptop (4 GB), synthetic D3D12 microbenchmark of the two CARD_COMPARE shaders in main 6d20eed. Both use the project compiler path (D3DCompile, cs_5_1, flags 0), device-local input and UAVs, and identical 64 KiB pieces. Both passed the same readback checks across 128 pieces: no flags on unchanged data, exactly piece 51 flagged after changing one byte, no flags on the next compare after mode 2 updated the stored hash.

Median GPU timestamp time in microseconds per compare dispatch (baseline / wide): 1 piece: 230.4 / 7.0; 8 pieces: 296.3 / 7.0; 32 pieces: 783.4 / 14.2; 128 pieces: 814.8 / 48.0. Seven timed rounds per size after one discarded round, alternating pipeline order, eight dispatches per sample with UAV barriers. Buffers were reused and warmed; recording, setup, transfers and CPU fence waits are outside the timestamps. The 64-thread group works on this 32-lane card. These measurements cover the compare kernel only; no frame-time, residency or visual result. AI-assisted.

**@⁠Dathinel** on GitHub · 2026-11-25 23:14 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7177295746) RTX 3050 Laptop (4 GB), synthetic D3D12 microbenchmark of the two CARD_COMPARE shaders in main 6d20eed. Both use the project compiler path (D3DCompile, cs_5_1, flags 0), device-local input and UAVs, and identical 64 KiB pieces. Both passed the same readback checks across 128 pieces: no flags on unchanged data, exactly piece 51 flagged after changing one byte, no flags on the next compare after mode 2 updated the stored hash. Median GPU timestamp time in microseconds per compare dispatch (baseline / wide): 1 piece: 230.4 / 7.0; 8 pieces: 296.3 / 7.0; 32 pieces: 783.4 / 14.2; 128 pieces: 814.8 / 48.0. Seven timed rounds per size after one discarded round, alternating pipeline order, eight dispatches per sample with UAV barriers. Buffers were reused and warmed; recording, setup, transfers and CPU fence waits are outside the timestamps. The 64-thread group works on this 32-lane card. These measurements cover the compare kernel only; no frame-time, residency or visual result. AI-assisted.
Author
Owner

@⁠xunbreakablex on GitHub · 2026-11-26 07:25 UTC · original

Correction to my comment above (AI-assisted, Claude): the frame numbers I gave for the package (162.5 -> 144.9 ms) were run-to-run drift; a base-set run today without any of the four switches came out at 143.6 ms. What stands is the card-meter drop of our own send-and-hash/compare lists with CARD_HASH_WIDE=1 (~38 -> ~8 ms per frame); I have not shown that it shortens the frame on this machine (RTX 4070 (undervolted), Ryzen 5 5600 at 3.95 GHz).

**@⁠xunbreakablex** on GitHub · 2026-11-26 07:25 UTC · [original](https://github.com/fxceless/victory-fork/pull/1014#issuecomment-7185447524) Correction to my comment above (AI-assisted, Claude): the frame numbers I gave for the package (162.5 -> 144.9 ms) were run-to-run drift; a base-set run today without any of the four switches came out at 143.6 ms. What stands is the card-meter drop of our own send-and-hash/compare lists with `CARD_HASH_WIDE=1` (~38 -> ~8 ms per frame); I have not shown that it shortens the frame on this machine (RTX 4070 (undervolted), Ryzen 5 5600 at 3.95 GHz).
This discussion has been locked. Commenting is limited to contributors.
No description provided.