Repository navigation
Conversation
|
Independent live allocator check on The bundled synthetic title called slot 9 on the actual allocator's vtable twice before recording its stock triangle, then once after GPU fence completion and an allocator reset. All calls returned I built with AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch check and drafted this report. |
|
lgtm |
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Linux (Wine + vkd3d-proton) + NVIDIA test of Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, Tested
Both runs with it logged this once, at 3.5 s: The image is loaded at The presents stop and the watchdog fires 2 to 3 s earlier in the runs with it. Runs of the same tree differ by that much here (a run of Read
Not tested: past 140 s; the preload of #690 on; the rest of the test suite; AMD and Intel. AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests and the four runs with |
The retail title calls ID3D12CommandAllocator xcl-dev#9 each time it takes an allocator from its pool (title+0x188501), with two arguments: a callback in its own code (title+0x555df10) and a context pointer. The return value is not read. The callback takes a size (4th argument), an alignment (5th) and the context (7th), and returns a block of the title's memory: the console runtime asks the title for command memory through it. A traced run (90 s, RTX 5070) saw over 1024 calls on 68 allocators, all with the same callback and context. A PC allocator gets its memory from the driver, so XCL never calls the callback: xcl-dev#9 answers S_OK and logs the first registration, on real and null devices, instead of the generic "not on PC" stub. Assisted-by: Claude Code (Claude Opus 5.5)
5c88525 to
590d470
Compare
ID3D12CommandAllocator#9 registers the title's command-memory callback. XCL answers it with S_OK and does not call the callback, instead of the generic "not on PC" stub. This is the one-slot PR with evidence asked for when #228 was closed. Part of #1067, which lists #9 (~14 000 calls) among its unimplemented functions.Evidence (retail 1.0.2.1,
game_scarlett_master.exeat 0x140000000)title+0x1884fe: after taking an allocator from its pool (alock cmpxchgloop), the title calls[vtbl+0x48]withrdx=title+0x555df10andr8= a pointer into one of its objects. It does not read the return value (raxis overwritten next).title+0x555df10is code, not a GUID:callback(…, a4, a5, a6, a7). It allocatesa4bytes with alignmenta5(a byte count if ≥ 16, otherwise log2) from the title's own allocator for the contexta7. It stores the block as the context's current one, releases the previous one, and returns it.a1–a3anda6are unused. So the console runtime asks the title for command memory through this callback.title+0x555df10) and the same context. The third and fourth argument registers held leftovers, so the method takes two arguments.What is in it
D3D12.X: allocator #9 takes the title's command-memory callback:alloc_memory_callback_xat console slot 9 of command allocators (crates/xcl/src/hle/d3d12x/real.rs) and on the null device (crates/xcl/src/hle/d3d12x/null.rs), with a unit test in each. Both tests fail without the slot entries.Tested
main6567c5f(conflict only innull.rs's test module, wheremainadded a test next to ours; both kept).cargo test --workspace --no-fail-fast -- --test-threads=4on head590d470: 995 passed, 4 failed, 45 ignored. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0–_3:CreateComputePipelineStatereturns E_OUTOFMEMORY (0x8007000E) for seeds 70, 545, 1019 and 1507 on this adapter. They fail the same way, at the same seeds, onmain6567c5f(cargo test -p xcl --lib fuzz_validate_and_gpu: 0 passed, 4 failed), and they do not reach the code this PR changes.list_x,title_textures,vram::d32s8_targets…). The rerun above had none of those 6.heap_window_out_of_memory_falls_back_to_the_switch_form("no heap windows");pso_measurement_compiles_an_exact_synthetic_record("cannot disable the driver cache (Windows Developer Mode is required)").cargo test -p xcl --lib allocator_9: 2 passed; with the two slot entries removed, both fail.D3D12.X: allocator #9 – the title registers a command-memory callback (0x14555df10, …)once, and noID3D12CommandAllocator::#9stub.Regression run
main:
PR:
Not tested
context+0x12798) is used only by the callback at that offset. The same memory is also reachable at offset0x18of a larger title object, and I did not check every access there. With the callback never called (as before this PR), the title ran normally in the runs above.HANDOFF.md(near line 1754) lists allocator #9 among the stubs. After this PR it is answered, so that line is out of date.AI use