GPU: refresh placed texture aliases when their writer changes #1147

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

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


A placed texture alias can keep sampling the previous GPU writer when another source takes its place during the same command list. If the second writer is already in COPY_SOURCE, there is no barrier and the old per-destination first-use check skips the copy. Track the last source per alias per recording, so changing writers refreshes the destination even without a state transition.

Validation: on Windows D3D12, a synthetic 4x4x4 R32_UINT volume test read [1, 2, 3, 4] from the R9G9B9E5 alias on the base. With this change it reads [17, 18, 19, 20], one value from each slice of the second writer. No game files or measurements were used.

This covers switching between compatible writers within a list. The placed-UAV creation work in #114 and the copy-footprint cache work in #743 cover separate paths. The in-game cloud appearance still needs a matched capture.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6614381370 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1150). Originally posted by [Lkxex](https://github.com/Lkxex) on 2026-11-25T21:45:15Z. --- A placed texture alias can keep sampling the previous GPU writer when another source takes its place during the same command list. If the second writer is already in COPY_SOURCE, there is no barrier and the old per-destination first-use check skips the copy. Track the last source per alias per recording, so changing writers refreshes the destination even without a state transition. Validation: on Windows D3D12, a synthetic 4x4x4 R32_UINT volume test read [1, 2, 3, 4] from the R9G9B9E5 alias on the base. With this change it reads [17, 18, 19, 20], one value from each slice of the second writer. No game files or measurements were used. This covers switching between compatible writers within a list. The placed-UAV creation work in #114 and the copy-footprint cache work in #743 cover separate paths. The in-game cloud appearance still needs a matched capture.
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/1150:upstream-pr/1150'
git switch 'upstream-pr/1150'

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