panel: F3 starts its window over only after it was hidden, not after every report #4696

Open
github-bot wants to merge 1 commit from github-bot/gh-4695 into main AGit
Owner

@⁠M4gnif1cus on GitHub · 2026-12-01 02:07 UTC · original
M4gnif1cus:fix-f3-panel-fps → main · +38 −2 · 1 files · 1 commits · open

Fixes #4540

What it changes

The F3 panel shows a higher frame rate than the game really runs at, about 7 % too high at 30 fps. It is a calculation error: after each update the panel counts the first frame again, so it divides 16 frames by the time of 15. This fixes it: the window only starts over when the panel was hidden.

How it was tested

  • GPU and profile: RTX 5070 Ti Laptop, Series X, 2560×1440, DLSS Performance, frame generation off, ray tracing off.
  • Before / After: average of what the panel showed against the engine's own frame rate over the same 2 minutes, two runs each:
Engine F3 panel Difference
main 29.05 fps 31.22 fps +7.5 %
this PR 29.50 fps 29.36 fps −0.5 %

The small difference left comes from comparing a 0.5 s window with the engine's 5 s averages, not from the panel.

  • For shader changes, the wave sizes tested: no shader changes
  • cargo test passed for the crates it touches: yes; the new test frames_are_counted_over_as_many_intervals fails without the fix.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4542, #4712 (also touch panel.rs).

🤖 Generated with Claude Code

**@⁠M4gnif1cus** on GitHub · 2026-12-01 02:07 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4695) `M4gnif1cus:fix-f3-panel-fps` → `main` · +38 −2 · 1 files · 1 commits · open Fixes #4540 ## What it changes The F3 panel shows a higher frame rate than the game really runs at, about 7 % too high at 30 fps. It is a calculation error: after each update the panel counts the first frame again, so it divides 16 frames by the time of 15. This fixes it: the window only starts over when the panel was hidden. ## How it was tested - GPU and profile: RTX 5070 Ti Laptop, Series X, 2560×1440, DLSS Performance, frame generation off, ray tracing off. - Before / After: average of what the panel showed against the engine's own frame rate over the same 2 minutes, two runs each: | | Engine | F3 panel | Difference | |---|---|---|---| | main | 29.05 fps | 31.22 fps | +7.5 % | | this PR | 29.50 fps | 29.36 fps | −0.5 % | The small difference left comes from comparing a 0.5 s window with the engine's 5 s averages, not from the panel. - For shader changes, the wave sizes tested: no shader changes - `cargo test` passed for the crates it touches: yes; the new test `frames_are_counted_over_as_many_intervals` fails without the fix. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4542, #4712 (also touch `panel.rs`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The window started over whenever it held no frames, which is also the case right after each report:
each window began at its first frame and counted it, N frames over N - 1 intervals, so the rate read
about 7 % too high at 30 fps (and frame time and per-frame counters low). A flag now says when the
panel was hidden; that frame only opens the window.

Fixes #4539.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 02:08:58 +00:00
Author
Owner

@⁠WarisGG on GitHub · 2026-12-01 03:27 UTC · original

Tested #4696 in-game against main for #4540 on an RTX 5070 12 GB (driver 621.24, HAGS on), Core Ultra 7 265KF, 64 GB RAM, Windows 11 build 26300. Both were local release builds, using the Series S profile with DLSS Quality, frame generation off, and ray tracing off.

Build F3 FPS / window title FPS
main (de21ed5710f5) 40.0 / 35, 35.0 / 33, 33.9 / 29
#4696 (337c5ba24493) 28.4 / 30, 36.8 / 36, 31.6 / 33

F3 read higher in all three samples on main. On the PR it read lower twice and slightly higher once. The engine log on the completed PR retry reported 29.4–34.9 FPS across its final eight samples. Those log samples were not synchronized to the individual F3 readings, and the two displays average over different intervals, so this is evidence that the consistent upward bias did not recur, not a measurement of the exact error or a performance comparison.

F3 displayed FPS again after hiding and reopening it on the PR. The focused unit test frames_are_counted_over_as_many_intervals also passed locally.

Separately, the first PR run exited with 0xC0000005 at a cutscene transition. The log did not establish a cause, and the F3 measurements above came from the retry. Frame generation was not tested.

**@⁠WarisGG** on GitHub · 2026-12-01 03:27 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4695#issuecomment-7299721563) Tested #4696 in-game against `main` for #4540 on an RTX 5070 12 GB (driver 621.24, HAGS on), Core Ultra 7 265KF, 64 GB RAM, Windows 11 build 26300. Both were local release builds, using the Series S profile with DLSS Quality, frame generation off, and ray tracing off. | Build | F3 FPS / window title FPS | | --- | --- | | `main` (`de21ed5710f5`) | 40.0 / 35, 35.0 / 33, 33.9 / 29 | | #4696 (`337c5ba24493`) | 28.4 / 30, 36.8 / 36, 31.6 / 33 | F3 read higher in all three samples on `main`. On the PR it read lower twice and slightly higher once. The engine log on the completed PR retry reported 29.4–34.9 FPS across its final eight samples. Those log samples were not synchronized to the individual F3 readings, and the two displays average over different intervals, so this is evidence that the consistent upward bias did not recur, not a measurement of the exact error or a performance comparison. F3 displayed FPS again after hiding and reopening it on the PR. The focused unit test `frames_are_counted_over_as_many_intervals` also passed locally. Separately, the first PR run exited with `0xC0000005` at a cutscene transition. The log did not establish a cause, and the F3 measurements above came from the retry. Frame generation was not tested.
github-bot force-pushed github-bot/gh-4695 from 337c5ba244 to 3511dce557 2026-12-01 13:05:00 +00:00 Compare
Author
Owner

@⁠M4gnif1cus on GitHub · 2026-12-01 13:03 UTC · original

Thanks @⁠WarisGG for testing. To confirm it, I measured the average of what the panel showed against the engine's own frame rate over the same 2 minutes, two runs each: on main the panel read 7.5 % too high; with this PR it matches (−0.5 %, which comes from comparing a 0.5 s window with 5 s averages). Single readings can still differ from a counter that averages over another interval.

**@⁠M4gnif1cus** on GitHub · 2026-12-01 13:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4695#issuecomment-7312051314) Thanks @⁠WarisGG for testing. To confirm it, I measured the average of what the panel showed against the engine's own frame rate over the same 2 minutes, two runs each: on main the panel read **7.5 % too high**; with this PR it matches (**−0.5 %**, which comes from comparing a 0.5 s window with 5 s averages). Single readings can still differ from a counter that averages over another interval.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/panel.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4696/head:github-bot/gh-4695'
git switch 'github-bot/gh-4695'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4695'
git switch 'github-bot/gh-4695'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4695'
git switch 'github-bot/gh-4695'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4695'
git switch 'main'
git merge --squash 'github-bot/gh-4695'
git switch 'main'
git merge --ff-only 'github-bot/gh-4695'
git switch 'main'
git merge 'github-bot/gh-4695'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/trustno1-coder--VIctory-NVIDIA!4696
No description provided.