GPU: forget descriptor range caches when their heap is destroyed #1372
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1372"
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 fxceless/victory-fork. Originally posted by spk-c on 2026-11-26T19:23:50Z.
Problem
Both the regular and marked buffer-view passes keep process-wide caches keyed by HostHeap addresses. A destroyed heap can leave cached shadow references behind; a new heap reusing that address can inherit stale cache state.
Change
Use upstream's existing monotonic heap ID (#1324) for both caches and remove both entries at title heap destruction, after releasing the shader-heap registry lock. Drop cached resource references after the cache locks have been released. Keep marked-pass forgotten-entry propagation, alt-mode reset, and the original full-scan cadence unchanged. This is a narrow alternative to the older fork's per-heap cache approach, adapted for current upstream.
Verification
Direct base
52ac4ec. Clean isolated workspace all-target/all-feature cargo check and Clippy -D warnings passed. Synthetic regression heap_range_cache_forgets_both_passes passed (only the specified heap's entries removed). Staged asset policy and diff checks passed. The regression does not exercise a live COM heap destruction or GPU race. Upstream full policy still has the pre-existing source-size issue addressed by #1357. CI/review pending.AI-assisted, inspired by fork b5cbfbc; no title assets.
Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T09:42:08Z.
I cherry-picked
9aac3495unchanged onto my4c60466-based Proton integration (3fd5af9). The Windows MSVC diagnostics build passed the heap-destruction regression, all four heap planner tests and the concurrent registration/cache-generation test under GE-Proton11-14.I also replayed the same early world view on the physical RTX 5060 Laptop GPU with both the plain and marked scan, keeping the executable and initial cache/checkpoint fixed. Both rendered the room and responded to camera input. In the matched 54-second windows, throughput was 5.94 and 6.38 FPS and the median heap preparation time was 63.8 and 68.3 ms respectively. This exercises both cache variants and the teardown fix on Proton. The two short replays leave the long-session memory effect open.
NVIDIA 615.78.08, vkd3d-proton 3.2.0. Assisted by Codex (GPT-6.2-Sol High).
Pull request closed