Refresh texture views after writes through a mapped alias #379

Open
github-bot wants to merge 3 commits from github-bot/gh-379 into main AGit
Owner

@⁠TaynanGT on GitHub · 2026-11-27 21:12 UTC · original
TaynanGT:fix/refresh-aliased-texture-writes → main · +226 −17 · 6 files · 3 commits · draft

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** on GitHub · 2026-11-27 21:12 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/379) `TaynanGT:fix/refresh-aliased-texture-writes` → `main` · +226 −17 · 6 files · 3 commits · draft 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.
Project known title writes onto the exact byte ranges of sibling mappings and queue the ranges together for subscribed heaps. Keep the existing physical-page notification path for callers that already enumerate the mappings.

Exercise the ordinary mapped write path across two mappings and two view heaps. Check an unrelated page and reject publication and completion from a replaced record.
Open destination guards before the copy and queue the texture change on exit, including copies that stop after writing a prefix. Keep the earlier notice for callers that still use the pre-write API.

Exercise both view heaps while a write is open and confirm that each receives a fresh notification after the bytes are available.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:14:32 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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