GPU: presenting a texture already in the copy source state makes no barrier from it to itself #2330

Closed
github-bot wants to merge 1 commit from gh-pr/2330/head into gh-pr/2330/base
Owner

@⁠denkencar-sketch on GitHub · 2026-11-25 10:42 UTC · original
denkencar-sketch:fix/queue-001 → main · +39 −10 · 1 files · 1 commits · closed without merging

Summary

Presenting a texture that is already in the copy source state made a barrier from that state to itself, which D3D12 refuses. transition_if now makes no barrier when the before and after states are the same.

Testing

Test a_barrier_to_the_same_state_is_not_made fails with the always-barrier behaviour and passes with this change.

cargo test --workspace --locked passes apart from known flakes: modules::dstorage::tests::a_page_list_filled_after_its_request_starts fails now and then on main too, and so does a parallel-run flake in victory-gpu's lib tests (watch:: and descriptor::host:: tests, 2 of 40 runs on pristine main).

This fixes only the same-state barrier. Not fixed: queue::present also reads and restores the texture's host state outside the submitted lock, which can clobber another queue's tracked state; that needs a presenter window to test. Not tried: a run in the game.

AI-assisted.

**@⁠denkencar-sketch** on GitHub · 2026-11-25 10:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/2330) `denkencar-sketch:fix/queue-001` → `main` · +39 −10 · 1 files · 1 commits · closed without merging ## Summary Presenting a texture that is already in the copy source state made a barrier from that state to itself, which D3D12 refuses. `transition_if` now makes no barrier when the before and after states are the same. ## Testing Test `a_barrier_to_the_same_state_is_not_made` fails with the always-barrier behaviour and passes with this change. `cargo test --workspace --locked` passes apart from known flakes: `modules::dstorage::tests::a_page_list_filled_after_its_request_starts` fails now and then on `main` too, and so does a parallel-run flake in `victory-gpu`'s lib tests (`watch::` and `descriptor::host::` tests, 2 of 40 runs on pristine `main`). This fixes only the same-state barrier. Not fixed: `queue::present` also reads and restores the texture's host state outside the `submitted` lock, which can clobber another queue's tracked state; that needs a presenter window to test. Not tried: a run in the game. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:02:30 +00:00
github-bot closed this pull request 2026-11-26 05:02:30 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 15:23 UTC · original · edited 2026-11-25 15:57 UTC

Automated triage for the maintainers.

This pull request no longer merges cleanly into main (conflicts in crates/victory-gpu/src/host.rs). It will be reviewed once it is rebased onto the current main. The earlier verdict (merge-candidate) was for an older state of main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 15:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2330#issuecomment-7166756686) · edited 2026-11-25 15:57 UTC <!-- victory-triage v1 head=e4e2985a2f3b1eddf7689e6ac2cf43079e2f1af0 verdict=needs-rebase at=2026-11-25T15:58:00Z --> Automated triage for the maintainers. This pull request no longer merges cleanly into `main` (conflicts in `crates/victory-gpu/src/host.rs`). It will be reviewed once it is rebased onto the current `main`. The earlier verdict (merge-candidate) was for an older state of `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠denkencar-sketch on GitHub · 2026-11-25 23:30 UTC · original

Closing as superseded: #1997 (\

**@⁠denkencar-sketch** on GitHub · 2026-11-25 23:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2330#issuecomment-7177654609) Closing as superseded: #1997 (\

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2330
No description provided.