Pin deferred texture flips to the uploaded descriptor #3840
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3840
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Yoruiopz on GitHub · 2026-11-30 09:03 UTC · original
Yoruiopz:pin-deferred-texture-upload-keys→main· +118 −36 · 2 files · 1 commits · merged 2026-11-30 14:12 UTCWhat 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
@tyr0nsur on GitHub · 2026-11-30 09:56 UTC · original
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.