GPU: a debug overlay, Alt+Z, drawn into the presented frame #2169
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2171"
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?
Imported from Marvisak/VIctory. Originally posted by 0xkn0wh3r3 on 2026-11-25T06:53:29Z.
A small debug overlay drawn into each presented frame, toggled with Alt+Z.
The panel at 1080 lines, as the ignored
previewtest renders it from sample data (compute left out, A and RB held). It has not been captured from a running title. At 1440 lines: overlay-1440.png.What it shows
Four sections, each with a header; labels on the left, values right-aligned with their units.
Metersecond: draws per frame, time preparing submissions, and time waiting for the GPU;GetProcessTimesagainst the processor count);QueryVideoMemoryInfoon the device's adapter);gameinput(the keyboard's stand-in pad when none is connected): a box per stick with its position, bars for the triggers, and the buttons lit while held.While the panel shows, the title reads neutral pads and no keys.
Switches
VICTORY_OVERLAY=1shows it from the start;VICTORY_OVERLAY=0turns it off.How it is drawn
On the CPU, into upload memory in the back buffer's format (RGBA8, BGRA8, RGB10A2 or RGBA16F, the four the presenter makes), then copied into the back buffer's corner after the frame, before the present, with one
CopyTextureRegion.Relation to #130
#130 is the full opt-in profiler (CSV, Perfetto trace, and a panel behind F3). This one is smaller and independent: a live panel with controller input and work toggles, and no new crate. If #130 lands first, this panel could take its numbers instead.
Changes
crates/victory-gpu/src/overlay.rs(new): the panel, its drawing, the keys, and the submission timer;host.rs: the presenter records the panel's copy,Meterhands over its second, andHost::executesubmits through the timer while the panel shows;list.rs: the four toggle gates at the draw, dispatch, mesh and indirect entry points;victory-hlegameinput.rs: publishes the pad, notes the title's input reads, and gives the title neutral input while the panel shows;Win32_UI_Input_KeyboardAndMousefeature forvictory-gpu.Testing
overlay::tests(9):cargo test --workspace --exclude victory-shader: 571 passed. The only failures are the 2 known NVIDIA heap-limit tests (#1835), which fail the same way onmain.cargo clippy --workspace --all-targets, with and without--features diagnostics: clean.Rebased onto
f3578e3Overlay::recordnow takes the back buffer's state and returns the state it leaves it in, so the composited path moves the back buffer to the copy destination only when the panel is copied.State::poll: the overlay's pad and input capture now run insideState::poll, after both, so the panel shows the pad the title actually reads.cargo test -p victory-gpu --lib: all pass but the two known NVIDIA heap-cap tests;overlay::testsandgameinputtests pass.host::present_plane_tests::compositor_failure_presents_primary_in_the_same_frame(--features diagnostics) exits abnormally here onmainas well. Clippy clean forvictory-gpuandvictory-hle, with and without--features diagnostics.Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T07:03:15Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):cargo test -p victory-gpu --lib overlay::— 4 passed, 0 failed (1 ignored) on RTX 5090cargo clippy -p victory-gpu -p victory-hle --all-targets— 0 warningscargo xtask policy— ok (184 files ok)Clean Alt+Z in-frame debug overlay implementation with unit tests and zero clippy warnings across
victory-gpuandvictory-hle. Looks good.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T07:17:33Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Debug overlay (Alt+Z) drawn into presented frame — debug UI; mixed gpu+hle, Windows-only.
Imported from Marvisak/VIctory. Originally posted by 0xkn0wh3r3 on 2026-11-25T07:23:39Z.
Moving this back to draft. There is a lot more I want to add and I found some bugs with how it interacts with in-game controls.
upstream-sync referenced this pull request2026-11-25 14:07:21 +00:00
upstream-sync referenced this pull request2026-11-25 14:07:24 +00:00
upstream-sync referenced this pull request2026-11-25 15:04:32 +00:00
Imported from Marvisak/VIctory. Originally posted by AwkGrep256 on 2026-11-27T12:50:32Z.
@0xkn0wh3r3 I’m working on native Graphics settings, and I think these fit together well. Players could choose their graphics options in the game menu, then use Alt+Z to see what changed while they play. One thing I’d like to compare is rendered FPS versus presented FPS with frame generation enabled. If you’re interested, I can share the counters we already use for those tests.
Native Graphics PR · Design discussion
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.