D3D12.X: use dedicated PC direct queue for PresentX under Wine (#175) #787
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/793"
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 ivall/xcl. Originally posted by gsucristo on 2026-11-24T05:33:10Z.
Use a dedicated presenter-owned unadopted PC direct command queue for DXGI swap-chain creation and
PresentXcopies when running under Wine, synchronized with the title's adopted queue via GPU fenceSignal/Wait. Under Wine + vkd3d-proton, presenting on the title's adopted queue leaves the output window black. Native Windows behavior is unchanged. Part of #175.What is in it
crates/xcl/src/hle/d3d12x/present.rs: addWineQueueand raw-vtable helpers (create_pc_queue,create_pc_allocator,create_pc_list,create_pc_fence) used only whenutil::under_wine()is true; bind the DXGI swap chain to the dedicated queue and fence-bridge title queue → presenter queue → title queue on each present.crates/xcl/src/hle/d3d12x/present.rs(frame_dump_tests): adddedicated_pc_queue_copies_across_fence_from_title_queueverifying cross-queue fence-synchronized render target copy and readback.Tested
rustc 1.98.1(x86_64-pc-windows-msvccross-compile), debug.cargo test --workspace --no-fail-fast --target x86_64-pc-windows-msvc -- --test-threads=4 --skip a_freed_block_is_decommitted_before_its_address_is_reused: 700 passed, 4 failed (pre-existing Wine-only failures:hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime,test_title_runs_and_game_folder_is_untouched,disk_free_space_ex_reports_pls_quota,set_predication_buffer_state_and_kickoff), 41 ignored, 1 filtered (a_freed_block_is_decommitted_before_its_address_is_reused).SKIPPEDGPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64).hle::d3d12x::present::frame_dump_tests::dedicated_pc_queue_copies_across_fence_from_title_queue.Regression run
scripts/smoke.ps1runs on a retail title (Linux/Proton environment only).Not tested
util::under_wine()), AMD RDNA, Intel GPUs,scripts/smoke.ps1retail regression run.AI use
Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T05:51:21Z.
Test run of
6f4bef3c81a981d8c85a2bb7f153115ddb00e61con AMD RDNA4. I merged it onto currentmaine50836blocally (clean merge).Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 705 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 664 passed, 0 failed, 21 ignoredSKIPPED; thepresenttests pass.Review: Under Wine it presents on a dedicated PC direct queue; on native Windows, which is what this run is, the behaviour is meant to be unchanged, and the suite agrees. I could not run it under Wine, so the black-window fix itself is not checked here.
Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Imported from ivall/xcl. Originally posted by ethandepstein-del on 2026-11-24T06:18:11Z.
Clean-room build, audit, and native hardware test run on NVIDIA RTX 5080 (Windows 11 Pro 25H2
26200.9974, driver617.42/32.0.16.1742,rustc 1.100.0, DXC Windows SDK10.0.26100.0).6f4bef3c81a981d8c85a2bb7f153115ddb00e61ccargo build --workspace): clean (only the pre-existingfetch_updatedeprecation warning).cargo test --workspace -- --test-threads=4):705 passed; 0 failed; 41 ignored(SKIPPED: only the 2 hardwareno wave64tests).hle::d3d12x::present::frame_dump_tests::dedicated_pc_queue_copies_across_fence_from_title_queuepassed on real hardware.orig_fnslots (8/9/12/36) matchID3D12Devicevtable order and signatures (CreateCommandQueue,CreateCommandAllocator,CreateCommandList,CreateFence), and COM ownership viafrom_rawis balanced. One tiny non-blocking note:title_q.Wait(&p.fence, ...)ignores itsResult, though CPU waits still prevent corruption.(Clean-room hardware check only; no retail title or
smoke.ps1run. Assisted-by: Antigravity / Claude Sonnet 5.5 + Gemini 4 Neon)Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T07:17:50Z.
Regression runs for this PR's head
6f4bef3and for its basemaind208e14, on a retail title (same title, 60 s each), made withscripts/smoke.ps1(release, clean tree at each commit) and pasted unedited, for Regression run.main:
this PR:
Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
Imported from ivall/xcl. Originally posted by crastinator on 2026-11-24T15:44:13Z.
Review: COMMENTED
Tested on RDNA2 under Proton with a patched vkd3d-proton: the test suite shows no new failures.
Tested (head
6f4bef3, merged ontomain930e8b4: no conflicts)-Db_ndebug=true, dxil-spirv53aac418from #775), DXVK v3.1.1-209dxgi, DXC 1.9.2609.5, libopus 1.5.2,XCL_REQUIRE_GPU=wave64,mesh(0 SKIPPED)x86_64-pc-windows-msvc(clang-cl / lld-link, xwin SDK 10.0.26100), Rust 1.99.1, debugcargo test -p xcl --lib -- --test-threads=1plus every integration test (--test '*' -- --test-threads=1), compared per test with the same runs onmain930e8b4.mainhere: 8 stable Wine-lane failures (#530 ×2, #676, #890 ×2, e2e,pls_quota#810,predication_e2e#1272). Separately,title_textures::{placed_title_textures_share_vram_and_preserve_pixels, transitions_apply_when_their_list_is_submitted}andvram::d32s8_targets…fail together in 2 of 5mainruns (the #718 family), so I do not count a pass of those as a fix either way.main: 740 / 11 / 41, with the #718 flakes failing in that run). No test fails here that passes onmain. The e2e test title still fails here at itsuser32 … not cloakedcheck, as it does onmain; that check is #794's area, not this PR's.Not tested
XCL_SAMPLE_*was set, so the tests that read them (about 66) pass without running.AI use
Imported from ivall/xcl. Originally posted by Filip722 on 2026-11-25T05:08:13Z.
On an RTX 5060 Laptop GPU (8 GB), the cross-queue regression passed under Proton in 1.16 s with no skip. It read the expected green texel after a clear on the title queue and a fenced copy on the presenter queue.
I also compared main
6987e496c35653f9ccc9dbdc1f1d342734306811with only this PR's patch from6f4bef3c81a981d8c85a2bb7f153115ddb00e61capplied. Each Series X run started from an independent copy of the same offline profile, shader and driver caches. The patched run confirmed it selected the dedicated PC direct queue.The input to presentation was already black on the three frames sampled by both builds. The patched run ended before frame 404. I couldn't verify a visible title screen in this workload with the queue change alone.
Bazzite 44, kernel 7.2.9-ogc2.1.fc44.x86_64, NVIDIA 615.78.08, Proton Experimental 11.0-20261112, vkd3d-proton 3.1.0 (
4522cc1a8b1347f+), Rust 1.98.1 Windows MSVC target. Codex (GPT-6.2-Sol, high reasoning) assisted with the builds, tests and this report.Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-25T10:53:17Z.
Linux / AMD RDNA4 (RADV) test report on
6f4bef3merged locally ontomain568e7db(clean merge).Environment
experimental-11.0-20261112), vkd3d-proton v3.1 (#257+dxil-spirv53aac418), DXVKv3.1.1-209, DXC1.9.2609.5,x86_64-pc-windows-gnucross-compileUnit & GPU tests (debug test binary,
XCL_ADAPTER=9070 XCL_REQUIRE_GPU=wave64,--test-threads=1 --nocapture)hle::d3d12x::present: 7 passed, 0 failed, 0 ignored, 0 skipped (0.21 s), includingdedicated_pc_queue_copies_across_fence_from_title_queue.Short retail check under Wine/RADV (release
xcl.exe,XCL_RUN_SECONDS=35,XCL_NETWORK=0,XCL_COHERENT_MB=512,XCL_ADAPTER=9070)present: using a dedicated PC direct queue under Wine851 PresentX calls), exit0, 0 device removals, 0 crashes.XCL_DXC_DIRwas not passed in this 35 s run (no DXClogged), so this confirms the dedicated presenter queue lifecycle and frame pacing under Wine/RADV, not rendered pixel content.Not tested: full workspace suite, rendered pixel verification with DXC set, native Windows.
AI use: T3 Code / Antigravity (Gemini 4 Neon) merged, built, ran these checks on this machine, and drafted this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:58:36Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:41:21Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:08:27Z.
Triage (#1607) – head
6f4bef3No other open PR gives the presenter its own queue under Wine. #794 and #1462 deal with the title window under Wine (#175), not with the present queue. #3492 tackles the same Wine black-screen area differently: it keeps vkd3d-proton's vtables and unwraps fences, and only changes the presenter's fence creation.
The PR conflicts with main:
new_presenter/present_nowin present.rs have been rewritten since its base (spare allocators, retirement marks), so the Wine branch has to be redone there.If #3492 lands, please check whether presenting on the title's queue still stays black, because this change might then not be needed.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:58:20Z.
Review (head
6f4bef3c, diff read, not a merge-check; it conflicts with main andPR descriptionfails, so not built or run):real::native_queue_execute/native_queue_signal,c3d701a6). Thetitle_q.Signal/title_q.Waitcalls (present.rs~814, ~837) must go through those helpers after a rebase, and the error from theWait(~837) is ignored.create_pc_*takes the ordinarydev.Create*branch and never touches theorig_fnslot path (~584), theunder_wine()switch (~634) orpresent_now; it only shows D3D12 fences work across two queues.Fine: native Windows behaviour is unchanged (the non-Wine branch is the same as before), the device vtable slots 8 / 9 / 12 / 36 are CreateCommandQueue / CreateCommandAllocator / CreateCommandList / CreateFence, and the cross-queue order (title signal -> presenter wait -> copy -> presenter signal -> title wait) is right. Recommendation: rebase only after #3492 is decided and the black image is shown to remain, with a test of the adopted-device path; otherwise close.
AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
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.