Watch textures in composited frames #4992

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/4992 into main
andrewpozdnakov7-jpg commented 2026-12-01 16:47:18 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T16:47:18Z.


Fixes #4988 for the 8-bit formats supported by the watcher.

What it changes

When the plane compositor is active, the texture pop watcher now reads the composed 8-bit frame from the back buffer. The read happens in the same present list, before the local overlays are drawn. The back buffer is returned to its previous state after the read. Direct presents keep using their source texture.

A recycled read-back buffer must match the new frame's dimensions and format. The watcher still runs only within the configured time window and its existing queue limit. A changing display overlay can contribute to the counts.

How it was tested

  • A focused Windows Rust fixture used the exact present routing and pool selection from 5fabb46e and 36e6a26a, with stub D3D12 calls. Main recorded no composed read. The patch recorded the back-buffer read between the two transitions, restored the state when no read was returned, and recorded no barriers outside the watch window. Direct reads still used the original source. Tested a pool with different sizes and RGBA/BGRA formats.
  • cargo check --locked -p victory-gpu --features diagnostics and cargo xtask policy --staged passed on Windows.
  • GPU and game run are pending. Main's CI check has five existing Clippy errors tracked in #4707.

Checked for overlap

  • Searched for #4988, VICTORY_POP_WATCH, and the affected files. #3488 wraps the copy call with its checked-copy helper. #4658 changes the swap-chain format. Neither adds the composed source to the watcher.

@CLHelper, the setup in #4988 could confirm that the composed presentation now produces pop-watch lines.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5590232400 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4992). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T16:47:18Z. --- Fixes #4988 for the 8-bit formats supported by the watcher. ## What it changes When the plane compositor is active, the texture pop watcher now reads the composed 8-bit frame from the back buffer. The read happens in the same present list, before the local overlays are drawn. The back buffer is returned to its previous state after the read. Direct presents keep using their source texture. A recycled read-back buffer must match the new frame's dimensions and format. The watcher still runs only within the configured time window and its existing queue limit. A changing display overlay can contribute to the counts. ## How it was tested - A focused Windows Rust fixture used the exact present routing and pool selection from `5fabb46e` and `36e6a26a`, with stub D3D12 calls. Main recorded no composed read. The patch recorded the back-buffer read between the two transitions, restored the state when no read was returned, and recorded no barriers outside the watch window. Direct reads still used the original source. Tested a pool with different sizes and RGBA/BGRA formats. - `cargo check --locked -p victory-gpu --features diagnostics` and `cargo xtask policy --staged` passed on Windows. - GPU and game run are pending. Main's [CI check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46563306780/job/142355972539) has five existing Clippy errors tracked in #4707. ## Checked for overlap - [x] Searched for #4988, `VICTORY_POP_WATCH`, and the affected files. #3488 wraps the copy call with its checked-copy helper. #4658 changes the swap-chain format. Neither adds the composed source to the watcher. @CLHelper, the setup in #4988 could confirm that the composed presentation now produces pop-watch lines. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
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/4992:upstream-pr/4992'
git switch 'upstream-pr/4992'

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/4992'
git switch 'upstream-pr/4992'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4992'
git switch 'upstream-pr/4992'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4992'
git switch 'main'
git merge --squash 'upstream-pr/4992'
git switch 'main'
git merge --ff-only 'upstream-pr/4992'
git switch 'main'
git merge 'upstream-pr/4992'
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
trustno1-coder/VIctory-NVIDIA!4992
No description provided.