[pr-diagnostics][rendering][frame-generation] Report DXGI gaps for consecutive present IDs #201

Open
tyr0nsur wants to merge 1 commit from tyr0nsur/Darner:codex/dxgi-display-gap into main
Contributor

Contributor role (optional)

  • Fluxer ID:

What it changes

  • The problem on main: with synthetic 60 Hz DXGI statistics, one poll can cover three present IDs and three refreshes. The meter reports 50.0 ms as a single gap, even if all three images arrived evenly at 16.7 ms intervals.
  • Estimate the longest gap only from pairs with consecutive present IDs and a positive refresh delta. Count those pairs separately from all DXGI update pairs and report an unavailable interval when none qualify. Frame generation and queued presents can leave few qualifying pairs.
  • When reprocessing old logs with -From, keep held and dropped totals and omit the old display maximum. Those rows did not record whether the interval covered consecutive IDs. DXGI flip model statistics

How it was tested

  • Tested revision: 99608ad559b9a051ecad2ec5047813e45ca9ba03, based on f3840d7.
  • Commands and results:
    • cargo +1.98.1 test --locked --offline -j 2 -p darner-gpu --lib host::smooth::tests -- --nocapture passed all 7 meter tests before the rebase. The changed files are byte-identical after the rebase, and the final workspace run also passed all 7.
    • rustc +1.98.1 --edition 2024 <isolated synthetic driver> built the meter from main and from the patch. At 60 Hz the all-grouped case reported 50.0 ms on main and unavailable on the patch. A mixed window reported 50.0 ms on main and 16.7 ms on the patch. A three-refresh interval between consecutive IDs still reported 50.0 ms. Held and dropped totals matched in all six synthetic cases.
    • powershell.exe -NoLogo -NoProfile -File scripts/bench.ps1 -From <synthetic run> -Warmup 0 -Seconds 6 checked the baseline and four candidate summaries, including legacy, grouped, mixed and held cases. All five matched the expected JSON and Markdown.
    • cargo +1.98.1 run --locked --offline -j 2 --package xtask -- policy --staged passed for 2 files. The same command with policy passed for 555 tracked files.
  • Changes a default: no. This changes only the diagnostic output and how the benchmark summarizes it.
  • A/B result: identical synthetic inputs on main and the candidate.
  • Gates run on that revision (the three in AGENTS.md; there is no CI):
    • cargo +1.98.1 clippy --workspace --all-targets --locked --offline -j 2 -- -D warnings passed.
    • cargo +1.98.1 clippy --workspace --all-targets --all-features --locked --offline -j 2 -- -D warnings passed.
    • cargo +1.98.1 test --workspace --exclude darner-shader --locked --offline -j 2 passed. It covered the GPU crate and all seven meter tests. The full workspace test gate is incomplete. I stopped its earlier run when main moved and excluded the unchanged shader crate from the final run.
  • Gameplay: not run. The regression uses synthetic DXGI counters on Windows 11 Pro build 26300. The test PC has an RTX 4060 8 GB with driver 621.40. The meter regression did not use the GPU.
  • Shader wave sizes tested, when relevant: not applicable.
  • Hardware dependence: the test exercises the counter arithmetic and PowerShell summary. Timing remains estimated from the average refresh period.
  • Coverage gaps: real DXGI sampling, VRR and generated-frame coverage were not measured in a title.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
    • Gameplay was not run. This is a diagnostics-only change with synthetic input and full report checks.
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #172 and #173 also change scripts/bench.ps1. Their changes cover the frame-percentile window and crash attribution, respectively.
  • Replaces or overlaps: none found.
