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

Closed
github-bot wants to merge 2 commits from github-bot/gh-3229 into main AGit
Owner

@⁠M4gnif1cus on GitHub · 2026-11-29 20:50 UTC · original
pr-panel-f3 → main · +3654 −19 · 9 files · 2 commits · closed without merging

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

**@⁠M4gnif1cus** on GitHub · 2026-11-29 20:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3229) `pr-panel-f3` → `main` · +3654 −19 · 9 files · 2 commits · closed without merging 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)
F3 now cycles: hidden, the existing panel, a second one, hidden. The existing panel
is unchanged and comes first.

The second panel: frame rate and its 1%/0.1% lows, the card (load, temperature,
power, clock), the processor, RAM and VRAM, latency, what limits the frame, the
draw calls and the draws dropped; below, the last 30 s of frame times as a graph
(severe stutters in red, exactly the ones counted) and the figures of the whole
time the panel is open: P95/P99, max, pacing, time at 30 and at 60 fps, severe
stutters, longest pause. Only play in the world counts: not menus, loading
screens, nor the settling after a load (shown grey in the graph).

Off the frame's way: painted on a thread of its own twice a second (Segoe UI via
GDI, glyphs cached) straight into an upload buffer, only the rows that changed;
sensors (NVML, system counters) on another thread every 500 ms; the shade under
the bars follows the brightness behind them, measured on the card every 400 ms
by a one-group compute pass compiled off the frame thread; the session figures
come from a fixed 0.1 ms histogram. About 9 us a frame on the frame thread.

F3 is also counted from the window's own key messages, so a press between two
frames is not lost.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 20:51:50 +00:00
github-bot force-pushed github-bot/gh-3229 from 8267b772a4 to 03f0f611bf 2026-11-30 11:35:17 +00:00 Compare
Author
Owner

@⁠M4gnif1cus on GitHub · 2026-11-30 12:23 UTC · original

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.

**@⁠M4gnif1cus** on GitHub · 2026-11-30 12:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3229#issuecomment-7278356581) 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.
github-bot closed this pull request 2026-11-30 15:35:37 +00:00

Pull request closed

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