Restore the title’s final texture state after water readback #1170
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/fxceless--victory-fork!1170
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1170"
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?
@BradRoland on GitHub · 2026-11-25 22:37 UTC · original
BradRoland:codex/restore-water-readback-state→main· +51361 −84 · 15 files · 17 commits · openThe water readback in #999 transitions a texture to
COPY_SOURCEwhen the command list closes. It can leave the texture there even if the title had already transitioned it back to shader-resource or unordered-access use. A later shader can inherit this state when its texture index is computed and the next list does not explicitly name that texture.This saves the final state recorded by the current list, transitions for the copy if needed, and restores that state immediately afterward. A combined read state that already includes
COPY_SOURCEneeds no extra barrier. For a texture with no earlier state in the list, the submission prelude still establishes the copy-source state.On
9c184b3, an 8×8 R32_FLOAT regression landed the expected texel but left the texture at0x800instead of the requested shader-resource state0xc0. The corrected test passes for shader-resource, unordered-access, combined shader-resource/copy-source, and copy-source states. Reproduce withcargo test --locked -p victory-gpu --features diagnostics water_readback_preserves_the_final_texture_state.A separate D3D12 debug-queue check covered 48 combinations on RTX 4080 and WARP, with water readback on/off and synchronous or deferred submission (relay off or stage 2). All 48 passed after the fix. The graphics suite had 201 passes and six ignored on each of two standalone runs. The sole failure was the existing indirect-budget ordering assertion in #1118. In 12 isolated WARP repetitions per binary, the same assertion failed six times with the original renderer and nine times with this patch. The state and subresource tests also passed together with #1152.
The fixtures use synthetic textures. The later device loss in the mission report still has no established cause. Gameplay report
AI-assisted implementation and testing.
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.