Relay capture: the compare captures what changed in the flight's own submission (VICTORY_LAND_CAPTURE, opt-in) #3498

Manually merged
github merged 1 commit from github-bot/gh-3498 into gh-pr/3498/base 2026-11-30 14:16:37 +00:00 AGit
Owner

@⁠remijn on GitHub · 2026-11-30 00:03 UTC · original
remijn:relay-land-capture → main · +641 −36 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC

Summary

Opt-in VICTORY_LAND_CAPTURE=1. With the relay at stage 2 (the default whenever VICTORY_RELAY is unset), the compare copies every piece it finds changed into slots of the plan, in the flight's own submission. The relay then merges them from there, instead of waiting for the compare and fetching them with a second list. Pieces past the plan's slots (VICTORY_LAND_CAPTURE_MB, 128 MB by default) are fetched as before.

Defaults: unchanged. The relay is already on by default (see ef1f8ed0), so capture's only precondition is met; it's opt-in until it has been tested on more PCs.

Measured

RTX 3080, Series S profile, no DLSS or frame generation, play-foxhound.ps1's settings, diagnostics build, the same save, 40 s after a 20 s warm-up, one run each:

fps copying back 1 % low p99 frame
defaults 18.3 15.7 ms 8.8 113 ms
+ capture 17.8 13.9 ms 9.6 104 ms

Capture takes about 2 ms a frame off "copying back" and improves the frame-time tail; the median fps doesn't change (within noise). On the branch it was developed on, the relay's fetch waits went from 34–38 ms a frame to 0, and the 90th-percentile frame from 94–139 ms to 75–82 ms.

Trade-offs

  • With capture on, plans with slots are compared in single passes, because the batched compare doesn't capture. That made no measurable difference on the 3080, but it hasn't been tested on other cards.

Tested

cargo check with and without diagnostics. Tests: capture_slots_are_never_taken_twice, warp_card_compare_captures_what_differs_into_the_plans_slots, and hardware_card_compare_captures_what_differs_into_the_plans_slots on the RTX 3080.

Please test: A/B the same scene without and with VICTORY_LAND_CAPTURE=1, especially on cards where the batched compare is a large share of the frame, and check that characters' faces and skin are correct. If it holds up, a follow-up can make it the default.

Replaces part of #3446.

🤖 Generated with Claude Code

**@⁠remijn** on GitHub · 2026-11-30 00:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3498) `remijn:relay-land-capture` → `main` · +641 −36 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC ## Summary Opt-in `VICTORY_LAND_CAPTURE=1`. With the relay at stage 2 (the default whenever `VICTORY_RELAY` is unset), the compare copies every piece it finds changed into slots of the plan, in the flight's own submission. The relay then merges them from there, instead of waiting for the compare and fetching them with a second list. Pieces past the plan's slots (`VICTORY_LAND_CAPTURE_MB`, 128 MB by default) are fetched as before. **Defaults:** unchanged. The relay is already on by default (see ef1f8ed0), so capture's only precondition is met; it's opt-in until it has been tested on more PCs. ## Measured RTX 3080, Series S profile, no DLSS or frame generation, `play-foxhound.ps1`'s settings, diagnostics build, the same save, 40 s after a 20 s warm-up, one run each: | | fps | copying back | 1 % low | p99 frame | |---|---|---|---|---| | defaults | 18.3 | 15.7 ms | 8.8 | 113 ms | | + capture | 17.8 | 13.9 ms | 9.6 | 104 ms | Capture takes about 2 ms a frame off "copying back" and improves the frame-time tail; the median fps doesn't change (within noise). On the branch it was developed on, the relay's fetch waits went from 34–38 ms a frame to 0, and the 90th-percentile frame from 94–139 ms to 75–82 ms. ## Trade-offs - With capture on, plans with slots are compared in single passes, because the batched compare doesn't capture. That made no measurable difference on the 3080, but it hasn't been tested on other cards. ## Tested `cargo check` with and without `diagnostics`. Tests: `capture_slots_are_never_taken_twice`, `warp_card_compare_captures_what_differs_into_the_plans_slots`, and `hardware_card_compare_captures_what_differs_into_the_plans_slots` on the RTX 3080. **Please test:** A/B the same scene without and with `VICTORY_LAND_CAPTURE=1`, especially on cards where the batched compare is a large share of the frame, and check that characters' faces and skin are correct. If it holds up, a follow-up can make it the default. Replaces part of #3446. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With the relay (VICTORY_RELAY=2), the compare of a flight's ranges also
copies each piece it finds differing into a slot of the plan's, in the
same submission, and the thread that lands merges those pieces without a
fetch. Pieces past the plan's slots are fetched as before.

Why: the relay read the compare's results once the flight had run, then
fetched the flagged pieces with a list of its own: a second trip to the
card, which on the drawing queue ran behind everything sent meanwhile.
On an RTX 3080 (Belobug's nvidia-3080, relay on): the relay's fetch waits
34-38 -> 0 ms a frame, landing 44-50 -> 12-15 ms, median frame 70-75 ->
68-69 ms, p90 94-139 -> 75-82 ms. 128 MiB of PC memory
(VICTORY_LAND_CAPTURE_MB).

Here: the capture's buffers are CardShared's, its ring and counter
CardWork's; a plan with slots is compared in single passes (the batched
compare does not capture). Off by default, as the relay is in
play-foxhound.ps1. The compare tests set every root constant and
parameter (a card may drop a dispatch that leaves one out). Ported from
Belobug's a95dc90a.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 00:05:55 +00:00
github-bot changed target branch from main to gh-pr/3498/base 2026-11-30 14:15:06 +00:00
github manually merged commit 7addcfc7e4 into gh-pr/3498/base 2026-11-30 14:15:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!3498
No description provided.