GPU: preserve RTV and DSV descriptor values across command-list cuts #1371

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

@⁠spk-c on GitHub · 2026-11-26 19:22 UTC · original
spk-c:submit/target-replay → main · +86 −23 · 2 files · 1 commits · open

Problem

When a title list is cut and its state replayed into a new host list, the original RTV/DSV CPU slots may already have been rewritten. Replay currently looks at those slots again, instead of the descriptor values captured by the original SetRenderTargets call.

Change

Snapshot descriptor words and resource identity at SetRenderTargets and reconstruct views from the snapshots on replay. Preserve current upstream target-format tracking and existing typed-null/missing-view behavior. The caller's resource lifetime contract remains unchanged; no new raw pointer dereference is introduced beyond the existing resource lookup path.

Verification

Directly based on upstream 52ac4ec. Fresh isolated workspace all-target/all-feature cargo check and Clippy -D warnings passed; synthetic render_target_snapshot_preserves_original_descriptor_words passed; staged asset policy (2 files) and diff check passed. The test checks value capture rather than a full GPU replay. No gameplay claims. Full upstream policy currently also needs upstream #1357's oversized source-file split; CI/review pending.

AI-assisted, adapted from fork commits 745b0d1 and 9059527. No proprietary assets.

**@⁠spk-c** on GitHub · 2026-11-26 19:22 UTC · [original](https://github.com/fxceless/victory-fork/pull/1371) `spk-c:submit/target-replay` → `main` · +86 −23 · 2 files · 1 commits · open ## Problem When a title list is cut and its state replayed into a new host list, the original RTV/DSV CPU slots may already have been rewritten. Replay currently looks at those slots again, instead of the descriptor values captured by the original SetRenderTargets call. ## Change Snapshot descriptor words and resource identity at SetRenderTargets and reconstruct views from the snapshots on replay. Preserve current upstream target-format tracking and existing typed-null/missing-view behavior. The caller's resource lifetime contract remains unchanged; no new raw pointer dereference is introduced beyond the existing resource lookup path. ## Verification Directly based on upstream 52ac4ec. Fresh isolated workspace all-target/all-feature cargo check and Clippy -D warnings passed; synthetic `render_target_snapshot_preserves_original_descriptor_words` passed; staged asset policy (2 files) and diff check passed. The test checks value capture rather than a full GPU replay. No gameplay claims. Full upstream policy currently also needs upstream #1357's oversized source-file split; CI/review pending. AI-assisted, adapted from fork commits 745b0d1 and 9059527. No proprietary assets.
AI-assisted; adapted from fork 745b0d1 and 9059527, preserving upstream target-format tracking.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:47:19 +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/1371/head:github-bot/gh-1371'
git switch 'github-bot/gh-1371'

Merge

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