D3D12.X: make the compute heartbeat opt-in under Wine #2916
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2916
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2916"
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?
@gustavsi on GitHub · 2026-11-26 23:09 UTC · original
gustavsi:wine/amd-gpu-awake-optin→amd-dev· +18 −13 · 2 files · 1 commits · openThe AMD keep-awake compute queue (
gpu_awake.rs) auto-starts whenevervendor_id == 0x1002and submits compute dispatches throughout active rendering. Under Wine on RADV (RX 9060 XT), those background compute dispatches contend with active frame presentation and cut frame output by ~40%.Making
Mode::Autorequire!under_wine()keeps the native Windows AMD default untouched, leavesXCL_GPU_AWAKE=1available as an explicit opt-in under Wine, and restores full presentation throughput on RADV without needing an environment override.Opened as a Draft PR targeting
amd-devbecauseamd-dev(bf7c82ee) does not yet carry the Wine vtable guards (#867/#2477), so a standalonescripts/smoke.ps1pair onb775ff85cannot be captured on Linux/Wine here; native Windows/AMD verification is needed before marking ready.What is in it
crates/xcl/src/hle/d3d12x/gpu_awake.rs: passcrate::util::under_wine()intoshould_enable(), disablingMode::Autounder Wine while preservingMode::On/Mode::Offand native Windows AMD auto-enable; expandenv_mode_parsing_and_amd_auto_enableto cover bothunder_wine = falseandunder_wine = true.README.md: document that the AMD keep-awake compute queue auto-starts on native Windows and is opt-in (XCL_GPU_AWAKE=1) under Wine.Tested
GE-Proton11-14, DXC1.9.2609.5,rustc(x86_64-pc-windows-msvccross-build, release).cargo build --release -p xcl --bin xclonb775ff85: clean build (Finished release profile in 51.44s).cargo test --release -p xcl --lib hle::d3d12x::gpu_awake::(underGE-Proton11-14) onb775ff85: 2 passed, 0 failed, 0 ignored (env_mode_parsing_and_amd_auto_enable,heartbeat_hlsl_compiles_with_d3dcompile; 0SKIPPED).amd-devintegration tree (ae20c0a1, identical executable, RX 9060 XT RADV,MemoryMax=24G, 60 s capped runs): changing onlyXCL_GPU_AWAKE=0raised frames shown from 618 to 1,025 (+65.9%, reaching 57–60 presents per 2 s during the intro).Not tested
scripts/smoke.ps1directly onb775ff85(cannot boot under Wine without#867/#2477).b775ff85.AI use
gpt-6.2-astra) measured theXCL_GPU_AWAKE=0A/B improvement on this machine and authored the commit (README.mdandgpu_awake.rs).Gemini 4 Neon) rebased the commit cleanly ontoamd-dev(bf7c82ee->b775ff85), built and ran thegpu_awake::tests under Proton on this machine, and updated this PR description.@JJAutoCompare on GitHub · 2026-11-27 00:11 UTC · original
Tested: Clean
b775ff85760912faf6e75afd0589691c68afe6ac, Windows 11 build 26200, Ryzen 7 3800X, Rust 1.100.0 MSVC, debug.cargo test --locked -j 2 -p xcl --lib hle::d3d12x::gpu_awake:: -- --nocapture: 2 passed, 0 failed, 0 ignored, 0 skips. The fixtures cover simulated vendor/Wine defaults, explicit overrides, and native WindowsD3DCompilecompilation of the heartbeat shader.Not tested: Actual heartbeat dispatch, AMD hardware, Wine/RADV behavior or performance, full workspace suite, or retail smoke.
AI use: T3 Code / Codex (
gpt-6.2-sol) ran and independently reran the tests and drafted this report.@akimfomin on GitHub · 2026-11-27 00:16 UTC · original
I ran the pinned mode logic from
b775ff85with the actual ntdll Wine-symbol check on native Windows. Two focused tests passed: native Windows kept the AMD default, and the synthetic Wine branch honored both overrides. This used a synthetic vendor ID and did not start an AMD GPU worker. Pinned decision code.I put the remaining native Windows/AMD check in PortBridge Test Lab #101, linked to your draft. Someone with AMD can give that link to their agent and return the two test outcomes. The task records worker execution separately if a synthetic runner is available. Any result can come back here with the tester's credit. AI-assisted native decision test.
@vibryxcx on GitHub · 2026-11-27 00:21 UTC · original · edited 2026-11-27 03:19 UTC
The native Windows / AMD check asked for in the description: on Windows the default is unchanged, and the heartbeat still starts by itself on AMD.
Tested: AMD Radeon RX 6800 (RDNA2, driver 32.0.21045.5002), i5-10600KF, Windows 11 Pro 26200, Rust 1.100.0, release for
xcl.exeand debug for the tests. Headb775ff85vs its baseamd-devbf7c82ee, each in its own worktree with no uncommitted changes. Retail title, warm caches, noXCL_GPU_AWAKEset.GPU keep-awake async-compute heartbeat active (vendor 0x1002, XCL_GPU_AWAKE=0 to disable)at about 18.7 s, sounder_wine()is false here andMode::Autostill enables it.cargo test -p xcl --lib -- hle::d3d12x::gpu_awake::: 2 passed, 0 failed, 0 ignored (env_mode_parsing_and_amd_auto_enable,heartbeat_hlsl_compiles_with_d3dcompile), no SKIPPED.Regression run
The base is
bf7c82eeonamd-dev, not a commit ofmain. Frames (99 %) and commit are within the limits.Not tested: Wine / RADV (no Linux machine here); longer runs (on this card
bf7c82eeitself crashes in the AMD compiler later in the title, see #2874, which is unrelated to this change); the full suite on this head (since run, see the update below).AI use: Claude Code (Claude Opus 5.5) read the diff, ran the builds, tests and the smoke pair, and wrote this comment.
Update: full lib suite on this head (
b775ff85, same RX 6800, debug,cargo test -p xcl --lib -- --test-threads=1with the 4 tests skipped that hang or abort only inside the fullamd-devrun, see #42): 1651 passed, 12 failed, 27 ignored. These are the same 12 failures as basebf7c82eerun the same way, so nothing fails only on this head. Bothgpu_awaketests pass. SKIPPED: 11 lines, the same as on the base:f16_programs_on_the_gpu, plus GPU tests skipped after the test process loses its device partway through the run, a base issue reported in #42.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.