GPU: wait for a sent-ahead submission before detiling into the staging buffer it copies from #272

Open
github-bot wants to merge 1 commit from github-bot/gh-272 into main AGit
Owner

@⁠fffluffy-dev on GitHub · 2026-11-24 23:06 UTC · original
fffluffy-dev:gpu/precise-staging-fence → main · +75 −20 · 2 files · 1 commits · open

With VICTORY_LATE_WAIT/VICTORY_RELAY, a submission still on the card may be copying from a texture's staging buffer when the next preparation detiles new contents into it. A submission is now marked as reading a staging buffer only when it recorded a real CopyTextureRegion from it, and a detile waits for that fence only when contents changed, so unchanged textures never wait (a wait on every texture step, as in #141, would wait at almost every submission). Device removal is checked before and after the wait; the wait time is reported.

Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine): victory-gpu 111 passed, 1 ignored; victory-formats 24-25 passed; cargo clippy --workspace --all-targets -D warnings clean with and without --all-features; cargo xtask policy ok. Not measured on a real frame.

AI use: written with Codex and Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.

**@⁠fffluffy-dev** on GitHub · 2026-11-24 23:06 UTC · [original](https://github.com/fxceless/victory-fork/pull/272) `fffluffy-dev:gpu/precise-staging-fence` → `main` · +75 −20 · 2 files · 1 commits · open With `VICTORY_LATE_WAIT`/`VICTORY_RELAY`, a submission still on the card may be copying from a texture's staging buffer when the next preparation detiles new contents into it. A submission is now marked as reading a staging buffer only when it recorded a real `CopyTextureRegion` from it, and a detile waits for that fence only when contents changed, so unchanged textures never wait (a wait on every texture step, as in #141, would wait at almost every submission). Device removal is checked before and after the wait; the wait time is reported. Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine): victory-gpu 111 passed, 1 ignored; victory-formats 24-25 passed; `cargo clippy --workspace --all-targets -D warnings` clean with and without `--all-features`; `cargo xtask policy` ok. Not measured on a real frame. **AI use:** written with Codex and Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:39:37 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/texture.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/272/head:github-bot/gh-272'
git switch 'github-bot/gh-272'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-272'
git switch 'github-bot/gh-272'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-272'
git switch 'github-bot/gh-272'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-272'
git switch 'main'
git merge --squash 'github-bot/gh-272'
git switch 'main'
git merge --ff-only 'github-bot/gh-272'
git switch 'main'
git merge 'github-bot/gh-272'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.