D3D12.X: patch assert-checked vtables in place under Wine (#175) #2467
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2477"
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 gustavsi on 2026-11-25T19:43:28Z.
Patch
vkd3d-proton's assert-checked COM vtables in place under Wine so stock assertion-enabledvkd3d-protonbuilds (such as Proton Experimental) no longer abort on adopted heaps, resources, descriptor/query heaps, root signatures, pipeline states, and command signatures. Part of #175 and #1701.Stacked on #867 (
021b2c33); only the top commit (5225ddcb) belongs here. Carries forward the permitted implementation from closed #1395 (originally authored by @cmt8), composed cleanly with #867'sUnadoptGuard.Under Wine,
vkd3d-protonkeepsassert(iface->lpVtbl == &d3d12_*_vtbl)active even in release builds for these seven classes. Because their console slots sit inside the PC interface, patching their PC slots in place (saving the runtime's original function pointers inIN_PLACEfororig_fn) preserves the runtime's own vtable pointer and eliminates those aborts. All new paths are gated behindutil::under_wine(); native Windows behavior is unchanged.What is in it
crates/xcl/src/hle/d3d12x/real.rs:IN_PLACE/in_place_original/in_place_kind/patch_in_place(from closed #1395) forHeap,Resource,DescriptorHeap,RootSignature,PipelineState,QueryHeap, andCommandSignatureunder Wine.IN_PLACE_Nis published withOrdering::Releaseandregister()runs before each changed slot is written via an alignedAtomicUsize::store(..., Ordering::Release).UnadoptGuard::newskip vtables patched in place (skips_guard:!is_ext_fast(cur) || in_place_original(cur, 0).is_some()) soext[-1]is never dereferenced on runtime-owned vtables.in_place_tests:a_vtable_patched_in_place_keeps_its_originals_and_its_neighbourconcurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fn(4 caller threads continuously invoking slot #1 through aPAGE_READONLYvtable while 2 patcher threads race to callpatch_in_place, with a 10 s deadline instead of a fixed iteration cap so callers do not exit before the patch lands under--test-threads=4; verifies exact-once patching, zero torn entries ororig_fnmisses, and thatskips_guardskips the patched table; the latter is asserted directly becauseUnadoptGuard::newreturns early off Wine, and fails with the in-place check removed).Tested
x86_64-pc-windows-msvc(clang-cl+lld-link).Proton - Experimentalvkd3d-protond3d12core.dllcontainingiface->lpVtbl == &d3d12_heap_vtblassertions; also independently reproduced by @ClosetPie107 on RX 9070 / stock Proton Experimental, by @Royalflamejlh on RTX 4070 / assertion-enabledvkd3d-proton, and by @pickles976 on RTX 4060 Laptop / stock assertion-enabledvkd3d-proton):#867(without this PR):--exact gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmemaborts immediately withAssertion failed: iface->lpVtbl == &d3d12_heap_vtbl, file ../src-vkd3d-proton/libs/vkd3d/vkd3d_private.h, line 1077(exit3).#867:real::passed with0assertions,gpu_sparse_vram_descriptors_buffers_and_xmem+gpu_valu_float_and_intpassed2/0with0assertions, and a 20 s retail title run exited0with337frames shown and all 7 assert-checked classes patched in place.021b2c33, onmainf9a0cb80) at5225ddcb(no conflicts, commit diff unchanged) underGE-Proton11-14:real::in_place_tests real::wine_vtable_tests --test-threads=4: 6 passed, 0 failed, 0 ignoredhle::d3d12x::real:: --test-threads=1: 69 passed, 0 failed, 0 ignoredhle::d3d12x::alloc_pool:: --test-threads=4: 4 passed, 0 failed, 0 ignored--exact gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem gpu::recomp::tests::gpu_valu_float_and_int --test-threads=1: 2 passed, 0 failed, 0 ignored, 0SKIPPEDpwsh ./scripts/smoke.ps1(XCL_PREPARE=0):22frames shown (PresentX 22,1 0 2/2 s),exit: 0x0,0crashes,0device removals.Regression run
Produced under Wine (
GE-Proton11-14, AMD Radeon RX 9060 XT,XCL_PREPARE=0 XCL_NETWORK=0 XCL_PSO_PRELOAD=0 XCL_RUN_SECONDS=60 XCL_ACTIVITY=1,VKD3D_CONFIG=""). The PR run used unmodifiedpwsh ./scripts/smoke.ps1via a thin Wine wrapper;main(e0d93c84) crashed before writingreport.json, so its block was extracted from the samexcl.log(peak commit: 0 MBis what Wine reports inxcl.log).main(e0d93c84):This PR (
5225ddcb, stacked on #867):Not tested
util::under_wine()).vkd3d-protonby @Royalflamejlh, @wayback94, and @pickles976).AI use
Gemini 4 Neon) restacked cleanly onto updated #867 (021b2c33, onmainf9a0cb80) at5225ddcb, ran the Proton tests and 60 s smoke run, and updated this description (as well as the earlier time-bounded caller loop fix).skips_guardand its direct assertion (@safesearch77's review) and ran the earlier9b9012c8verification.Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:17:31Z.
Review: COMMENTED
No confirmed code-level defect found, but this is high-risk and not merge-ready. The target validation gap is material: the intended assertion-enabled stock Proton/vkd3d-proton scenario was not reproduced directly; the author run used GE-Proton with assertions disabled. Please reproduce it before merge. Also, the shared runtime vtable is patched while other threads may call it; aligned entry stores are relied upon, but there is no concurrent call/patch stress test despite the process-wide blast radius. Finally, the branch is dirty/non-mergeable and stacked on #867, so it needs a rebase and refreshed CI/test evidence.
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-25T21:03:42Z.
Update for head
a970ef38(earlier reports for9b9012c8and0c249f08below)git range-diffshows this PR's own commit unchanged from9b9012c8; only the #867 commit under it moved (nowd9e6ad51). Same machine and Proton as below.Stock assertion-enabled Proton (
d3d12core.dllsha25693565013…)08db8020,XCL_PREPARE=0 XCL_PSO_PRELOAD=0:d9e6ad51): aborts after 5 s withAssertion failed: iface->lpVtbl == &d3d12_heap_vtbl, exit 3.a970ef38): ran the full 300 s, exit 0, 1,800 presents, no assertion, no crash. All 7 assert-checked classes loggedwritten into the runtime's own vtable.main8b957becwith #2849 (4e931734), test commit272ab8cd:hle::d3d12x::real::69 passed, 0 failed.mainaborts in the same filter with thed3d12_heap_vtblassertion (exit 3).Patched
vkd3d-proton(masterec207194without the allocator / command-listlpVtblchecks), test commit272ab8cd:hle::d3d12x::real::: 69 passed, 0 failed (main: 63 passed, 0 failed).cargo test -p xcl --libaborts in all 4 runs (2 at--test-threads=4in full-suite runs, 1 more at 4 threads, 1 at--test-threads=1): inpresent::frame_dump_tests::compositor_blends_ui_plane_over_scene_plane, RADV printsThe CS has been rejectedand the device is removed, so the rest of the lib binary does not run. The complete lib runs ofmain, #867 and #867+#871+#877 (4 runs) did not hit this. It is not new code failing, though: that test passes on its own (3 of 3 runs on this tree), and running onlylist_x::followed by that test loses the device the same way onmainand on #867 as on this tree. So it is a test-order hazard thatmainalready has, and this tree's lib run hits it every time.Not tested
main:main+ #2849 crashes there during the startup shader preparation (#2555), with or without this PR (2 of 2 runs, ~105 s), so the stock retail runs above use the PR's own base.AI use
Update for head
9b9012c8(earlier report for0c249f08below)Independent test report under Wine/Proton (not native Windows), on stock Proton Experimental
vkd3d-protonwith assertions enabled (d3d12core.dllsha25693565013…4b2576, same as before).Tested
AMD Radeon RX 9070 (RDNA4, RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, CachyOS Linux 7.3.5
Proton Experimental
experimental-11.0-20261112, DXVKv3.1.1-209, DXC1.9.2609.5, Rust 1.96.0, targetx86_64-pc-windows-gnu, debug build for testsHead merged onto
main8b957bec(test commit1b59ec6e):cargo test -p xcl --lib in_place_tests -- --test-threads=12 passed, 0 failed.cargo test -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=14 passed, 0 failed.Retail title, 60 s, release build,
XCL_DIRECT_DXIL=1,XCL_PREPARE=0,XCL_PSO_PRELOAD=0, built from exact commits:e57cb659: aborts after 5 s withAssertion failed: iface->lpVtbl == &d3d12_heap_vtbl, file …/libs/vkd3d/vkd3d_private.h, line 1077, exit 3.9b9012c8: ran the full 60 s, 1,589 presents, exit 0, no assertion or crash.I did not get a boot comparison on current
main:main8b957becandmain+PR1b59ec6eboth stayed in the startup shader-preparation window until the 150 s wall-clock cap (exit 124), so neither reached the title.Not tested
main+PRAI use
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head
0c249f08137161fc48e018cfffc179c65339f304(merged cleanly ontomain6d12f58) on stock, unmodified, assertion-enabled Proton Experimentalvkd3d-proton.Hardware & environment
experimental-11.0-20261112), stock assertion-enabledd3d12core.dll(sha256: 9356501320114773be279506644aabd9a1717ff451d480ac802a4fd4e94b2576, verifiediface->lpVtbl == &d3d12_heap_vtblassertions present), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug for tests, release for retail)Unit / GPU tests (
XCL_REQUIRE_GPU=wave64,XCL_DXC_DIR,VKD3D_CONFIG=ignore_shared_fence)hle::d3d12x::real:: --test-threads=1 --nocapture: 63 passed, 0 failed, 0 ignored (0 skipped, 0 assertions; includes bothin_place_tests)hle::d3d12x::alloc_pool:: --test-threads=4 --nocapture: 4 passed, 0 failed, 0 ignored (0 skipped, 0 assertions)--exact gpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmem gpu::recomp::tests::gpu_valu_float_and_int --test-threads=1 --nocapture: 2 passed, 0 failed, 0 ignored (0 skipped, 0 assertions)hle::d3d12x(--test-threads=4and--test-threads=1): 0 assertions and 0 aborts — all 7 assert-checked classes (ID3D12Heap1,ID3D12Resource2,ID3D12DescriptorHeap,ID3D12RootSignature,ID3D12PipelineState,ID3D12QueryHeap,ID3D12CommandSignature) patched in place cleanly. (12–13 subsequent GPU tests in the full module run failed after an unrelatedradv/amdgpu: The CS has been rejectedpoisoned the singleton device on stock Proton'svkd3d-proton.)Retail title (60 s, stock assertion-enabled Proton Experimental
d3d12core.dll)XCL_DIRECT_DXIL=1,XCL_TEXTURE_LEVEL_PAGES=1,XCL_PSO_WAIT_MS=50,XCL_SPLIT_MIDLIST_WAIT=0,XCL_COHERENT_MB=1024,VKD3D_CONFIG=ignore_shared_fence,XCL_PSO_PRELOAD=0,XCL_NETWORK=0exit=0) with 0 assertions, 0 crashes, and 0 device removals:1,200+frames presented at30.0 fps,11,962translated draws,2,048dispatches,1,031Opus packets (0 errors),10.25 GiBpeak VRAM,8.1 GiBpeak RSS.vkd3d-protonclasses loggedwritten into the runtime's own vtable.Not tested
vkd3d-proton.AI use
main, swapped in stock Proton Experimentald3d12core.dll, ran the tests and 60 s retail run on this machine, and drafted this report.Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-25T20:32:37Z.
Thanks @bmjask for the review! Addressed all three points at
0c249f08(rebased ontomaine0d93c84+ updated #867f98da36d):Proton - Experimentalvkd3d-protond3d12core.dllverified to containiface->lpVtbl == &d3d12_heap_vtbl):f98da36d, without this PR):gpu_sparse_vram_descriptors_buffers_and_xmemaborts withAssertion failed: iface->lpVtbl == &d3d12_heap_vtbl, file ../src-vkd3d-proton/libs/vkd3d/vkd3d_private.h, line 1077(exit3).0c249f08):hle::d3d12x::real::63/0,gpu_sparse_vram_descriptors_buffers_and_xmem+gpu_valu_float_and_int2/0, and a 20 s retail title run exited0with 337 frames shown (337 PresentX), all 7 assert-checked classes (ID3D12Heap1,ID3D12Resource2,ID3D12DescriptorHeap,ID3D12RootSignature,ID3D12PipelineState,ID3D12QueryHeap,ID3D12CommandSignature) patched in place and0assertions.in_place_tests::concurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fn— 4 caller threads continuously invoking slot #1 through aPAGE_READONLYvtable while 2 patcher threads race inpatch_in_place(verifies exact-once patching, zero torn entries ororig_fnmisses, andUnadoptGuard::newskipping the patched table).e0d93c84+ updated #867, verified with a fresh 60 spwsh ./scripts/smoke.ps1run (exit: 0x0,22frames,0crashes,0removals).Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:34:23Z.
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 gustavsi on 2026-11-26T00:52:20Z.
Thanks @ClosetPie107 for the independent AMD RDNA4 verification on stock assertion-enabled Proton Experimental (60 s at 30.0 fps, 0 assertions, 0 crashes) and @DavidM1911 for verifying on Windows 11!
Rebased onto
main(08db8020) + updated #867 (e57cb659, picking up theUnadoptGuardCOM reference pin and alignment guard) at96b91da5:GE-Proton11-14(RX 9060 XT):real::64/0,alloc_pool:: --test-threads=44/0,gpu_sparse_vram_descriptors_buffers_and_xmem+gpu_valu_float_and_int2/0, plus a fresh 60 spwsh ./scripts/smoke.ps1run (exit: 0x0,11frames shown,0crashes,0removals; block updated in PR description).AI use: Antigravity (Gemini 4 Neon) rebased onto
main+ updated #867, ran the Proton tests and smoke run, and drafted this comment.Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T01:50:20Z.
Review: CHANGES_REQUESTED
The new test
concurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fnfailed on0c249f0under Wine in 3 of 21 runs ofreal::in_place_tests real::wine_vtable_tests(4 tests) at--test-threads=4, the countscripts/test.ps1uses, atreal.rs:8070("callers must observe the patched hook"); alone and at one thread it passed 10 of 10 each. The test is unchanged at the rebased head96b91da(the loop and the assert are now at:8058and:8097); we have not rerun it there. The change itself works on Linux + NVIDIA: on a vkd3d-proton built with assertions on and without XCL's relaxed-vtable patch, #867 alone aborts before the first frame and #2477 on top runs.The callers stop after 20,000 calls each (
:8058at96b91da), so if the patch lands after they finish,hook_hitsstays 0 (a reading of the test). With the loop bounded by time instead, the same 4 tests passed 25 of 25 runs at--test-threads=4here, each in 0.02–0.04 s: the callers still stop once the hook has been seen, so the 10 s only bounds a failing run:Setup:
maine0d93c84(the commit this head is rebased on) + #684e56dbc3, then + #867f98da36, then + #24770c249f0. RTX 4070 12 GB (615.71.09), Fedora 44, Wine 11.21 Staging, release, Series X profile, 100 s,XCL_PSO_PRELOAD=0. vkd3d-protonv3.1-90-g30b0eb9bwithout the relaxed-vtable patch, assertions on (d3d12core.dll5b59f1b8…) and off.Assertion failed: iface->lpVtbl == &d3d12_heap_vtbl(vkd3d_private.h:1078), 0 frames86a10c6,c79e3b3) gave the same pattern on the assertion build: the base and #867 aborted in 2 of 2 runs each, and #2477 ran in 3 of 3.Not tested: Proton's own build; the suite; Windows.
AI use: Claude Code (Claude Opus 5.5) ran the title and the tests, tried the fix and wrote this comment.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:50:02Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-26T02:16:50Z.
Thanks @Royalflamejlh for the assertion-enabled
vkd3d-protonRTX 4070 verification and for tracking down the--test-threads=4flake, and @DavidM1911 for the Windows 11 re-verification!Applied the suggested 10 s deadline loop in
concurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fnat94a05e53:real::in_place_tests real::wine_vtable_tests --test-threads=4(× 25 runs underGE-Proton11-14, RX 9060 XT): 25/25 passed (5 passed, 0 failed, 0 ignoredeach, ~0.10 s/run).hle::d3d12x::real:: --test-threads=1: 64 passed, 0 failed, 0 ignored.pwsh ./scripts/smoke.ps1run:exit: 0x0,13frames shown (1 1 1/2 s),0crashes,0device removals (block updated in PR description).AI use: Antigravity (Gemini 4 Neon) applied the time-bounded loop fix, ran the 25× stress test and smoke run, and drafted this comment.
Imported from ivall/xcl. Originally posted by Alm0stSurely on 2026-11-26T08:36:43Z.
Tested on an RTX 5080 16 GB, NVIDIA 620.73.04, Linux, stock Proton Experimental (vkd3d-proton
cae8353, assertions enabled). One direct title run per revision, fresh prefixes and cold caches, same synthetic profile. Built withcargo build --locked --offline --release --target x86_64-pc-windows-gnu -p xcl --bin xcl. Ranxcl.exe run <title-directory>withVKD3D_CONFIG=single_queue,XCL_PSO_PRELOAD=0,XCL_ACTIVITY=1,XCL_NETWORK=0, a 60 s time limit and the same host memory guards.e57cb659(#867): the stock driver stopped on its heap vtable assertion before PresentX, exit 3.94a05e53(#2477): the log shows the in-place path on all seven object classes, then PresentX, a 3840×2160 swapchain and the first-frame message. The last draw counter was 256 translated draws, zero skipped. The capture showed a black window with no identifiable game scene.The parent started with 14,308 MiB free VRAM; this run started with 10,883 MiB. The local guard ended the latter at 5,045 MiB free (cutoff 5,120), about 14 s after preflight. This verifies the heap fix on this Proton build. World rendering, stability beyond that point and gameplay FPS remain unmeasured.
Follow-up on
nvidia-dev(af2cecc4), same RTX 5080 and stock Proton. The unmodified branch exits 3 on the heap identity assertion ingpu_placed_console_depth_target_with_clear_value. With the Wine heap/resource changes ported locally onto that head, the same GPU test passes in 0.79 s, with no skip (dedicated allocation fallback for the depth target). WithXCL_PREPARE=0for a direct cold title run, the next stop is the shared-fence identity assertion before PresentX. This local port covers the object classes changed here and does not carry the fence changes from #867.AI use: OpenAI Codex (gpt-6.2-astra) ran the comparison, checked the logs and capture, and wrote this report.
RTX 5080 / Proton Experimental follow-up on the same NVIDIA base,
af2cecc408. With the heap-only port of #2477, full preparation processed 26,503/26,503 entries in 27,081.6 s and created 2,671 GPU pipelines, zero refused. The title then exited 3 at the shared-fence vtable check in vkd3d_private.h:757 before its first present. The on-demand run had reached the same assertion.A separate GPU test on that base creates a shared fence through the title device and calls queue Signal(1), Wait(1), Signal(2). The heap-only build hit the same assertion. Adding the Wine fence adapter from #867 made the same test reach completed value 2 in a 0.66 s test run. Both GPU probes used the same driver, single_queue and VK_NV_optical_flow disabled. The candidate is a local port, not a test of the latest #2477 head.
AI use: OpenAI Codex (gpt-6.2-astra) adapted the existing fence changes, prepared and ran the probes, and wrote this follow-up.
Imported from ivall/xcl. Originally posted by safesearch77 on 2026-11-26T14:10:00Z.
Reviewed
94a05e53againstmain(b49be183) with#867(e57cb659) as its first commit. Theorder in
patch_in_place(publish theIN_PLACEentry andregister()before the first store,then one atomic store per entry) is right, and
orig_fnreads the saved entries lock-freeagainst that. One test gap:
The last assertion of
concurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fncannot fail in the
CIjob.assert!(UnadoptGuard::new(obj_addr as *mut c_void).is_none(), "UnadoptGuard must skip in-place patched vtables")is meant to cover the new|| in_place_original(cur, 0).is_some()check inUnadoptGuard::new. Butnewstarts withif !crate::util::under_wine() || ... { return None; }, andunder_wine()is awine_get_versionlookup inntdll(util.rs:126), false on the Windows runner. So onCInewreturnsNoneon its first line and the assertion passes whether or not the skip exists;it only means something when someone runs the test under Wine. The
#867test avoids this bycalling the
#[cfg(test)] enter, which has no skip.Moving the condition into a small helper (
fn skips_guard(cur: usize) -> bool { !is_ext_fast(cur) || in_place_original(cur, 0).is_some() }, used bynew) and asserting on that in the test wouldmake the skip checked on Windows too.
Read only (
git apply --check, source); no GPU, Wine or Windows run.AI use: Antigravity (Claude Sonnet 5.5) read the diff and the call sites; I re-checked the point
against the source before posting.
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-26T15:15:27Z.
Thanks @safesearch77, good catch: off Wine,
UnadoptGuard::newreturns on its first line, so that assertion could not fail on theCIrunner.Updated at
9b9012c8(still one commit on #867e57cb659):skips_guard(cur)(!is_ext_fast(cur) || in_place_original(cur, 0).is_some()), used byUnadoptGuard::new.concurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fnassertsskips_guard(table_addr)directly, which does not depend onunder_wine(). The test registers the table as extended before patching, so only the in-place check can make it true: with that check removed fromskips_guard, the test fails at the new assertion (UnadoptGuard must skip in-place patched vtables), and passes with it.GE-Proton11-14(RX 9060 XT):real::in_place_tests real::wine_vtable_tests --test-threads=425/25 runs passed,hle::d3d12x::real::64 passed / 0 failed,alloc_pool:: --test-threads=44/0,--exact gpu_sparse_vram_descriptors_buffers_and_xmem gpu_valu_float_and_int2/0. New smoke block in the description.@Royalflamejlh, your time-bounded loop is in since
94a05e53; could you take another look when you have time?AI use: Claude Code (Claude Opus 5.5) made the change, ran the tests and the smoke run, and drafted this reply; I checked it.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T18:53:03Z.
Under Wine 11.21 Staging, at head
9b9012c8(with #867e57cb659as its first commit) merged onmain8b957bec,real::in_place_tests real::wine_vtable_testspassed in 21 of 21 runs at--test-threads=4,concurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fnincluded.The callers' loop is now bounded by 10 s instead of 20,000 calls (
real.rs:8064at9b9012c8), the change we asked for. Each run took 0.02–0.04 s, so none came near the deadline. It had failed in 3 of 21 runs of the same filter (then 4 tests) on0c249f0, so we withdraw our request for changes.Setup: release,
cargo test --release -p xcl --lib --target x86_64-pc-windows-gnu -- real::in_place_tests real::wine_vtable_tests --test-threads=4, Fedora 44, Wine 11.21 Staging; 5 tests in each run. By reading, none of the five creates a D3D12 device, so the card and vkd3d-proton play no part.Not tested: the title at this head; the whole test suite; Windows.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.
Posted without review by a person: the account owner was away and reads replies later.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T19:05:04Z.
Review: APPROVED
At
9b9012c8the callers' loop is bounded by 10 s, the change we asked for, and the fivereal::in_place_tests real::wine_vtable_teststests passed in 21 of 21 runs under Wine at--test-threads=4(details: https://github.com/xcl-dev/xcl/pull/2477#issuecomment-7200957091). This replaces our request for changes.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this review.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T21:46:20Z.
Independent native Windows 11 desktop NVIDIA regression verification of PR #2477 at head
a970ef38a57d72a642e5f7994b35fea968c17a15(2commitsd9e6ad51 -> a970ef38on merge-base08db8020d323bf478964fcc586152cce54959cfc, pre-#2555ancestor ofmain; parentd9e6ad51baaad5421a794ca39c0560d1edd28421).Environment
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(native Windows, non-Wine, Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted release tests & build (
a970ef38)cargo test --release -p xcl --lib a_vtable_patched_in_place_keeps_its_originals_and_its_neighbour -- --nocapture1 passed; 0 failed; 0 ignored; 1336 filtered out(0.00s)cargo test --release -p xcl --lib concurrent_calls_and_patches_on_readonly_vtable_never_tear_or_miss_orig_fn -- --nocapture1 passed; 0 failed; 0 ignored; 1336 filtered out(0.00s)cargo test --release -p xcl --lib unadopt_guard_restores_native_vtable_and_reapplies_extended_on_drop -- --nocapture1 passed; 0 failed; 0 ignored; 1336 filtered out(0.00s)cargo test --release -p xcl --lib concurrent_release_during_unadopt_guard_still_runs_hooked_cleanup -- --nocapture1 passed; 0 failed; 0 ignored; 1336 filtered out(0.00s)cargo test --release -p xcl --lib fence_proxy_forwards_signal_unwraps_and_frees_on_final_release -- --nocapture1 passed; 0 failed; 0 ignored; 1336 filtered out(0.02s)cargo test --release -p xcl --lib track_end_title_fence_registers_once_and_addrefs -- --nocapture1 passed; 0 failed; 0 ignored; 1336 filtered out(0.00s)cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=4(3 consecutive runs)65 passed; 0 failed; 0 ignored; 1272 filtered out× 3 (0.66s,0.67s,0.70s)cargo test --release -p xcl --lib hle::d3d12x::list_x::40 passed; 0 failed; 0 ignored; 1297 filtered out(0.68s)cargo test --release -p xcl --lib hle::d3d12x::sparse::17 passed; 0 failed; 1 ignored; 1319 filtered out(0.30s;early_commit_timingis#[ignore])cargo build --release -p xcl --bin xcl1m 10s, exit0)Paired quiet 60 s retail smoke (
title: 29640639)Merge-base (
08db8020d323bf478964fcc586152cce54959cfc, cached baseline on the same machine):PR #2477 (
a970ef38a57d72a642e5f7994b35fea968c17a15):Runtime log observations (
xcl.log)9222log lines,0[ERROR]/ device-removal / panic lines.ID3D12Device14,ID3D12Heap1,ID3D12CommandQueue,ID3D12Fence1).19483 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14011 MB committed by the process; video memory 6116 MB local, 4683 MB non-local.Limits of coverage
UnadoptGuard, and fence-proxy mechanics were verified via the 6 new unit tests (in_place_testsandwine_vtable_tests), while 3× parallelhle::d3d12x::real:: -- --test-threads=4,list_x::,sparse::(early_commit_timingremained#[ignore]), and the paired 60 s retail smoke confirm zero regression on native Windows D3D12.AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-27T00:00:43Z.
Offscreen Wine/NVIDIA verification of #2477
a970ef38a57d72a642e5f7994b35fea968c17a15, directly on #867d9e6ad51baaad5421a794ca39c0560d1edd28421: 12 selected fixtures passed (6 concurrency/proxy, 4 allocator, 2 GPU sequence). Production unchanged; local test-only strengthening inreal.rsrequires every concurrent caller to observe the patched hook and verifies the vtable page returns toPAGE_READONLY.Crucially, the hardware legs used stock assertion-enabled vkd3d-proton
2576c0b4adfae4a, not our installed relaxed diagnostic DLLs. We copied only the test executable and stock D3D12 DLLs into a disposable application directory;WINEDEBUG=-all,+loaddllproves both native DLLs loaded from that directory. The shared prefix's installed diagnostic pair was mounted read-only and its before/after hashes stayed unchanged.Stock SHA-256:
Test executable SHA-256:
dce8970b6a14edb5beec9df8639966229e3f1113dc728aea0cb95370559d2b0b. Fresh intended-worktreeCompiling xclline recorded; release test build took 146 s.Machine/config: Linux 6.17, Wine 11.0, Intel i7-13620H, 16 GiB RAM, physical RTX 4060 Laptop 8 GiB / NVIDIA 590.48.01, Rust 1.98.1 / Windows MSVC target.
DXVK_CONFIG='dxgi.hideNvidiaGpu = False',XCL_ADAPTER=nvidia; isolated offline fixtures, unchanged 9 GiB/512 MiB scope and global 2048 MiB available-RAM / 6000 MiB GPU / 10 GiB disk guards. No guard stop. Hardware legs sampled at most 413 MiB global GPU use and at least 11129 MiB available RAM; these short samples are not title-memory measurements.Results / reproducible selection
Hardware groups used
XCL_REQUIRE_GPU=wave64, and the wrapper rejects anySKIPPEDoutput. The GPU pair ran in that order in one process, so it exercises the adopted singleton followed by the next runner submission. Logs show the real NVIDIA backend, sparse XMem/descriptor execution, and in-place Heap/RootSignature/PipelineState/DescriptorHeap/Resource vtables. No stock-vkd3d assertion fired in these tests.The six CPU fixtures cover original-method/neighbor preservation, two patchers racing four callers, skip-guard behavior, concurrent final-release cleanup, fence proxy forwarding/unwrapping, and end-title fence registration. They use fake vtables, not GPU stress. The allocator group contains two bookkeeping fixtures and two hardware paths; it is not four shader tests.
Evidence caveats: the CPU test binary returned 6/6, but my first postprocessor returned exit 1 because it compared single-backslash paths with Wine's escaped
\\loader log. The recorded log actually shows the correct app-local natived3d12.dll; corrected path matching was checked against that existing log, without rerunning the tests. Both hardware groups then passed the corrected loader/hash validation. The GPU log also has a non-fatalFailed to open stream archive write file exclusivelycache message; this is not cache-persistence certification or an error-free retail run.Local evidence:
.compat-runtime/logs/verify-xcl2477-build-20261126T235345Z/.compat-runtime/logs/verify-xcl2477-stock-cpu-20261126T235624Z/.compat-runtime/logs/verify-xcl2477-stock-alloc-20261126T235755Z/.compat-runtime/logs/verify-xcl2477-stock-gpu-20261126T235821Z/.compat-xcl/stock-pr2477/run-{cpu,alloc,gpu}-*contains DLL/executable provenance and loader traces; runner source archived with the verification logs.Not tested: a matched parent-only run, full suite, all interleavings, other drivers/adapters, title loading/RAM/FPS, or our separate Game-Init stalled-fence watchdog. This supports the selected stock-vkd3d compatibility and concurrency paths; it does not certify the whole nvidia-dev merge or justify repeating an unchanged crashing title launch. Suggested owner follow-through: retain the per-caller completion/page-protection assertions and run the same adopted-device→subsequent-submit sequence in full-suite/native-Windows coverage.
AI-assisted verification/report: omp, OpenAI GPT-6 Astra; all pass counts above come from executed commands.
Imported from ivall/xcl. Originally posted by gustavsi on 2026-11-29T03:52:53Z.
Closing as I'm stepping away from the project, but anyone is welcome to rebase and reuse these commits.
Pull request closed