Repository navigation
Conversation
Grand Theft Auto VI submits from one thread: for each batch it calls ExecuteX, PresentX and Signal, and only then gives its ring slots back to the producers its main thread waits on (Marvisak#1118). With submissions asynchronous, `Host::present` still drained every submission after `Present`, so that thread waited for the frame's whole GPU time inside PresentX. The title waits for its fences, not for the present, so the shortcut's condition holds: a present now finishes the previous frame's submissions (and its copy, whose list it reuses) before it records this frame's, and leaves this frame's running. ResizeBuffers still drains; a saved capture settles its frame before reading it back. The copy list now holds the presented texture, since the title may release it while the copy still runs. Diagnostics: the black-frame probe of a frame is read at the next present, once that frame's work has finished, and reported with that frame's own number, resource and draws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
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.
For Marvisak#595 (Marvisak/VIctory), on top of your
dfac3b4. One commit.What:
Host::presentwaits for the previous frame's submissions instead of draining all of them afterPresent. It settles the newest submission recorded at the last present (that frame's copy included) before it resets and reuses the copy list, then leaves the current frame running.ResizeBuffersstill drains.VICTORY_CAPTURE) settles its frame before the read-back.keeps the presented texture, because the title may release it while the copy is still running. Before, the drain hid this.blinksreports it with that frame's own number, resource and draws.Why: this is the condition in the
shortcut:comment. The title waits for its fences, not for the present. Its submission thread (+0x2481e90) callsExecuteX, thenPresentX, thenSignal, and only after that returns ring slots to the producers main waits on (traced in Marvisak#1118, comment). With the drain, that thread sat inPresentXfor the frame's whole GPU time, so the Marvisak#1118 stall moved fromExecuteXtoPresentX.Test:
host::submissions::a_present_waits_for_the_previous_frame_not_its_ownholds a submission on the GPU with yourGate. It checks that "presenting" the frame leaves the submission running with its bottom-of-pipe write not yet done, and that the next frame's present finishes it. It drives the two helperspresentuses (frame_done,previous_frame), becausepresentitself needs a swap chain.Checked on RTX 3050 6 GB Laptop, Linux, Proton 11.0 (vkd3d-proton), real device:
cargo-xwin clippy -p victory-gpu -p victory --all-targets -D warnings: clean, with and withoutdiagnostics.victory-gpu --features diagnostics: 81 passed, 10 failed. The same 10 fail on plain70564aeon this host (the view heap is capped at 1,000,000, plus vkd3d root-signature refusals).70564aeto 2-3 ms ondfac3b4to 0.0-0.3 ms with this commit. Black-frame reports still fire with correct frame numbers. It does not fix the Crash at victory-image-b99f876b74d4a77f.dll+0x23cf683 (write 0x0) ~1 min after entering the world (prologue, Prestream) Marvisak/VIctory#1118 stop by itself. I reproduced the stop on this card withffe310e+ GPU: add VICTORY_TEXTURE_MIP_DROP and DXGI auto-default for <= 8 GB GPUs (fixes #737, #1226) Marvisak/VIctory#1296 (mip drop) + GPU: run submissions asynchronously on a host fence timeline Marvisak/VIctory#595@7465030+ GPU: remember pipelines whose creation crashed the process (VICTORY_PIPELINE_JOURNAL) Marvisak/VIctory#491 (pipeline journal), then A/B'd with and without this commit (3 runs each). The stop came at 85-146 s either way. In the stack dumps, the title's submission thread is inPresentX→drain→wait_gpuwithout this commit, and inPresentX→previous_frame→wait_gpuwith it. In both,victory-gpu-finisherwaits on the host fence indefinitely: the GPU itself stops completing work there. This commit removes the wait on the frame being presented, but it can't help when the previous frame's GPU work never finishes.Reviewed by a second agent before opening; it caught the texture lifetime and the
blinkspairing.🤖 Generated with Claude Code (with Codex and Antigravity). No game data included.