GPU: order page remaps with queued work and copy-back #1140

Open
Lkxex wants to merge 1 commit from upstream-pr/1143 into main
Lkxex commented 2026-11-25 21:33:20 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Lkxex on 2026-11-25T21:33:20Z.


A page remap can overtake queued GPU work and redirect pending copy-back into the replacement backing. Queue the remap with earlier work, settle pending GPU writes before changing the backing, and keep queue and fence references alive until their deferred work completes. This includes the Windows placeholder prerequisite and the regression fixture.

All source changes are by NotADonky43, who posted the implementation and tests in #1131 and the placeholder fix in #824. The commit retains that authorship.

Independent Windows validation on code-identical base c36971b: 8 queue tests, 14 XMem tests and the synthetic D3D12 readback test passed. The D3D12 debug layer was unavailable on this machine. The base advanced to 9c184b3 with a README-only change.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6614188223 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1143). Originally posted by [Lkxex](https://github.com/Lkxex) on 2026-11-25T21:33:20Z. --- A page remap can overtake queued GPU work and redirect pending copy-back into the replacement backing. Queue the remap with earlier work, settle pending GPU writes before changing the backing, and keep queue and fence references alive until their deferred work completes. This includes the Windows placeholder prerequisite and the regression fixture. All source changes are by NotADonky43, who posted the implementation and tests in #1131 and the placeholder fix in [#824](https://github.com/fxceless/victory-fork/pull/824#issuecomment-7174620673). The commit retains that authorship. Independent Windows validation on code-identical base c36971b: 8 queue tests, 14 XMem tests and the synthetic D3D12 readback test passed. The D3D12 debug layer was unavailable on this machine. The base advanced to 9c184b3 with a README-only change.
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/1143:upstream-pr/1143'
git switch 'upstream-pr/1143'

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/1143'
git switch 'upstream-pr/1143'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1143'
git switch 'upstream-pr/1143'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1143'
git switch 'main'
git merge --squash 'upstream-pr/1143'
git switch 'main'
git merge --ff-only 'upstream-pr/1143'
git switch 'main'
git merge 'upstream-pr/1143'
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
fxceless/victory-fork!1140
No description provided.