GPU: replay originally bound RTV and DSV views #48
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/DexNom--VIctory!48
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-48"
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?
@Cuebert on GitHub · 2026-11-25 20:40 UTC · original
Cuebert:gpu/retain-output-views→main· +296 −23 · 3 files · 1 commits · openI found that
State::set_targetskept guest CPU descriptor handles and rebuilt RTV/DSV bindings when replaying state onto a later host command list. D3D12 consumes non-shader-visible RTV/DSV descriptors while recording the bind call, after which the CPU descriptor storage may be reused (Microsoft documentation). If the title rewrites one of those slots before a runtime list cut, rebuilding from the handle can bind the later view instead of the view originally recorded.This change keeps each bound view description together with a retained title resource and its native host texture, then reuses that snapshot when binding outputs on the next host list. The new WARP regression draws to two 4×4 targets and rewrites the RTV slot, DSV slot, both, or neither between the initial bind and replay. The original implementation failed three rewrite cases; the corrected implementation returned all 16 red pixels on the original target in all four cases. The targeted test passed, the resource test group reported 15 passed, and the diagnostics-free GPU crate check passed.
I have not established that the title rewrites a CPU descriptor in the captured list-cut sequence or verified an in-game visual change. The trace shows list cuts, but it does not retain descriptor rewrite history.
@Artking175 on GitHub · 2026-11-25 21:03 UTC · original
Independent check on RTX 2060 (Windows 10, driver 531.41, Agility 1.614.1). I ran
replay_uses_render_target_and_depth_views_as_boundon the hardware adapter and separately with WARP. Both used PR head2ac8e5f7plus the same #12 SDK loader overlay. For the control I kept the fixture and restoreddraw.rsfrom2e01ab4.Both adapters gave the same readback. The pairs count red pixels in the original and alternate render targets.
The control failed the output-binding assertion on both adapters. The PR passed all four cases on both. I did not test the title's descriptor history or rendering with this branch.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.