Repository navigation
GPU: a command queue's SuspendX and ResumeX succeed - #3225
Open
JurajSimicevic wants to merge 1 commit into
Open
JurajSimicevic wants to merge 1 commit into
JurajSimicevic wants to merge 1 commit into
Conversation
Grand Theft Auto VI's suspend routine calls the command queue's SuspendX(0) at 0xb8, which had no method: every window close or relaunch logged "method not implemented" for the command queue and the call answered E_NOTIMPL (noted in Marvisak#1080). SuspendX and ResumeX now succeed. On the console they stop and restart the queue's GPU work; here submissions have run when Execute returns, work held for a wait runs once the wait is met, and a suspended title is never resumed, so there is nothing to stop. They sit at 0xa8/0xb0 in the older queue layout, so newer queues have them at 0xb8/0xc0, where the title calls them. New test: queue::tests::queues_suspend_and_resume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dukestar69
approved these changes
Nov 26, 2026
Dukestar69
left a comment
There was a problem hiding this comment.
Verified on RTX 5090 against origin/main (63bcca4):
cargo test -p victory-gpu --lib queue:: -- --test-threads=1: 6/6 passed (includingqueues_suspend_and_resume).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Cleanly implements SuspendX and ResumeX on command queues.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
vanya890
added a commit
to vanya890/VIctory
that referenced
this pull request
Nov 26, 2026
Import upstream Marvisak#3225: implement queue SuspendX and ResumeX
|
WARP verification at head
Software adapter (WARP, Microsoft Basic Render Driver), not a physical GPU. Synthetic tests only, no game files. Run with AI-assisted: verification by Claude Code (Claude Sonnet 5.5). |
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.
Problem
When the title is suspended (window close, or a relaunch through
lifecycle::end_title), Grand Theft Auto VI's suspend routine calls the command queue'sSuspendX(0)at slot 0xb8. Nothing is written there, so every suspend logsmethod not implemented object="command queue" slot=0xb8and the call returnsE_NOTIMPL. #1080 noted it and left it as a follow-up.queue.rsalready names 0xb8/0xc0 as suspend and resume, from the title's calls.Change
SuspendX(flags)andResumeX()returnS_OK. On the console, a suspend stops the queue's GPU work andResumeXrestarts it (Microsoft's public GDK sampleDeviceResourcesGXDK.cppcallsSuspendX(0)on suspend andResumeX()on resume). Here there is nothing to stop. Our submissions have run when Execute returns, work held for a wait runs as soon as the wait is met, and a suspended title is never resumed, because the process ends.METHODSgets them at 0xa8/0xb0 in the older layout, sonewer_slotputs them at 0xb8/0xc0, where Grand Theft Auto VI calls them.queue::tests::queues_suspend_and_resume: the slots in both layouts, and both calls through a queue's own table returnS_OK.crates/victory-gpu/src/queue.rsonly.Tested
cargo test -p victory-gpu --lib queue::: 6 passed, among them the new test.cargo test --workspace --locked: 569 passed. On this card (RTX 5080) two tests ofvictory-gpufail, as they do onmainon every NVIDIA host:dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views(the 1,000,000-view cap; GPU and shaders: a host that caps its view heaps gets heaps at its ca… #2461 and GPU: view heaps on hosts capped below 2^21 descriptors #1779 address it). Thevictory-shadertest binary exits withSTATUS_ACCESS_VIOLATIONwhile its tests run in parallel. That crate doesn't depend onvictory-gpuand is the same as onmain.cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features: clean. No new rustfmt hunks.main63bcca4with this change,RUST_LOG=info,victory_gpu::queue=debug. The window was closed at the menu:No
method not implementedline for the command queue. The title callsSuspendXonce, 0.1 s after the close, and finishes suspending right after.In the world at 0.5 fps it doesn't get that far. In my earlier runs on
main, the title reached this call only after the 1 s deadline inlifecycle.rshad passed (title did not finish suspending in time, then theslot=0xb8line). There, this change makes no difference.Claim: #1633 (#1633 (comment)).
No game data: log lines and counts only.
AI-assisted.
🤖 Generated with Claude Code