GPU/list: retain host resources on Aliasing/UAV barriers and include depth-plane twin #479
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by AscilCH on 2026-11-25T01:22:54Z.
Problem
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
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.