gpu: F10 marks a render issue and saves the next frame before the HUD #171

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

@⁠SovietBearz0r on GitHub · 2026-12-05 20:51 UTC · original
SovietBearz0r:f10-issue-capture → main · +172 −13 · 4 files · 1 commits · open

You asked for "F10 capture" as a small focused PR from the closed #32 review: press F10 to timestamp a visible render issue and save the next frame before HUD composition (F11 only records brief flashes).

What

  • crates/victory-gpu/src/capture.rs: mark machinery (request_mark, present_plan, mark_wants_next, frame_name/marked_name, save_in, complete) using the existing pre-HUD capture path — present.rs reads the title's picture after the copy but before p.panel.draw(...), gated by capture::wanted(frame).
  • F10 in the overlay input handler: marks on a fresh press only, only when the overlay is enabled and a mark folder is configured (VICTORY_MARK_FRAME_DIR); otherwise F10 falls through to the title as before. The first press saves the next presented frame; the mark is consumed once.
  • Diagnostics build only; no continuous readback; F11/VICTORY_CAPTURE untouched; README diagnostics bullet added.

Verification

  • cargo test -p victory-gpu --lib: 717 passed, 0 failed, 21 ignored; with --features diagnostics: 796 passed, 21 ignored (3 new: fresh-press-only F10, one-shot next-frame mark, captured frame names); clippy clean with/without diagnostics; cargo check -p victory; policy 442 files.
  • Needs in-game (diag build, -More @{ VICTORY_MARK_FRAME_DIR = 'D:\issue-frames' }, press F10 on a glitch): log lines F10 render issue marked / saving the frame before HUD composition / frame saved, PNG shows the glitch without HUD, F11 still records, overlay-off/no-folder leaves F10 as before.
  • Risks: the mark is consumed at the start of a present and lost if that present bails (same as the old branch); only 8-bit colour frames saveable (warning otherwise); Series-S two-plane path saves the composed title planes before our HUD — confirm in-game.
**@⁠SovietBearz0r** on GitHub · 2026-12-05 20:51 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/170) `SovietBearz0r:f10-issue-capture` → `main` · +172 −13 · 4 files · 1 commits · open You asked for "F10 capture" as a small focused PR from the closed #32 review: press F10 to timestamp a visible render issue and save the next frame **before HUD composition** (F11 only records brief flashes). ## What - `crates/victory-gpu/src/capture.rs`: mark machinery (`request_mark`, `present_plan`, `mark_wants_next`, `frame_name`/`marked_name`, `save_in`, `complete`) using the existing pre-HUD capture path — present.rs reads the title's picture after the copy but before `p.panel.draw(...)`, gated by `capture::wanted(frame)`. - F10 in the overlay input handler: marks on a fresh press only, only when the overlay is enabled and a mark folder is configured (`VICTORY_MARK_FRAME_DIR`); otherwise F10 falls through to the title as before. The first press saves the next presented frame; the mark is consumed once. - Diagnostics build only; no continuous readback; F11/`VICTORY_CAPTURE` untouched; README diagnostics bullet added. ## Verification - `cargo test -p victory-gpu --lib`: **717 passed, 0 failed, 21 ignored**; with `--features diagnostics`: **796 passed, 21 ignored** (3 new: fresh-press-only F10, one-shot next-frame mark, captured frame names); clippy clean with/without diagnostics; `cargo check -p victory`; policy 442 files. - **Needs in-game** (diag build, `-More @{ VICTORY_MARK_FRAME_DIR = 'D:\issue-frames' }`, press F10 on a glitch): log lines `F10 render issue marked` / `saving the frame before HUD composition` / `frame saved`, PNG shows the glitch **without** HUD, F11 still records, overlay-off/no-folder leaves F10 as before. - Risks: the mark is consumed at the start of a present and lost if that present bails (same as the old branch); only 8-bit colour frames saveable (warning otherwise); Series-S two-plane path saves the composed title planes before our HUD — confirm in-game.
Ports the F10 issue capture of the old amd-dev-prologue branch (80f9c04),
which the #32 review asked for as a small focused PR: pressing F10 with the
overlay on timestamps a visible render issue in the log and saves the next
presented frame, taken from the title's picture before the overlay's HUD is
drawn over it, as marked-frame-<n>.png in VICTORY_MARK_FRAME_DIR (which must
be outside the repository).

It is off unless that folder is set (F10 stays the title's otherwise) and
exists only in diagnostics builds. The frame is decided once per present in
capture::present_plan, before the presentation may be sent ahead, and it uses
the existing readback: no continuous readback is enabled. F11 and
VICTORY_CAPTURE are untouched.

Tests: the hotkey decision (a fresh F10 press only), the mark picking the next
frame once, and the save names. Needs an in-game check: press F10 on a glitch
and look at the saved PNG.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 20:53:32 +00:00
Author
Owner

@⁠SovietBearz0r on GitHub · 2026-12-05 21:48 UTC · original

In-game check done with a diagnostics build on this box. A synthetic F10 press (P/Invoke keybd_event, foreground title window, GetAsyncKeyState=0x8000) produced exactly one mark:

F10 render issue marked (last_presented=…)
F10 capture: saving the frame before HUD composition frame=17189
frame saved

and the file exists: data\ingame-verify\f10-frames\marked-frame-17189.png, 1,739,378 bytes, written from the pre-HUD readback. Nothing else was triggered; F11 was not exercised in this run (code untouched), overlay-off/no-folder behaviour is covered by the unit tests. Log: data\ingame-verify\logs\f10.log.

**@⁠SovietBearz0r** on GitHub · 2026-12-05 21:48 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/170#issuecomment-7446017147) In-game check done with a diagnostics build on this box. A synthetic F10 press (P/Invoke `keybd_event`, foreground title window, `GetAsyncKeyState=0x8000`) produced exactly one mark: ``` F10 render issue marked (last_presented=…) F10 capture: saving the frame before HUD composition frame=17189 frame saved ``` and the file exists: `data\ingame-verify\f10-frames\marked-frame-17189.png`, **1,739,378 bytes**, written from the pre-HUD readback. Nothing else was triggered; F11 was not exercised in this run (code untouched), overlay-off/no-folder behaviour is covered by the unit tests. Log: `data\ingame-verify\logs\f10.log`.
Author
Owner

@⁠SovietBearz0r on GitHub · 2026-12-05 21:48 UTC · original

Follow-up on the saved PNG: I inspected marked-frame-17189.png — it is a 1920x1080 title/loading illustration, captured without any overlay/HUD, so the pre-HUD readback path is proven; the synthetic press happened to land on a transition frame rather than live gameplay. Mechanism verified; a human press during an actual gameplay glitch is the optional next check (timing, not code).

**@⁠SovietBearz0r** on GitHub · 2026-12-05 21:48 UTC · [original](https://github.com/ReTerryDavis/ReVIctory/pull/170#issuecomment-7446021292) Follow-up on the saved PNG: I inspected `marked-frame-17189.png` — it is a 1920x1080 title/loading illustration, captured **without any overlay/HUD**, so the pre-HUD readback path is proven; the synthetic press happened to land on a transition frame rather than live gameplay. Mechanism verified; a human press during an actual gameplay glitch is the optional next check (timing, not code).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-170'
git switch 'github-bot/gh-170'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-170'
git switch 'github-bot/gh-170'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-170'
git switch 'main'
git merge --squash 'github-bot/gh-170'
git switch 'main'
git merge --ff-only 'github-bot/gh-170'
git switch 'main'
git merge 'github-bot/gh-170'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.