F3: a second panel, translucent bars over the picture #3229

Closed
M4gnif1cus wants to merge 2 commits from upstream-pr/3229 into main
M4gnif1cus commented 2026-11-29 20:50:38 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by M4gnif1cus on 2026-11-29T20:50:38Z.


F3 now cycles the FPS counter → the existing panel → a second panel → the FPS counter. The existing panel is unchanged and still comes first after the counter.

F3 second panel

What it shows

  • Top: frame rate with 1% / 0.1% lows, the card (load, temperature, power, clock), the CPU, RAM and VRAM, latency, what limits the frame, draw calls and draws dropped.
  • With frame generation on, the frame rate is marked BASE and under it the panel shows the rate the screen gets, with how many frames are shown for each one rendered (FG ×2 to ×6; tested at ×2, ×3, ×4 and ×6 on an RTX 5070 Ti Laptop).
  • Bottom: the last 30 s of frame times as a graph. Severe stutters are red, and they are exactly the ones counted.
  • The session figures cover the whole time the panel is open: P95, P99, max, pacing, time at 30 fps and at 60 fps, severe stutters and longest pause.
  • Only play in the world counts. Menus, loading screens and the settling after a load are left out; that settling is still drawn in grey on the graph.
  • The shade under the bars follows the brightness of the scene: it stays clear over dark scenes and gets darker over bright ones.

Cost
I measured it in one run, swapping between the two panels every 20 s for 4 minutes, using only the Play-VIctory.cmd defaults (Series S, 1920×1080, RTX 5070 Ti Laptop, Core Ultra 9 275HX):

Panel Samples Median fps Mean fps ms/frame
New panel 21 22.0 21.8 45.5
Existing panel 24 22.1 21.7 45.5

On the frame thread the new panel costs about 11 µs per frame on average, 240 µs at most.

How it stays cheap

  • It is painted on its own thread twice a second, using GDI (Segoe UI) with a glyph cache.
  • Only the rows that changed are written, straight into the upload buffer. The frame only records the copy and the blend.
  • Sensors are read on another thread every 500 ms: NVML for the card and system counters for the rest. Anything that is not available shows "--".
  • The scene brightness for the shade is measured on the card every 400 ms by a small compute pass. Its shader compiles off the frame thread, and nothing is read back to the CPU.
  • The session figures come from a fixed 0.1 ms histogram, so memory stays the same however long you play.
  • F3 is also counted from the window's own key messages, so a press between two frames is not lost.

