Validate overlapping GPU readback by default #148

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

@⁠gomeaw on GitHub · 2026-11-26 07:32 UTC · original
gomeaw:fix/check-copy-queue-readback → main · +10 −9 · 2 files · 1 commits · open

The copy queue can read a card buffer while a later flight is changing it. If that flight restores the original bytes before its comparison, the comparison sees no change and skips the fetch that would restore title memory. A CPU write on the same page can then send the intermediate bytes back to the card.

Enable the existing fetch hash check by default when the relay actually uses a copy queue. A mismatched piece is fetched again on a later flight that touches it even if the comparison reports no change. VICTORY_FETCH_CHECK=0 remains available for an explicit benchmark. Both play.ps1 presets already request the copy queue and pick up the fix through the renderer.

  • #115 reproduced wrong results in 6 of 12 synthetic rounds on a Windows RTX 5060.
  • #138 shows the same mechanism under vkd3d-proton. The reported run kept faces and stayed around 66 ms a frame with validation and the fast relay, against about 82 ms for the relay-1 workaround.
  • Windows WARP recovered every suspect piece in 12 rounds with the new default. All 12 rounds had a wrong title result with the explicit override. Four hash and relay tests and the asset check also passed.

This uses the current recovery mechanism. A snapshot taken inside the producing flight would also give a stable version to an earlier consumer.

**@⁠gomeaw** on GitHub · 2026-11-26 07:32 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/148) `gomeaw:fix/check-copy-queue-readback` → `main` · +10 −9 · 2 files · 1 commits · open The copy queue can read a card buffer while a later flight is changing it. If that flight restores the original bytes before its comparison, the comparison sees no change and skips the fetch that would restore title memory. A CPU write on the same page can then send the intermediate bytes back to the card. Enable the existing fetch hash check by default when the relay actually uses a copy queue. A mismatched piece is fetched again on a later flight that touches it even if the comparison reports no change. `VICTORY_FETCH_CHECK=0` remains available for an explicit benchmark. Both play.ps1 presets already request the copy queue and pick up the fix through the renderer. - #115 reproduced wrong results in 6 of 12 synthetic rounds on a Windows RTX 5060. - #138 shows the same mechanism under vkd3d-proton. The reported run kept faces and stayed around 66 ms a frame with validation and the fast relay, against about 82 ms for the relay-1 workaround. - [Windows WARP](https://github.com/gomeaw/VIctory-7900XTX/actions/runs/45775772355) recovered every suspect piece in 12 rounds with the new default. All 12 rounds had a wrong title result with the explicit override. Four hash and relay tests and the asset check also passed. This uses the current recovery mechanism. A snapshot taken inside the producing flight would also give a stable version to an earlier consumer.
While the copy queue reads a card buffer, a later flight can modify it and restore the end value. Check the fetched hash so that flight fetches its result even when its comparison flags no change. Keep VICTORY_FETCH_CHECK=0 as an explicit benchmark override.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 07:36:19 +00:00
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 07:39 UTC · original

Left open: turns VICTORY_FETCH_CHECK on by default for every card (3-4 ms of hashing a frame by its own note); needs an in-game check on the 7900 XTX first.

**@⁠avatarmanz** on GitHub · 2026-11-26 07:39 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/148#issuecomment-7185697805) Left open: turns VICTORY_FETCH_CHECK on by default for every card (3-4 ms of hashing a frame by its own note); needs an in-game check on the 7900 XTX first.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/upcheck.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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