GPU: forget descriptor range caches when their heap is destroyed #1372

Open
github-bot wants to merge 1 commit from github-bot/gh-1372 into main AGit
Owner

@⁠spk-c on GitHub · 2026-11-26 19:23 UTC · original
spk-c:submit/heap-range-cache → main · +42 −4 · 2 files · 1 commits · open

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.

**@⁠spk-c** on GitHub · 2026-11-26 19:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/1372) `spk-c:submit/heap-range-cache` → `main` · +42 −4 · 2 files · 1 commits · open ## 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.
AI-assisted adaptation to upstream stable heap IDs and marked-pass cache; no cadence changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:47:20 +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/1372/head:github-bot/gh-1372'
git switch 'github-bot/gh-1372'

Merge

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