HUD: show real and presented FPS for direct frame generation #390
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/lobomfz--VIctory-xmem!390
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-390"
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?
@maple-quartz18 on GitHub · 2026-12-03 23:45 UTC · original
maple-quartz18:feat/direct-framegen-hud→main· +122 −8 · 6 files · 2 commits · openSummary
In direct FidelityFX frame generation, show
real>presented FPSwhen the current sampling window contains successful generated presents. The presented total is a submission rate, not a measurement of display scanout or input latency. When there are no successful generated presents in the window, keep the plain real-frame rate.Full and compact modes also retain the average real-frame time, for example
25.0>50.0 FPS 40.0 ms. The head can expand and moves the adjacent badge as needed. FPS-only mode remains rate-only. The frame-time graph and 1% low continue to describe real frames.The generated-present counter is independent of the periodically reset
fg_directlog counters, and only successful presents are counted. Reset the panel sample after hiding the HUD or opening the menu. Non-direct modes keep their existing display.Validation
victory-gpuunit tests under Proton: three generated-present rate tests and the full/compact/FPS-only head-format test passed, including no generated frames, disabled direct mode, a counter decrease, and nonzero generated frames.git diff --checkpassed.@Kal0s-design on GitHub · 2026-12-04 03:24 UTC · original
Checked this natively on Windows 11 (MSVC). Both new framegen_rate tests pass, and the rest of the victory-gpu lib matches main (same known native failures). No new clippy warnings.
You said the layout wasn't checked, so I rendered it without the game using the ignored GDI preview test (
panel::tests::preview) at 1080p, 1440p and 2160p. "9.4>18.8 FPS" fits in full, compact and FPS-only. I also tried a temporary sample with three-digit values, "119.9>239.8 FPS". It still fits in all three modes, including the FPS-only box at the smallest font step.The math reads right to me. The generated counter is only bumped on S_OK at the one generated
Present(host.rs), and the window is the same one used for real frames. It resets at each refresh and on hide or menu, so the two counts line up.presented_fpscan't divide by zero or underflow.Two small things, not blockers.
direct()only means the API is loaded and the switch is on. With FG idle, or whenever generated presents stop, the head shows something like "30.0>30.0 FPS". Gating on the badge's armed state, or on a non-zero generated delta, would keep the old plain head then.AI-assisted: yes
@Luxuride on GitHub · 2026-12-04 11:28 UTC · original
This is sound and I would take it: the counter is bumped only in the
status == S_OKarm of a generated present (crates/victory-gpu/src/host.rs:9024), the window used as the divisor is the same one the numerator came from (panel.rs:2228-2231), and a separate non-resetting counter is genuinely needed becausedirect_linezeroes the existing generated count every interval (crates/victory-gpu/src/framegen.rs:493).One change before merge: in full HUD mode the head becomes
25.0>50.0 FPSand the frame time disappears, thoughHEAD_Wis documented as sized for "999.9 FPS 9999.9 ms" (panel.rs:958-959)."{:.1}>{:.1} FPS {:.1} ms"keeps what that mode had.Nits:
framegen_rate.rsis a whole#[cfg(windows)]module with docs and two tests for three lines — it belongs inframegen.rsnext to the counter it divides; andcounter_reset_does_not_underflownames a reset that cannot happen (the counter never resets) — rename it to what it pins.@maple-quartz18 on GitHub · 2026-12-04 12:19 UTC · original
Thanks for your review. I'm fixing
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.