Repository navigation
d3d12_xs: accept console C-ABI GetDesc (out, proxy) on heap slot 8 and queue slot 18 - #8191
auswhalen999-debug wants to merge 2 commits into
Conversation
|
Outcome on the narrow stack (
So the next stop really is the console AI-assisted (OpenCode). |
|
Tested on a boot stack: Pipodi's The retail title's first queue slot 18 call is not With this PR, the PC-order branch runs before the layout logic, so AI-assisted (Claude Code). |
|
Tested the head on the narrow stack ( Diagnosis (temporary local logging, no game data):
I’ve changed the local stack to require a proven-newer layout for the frequency path and am retesting. Suggest at least adding a PC-form |
|
Retraction: the retail boot's The slot-18 frequency/layout theory in my earlier comment was wrong; the local layout fix did not change the crash. Please disregard it. The real fix is #7111 ( |
|
Thanks @beamdotdev for catching that on the boot stack! Fixed in
Re-verified (
AI-assisted. |
svds12343
left a comment
There was a problem hiding this comment.
Independent native Windows/MSVC check of fb31ff1ef0f679e3e6b1da09a3fe182089c7da7b: 9/9 focused CTests passed, none skipped.
Windows 11 build 26200, MSVC 19.44.35230, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, RTX 3070 driver 610.88. Built the exact head unchanged and ran device_proxy (+ trace), all six xs_proxy_mock modes, and queue_proxy. The queue test passed WARP, native NVIDIA D3D12 and Vulkan; Vulkan validation was enabled with no validation-error diagnostics. Existing host-invalid-pointer exclusions and unsupported Vulkan shared-fence coverage remain as reported by the test.
The current mock test linked against previous-head cbe5febb source fails at line 961 on the PC-order slot-18 argument-preservation assertion; the current source passes. That directly confirms the latest forwarding correction. The original dde82f27e base also fails the new heap slot-8 override check. Current console/PC GetDesc, canary, null-output and proxy-integrity checks pass. No actionable issue found in the changed code.
Built with Ninja / RelWithDebInfo, Vulkan enabled and SDL3 disabled: cmake --build <build> --parallel 4 --target device_proxy_test xs_proxy_mock_test queue_proxy_test, then ctest --test-dir <build> -V -R '^(device_proxy(_trace)?|xs_proxy_mock.*|queue_proxy)$'. No warnings in changed files; the build emitted the existing C4189 warning in vulkan_present.h.
Synthetic inputs only, no game files. This is focused native coverage, not a full runtime suite, retail boot or a test of the title's queue-layout detection on an integration stack. AI-assisted (Codex).
Claim: #9235 (comment)
|
Tested fb31ff1 on RTX 4070 SUPER, NVIDIA 621.01, Windows 11 Pro: pass
|
…(out, proxy) on heap slot 8 and queue slot 18 Squashed from ItsNotRexed#8191 by auswhalen999-debug, head fb31ff1 (security scan PASS). Applied as the PR's own diff (gh pr diff); head fb31ff1 as rescanned. Against ItsNotRexed#2490's queue proxy: the console C-ABI GetDesc check (out in RCX, queue proxy in RDX) runs first in the queue dispatch, before note_child_slot and ItsNotRexed#2490's layout detection, which would otherwise read the caller's buffer as a proxy; a proxy in RCX still takes ItsNotRexed#2490's slot-18 path (newer-layout frequency getter, or PC GetDesc). Mock: Kind keeps heap and list; the heap slot 8 and queue slot 18 GetDesc cases follow the existing heap/queue cases; check_get_desc_c_abi joins the list.
…ins the older queue layout first (ItsNotRexed#8191 x ItsNotRexed#2490) ItsNotRexed#8191 was written against a queue proxy without ItsNotRexed#2490's layout detection. With it, an undetected queue answers PC-order slot 18 as the newer layout's frequency getter, which writes 8 bytes and cannot overrun the caller (ItsNotRexed#2490's rule, kept). The check now calls slot 16 with an out pointer first, which pins the older layout, where PC-order slot 18 is GetDesc. The console C-ABI GetDesc path that the retail title takes is unchanged.
|
Tested Full runtime AI-assisted (Claude Code). |
Claimed in the coordination issue as: #8047 (comment)
What and why
Both D3D12_DESCRIPTOR_HEAP_DESC (16 B) and D3D12_COMMAND_QUEUE_DESC (16 B) exceed 8 bytes. Under the console x64 C-ABI struct-return convention, callers pass the hidden return buffer in RCX and the interface pointer in RDX (GetDesc(&out, proxy)), whereas PC C++ member calls pass (proxy in RCX, &out in RDX).
Previously, heap_slot<8> (ID3D12DescriptorHeap::GetDesc) and child_slot<ChildKind::queue, 18> (ID3D12CommandQueue::GetDesc) in
untime/shims/d3d12_xs_device.cpp forwarded (self->real, a1, ...) unconditionally, which faults when a console-ABI caller passes a stack return buffer in RCX and the proxy in RDX.
This change:
untime/test/xs_proxy_mock_test.cpp) and real/Vulkan device tests (
untime/test/device_proxy_test.cpp,
untime/test/queue_proxy_test.cpp) exercising both console C-ABI and PC C++ forms, canary padding, null output handling, hit counters, and proxy integrity.
Tested
Built on Windows 11 x64 with clang-cl 23.1.6 + lld-link 23.1.6 + xwin-sdk 10.0.26100 (NVIDIA GeForce GTX 1070, driver 581.80, WARP, and Vulkan D3D12 backend):
AI-assisted: yes
Checklist