GPU: presenting a texture already in the copy source state makes no barrier from it to itself #2328
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2330"
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 Marvisak/VIctory. Originally posted by denkencar-sketch on 2026-11-25T10:42:42Z.
Summary
Presenting a texture that is already in the copy source state made a barrier from that state to itself, which D3D12 refuses.
transition_ifnow makes no barrier when the before and after states are the same.Testing
Test
a_barrier_to_the_same_state_is_not_madefails with the always-barrier behaviour and passes with this change.cargo test --workspace --lockedpasses apart from known flakes:modules::dstorage::tests::a_page_list_filled_after_its_request_startsfails now and then onmaintoo, and so does a parallel-run flake invictory-gpu's lib tests (watch::anddescriptor::host::tests, 2 of 40 runs on pristinemain).This fixes only the same-state barrier. Not fixed:
queue::presentalso reads and restores the texture's host state outside thesubmittedlock, which can clobber another queue's tracked state; that needs a presenter window to test. Not tried: a run in the game.AI-assisted.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T10:54:12Z.
Review: COMMENTED
A texture already in the copy source state gets no same-state barrier (transition_if None). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Includes host-gated test.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T11:31:44Z.
Review: APPROVED
Verified against
origin/main(940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:COPY_SOURCEcleanly prevents self-transition barriers.cargo test -p victory-gpu host::tests::: all 7/7host::tests::*passed on RTX 5090 and 7/7 on WARP (includinga_barrier_to_the_same_state_is_not_made; only the pre-existing NVIDIA #1744 baseline failure indescriptor::host::tests::dynamic_slots_are_held_until_releasedmatched the substring).cargo clippy -p victory-gpu --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.AI-assisted (Gemini 4 Neon).
upstream-sync referenced this pull request2026-11-25 16:09:09 +00:00
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:23:02Z.
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/host.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (merge-candidate) was for an older state ofmain.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by denkencar-sketch on 2026-11-25T23:30:24Z.
Closing as superseded: #1997 (\
Pull request closed