Validate overlapping GPU readback by default #148

Open
gomeaw wants to merge 1 commit from upstream-pr/148 into main
gomeaw commented 2026-11-26 07:32:25 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by gomeaw on 2026-11-26T07:32:25Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6621769298 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/148). Originally posted by [gomeaw](https://github.com/gomeaw) on 2026-11-26T07:32:25Z. --- 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.
avatarmanz commented 2026-11-26 07:39:45 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by avatarmanz on 2026-11-26T07:39:45Z.


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.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7185697805 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/148#issuecomment-7185697805). Originally posted by [avatarmanz](https://github.com/avatarmanz) on 2026-11-26T07:39:45Z. --- 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 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/148:upstream-pr/148'
git switch 'upstream-pr/148'

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/148'
git switch 'upstream-pr/148'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/148'
git switch 'upstream-pr/148'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/148'
git switch 'main'
git merge --squash 'upstream-pr/148'
git switch 'main'
git merge --ff-only 'upstream-pr/148'
git switch 'main'
git merge 'upstream-pr/148'
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
avatarmanz/VIctory-7900XTX!148
No description provided.