Report exact frame deadline counts and DXGI present outcomes #1128
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1128"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ghptc on 2026-11-28T13:43:53Z.
Report exact frame deadlines and DXGI present outcomes
The meter already emits per-window percentiles and counts over 50 and 100 ms. To compare an entire route at 30 or 60 Hz, each new summary includes the count of actual inter-meter intervals, their summed nanoseconds and strictly missed rational deadlines. The first meter call contributes only its present outcome. Consecutive windows retain the last timestamp. Each batch has a sequence number and an orderly meter drop reports its partial batch. A process abort can lose its final open window.
The production DXGI call and existing tearing retry feed signed HRESULTs into the meter. Each logical frame has one final outcome, either S_OK, another success status, or failure. The same summary counts physical API attempts, refusals, and logical retries. S_OK describes API acceptance. Physical refreshes, visible pixel correctness and interpolated frames require separate evidence. Setting
VICTORY_FRAME_SAMPLES=1emits nanoseconds in one line per batch for pooled percentiles. The existing frame-time text stays parseable. Microsoft’s Present contractTests. A native CPU fixture covers the two neighboring integer nanoseconds around both deadlines, first-call handling, uneven windows, S_OK, occlusion, failure and both retry outcomes. The Windows-target crate and tests type-checked with default and diagnostics features. DXGI was not executed in this validation.
Prior work. The NVIDIA-fork’s frame meter search found #341. Its implementation already prints the interval spread, which this patch preserves. Searches for frame budget, deadlines and present outcomes found no duplicate implementation. Original meter PR · Base implementation
Reproduce
From this independent PR head with the pinned Rust toolchain on Linux, compile the production module directly.
On Windows use
cargo test --release --locked -j 2 -p victory-gpu --lib host::pacing::tests -- --test-threads=1. The fixture drives the production accumulator across two windows, with and without a retry. The Windows target type-checked with and without diagnostics. The CPU regressions passed again on the submitted commit. Gameplay timings and driver overhead remain unmeasured.