GPU: a command queue's SuspendX and ResumeX succeed #3223
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3225"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by JurajSimicevic on 2026-11-26T13:44:25Z.
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; #2461 and #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 (https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7193577024).
No game data: log lines and counts only.
AI-assisted.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T13:49:23Z.
Review: APPROVED
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
SuspendXandResumeXon command queues.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-26T15:03:49Z.
WARP verification at head
db63d1f2(main63bcca43as control).queue::tests::queues_suspend_and_resume: passes on the head.descriptor::host::tests::a_slot_rewritten_while_its_view_is_prepared_views_the_new_recordfailed once (it passed in the next 3 runs). This PR only touchesqueue.rs, so I read it as a flake in an unrelated test, not something this PR causes. I did not chase it. Main passed 246 of 246 in 3 of 3 runs.SuspendXreturnsE_NOTIMPL(-2147467263) instead ofS_OK.Software adapter (WARP, Microsoft Basic Render Driver), not a physical GPU. Synthetic tests only, no game files. Run with
VICTORY_WARP=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib --features diagnostics -j 4and dxil.dll available. Test report only, no code changes.AI-assisted: verification by Claude Code (Claude Sonnet 5.5).
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-27T06:17:08Z.
Independent CPU-only verification of PR #3225 (
GPU: queue Suspend/Resume keeps per-queue state).CARGO_TARGET_DIR(D:\Victory-Contrib\target-3225-watch),CARGO_BUILD_JOBS=2.db63d1f29e0a3d260bb8355cff03a738ba11c59d, merge base63bcca43c6a00a758510398fa43096ce7e4f7df0.cargo test --locked -p victory-gpu --lib -- queue::tests::queues_suspend_and_resume --exact --test-threads=1 --quiet->1 passed; 0 failed; 232 filtered.git grep -Ffor the new test name on63bcca4returned no hits (test absent on base).git diff --check 63bcca4 HEADexit 0 (clean).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.