Sends: snapshot only near the title's own buffer copies (VICTORY_SEND_OWN_COPIED, opt-in; RTX 3080 21.1 → 21.8 fps), with refresh and send diagnostics #3726
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3726"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by remijn on 2026-11-30T05:02:12Z.
Summary
Two changes to how the bytes a submission changed reach host copies in the card's memory, plus the diagnostics used to find where that time goes. No defaults change: the new behaviour is opt-in (
VICTORY_SEND_OWN_COPIED=1) and the diagnostics are off unless set.On an RTX 3080 (Series S, the same save, 60 s measured per run), turning it on took the median from 21.1 to 21.8 fps, preparing a frame from 35.1 to 32.9 ms, and p99 from 84 to 82 ms.
VICTORY_SEND_OWN_COPIED=1: a snapshot only where it's neededEach submission's sends to copies in the card's memory are first copied into memory of the submission's own (
VICTORY_SEND_OWN, on by default), so that a later submission's preparation can't change those bytes before the card copies them up. The module's own notes say what that protects: the title's buffer copies, which we perform when a submission is prepared. "A value to a buffer, a draw that reads it", repeated in the next submission with another value, would otherwise have the first draw read the second value. What the title's CPU writes, it doesn't write while the card still reads it, as on the console.With the switch on:
defer_copy) are recorded, and kept for 8 frames.VICTORY_SEND_OWN=0does.Measured on the 3080, per frame: taking the sends into the snapshot fell from 2.8 to 1.9 ms. For comparison,
VICTORY_SEND_OWN=0(no snapshot at all, including for the title's copies, which isn't safe) took preparing down 4 ms in a 30 s A/B.card_recordalso sizes its range lists once instead of growing them push by push.Why opt-in: it relies on the assumption that the CPU doesn't rewrite memory the GPU is still reading. If some title does, those bytes could reach the card one submission late. It has run on one PC.
Diagnostics (off by default, diagnostics builds)
VICTORY_REFRESH_KINDS=1VICTORY_SEND_RUNS=1card_record)What they showed on the 3080:
card_recordare where that step's time goes.Tested
cargo checkwith and withoutdiagnostics.victory-gputests for sends, host copies and the compare (124 pass).Measured
RTX 3080 10 GB, 32 GB RAM, Series S profile, DLSS Quality, FSR 3 frame generation (rendered frames counted), ray tracing off,
play-foxhound.ps1's switches; the same save, 15 s warm-up then 60 s:VICTORY_SEND_OWN_COPIED🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ColorC on 2026-11-30T08:58:49Z.
Independent cross-validation on RTX 5070 Ti + Ryzen 7 9800X3D (Series X 1440p, DLSS Quality + 3x MFG), via same-binary toggle A/B (
VICTORY_SEND_OWN_COPIED=1vs0) at ~10,250 draws/frame:copies in card's memoryVICTORY_SEND_OWN_COPIED=0VICTORY_SEND_OWN_COPIED=1Takeaway
VICTORY_SUBMIT_SPLIT=1+VICTORY_LAZY_COMPARE_MB=64+VICTORY_REFLEX_ASIDE=1,VICTORY_SEND_OWN_COPIED=1still delivered a clean-2.6 msdrop in submitting-thread card-copy work,+0.78 FPS(-1.0 msframe time), and-698 MBlower peak VRAM with zero visual issues or errors across 8+ minutes of walking tests.Test Setup
--res 1440 --dlss quality --framegen 3 --fps 1000)-C target-cpu=znver5) rebased onmain(41adb551) with a curated local PR stack; all A/B numbers below are same-binary toggle ablations from the exact same restored save (~10.0k–10.4k draws/frame standing scene) after official 1-time warmup.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by shurhundo on 2026-12-01T02:48:41Z.
copied_lately()is only ever populated bynote_copied(), whichdefer_copy()calls for the title's explicit CopyBufferRegion path (host.rs:10840/10847). The ordinary write-watch refresh path (update_free_inner→copy_stale,shadow.rs:6425-6442) also writes fresh title bytes intoself.datafor the same submissions, but never callsnote_copied. So a range dirtied by a plain CPU store rather than an explicit buffer copy won't be flagged "copied lately" and takes the new unprotected direct-CPU-read path underVICTORY_SEND_OWN_COPIED=1, even though it's exposed to the same CPU-write-while-GPU-reads raceown()exists to guard against. Is that an intentional scope limit (buffer-copy writes specifically are the hazard, not all title writes), or a gap? TheCOPIED_FRAMEScomment about submissions still in the air when this fires reads like the latter is possible.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:49:26Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed