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
|
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