Display: the title's screenshots save the last presented frame #1835

Open
kais7654 wants to merge 1 commit from upstream-pr/1837 into main
kais7654 commented 2026-11-24 23:10:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kais7654 on 2026-11-24T23:10:42Z.


The capture item in display (slot 0x28) failed as if capture were unavailable, and its comment spelled out what was missing: a hook in the GPU side reading the last presented frame back on request. Done. A screenshot now asks the next present to copy the back buffer into a readback buffer (the copy every present submission already waits for), maps its rows, and writes a full-size 8-bit RGB PNG to VICTORY_CAPTURE or ./screenshots, path in the log.

victory-gpu: new screenshot module carries the frame from present time (PENDING/PRESENTED/LAST, take polling to WAIT); read_back and the PNG chunking move here from capture, whose diagnostics path now shares it — one readback path instead of two copies of the same unsafe code. The API's result structure is not written: its layout is not known, the file is the answer.

Tests: PNG roundtrip (2x2 BGRA, pitch, filter bytes, zlib bytes) and a request clearing an older frame. victory-hle 97/97.

Generated by Mistral Vibe.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6593275945 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1837). Originally posted by [kais7654](https://github.com/kais7654) on 2026-11-24T23:10:42Z. --- The capture item in display (slot 0x28) failed as if capture were unavailable, and its comment spelled out what was missing: a hook in the GPU side reading the last presented frame back on request. Done. A screenshot now asks the next present to copy the back buffer into a readback buffer (the copy every present submission already waits for), maps its rows, and writes a full-size 8-bit RGB PNG to VICTORY_CAPTURE or ./screenshots, path in the log. victory-gpu: new screenshot module carries the frame from present time (PENDING/PRESENTED/LAST, take polling to WAIT); read_back and the PNG chunking move here from capture, whose diagnostics path now shares it — one readback path instead of two copies of the same unsafe code. The API's result structure is not written: its layout is not known, the file is the answer. Tests: PNG roundtrip (2x2 BGRA, pitch, filter bytes, zlib bytes) and a request clearing an older frame. victory-hle 97/97. Generated by Mistral Vibe.
catminou4 commented 2026-11-25 00:06:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:37Z.

Review: COMMENTED


Static review only: spans victory-gpu/victory-hle — both Windows-only; source review of the diff.

Title screenshots save the last presented frame (gpu+hle): readback path for screenshots; Windows-only, needs a Windows session with a real title frame.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049281709 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1837#pullrequestreview-6049281709). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:47:37Z. **Review:** COMMENTED --- Static review only: spans victory-gpu/victory-hle — both Windows-only; source review of the diff. Title screenshots save the last presented frame (gpu+hle): readback path for screenshots; Windows-only, needs a Windows session with a real title frame.
Marvisak commented 2026-11-25 07:03:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:33:20Z.


Automated triage for the maintainers.

This pull request no longer merges cleanly into main (conflicts in crates/victory-gpu/src/draw.rs). It will be reviewed once it is rebased onto the current main. The earlier verdict (needs work) was for an older state of main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154911866 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1837#issuecomment-7154911866). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:33:20Z. --- <!-- victory-triage v1 head=3dcdfeec93861e7db9791f072f9e424910c718ee verdict=needs-rebase at=2026-11-25T16:04:00Z --> Automated triage for the maintainers. This pull request no longer merges cleanly into `main` (conflicts in `crates/victory-gpu/src/draw.rs`). It will be reviewed once it is rebased onto the current `main`. The earlier verdict (needs work) was for an older state of `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
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/1837:upstream-pr/1837'
git switch 'upstream-pr/1837'

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/1837'
git switch 'upstream-pr/1837'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1837'
git switch 'upstream-pr/1837'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1837'
git switch 'main'
git merge --squash 'upstream-pr/1837'
git switch 'main'
git merge --ff-only 'upstream-pr/1837'
git switch 'main'
git merge 'upstream-pr/1837'
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
Marvisak/VIctory!1835
No description provided.