Repository navigation
GPU: wait for a sent-ahead submission before detiling into the staging buffer it copies from - #272
Open
fffluffy-dev wants to merge 1 commit into
Open
fffluffy-dev wants to merge 1 commit into
fffluffy-dev wants to merge 1 commit into
Conversation
…g buffer it copies from Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JustDownTV
pushed a commit
to JustDownTV/victory-gta6
that referenced
this pull request
Nov 25, 2026
…g buffer it copies from (fxceless#272)
Closed
triippywhale
pushed a commit
to triippywhale/victory-fork
that referenced
this pull request
Nov 25, 2026
…g buffer it copies from Port of PalmVIDev fc83669 (fxceless#272, fffluffy-dev). With submissions sent ahead (relay, late waits), a submission's prelude copies a texture's staging buffer into its host texture when the card runs it; the next submission's refresh could detile new contents into that buffer first, and the texture took part of the newer contents. A detile now waits for the last submission sent ahead whose prelude copies out of that staging buffer (Host::wait_for_staging); the frame line's texture refresh time says how long such waits took. Adapted to this tree's upload path (main 737fcb7: the copy is recorded in HostList::prelude when take_upload says so): the prelude marks the staging buffer queued, and when the submission is sent ahead its fence is noted (Staging::upload_sent); a submission that is waited for leaves nothing to wait for. Nothing changes without send-ahead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017V7WBA8CxPD68KngjiMeJb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 realCopyTextureRegionfrom 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 warningsclean with and without--all-features;cargo xtask policyok. 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.