Pin deferred texture flips to the uploaded descriptor #3840
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3840"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoruiopz on 2026-11-30T09:03:45Z.
What it changes
A title descriptor can change while the renderer is scheduling the deferred publication of an upload. The upload was prepared from view A, but the deferred path could reread the handle after it changed to view B and associate A's completion with B. The existing completion guard would then be checking the wrong key.
Read the view and its key together. Carry that key through list and upload-worker callbacks, and check it under the slot lock before replacing a descriptor with the neutral view. The existing completion check now validates the key of the upload that actually ran.
How it was tested
Checked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-11-30T09:56:19Z.
The immediate publication paths can still reread a replacement descriptor. In
3d65cbe, bothat_once(no upload needed) and theshows_otherbranch for unchanged contents can check view A, then call ordinarymirrorafter the slot has been rewritten to view B. The deferred key check cannot cover those calls.Follow-up 6855892 uses the key the texture pass already has and checks it under the existing mirror lock before any slot bookkeeping. It keeps the normal mirror and
show_new_laterrules. An empty snapshot can still clear a slot that stays empty, while a new valid view waits for its own turn.I extended the existing asset-free D3D12 fixture. The stale immediate attempt returned B before the change and is rejected after it. The current-key and still-empty cases also pass. The targeted descriptor and draw diagnostics suite passed on RTX 4060 (90 passed, 1 ignored). All four focused tests passed with WARP and staged asset policy passed. Gameplay impact remains unmeasured.