GPU/list: retain host ID3D12Resources in Aliasing and UAV barriers an… #540
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/540"
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 pug205gti6 on 2026-11-25T02:02:22Z.
…d include depth-plane twin
D3D12 command lists do not AddRef resources passed to
ID3D12GraphicsCommandList::ResourceBarrier. Transition barriers (kind == 0) kept host textures alive viaHostList::transition, but Aliasing (kind == 1) and UAV (kind == 2) barriers extracted rawID3D12Resource*pointers viahost_resource/twin_resourcewithout callinglist.keep(...). Releasing a title texture (or idle eviction) beforeExecuteCommandListstherefore caused a hostID3D12Resourceuse-after-free.Additionally, UAV barriers on depth-stencil+UAV textures only emitted a barrier for
twin.colour, omittingtwin.plane(the depth-plane twin).Hold owned
Arc<HostTexture>/Arc<Twin>viaresource::host_copy/resource::twin, retain every referencedID3D12Resourceon the command list withlist.keep(...), and emit UAV barriers for bothtwin.colourandtwin.plane. Add a synthetic D3D12 unit test verifying COM refcount retention, depth-plane twin emission, and safe execution after releasing title textures.Imported from fxceless/victory-fork. Originally posted by Revens2 on 2026-11-25T07:37:42Z.
Duplicate of #479: @AscilCH opened this patch 39 minutes earlier, and
gh pr diffreturns the same bytes for both (+255/-37 on 1 file(s), same title).Please continue in #479 so the review history and any test data stay in one place.
Thanks.
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.