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

Open
M4gnif1cus wants to merge 1 commit from upstream-pr/4695 into main
M4gnif1cus commented 2026-12-01 02:07:17 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by M4gnif1cus on 2026-12-01T02:07:17Z.


Fixes #4539

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: #4541, #4711 (also touch panel.rs).

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5577492156 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4695). Originally posted by [M4gnif1cus](https://github.com/M4gnif1cus) on 2026-12-01T02:07:17Z. --- Fixes #4539 ## 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: #4541, #4711 (also touch `panel.rs`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
WarisGG commented 2026-12-01 03:27:19 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by WarisGG on 2026-12-01T03:27:19Z.


Tested #4695 in-game against main for #4539 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
#4695 (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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7299721563 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4695#issuecomment-7299721563). Originally posted by [WarisGG](https://github.com/WarisGG) on 2026-12-01T03:27:19Z. --- Tested #4695 in-game against `main` for #4539 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 | | #4695 (`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.
M4gnif1cus commented 2026-12-01 13:03:53 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by M4gnif1cus on 2026-12-01T13:03:53Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7312051314 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4695#issuecomment-7312051314). Originally posted by [M4gnif1cus](https://github.com/M4gnif1cus) on 2026-12-01T13:03:53Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4695:upstream-pr/4695'
git switch 'upstream-pr/4695'

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 'upstream-pr/4695'
git switch 'upstream-pr/4695'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4695'
git switch 'upstream-pr/4695'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4695'
git switch 'main'
git merge --squash 'upstream-pr/4695'
git switch 'main'
git merge --ff-only 'upstream-pr/4695'
git switch 'main'
git merge 'upstream-pr/4695'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!4695
No description provided.