Card-copy refreshes: GPU-side cost of whole-page uploads (6.6 ms/frame on the direct queue), and VICTORY_SEND_CHANGED made cheap by joining nearby runs #4751
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 plapha on 2026-12-01T04:54:07Z.
Setup. RTX 5060 8 GB (621.01), i5-14600KF, 32 GB, Windows 11. Series S profile, 540p internal, DLSS performance, frame generation off. Build: a local branch of
63b902fwith later PRs ported, release, fat LTO. Local placement change: windows are promoted to card memory by heat (2.8 GB of windows on the card), texture budget capped at 600 MB to make room. One fixed spot, about 7,300 draws/frame, three runs of 1–2 minutes each. Logs available on request.This adds data to #3713 and #4340 rather than reporting something new: that refreshes send written 64 KiB pages whole, and that
VICTORY_SEND_CHANGEDis off, is known.1. What the uploads cost on the card
One frame in Nsight GPU Trace (53.9 ms), actions on the direct queue, with the hardware counters averaged over each kind of action:
Per-command GPU timing (
VICTORY_GPU_TIMES) does not see these copies, so they are missing from the usual "GPU ms" figures: it gave 32 ms at this spot, the trace has the card busy for 40. #3713 measured the same volume (52–58 MB a frame) on the CPU side with default settings on a 4080 SUPER.2.
VICTORY_SEND_CHANGED=1as it is, and with nearby runs joinedSame build and spot, per frame:
SEND_CHANGED=1SEND_CHANGED=1+SEND_GAP=1024With the switch alone the bytes drop to a sixth, but every changed dword is a run of its own and the submitting thread pays for each.
3. The change
In
Shadow::take, after the dword compare, runs no further apart thanVICTORY_SEND_GAPbytes go up as one (0 unless given: as now). The bytes between two runs are the ones the CPU's side holds, which title memory holds too, so inside a gap this behaves as the default whole-page send does, over a much smaller span.About 30 lines with the switch. I can open a PR against main if this is wanted.
Limits
SEND_CHANGEDkeeps its documented blind spot (the title writing again the value it wrote before). No picture faults seen in three short runs; no driving, no long session.Also measured, negative
Declaring the mesh programs' own output counts (dkdknight/Victory-Knight-HD#28 ported to this base; 961 of the 1,128 mesh programs in use took it, checked by disassembling the cached DXIL) changed nothing here: 32.7 against 31.8 ms of GPU command time at the same spot, same per-command figures.
AI-assisted (Claude Code).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-12-01T04:54:18Z.
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU you have and which Windows version (10 or 11).
If this issue needs logs and none are posted here within 12 hours, it will be closed. Add them by editing your post or in a comment.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by plapha on 2026-12-01T05:55:12Z.
Logs for the three runs in the tables above. GPU: NVIDIA GeForce RTX 5060 (8 GB), Windows 11. Nothing crashed, so there is no crash log; these are measurement runs.
Each block is the launcher's first line (the switches; local paths removed) and a steady stretch of the per-frame statistics lines from the same save position, about 7,300 draws a frame, frame generation off. The full logs are 5–8 MB each; I can attach any of them whole if that helps.
Run W — baseline, stable build —
victory-nvidia-20261201-122719.logRun V — `VICTORY_SEND_CHANGED=1` —
victory-nvidia-20261201-122049.logRun X — `VICTORY_SEND_CHANGED=1` + `VICTORY_SEND_GAP=1024` (the patch in the issue) —
victory-nvidia-20261201-123623.logImported from trustno1-coder/VIctory-NVIDIA. Originally posted by Marsietiss on 2026-12-01T06:05:18Z.
Counted on my tree (count only, nothing changed in what is taken or sent; RTX 5080, 256 lists, two spots, 3 x 30 s each, about 5,800-6,100 draws a frame): what stage 1 copies a frame, by cause.
The whole adds up to the frame line's copied MB. Joining neighbouring changed pieces has almost nothing to act on here: of about 25 MB sent a frame, 0.06-0.08 MB in 3-4 ranges meets the rule I would need (a card copy that the card never wrote), since most of it has no card copy or is written by the card. So for this title on this machine the gap switch has little to join. That says nothing against the result you measured: your bench had many changed pieces on copies of another kind.
The caveat that matters: this is a count build with its own extra reads (about 10 ms a frame), so the shares are usable and the times are not, and it is one card, one title, two spots.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by plapha on 2026-12-01T14:31:20Z.
GPU-side follow-up:
VICTORY_SEND_CHANGED=1alone takes the uploads off the direct queue;SEND_GAPis not needed.Same machine and setup as the post above (RTX 5060 8 GB, 621.01, Series S profile, 540p, DLSS performance, frame generation off, heat placement on, texture budget 600 MB), same save, about the same spot (draw counts differ, see the table). One frame each in Nsight GPU Trace, actions on the direct queue:
SEND_CHANGED=1+SEND_GAP=1024SEND_CHANGED=1onlySEND_GAPadds nothing on the card: the copies are already cheap without it. That agrees with @Marsietiss's count above. In the one frame with it, draws were slower per call and read 3x more over PCIe; I did not track that down (it may be the spot), so I am not claiming it is caused by the gap.copiesa frame on the CPU side, and preparing went from about 47 to 52–55 ms, with more draws, so I cannot say whether the comparison costs anything there.Given that
VICTORY_SEND_CHANGEDis still off by default on main (5fabb46e), would turning it on by default be worth considering, at least for cards near their memory limit?Frame lines (steady stretch)