GPU/list: split duplicate resource transitions across ResourceBarrier calls and sanitize committed aliasing barriers #787
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!787
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-787"
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 07:35 UTC · original
AscilCH:fix/gpu-list-barrier-dedup-and-committed-aliasing→main· +316 −23 · 1 files · 1 commits · openSummary
Fix two Direct3D 12 barrier validation bugs in
crates/victory-gpu/src/list.rs:Duplicate
ALL_SUBRESOURCEStransitions in a singleResourceBarriercall (D3D12 error#524).host_barrier()flattens per-subresource transition barriers toD3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES. When a title transitions multiple subresources of the same texture to different states in oneResourceBarrier(count, barriers)call,barrier()previously submitted both whole-resource transitions together in oneResourceBarrierslice.for_barrier_batches()to split the translated barriers into maximal contiguous slices where no singleResourceBarriercall repeats aTransition(kind == 0) barrier for the same hostID3D12Resource.Committed resources passed in
D3D12_RESOURCE_BARRIER_TYPE_ALIASINGbarriers.NULLin aliasing barriers (and requiresFlags == 0). PassingCreateCommittedResourcepointers is a D3D12 validation error.resource::host_copy()andaliasing_barrier(), preserving reserved (host.tiled.is_some()) resource pointers while downgrading committed host textures toNULL(forming a valid half-open or global aliasing barrier) and clearingflags.Verification
cargo test -p victory-gpu --locked -- list:::4 passed; 0 failed; 0 ignored(includingbarrier_batches_split_before_duplicate_resource_transitions,aliasing_barrier_downgrades_committed_resources_and_keeps_reserved, and real D3D12 device testhost_barrier_handles_committed_aliasing_and_subresource_transitions_on_device; host lacks optional Windows Graphics Tools D3D12 debug layer).cargo clippy -p victory-gpu --all-targets --all-features --locked: 0 warnings incrates/victory-gpu/src/list.rs(only pre-existing8dd30abwarnings indraw.rsandindirect.rs).cargo xtask policy:171 files ok.(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.