Refresh texture views after writes through a mapped alias #379

Closed
TaynanGT wants to merge 658 commits from upstream-pr/379 into main
TaynanGT commented 2026-11-27 21:12:56 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T21:12:56Z.


A placed texture can share its physical pages with another virtual address. A write through that address used to open the guards but only queue a texture update for the address that was written. A view in a second descriptor heap could keep sampling an old upload. A mapped copy also sent its notice before copying, which let a texture pass consume the notice while the old bytes were still visible.

Use the existing physical-page index to project the changed byte range into the other views, then enqueue those ranges together for each subscribed heap. Mapped copies publish the change on exit, including partial-copy paths. Physical-page writes that already enumerate every view keep their existing path.

The Windows regression maps one page into two addresses. It copies bytes through the first, checks the fingerprint through the second, and verifies that both descriptor heaps become due. It also covers an unrelated page, a replaced slot and a pass draining notices before a copy finishes. All assertions ran on the local D3D12 host. The existing per-heap write, remap and late-publication tests passed alongside it.

Related: #371 keeps notices for each subscribed heap. #303 measures repeated texture changes discovered by polling. The alias warning in a local scene motivated this fix. The specific material associated with that warning still needs to be identified in a frame capture.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5533165994 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/379). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T21:12:56Z. --- A placed texture can share its physical pages with another virtual address. A write through that address used to open the guards but only queue a texture update for the address that was written. A view in a second descriptor heap could keep sampling an old upload. A mapped copy also sent its notice before copying, which let a texture pass consume the notice while the old bytes were still visible. Use the existing physical-page index to project the changed byte range into the other views, then enqueue those ranges together for each subscribed heap. Mapped copies publish the change on exit, including partial-copy paths. Physical-page writes that already enumerate every view keep their existing path. The Windows regression maps one page into two addresses. It copies bytes through the first, checks the fingerprint through the second, and verifies that both descriptor heaps become due. It also covers an unrelated page, a replaced slot and a pass draining notices before a copy finishes. All assertions ran on the local D3D12 host. The existing per-heap write, remap and late-publication tests passed alongside it. Related: #371 keeps notices for each subscribed heap. #303 measures repeated texture changes discovered by polling. The alias warning in a local scene motivated this fix. The specific material associated with that warning still needs to be identified in a frame capture.
TaynanGT commented 2026-11-30 17:10:46 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:10:46Z.


Superseded: main has moved to a new line of the code (see #468). Whatever is still worth having from this will come back as a new PR on the current main.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7285843504 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/379#issuecomment-7285843504). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-30T17:10:46Z. --- Superseded: `main` has moved to a new line of the code (see #468). Whatever is still worth having from this will come back as a new PR on the current `main`.

Pull request closed

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
TaynanGT/Vice-Tay!379
No description provided.