Repository navigation
d3d12_xs proxy: slots 14/62/76 and heap GetDevice clear the output before failing - #1158
Conversation
…fore failing d3d12.h declares these outputs _COM_Outptr_ (NULL on failure), and the inner Vulkan device clears it, but the Xbox-ABI proxy returned an error with the caller's pointer untouched: slot 14 created into a local, and slots 62/76 and heap slot 7 checked riid/desc before touching out.
|
Tested bc59ef4 on NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11 Home 25H2 (26200.9974), VS 2022 Build Tools, Vulkan SDK 1.4.363.1: pass.
AI-assisted. No game files. |
|
Tested bc59ef4 on NVIDIA GeForce RTX 5070, driver 621.24 (32.0.16.2124), Windows 11 26H2 (26300), MSVC 14.52 (VS Build Tools 18), Ninja, RelWithDebInfo: pass.
|
|
Tested bc59ef4 on AMD Radeon RX 9070 (RDNA4), AMD 26.11.2 (LLPC), Windows 11 Pro 26300, MSVC 14.44 (VS 2022 Build Tools),
So the new checks catch the old behaviour and the fix makes them pass, as described. Full AI-assisted (Claude Code). |
|
Tested AI-assisted (Claude Code): it built the branch, ran the tests and wrote this comment.
One validation error appears with |
…fixes The list proxy's GetDevice and device slots 12/51 clear the output before any failure, as ItsNotRexed#1158 does for the other proxy slots. d3d12_vulkan_device_test copies through console slots 15/9 on a slot-12 list and executes its PC list. The docs no longer say every proxy slot forwards in PC order.
…fixes The list proxy's GetDevice and device slots 12/51 clear the output before any failure, as ItsNotRexed#1158 does for the other proxy slots. d3d12_vulkan_device_test copies through console slots 15/9 on a slot-12 list and executes its PC list. The docs no longer say every proxy slot forwards in PC order.
The Xbox-ABI proxy in
runtime/shims/d3d12_xs_device.cppreturned errors with the caller's output pointer untouched:CreateDescriptorHeap) creates into a local, so when the PC device'sCreateDescriptorHeapfails, orriidis null,*outis never written;CreateComputePipelineState) returns for a nullriidbefore touchingout;riid;GetDevice) checksriidbeforeout.d3d12.h (Windows SDK 10.0.26100) declares these outputs
_COM_Outptr_, which means NULL on failure, and the inner Vulkan device already clears*outbefore validating. Through the proxy, a raw-pointer caller kept whatever was in its variable and could Release garbage. Each of the four now doesif (!out) return E_POINTER; *out = nullptr;before its other checks.mainNumDescriptors = 0(inner device fails)Tests:
device_proxy_testadds raw slot 14/62 calls with a null IID and a slot 76 call with a null description. Onmain:FAIL slot 14/62 … nulls its output,FAIL slot 76 nulls its output for a null description, 3 failures. With this change: OK.d3d12_vulkan_device_testadds slot 14 withNumDescriptors = 0through the inner device and the proxy. Onmainit fails atproxy_out == nullptr; with this change it exits 0.d3d12_descriptor_teststill passes. Fullcteston Windows 11, RTX 5070 (621.24), VS 2022 Build Tools, withLEONIDA_VK_VALIDATION=1andLEONIDA_D3D12=vulkan: 54/54.Heap slot 7 is fixed but has no test of its own. #558 rewrites slot 14's null-output line into a capability check; the clear goes on the line after it, and I'll rebase on whichever lands first.
AI-assisted.