D3D12.X: show live FPS in the game window title #482

Closed
github-bot wants to merge 1 commit from gh-pr/482/head into gh-pr/482/base
Owner

@⁠Mavixot on GitHub · 2026-11-24 00:56 UTC · original
present-fps-counter → main · +73 −5 · 1 files · 1 commits · closed without merging

Displays live FPS in the top title bar of the XCL window, alongside shader compilation progress. Samples successful presents over at least one second using actual elapsed time, and reports zero during a stall. Related to #450's optional in-frame overlay.

What is in it

  • crates/xcl/src/hle/d3d12x/present.rs: reuse the window timer and presented-frame counter; three tests cover sampling intervals, irregular timing, stalls and recovery.

Tested

  • AMD Radeon RX 6600 (driver 32.0.21045.16010), Ryzen 5 3600, Windows 11 Pro build 26300, Rust 1.100.0; debug tests and release game runs.
  • On b86fba483e6a, cargo build --workspace --locked --offline and all three FPS tests pass. The full workspace suite and release smoke run are in progress.
  • Earlier head 12019c9: cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4: 674 passed, 3 failed, 41 ignored, 0 GPU SKIPPED lines; Windows Application Control blocked 3 additional test targets. The three failures were a 3D texture mip readback mismatch and two poisoned-lock failures, also reproduced on unmodified main at 2b4bb43.
  • Clippy completed with existing warnings on the FPS implementation. Changed snippets pass rustfmt, and git diff --check passes.

Regression run
Main (2997c9a), 60 seconds:

xcl-smoke v1
commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21
gpu: AMD Radeon RX 6600
title: 419239bf
seconds: 60
exit: 0x0
frames shown: 789 (PresentX 789)
presents per 2 s (last 3): 39 39 39
device removals: 0
crashes: 0
peak commit: 15077 MB

PR head (b86fba483e6a): pending completion of the current validation run. The actual head block will be added when available. Earlier blocked or misidentified runs are excluded.

Not tested

  • The required clean PR-head game smoke is not complete yet. The PR remains a draft while validation is pending.
  • Other GPUs and titles. The counter measures successful XCL presents, including repeated image content; no playback performance improvement is claimed.

AI use

  • Codex (GPT-6 family; exact model variant was not supplied) implemented the counter and tests, ran validation, and prepared this description.
**@⁠Mavixot** on GitHub · 2026-11-24 00:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/482) `present-fps-counter` → `main` · +73 −5 · 1 files · 1 commits · closed without merging Displays live FPS in the top title bar of the XCL window, alongside shader compilation progress. Samples successful presents over at least one second using actual elapsed time, and reports zero during a stall. Related to #450's optional in-frame overlay. **What is in it** - `crates/xcl/src/hle/d3d12x/present.rs`: reuse the window timer and presented-frame counter; three tests cover sampling intervals, irregular timing, stalls and recovery. **Tested** - AMD Radeon RX 6600 (driver 32.0.21045.16010), Ryzen 5 3600, Windows 11 Pro build 26300, Rust 1.100.0; debug tests and release game runs. - On `b86fba483e6a`, `cargo build --workspace --locked --offline` and all three FPS tests pass. The full workspace suite and release smoke run are in progress. - Earlier head `12019c9`: `cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4`: 674 passed, 3 failed, 41 ignored, 0 GPU SKIPPED lines; Windows Application Control blocked 3 additional test targets. The three failures were a 3D texture mip readback mismatch and two poisoned-lock failures, also reproduced on unmodified main at `2b4bb43`. - Clippy completed with existing warnings on the FPS implementation. Changed snippets pass rustfmt, and `git diff --check` passes. **Regression run** Main (`2997c9a`), 60 seconds: ``` xcl-smoke v1 commit: 2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21 gpu: AMD Radeon RX 6600 title: 419239bf seconds: 60 exit: 0x0 frames shown: 789 (PresentX 789) presents per 2 s (last 3): 39 39 39 device removals: 0 crashes: 0 peak commit: 15077 MB ``` PR head (`b86fba483e6a`): pending completion of the current validation run. The actual head block will be added when available. Earlier blocked or misidentified runs are excluded. **Not tested** - The required clean PR-head game smoke is not complete yet. The PR remains a draft while validation is pending. - Other GPUs and titles. The counter measures successful XCL presents, including repeated image content; no playback performance improvement is claimed. **AI use** - Codex (GPT-6 family; exact model variant was not supplied) implemented the counter and tests, ran validation, and prepared this description.
Sample successfully presented frames over at least one second using the existing window timer. Keep FPS visible alongside shader compilation progress and report zero when presentation stops. Cover irregular sampling, sample intervals, stalls and recovery with unit tests.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:22:56 +00:00
github-bot closed this pull request 2026-11-26 04:22:57 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.