<!-- Thanks for the pull request. Start the title with its type (pr-fix, pr-feature, pr-performance, pr-diagnostics, pr-refactor, pr-docs or pr-tests) and the area tags, like [pr-fix][memory]. This host has no labels yet, so the tags stay in the title. --> <!-- Use Fixes #N for a complete fix or Refs #N for a partial change. --> ## Contributor role (optional) - Fluxer ID: ## What it changes - The problem on main: with synthetic 60 Hz DXGI statistics, one poll can cover three present IDs and three refreshes. The meter reports 50.0 ms as a single gap, even if all three images arrived evenly at 16.7 ms intervals. - Estimate the longest gap only from pairs with consecutive present IDs and a positive refresh delta. Count those pairs separately from all DXGI update pairs and report an unavailable interval when none qualify. Frame generation and queued presents can leave few qualifying pairs. - When reprocessing old logs with -From, keep held and dropped totals and omit the old display maximum. Those rows did not record whether the interval covered consecutive IDs. [DXGI flip model statistics](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/dxgi-flip-model) ## How it was tested - Tested revision: `99608ad559b9a051ecad2ec5047813e45ca9ba03`, based on `f3840d7`. - Commands and results: - `cargo +1.98.1 test --locked --offline -j 2 -p darner-gpu --lib host::smooth::tests -- --nocapture` passed all 7 meter tests before the rebase. The changed files are byte-identical after the rebase, and the final workspace run also passed all 7. - `rustc +1.98.1 --edition 2024 <isolated synthetic driver>` built the meter from main and from the patch. At 60 Hz the all-grouped case reported 50.0 ms on main and unavailable on the patch. A mixed window reported 50.0 ms on main and 16.7 ms on the patch. A three-refresh interval between consecutive IDs still reported 50.0 ms. Held and dropped totals matched in all six synthetic cases. - `powershell.exe -NoLogo -NoProfile -File scripts/bench.ps1 -From <synthetic run> -Warmup 0 -Seconds 6` checked the baseline and four candidate summaries, including legacy, grouped, mixed and held cases. All five matched the expected JSON and Markdown. - `cargo +1.98.1 run --locked --offline -j 2 --package xtask -- policy --staged` passed for 2 files. The same command with `policy` passed for 555 tracked files. - Changes a default: no. This changes only the diagnostic output and how the benchmark summarizes it. - A/B result: identical synthetic inputs on main and the candidate. - Gates run on that revision (the three in AGENTS.md; there is no CI): - `cargo +1.98.1 clippy --workspace --all-targets --locked --offline -j 2 -- -D warnings` passed. - `cargo +1.98.1 clippy --workspace --all-targets --all-features --locked --offline -j 2 -- -D warnings` passed. - `cargo +1.98.1 test --workspace --exclude darner-shader --locked --offline -j 2` passed. It covered the GPU crate and all seven meter tests. The full workspace test gate is incomplete. I stopped its earlier run when main moved and excluded the unchanged shader crate from the final run. - Gameplay: not run. The regression uses synthetic DXGI counters on Windows 11 Pro build 26300. The test PC has an RTX 4060 8 GB with driver 621.40. The meter regression did not use the GPU. - Shader wave sizes tested, when relevant: not applicable. - Hardware dependence: the test exercises the counter arithmetic and PowerShell summary. Timing remains estimated from the average refresh period. - Coverage gaps: real DXGI sampling, VRR and generated-frame coverage were not measured in a title. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). - Gameplay was not run. This is a diagnostics-only change with synthetic input and full report checks. - [x] This PR contains one change based on main. - [x] The diff follows docs/asset-policy.md. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #172 and #173 also change scripts/bench.ps1. Their changes cover the frame-percentile window and crash attribution, respectively. - Replaces or overlaps: none found.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'codex/dxgi-display-gap:tyr0nsur-codex/dxgi-display-gap'
git switch 'tyr0nsur-codex/dxgi-display-gap'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'tyr0nsur-codex/dxgi-display-gap'
git switch 'tyr0nsur-codex/dxgi-display-gap'
git rebase 'main'
git switch 'main'
git merge --ff-only 'tyr0nsur-codex/dxgi-display-gap'
git switch 'tyr0nsur-codex/dxgi-display-gap'
git rebase 'main'
git switch 'main'
git merge --no-ff 'tyr0nsur-codex/dxgi-display-gap'
git switch 'main'
git merge --squash 'tyr0nsur-codex/dxgi-display-gap'
git switch 'main'
git merge --ff-only 'tyr0nsur-codex/dxgi-display-gap'
git switch 'main'
git merge 'tyr0nsur-codex/dxgi-display-gap'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!201
No description provided.