Repository navigation
Conversation
… vtable vkd3d-proton takes a heap, resource, descriptor heap, query heap, root signature, pipeline state or command signature only with its own vtable: an assert(iface->lpVtbl == &..._vtbl) in each of its methods and wherever one is passed in (vkd3d_private.h). The official release builds keep these asserts, so adoption, which replaces the vtable pointer, ends the process (status 3) at the first such object: under Wine with the v3.1 release DLLs the test title stops at its first heap after 6 checks. Under Wine (util::under_wine) these classes now get XCL's PC slots written into the runtime's own table instead (VirtualProtect, as XAudio2's patch does), only up to the PC interface's method count, and only when the object answered QueryInterface for that interface with itself and every slot up to there is in the runtime's module. orig_fn finds the entries from before by the table. Classes are made one at a time, so no thread scans a table another is writing. The table is shared by every object of the class (swap-chain buffers too); the overrides already take objects XCL did not create. These classes have no console slots past the PC interface, so nothing is lost there. Not covered, by design: fences (console xcl-dev#12 is past the PC table), command allocators and lists (vkd3d-proton checks those at run time, E_INVALIDARG; xcl-dev#867 handles them), bundles. On Windows nothing changes: every new path is behind under_wine(), and orig_fn's lookup has no table there. Part of xcl-dev#175. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Tested #1395 together with #877 (
Testing and write-up assisted by Claude (AI); runs on my own hardware. |
…in-place vtables Integrates 16 upstream PRs (ivall#1380, ivall#1383, ivall#1384, ivall#1395, ivall#1398, ivall#1400, ivall#1404, ivall#1405, ivall#1419, ivall#1420, ivall#1421, ivall#1423, ivall#1424, ivall#1427, ivall#1428, ivall#1429) on top of the Linux/Proton fork, plus three Proton/vkd3d-proton fixes caught during verification: - Recompiler (ivall#1428): flatten IO_GROUP_LIMIT early-return in compute shaders so vkd3d-proton v3.1 dxil-spirv accepts the emitted CFG. - D3D12.X (ivall#1395 + ivall#867): skip UnadoptGuard on in-place-patched vtables and restore native vtables in runner::submit_list when a prior test adopted the singleton ID3D12Device. - Tests: match Wine centered default in window_position_modes. Verified under GE-Proton11-14 (RX 9060 XT / RADV): - gpu_sparse_vram_descriptors_buffers_and_xmem + gpu_valu_float_and_int + window_position_modes: 3 passed, 0 failed - Broad sweep (present, real, sparse, clamp, dstorage, gpu_valu, gpu_typed_buffer): 82 passed, 0 failed, 1 ignored, 0 skipped - 2.5 min retail title run (XCL_MEM_LIMIT=12G): 3,000+ frames at 30.0 fps, 6.0-6.1 GB flat committed RAM, 6.4 GB local VRAM, 0 DS failures.
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Test report for #867 and #1395 (each head, and the two together), on RDNA2 / RADV under Wine (the test suite only, no game run). Tested
(passed includes 2 tests that print The third column merges the two heads (textually clean) and adds the two-line change @cmt8 described in #1395's discussion, Joined per test against
Not tested
AI use
|
|
Test report for #867 and #1395 on NVIDIA under Wine, with Proton Experimental's own vkd3d-proton (assertions on). The test suite only, no game run. With #867 ( Tested
"Passed" includes 14 tests that print
Per test against
Not about these PRs, the same on every tree:
Not tested
AI use
|
|
Paired GPU test and startup check on EndeavourOS, Ryzen 9 9950X3D, RTX 5080, NVIDIA 620.73.04, 60 GiB usable RAM. Stock Proton Experimental vkd3d-proton 3.2
Startup on the same stock driver also advanced past heap adoption. Before: last interface Tested and reported with Codex (GPT-6.2 Astra). Follow-up, same RTX 5080 and stock driver. Added a local port of #867 ( Repeat on the same executable and stock DLLs, fresh copy of the same initial cache. Illustrated loading reproduced (1,719 presents). First exception differed: at 100.075 s, and again on another thread at 100.578 s, Compute translation control: same executable, stock driver, fresh copy of the same cache seed and 600 s cap as the first paired title run. Changed |
|
Test report for Tested
Not tested
Written with Claude Code (Claude Opus 5.5), which ran the builds and tests on my machine; part of the D51 check on #1607. |
|
Test report for #867 and #1395 on NVIDIA under Wine, with Proton Experimental's own vkd3d-proton (assertions on): the test suite, and the retail title for 60 s. With #867 ( The retail title runs on a stock release build of vkd3d-proton with both PRs (#1395's "Not tested"). Tested
"Passed" includes 14 tests that print
Per test against
The retail title, 60 s, no input (intro and menus), with #257's
C, stock (run 7): For Not about these PRs, the same on every tree:
Not tested
AI use
|
|
I ran the PR on Nobara proton experimental here's an ai summary: Test report for #1395 + #867 (with the 2-line Setup
Result
|
|
This isn't gonna be merged and I've moved my focus to other projects. Feel free to use the code for whatever but closing this PR |
…1860, xcl-dev#1913, xcl-dev#2192, xcl-dev#1946, xcl-dev#2237 Integrates XG CopyFromSubresource 7-arg ABI (xcl-dev#684), DirectStorage physical-page list re-read (xcl-dev#1405), vkd3d-proton in-place vtable patching with UnadoptGuard composition (xcl-dev#1395), single-back-edge Direct DXIL CFG (xcl-dev#1860), wave64 graphics Direct DXIL guard (xcl-dev#1913), and AMD RDNA2-4 DXIL fuzz fixes (xcl-dev#2192, xcl-dev#1946, xcl-dev#2237).
Carries forward the permitted in-place vtable patching from closed xcl-dev#1395 (originally by @cmt8) on top of xcl-dev#867, skipping in-place patched tables in UnadoptGuard::new so ext[-1] is never read on runtime-owned vtables. Under Wine, vkd3d-proton asserts iface->lpVtbl == &d3d12_*_vtbl on heaps, resources, descriptor/query heaps, root signatures, pipeline states and command signatures even in release builds. Patching their PC slots in place preserves the runtime's vtable pointer and avoids those aborts on stock Proton Experimental / vkd3d-proton 3.2. Assisted-by: Antigravity (Gemini 4 Neon)
…1946, xcl-dev#1803, xcl-dev#2297, xcl-dev#2320, xcl-dev#2333 Carries forward still-open high-value upstream PRs onto upstream/main (2898511) + our updated Wine PR stack (xcl-dev#867, xcl-dev#1395-successor, xcl-dev#871, xcl-dev#877, xcl-dev#1732). Preserves UnadoptGuard in xcl-dev#2320 KickoffX reset_one. Assisted-by: Antigravity (Gemini 4 Neon)
Carries forward the permitted in-place vtable patching from closed xcl-dev#1395 (originally by @cmt8) on top of xcl-dev#867, skipping in-place patched tables in UnadoptGuard::new so ext[-1] is never read on runtime-owned vtables. Under Wine, vkd3d-proton asserts iface->lpVtbl == &d3d12_*_vtbl on heaps, resources, descriptor/query heaps, root signatures, pipeline states and command signatures even in release builds. Patching their PC slots in place preserves the runtime's vtable pointer and avoids those aborts on stock Proton Experimental / vkd3d-proton 3.2. Assisted-by: Antigravity (Gemini 4 Neon)
Carries forward the permitted in-place vtable patching from closed xcl-dev#1395 (originally by @cmt8) on top of xcl-dev#867, skipping in-place patched tables in UnadoptGuard::new so ext[-1] is never read on runtime-owned vtables. Under Wine, vkd3d-proton asserts iface->lpVtbl == &d3d12_*_vtbl on heaps, resources, descriptor/query heaps, root signatures, pipeline states and command signatures even in release builds. Patching their PC slots in place preserves the runtime's vtable pointer and avoids those aborts on stock Proton Experimental / vkd3d-proton 3.2. Assisted-by: Antigravity (Gemini 4 Neon)
…1946, xcl-dev#1803, xcl-dev#2297, xcl-dev#2320, xcl-dev#2333 Carries forward still-open high-value upstream PRs onto upstream/main (2898511) + our updated Wine PR stack (xcl-dev#867, xcl-dev#1395-successor, xcl-dev#871, xcl-dev#877, xcl-dev#1732). Preserves UnadoptGuard in xcl-dev#2320 KickoffX reset_one. Assisted-by: Antigravity (Gemini 4 Neon)
Under Wine, XCL writes its PC slots into vkd3d-proton's own vtables for the seven classes vkd3d-proton checks only by assertion, so those objects keep their vtable pointer. Part of #175.
vkd3d-proton accepts heaps, resources, descriptor heaps, query heaps, root signatures, pipeline states and command signatures only with its own vtable:
assert(iface->lpVtbl == &…_vtbl)in each of their methods (vkd3d_private.h). The official release builds keep the asserts, so XCL's adoption, which replaces the vtable pointer, ends the process at the first heap. A guard around host calls cannot fix that (see the 14:12Z comment on #867): the asserts sit in the objects' own methods.This complements #867: #867 covers allocators and lists (run-time checks) and fences; this covers the assert-only classes. Neither alone runs on a stock release build.
What is in it
crates/xcl/src/hle/d3d12x/real.rs(+152 / −2):patch_in_place,in_place_kind,in_place_original;class_forpatches in place only when the object answers QueryInterface for the PC interface with itself and every slot up to that interface's method count is in the runtime's module. Everything is behindutil::under_wine().real::in_place_tests::a_vtable_patched_in_place_keeps_its_originals_and_its_neighbour(no GPU).Tested
dxgi, DXC 1.9.2609.5, rustc 1.100.0,x86_64-pc-windows-gnu, debug.d3d12.dll502694a5…,d3d12core.dll0dfd690a…).cargo test --workspace --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4, aborted binaries rerun one test per process; noSKIPPED:main930e8b4fd97d91main→ this PR changes 3 tests, each from an abort to a fail on the allocator's run-time check (D3D12.X: preserve native vtables and wrap fences for vkd3d-proton under Wine (#175) #867's scope). No pass becomes a fail.UnadoptGuard::newmust skip tables patched in place (for those,ext[-1]is not the native table). One condition; tested with it.Regression run
scripts/linux/smoke.sh(the same block asscripts/smoke.ps1), 60 s of a retail title,XCL_COHERENT_MB=512, same hardware as above.-Db_ndebug=true, its patch, dxil-spirv53aac41): the only kind of build on whichmainruns a title under Wine. On it this PR's in-place path is active but nothing asserts either way, so the blocks show only that nothing regressed; what the PR fixes is in the table above.main:This PR:
Not tested
under_wine()), NVIDIA, Intel.ec20719was read, not run: same seven tables and asserts.AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_019twRmV74bPu5j5TBXjrNug