GPU/list: retain host resources on Aliasing/UAV barriers and include depth-plane twin #479
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!479
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-479"
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?
@AscilCH on GitHub · 2026-11-25 01:22 UTC · original
AscilCH:fix/gpu-barrier-retain-host-resources→main· +255 −37 · 1 files · 1 commits · openProblem
In
crates/victory-gpu/src/list.rs,host_barrierpassed rawID3D12Resource*pointers toID3D12GraphicsCommandList::ResourceBarrier(which does notAddRefreferenced resources):kind == 1) and UAV (kind == 2) barriers: Unlike Transition barriers (kind == 0, which keepArc<HostTexture>inHostList::statesvialist.transition), Aliasing and UAV barriers borrowed raw pointers viaresource::host_resource/resource::twin_resourcewithout callinglist.keep(...). If the title released the resource (orresource::let_go_idleevicted it) beforeExecuteCommandLists, the hostID3D12Resourcewas destroyed while still referenced by the recorded command list.kind == 2only emitted a UAV barrier ontwin.colour(stencil plane) and omittedtwin.plane(depth plane).Fix
Arc<HostTexture>/Arc<Twin>viaresource::host_copyandresource::twin, retain every referencedID3D12ResourceonHostListvialist.keep(...)until list reset, and emit UAV barriers for bothtwin.colour.textureandtwin.plane.texture.aliasing_and_uav_barriers_retain_host_resources_and_depth_plane_twinverifying COM refcount retention, both twin UAV barriers, and safeClose+ExecuteCommandListsafter releasing all title textures.Verification
cargo test -p victory-gpu --locked list::tests -- --test-threads=1: 2 passed, 0 failedcargo xtask policy: 169 files okcargo clippy -p victory-gpu --all-targets --locked -- -D warnings: cleancargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings: clean(AI-assisted; synthetic unit tests only, no game data.)
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.