GPU: the frame line times the title's calls, and how long they waited #3224
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3224
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3224"
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?
@borosf on GitHub · 2026-11-26 13:39 UTC · original
borosf:vibe/call-counters-842ca5→main· +34 −3 · 2 files · 1 commits · openSummary
Every counter on the frame line times submission-side work — preparing, copying back, guarding, heaps, descriptors. Nothing times the recording side: the title's calls into its command lists, which #2590 puts at "about 42,000 list calls a frame … roughly 20 µs each (RTX 4050 Laptop): the largest CPU cost of a frame".
That figure cannot be checked against this tree today, and the two readings of it want opposite fixes: ~2–4 µs of instructions per call is a code problem, tens of microseconds is a call waiting on the submission's locks — a different problem, mostly with a different owner (
NEW-74/@RVZO6'ssync_heapshold onSHADER_HEAPS, which FIND-30 already prices at 48 ms a frame of title threads waiting).list::with_stateis where every list handler's body runs, so it now reports:Calls— the calls that did work,CallUs— how long their bodies took,CallWaitUs— how long they waited for the list's own locks (the segment's host list, then the draw state) before doing anything.Split that way, the frame line says which of the two a frame's recording time is. Printed at the end of the existing line, as
list calls N in X ms, Y ms waiting for the list.Diagnostics builds only, like every other counter in this file: with the feature off, nothing is measured and nothing is added to the call.
Verification
Intel Arc B580, Windows 11:
cargo test -p victory-gpu --lib --features diagnostics --locked -- --test-threads=1→ 244 passed, 2 failed, 1 ignored. The two are the known Intel heap-cap pair (descriptor::host::tests::dynamic_slots_are_held_until_released,memory::tests::lists_share_a_table_and_copies_keep_their_views— #1744/#1829) that pristinemain63bcca4also fails on this card.with_stateon a created list raisedCallsby exactly one, then the probe was removed (final diff: two files, +34/−3).cargo clippy -p victory-gpu --all-targets -- -D warningsclean with and without thediagnosticsfeature.cargo xtask policy→ 193 files ok.No game data used; synthetic tests only. Measurement only — no behaviour change on any path.
claiming: GPU: the frame line times the title's calls into its command lists (how many, how long, and how long they waited for the list's locks) — the recording side of a frame, which no counter measures today
@Dukestar69 on GitHub · 2026-11-26 13:50 UTC · original · approved these changes
Verified on RTX 5090 against
origin/main(63bcca4):cargo test -p victory-gpu --lib draw:: -- --test-threads=1: 20/20 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings&--features diagnostics: clean.cargo xtask policy: 191 files ok.Cleanly times title command-list calls and their wait durations in the frame summary line.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.