Notes
No new dependencies; one feature, Win32_Graphics_Gdi, is added to windows-sys. Clippy reports no warnings in the new files, and the panel and menu tests pass.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5554979821 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3229). Originally posted by [M4gnif1cus](https://github.com/M4gnif1cus) on 2026-11-29T20:50:38Z. --- F3 now cycles **the FPS counter → the existing panel → a second panel → the FPS counter**. The existing panel is unchanged and still comes first after the counter. ![F3 second panel](https://raw.githubusercontent.com/M4gnif1cus/VIctory-NVIDIA/pr-panel-captura-fg/panel-fg.png) **What it shows** - Top: frame rate with 1% / 0.1% lows, the card (load, temperature, power, clock), the CPU, RAM and VRAM, latency, what limits the frame, draw calls and draws dropped. - With frame generation on, the frame rate is marked **BASE** and under it the panel shows the rate the screen gets, with how many frames are shown for each one rendered (**FG ×2** to **×6**; tested at ×2, ×3, ×4 and ×6 on an RTX 5070 Ti Laptop). - Bottom: the last 30 s of frame times as a graph. Severe stutters are red, and they are exactly the ones counted. - The session figures cover the whole time the panel is open: P95, P99, max, pacing, time at 30 fps and at 60 fps, severe stutters and longest pause. - Only play in the world counts. Menus, loading screens and the settling after a load are left out; that settling is still drawn in grey on the graph. - The shade under the bars follows the brightness of the scene: it stays clear over dark scenes and gets darker over bright ones. **Cost** I measured it in one run, swapping between the two panels every 20 s for 4 minutes, using only the `Play-VIctory.cmd` defaults (Series S, 1920×1080, RTX 5070 Ti Laptop, Core Ultra 9 275HX): | Panel | Samples | Median fps | Mean fps | ms/frame | |---|---|---|---|---| | New panel | 21 | 22.0 | 21.8 | 45.5 | | Existing panel | 24 | 22.1 | 21.7 | 45.5 | On the frame thread the new panel costs **about 11 µs per frame** on average, 240 µs at most. **How it stays cheap** - It is painted on its own thread twice a second, using GDI (Segoe UI) with a glyph cache. - Only the rows that changed are written, straight into the upload buffer. The frame only records the copy and the blend. - Sensors are read on another thread every 500 ms: NVML for the card and system counters for the rest. Anything that is not available shows "--". - The scene brightness for the shade is measured on the card every 400 ms by a small compute pass. Its shader compiles off the frame thread, and nothing is read back to the CPU. - The session figures come from a fixed 0.1 ms histogram, so memory stays the same however long you play. - F3 is also counted from the window's own key messages, so a press between two frames is not lost. **Notes** No new dependencies; one feature, `Win32_Graphics_Gdi`, is added to `windows-sys`. Clippy reports no warnings in the new files, and the panel and menu tests pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
M4gnif1cus commented 2026-11-30 12:23:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by M4gnif1cus on 2026-11-30T12:23:02Z.


The failing check job comes from main, not from this PR. I reproduced it locally on Windows, comparing main (41adb551) with this branch (03f0f611).

Where it stops. The first Clippy step (cargo clippy --workspace --all-targets --locked -- -D warnings) fails in victory-loader and victory-shader, which this PR does not touch, for example:

  • crates/victory-loader/src/crash.rs: unwind_copy is never used without the diagnostics feature (#3785 addresses this one).
  • crates/victory-shader: unused imports (PAIR_MEETINGS, lane_regions), a loop condition that is not mutated, and a function with too many arguments.

Behind those. To let Clippy reach the rest, I temporarily gated unwind_copy and silenced those victory-shader lints, then ran both Clippy steps on main and on this branch:

Step Distinct errors on main With this PR New from this PR
Clippy 27 27 0
Clippy, --all-features 32 32 0

They are mostly in victory-gpu (dead code, among others). So fixing unwind_copy alone will not turn the check green.

Policy test. cargo xtask policy (run by the test step) also fails on both, on crates/victory-loader/src/heap_sites/frame_users.rs (a long run of hex digits).

This PR's tests. The panel and menu tests in victory-gpu pass (30 of 30). I did not run the whole test suite.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7278356581 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3229#issuecomment-7278356581). Originally posted by [M4gnif1cus](https://github.com/M4gnif1cus) on 2026-11-30T12:23:02Z. --- The failing `check` job comes from `main`, not from this PR. I reproduced it locally on Windows, comparing `main` (41adb551) with this branch (03f0f611). **Where it stops.** The first Clippy step (`cargo clippy --workspace --all-targets --locked -- -D warnings`) fails in `victory-loader` and `victory-shader`, which this PR does not touch, for example: - `crates/victory-loader/src/crash.rs`: `unwind_copy` is never used without the `diagnostics` feature (#3785 addresses this one). - `crates/victory-shader`: unused imports (`PAIR_MEETINGS`, `lane_regions`), a loop condition that is not mutated, and a function with too many arguments. **Behind those.** To let Clippy reach the rest, I temporarily gated `unwind_copy` and silenced those `victory-shader` lints, then ran both Clippy steps on `main` and on this branch: | Step | Distinct errors on `main` | With this PR | New from this PR | |---|---|---|---| | Clippy | 27 | 27 | 0 | | Clippy, `--all-features` | 32 | 32 | 0 | They are mostly in `victory-gpu` (dead code, among others). So fixing `unwind_copy` alone will not turn the check green. **Policy test.** `cargo xtask policy` (run by the test step) also fails on both, on `crates/victory-loader/src/heap_sites/frame_users.rs` (a long run of hex digits). **This PR's tests.** The panel and menu tests in `victory-gpu` pass (30 of 30). I did not run the whole test suite.

Pull request closed

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!3229
No description provided.