Frame-line counters: the card's clock counts list-translation waits as the title's, and copystat's 'copied from' counts bytes looked at #366
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#366
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?
@Jesper-Andersson on GitHub · 2026-11-26 19:44 UTC · original
Two frame-line counters point the wrong way when you look for what sets the frame.
VICTORY_THIN) as "while the title had not submitted".Where
At
2de9980(main).1.
crates/victory-gpu/src/host.rscard_clock_line. An idle stretch of the card is split only into two parts: "the submitting thread was working" (worked()) and "the rest".With
VICTORY_THIN=1(aplay.ps1default), a submission goes into the line as aJob::Lists(queue/behind.rs). The line's thread cannot send it until every recording in it is translated. During that wait it is not "working", so the time lands in "the rest".2.
crates/victory-gpu/src/host.rsupdate→copystat::range(from, to - from, us, 0). This recordsto - fromeven thoughshadow.updatereturns the bytes it actually copied (copied, which goes toPREPARING[1]).Why it matters
Run on an RTX 2070 SUPER 8 GB, Series S, before the own-bytes pool from #221. One gameplay second, per frame:
Read as written, the first line says the card waits about 230 ms a frame for the title. But in the same second the title waited 261 ms at its presents, for the frame before to be sent. That frame was waiting for its lists' translation. The time was ours, not the title's.
The second counter reports one range as "copied ~9.8x a frame, 1.79 GB a frame", in 2.6 ms. That is bytes looked at. The bytes actually moved (the "preparing" line's copies) were about 43 MB a frame.
Suggestion
Listsjobs, and the clock takes the difference over each idle stretch, as it does forworked(). I have this locally (about 40 lines inhost.rsandqueue/behind.rs) and can open a PR once it has run.copiedtocopystat::range, or keep both, "looked at" and "copied".Not checked
AI use
Log reading, source reading and write-up with AI assistance (Claude Code). The runs are my own.