Collect completed GPU timestamps at the meter boundary #27
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/linkoovosh--LinkoArts-build!27
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-27"
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?
@avt0m4t48 on GitHub · 2026-12-03 03:37 UTC · original
avt0m4t48:diagnostics-collect-completed-gpu-brackets→main· +167 −96 · 2 files · 1 commits · draftProblem
The optional GPU timestamp meter waits for a slot to wrap before it reports the result. That can leave a short run with zero reported brackets even after the drawing queue has finished them. Dividing those delayed samples by the current frame count also attributes them to the wrong window.
Change
Collect completed timestamp pairs in order at each meter boundary and before reuse when the ring is full. Reading a slot requires a successful queue signal and an observed completion on that fence. The meter polls once when results are pending and adds no GPU wait. It reports collected milliseconds, valid sample count, skips and results still pending. Fences and both timestamp commands stay tied to the drawing queue. D3D12 fence semantics
A selected send publishes its successful signal with one atomic store. The optional sampler can collect up to 512 pairs at a boundary and releases the ring lock before logging.
Verification
In the 512-submission fixture, the earlier meter reports zero completed samples at the first boundary and reports the first 80 ms bracket at the next boundary. The new meter reports all 512 at the first boundary and the next submission's 1 ms bracket at the next boundary.
A separate queue and interval ledger checked 20,000 synthetic events, slot order, skips, overlapping brackets and the emitted totals. Two serialized senders and a concurrent meter collected every one of 2,048 pairs once and in order. Additional checks covered invalid targets, wraparound, failed or unconfirmed signals, device removal, and the disabled sampler. The sender-slice replay checked command grouping and signal confirmation with and without diagnostics.
These replays use a CPU-backed timestamp mapping and simulated fences. Native Windows driver behavior, enabled-sampler overhead and gameplay frame times remain unmeasured.
Both the inline late path and the separate published sender publish their confirmed signals. The existing sender FIFO and inline gate order work on the same fence timeline.
The standalone GPU and combined workspace test targets type-checked for Windows x64 MSVC with diagnostics and pure-Rust BLAKE3. The Linux host used a metadata-only mimalloc declaration. Both staged source files passed asset policy.
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.