fix(gpu): distinguish CPU waits from GPU timestamp intervals #67
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/DexNom--VIctory!67
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-67"
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?
@LZJ-Developer on GitHub · 2026-11-26 03:45 UTC · original
LZJ-Developer:fix/separate-cpu-wait-gpu-timing→main· +578 −42 · 4 files · 1 commits · openWindow captions and frame logs currently derive “GPU busy” from CPU-side submission waits. Long CPU completion waits can therefore be mistaken for high device utilization. Report CPU completion waits explicitly in ms/frame, measure the blocking event wait separately from submission/bookkeeping, and exclude nested settling from CPU preparation in the synchronous path.
Add optional GPU queue timestamps in diagnostics builds with
VICTORY_GPU_QUEUE_TIMING=1(off by default). Two marker lists bracket each main direct-queue batch. The original list order and ExecuteCommandLists grouping are retained, and results are polled only after the existing completion fence is reached. A bounded 32-slot pool skips samples under backpressure instead of adding a CPU wait or fence signal. Completed slots are reused.The HUD and log report completed-batch mean/total intervals and completed, pending, skipped and invalid counts. Off, unavailable and no completed samples remain distinct from a measured zero. The older fence-clock estimate is labeled as outstanding work rather than device utilization.
docs/timing.mddescribes scope and the no-game reproduction command.Measurement boundaries:
Synthetic regression uses a private queue, generated 1 MiB copy data, a closed queue gate and a two-slot pool. It verifies that incomplete samples remain pending, a full pool skips without waiting, completed copies contain the expected bytes, results are counted once, delayed CPU observation preserves GPU elapsed time, and completed slots can be reused. Conversion tests cover fractional ticks, zero frequency, reversed timestamps and large counters. No timing-performance threshold is asserted.
Validation on Windows 11, i7-12800HX, RTX 4060 Laptop 8 GB, driver 572.83, Rust 1.98.1 MSVC, MSVC 14.44.35207 and Windows SDK 10.0.26100.0:
cargo clippy --workspace --all-targets --locked -- -D warnings--all-featurescargo test --workspace --locked --no-fail-fast--features diagnosticsand queue sampling enabledIn one release synthetic run, CPU fence waiting was 40.787 ms while the two GPU timestamp intervals totaled 0.194 ms. This illustrates the controlled queue gate, not a speedup. The WARP run likewise completed both tests. No game installation or FidelityFX provider was used.
A local application of Screen's path/binary/added-line patterns found no matches. GitHub workflow status is separate from these local results.
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.