Repository navigation
d3d12_xs device proxy: slot 62 takes (desc, w2, w3, riid, out) - #161
Merged
Merged
Conversation
The proxy read device slot 62 as (desc, riid, out), so XboxBvhBuilder's constructor, the only known caller, got E_POINTER on its first compute PSO and threw it. Recorded on 1.0.2.1: the DLL calls slot 62 with (desc, 0, 0, &IID_ID3D12PipelineState, out), the shape the prior art had documented (d3d12_vulkan.md, sections 4.8 and 7). Read the IID and the output from the fourth and fifth arguments, and log the two extra words once if they are ever non-zero. device_proxy_test now calls slot 62 in that shape. AI-assisted (Claude Code). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The proxy reads device slot 62 as
(desc, riid, out). The package'sXboxBvhBuilder.dll, the only known caller, calls it as(desc, 0, 0, &IID_ID3D12PipelineState, out), the shape the prior art had documented (docs/d3d12_vulkan.md§4.8 and §7: "a plainD3D12_COMPUTE_PIPELINE_STATE_DESC, two zero words, iid, out"). So the proxy saw a null IID, returnedE_POINTERon the builder's first PSO, and the constructor threw it.proxy_create_compute_pipeline_statenow takes the IID and the output from the 4th and 5th arguments. The two words in between are logged once if they're ever non-zero; their meaning is unknown.d3d12_xs_device.h: slot 62's documented shape.device_proxy_test: calls slot 62 in that shape. The old test used the same 3-argument form as the proxy, which is why it passed.How it was measured
On 1.0.2.1, with a local test that maps
XboxBvhBuilder.dllwithrt::Loader+ #93, runsDllMainand callsXboxBvhBuilder(ID3D12Device11*, bool)on a PC device behind the proxy. A recorder in front of the proxy's slot 62 printed the raw argument words:a2 = a3 = 0, anda4points atIID_ID3D12PipelineState. Before the fix: one slot-16 and one slot-62 call, then the constructor throws a C++long0x80004003(E_POINTER).After the fix:
S_OK).~XboxBvhBuilderreturns. That's created, not proven correct: the shaders are Xbox DXIL (§7.2), and nothing is dispatched.S_OK; creating the 49th ends the process with0xC0000409on repeated runs (one run returnedE_OUTOFMEMORYinstead). So the PC driver doesn't survive the builder's DXIL as is, which is worth knowing for the layer.That test (and an FSR one, results on #74) will come as a separate PR once #93 is in, since they need its static TLS and unwind support. Nothing from the DLL is in this PR.
Tested
Windows 11, VS 2022 Build Tools (MSVC 14.44), Windows SDK 10.0.26100.0:
device_proxy_test: OK (0 failures)on WARP, includingslot 62 creates a compute PSO via CreateComputePipelineState. The builder results above: RTX 4090 driver 621.24, and WARP.AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code