D3D12.X: show live FPS in the game window title #516
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!516
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/516/head"
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?
@Mavixot on GitHub · 2026-11-24 01:11 UTC · original
present-fps-counter→main· +73 −5 · 1 files · 1 commits · merged 2026-11-24 01:15 UTCDisplays 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
b86fba483e6a, workspace and release builds pass. All three FPS tests pass. Changed snippets pass rustfmt;git diff --checkpasses.cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4: 673 passed, 3 failed, 41 ignored, 0 GPU SKIPPED lines; Windows Application Control blocked 2 additional targets (disasm_e2e,e2e).placed_title_textures_share_vram_and_preserve_pixels(3D mip readback mismatch), thentransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory(poisoned lock). The same failure chain was reproduced on unmodified main at2b4bb43.Regression run
Both runs use
scripts/smoke.ps1 -Seconds 60on the same title. The baseline precedes main's texture-upload optimization (#486); these results check for regression and do not isolate counter overhead or establish a speedup from the counter.Main (
2997c9a):PR head (
b86fba483e6a, after pushing):Not tested
XCL_SAMPLE_*inputs. The counter measures successful XCL presents, including repeated image content.AI use
@MonkeyPython on GitHub · 2026-11-24 02:10 UTC · original
Post-merge verification on NVIDIA (the "other GPUs and titles" gap): the live FPS counter works on an RTX 3080 Ti with Grand Theft Auto VI (Xbox Series 1.0.2.1).
Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01), main at
508a0c7(includesb86fba4), release build,XCL_NETWORK=0+ firewall outbound block. 600 s run at the profile selector (no input injected), 3840×2160.Counter agreement with the presented-frame log: the window title was sampled every ~5 s (114 steady-state samples, t ≥ 20 s): min 29.2, max 30.8, mean 30.01 FPS. The activity log's
D3D12.X: N frames presented, 30.0 fps over the last 300read 30.0 on all 58 lines (600 → 17700 presents). So the 1 s title sampling and the 300-frame log window agree within sampling noise on NVIDIA — same shape as the 29.7-vs-30 observation on AMD in the PR description, no disagreement beyond that.Alongside shader status: the title correctly showed
XCL – Grand Theft Auto VI | 29.8 FPS | compiling shaders: 0 running, 0 done, 57817 pipelines queued— FPS stays visible next to the compilation progress string. During the first 10 s (startup, 53210 → 57817 pipelines queued) the title read 10.0 → 8.0 → 22.8 FPS while presents were irregular; it settled to ~30 once the selector drew steadily.Not tested: the 0-present loading gaps (need gameplay navigation past the profile selector) and other titles. No crashes or device removals in the 600 s (17700 presents).
Suite without
XCL_SAMPLE_*at this commit: 680 passed / 0 failed / 41 ignored, 2 internalSKIPPED(wave64 pair) — identical counts to the with-samples run (the sample tests no-op when unset; sample activity shows in wall time, not counts).AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the title, sampled the window title and wrote this report from the logs; a human reviews it before posting. No code changes.