GPU: drain fence wait counts and durations together #3169
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!3169
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3169"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 10:51 UTC · original
andrewpozdnakov7-jpg:codex2/fence-wait-accounting→main· +67 −7 · 1 files · 1 commits · openFence completion records a count and a duration. When the report drains those values separately, it can put the count in one window and its time in the next. The totals across both windows still add up, but the individual rows are wrong.
Accumulate the two values under one lock and drain them as a pair. A signal that completes several queued events records its batch after releasing the fence's waiter lock.
The same synthetic fixture ran a producer with 32,768 waits of 1,250 microseconds while the consumer drained the counters. Each run contained 32,768 events and 40,960,000 microseconds in total.
63bcca4The app-local WARP diagnostics suite passed 247 tests with one ignored. The native event test passed. Strict GPU Clippy with default and all features and the asset policy passed.
This collector change is independent of #3157, which logs frames with fence waits even when no command-list segments were held.
@Dukestar69 on GitHub · 2026-11-26 11:08 UTC · original · approved these changes
Verified against
origin/main(63bcca4):cargo test -p victory-gpu --lib fence:: -- --test-threads=1: passed.cargo test -p victory-gpu --lib queue:: -- --test-threads=1: 5/5 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings&--features diagnostics: clean.cargo xtask policy: 191 files ok.Cleanly drains fence wait counts and durations atomically together.
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.