The in-box d3d12.dll of Windows 10 (and Windows 11 23H2, #361) serializes
root signatures only up to 1.1: on Windows 10 it rejects even an empty 1.2
description with E_INVALIDARG (#528). #361 made the tests skip there, but the
d3d12_xs serializer still forwarded 1.2 descriptions unchanged, so every 1.2
root signature from the package DLLs or the game failed on those hosts.
- d3d12_xs_rootsig: downgrade_root_signature_1_2_to_1_1 rewrites a 1.2
description whose static samplers all have Flags == 0 as the same root
signature in 1.1 (1.2 differs only in D3D12_STATIC_SAMPLER_DESC1::Flags).
- d3d12_xs: probe the host once with an empty 1.2 description; where it
stops at 1.1, serialize 1.2 as 1.1, or refuse one with sampler flags
with a log line.
- root_sig_test: the registered shim's 1.2 checks run on every runtime again;
new checks cover the rewrite field by field, through the registered shim
and back through the host deserializer, and the refusal.
- root_signature_oracle_test: its 1.2 cases use sampler flags, which have no
1.1 form, so they print SKIP where the host can't serialize 1.2.
- docs/d3d12_vulkan.md: the measurement and the rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host deserializer rejects an Xbox-high-byte blob on newer runtimes but
accepts it (keeping the high byte) on older ones such as Windows 11 23H2, so
"host deserializer rejects the Xbox high byte" failed there. Replace it with a
check that holds either way: if the host accepts, it must keep the high byte
(which is the bug the shim fixes); if it rejects, print that instead.
AI-assisted (Cline).
Older in-box D3D12 runtimes (e.g. Windows 11 23H2) refuse root signature 1.2
entirely, so root_sig_test's 1.2 serializer checks fail there even though the
flag clearing is correct. Gate the serializer-dependent 1.2 checks on
CheckFeatureSupport(D3D12_FEATURE_ROOT_SIGNATURE) >= 1.2, printing SKIP
otherwise. The byte-level helper checks never touch the serializer and stay
unconditional.
AI-assisted (Cline).
The d3d12_xs shim masked 0x03000000 on a copy before the host serializer but
forwarded D3D12CreateRootSignatureDeserializer blobs unchanged. The host
deserializer rejects a blob whose RTS0 flags carry that high byte (measured
E_INVALIDARG), and docs/d3d12_vulkan.md says the flags "must be masked on a
copy before the host serializer/deserializer".
copy_rts0_blob_clear_xbox_flags walks the DXBC chunk table to the RTS0 chunk,
clears bits 24-31 of its flags on a copy, and the deserializer forwards that
copy when a rewrite is needed. root_sig_test adds test_deserializer: it
tampers a serialized blob with 0x03000000, checks the host rejects it, and
checks the registered shim deserializer clears it and returns flags 0.
AI-assisted (Cline).
root_sig_test only exercised the high byte clearing for 1.0 and 1.1. Add the
1.2 case (Desc_1_2 is D3D12_ROOT_SIGNATURE_DESC2, whose static samplers are
D3D12_STATIC_SAMPLER_DESC1) so the shim's 1.2 path is covered, and extend
test_registered_shim to prove the registered d3d12_xs serializer clears the
byte for 1.2 end-to-end.
AI-assisted (Cline).
- xmem: XMemVirtualQuery(process, address, out64) fills the known MEMORY_BASIC_INFORMATION prefix and zeroes the rest; the working-set size goes at +8 with a TRUE return; allocator alignment and size-0 behaviour are documented.
- d3d12_xs: copy root-signature descriptors and clear the Xbox high flag byte (0x03000000) before forwarding to the PC serializer; add the legacy serializer; keep the deserializer.
- d3d12_xs: add D3D12XboxCreateDevice, create a PC device and log the 24-word params block. The Xbox ABI proxy is not implemented; measured slot overrides are documented as TODO and logged at runtime.
- test: root_sig_test serializes synthetic flags=0x03000000 descriptors through the PC d3d12.dll, checks the untouched copy is rejected and the cleared copy is accepted, and exercises the registered shim.
Clean-room: implemented from an ABI-facts spec derived from public write-ups; no source from americas-recomp or AnyPS5 was read or copied.