d3d12_xs: export D3D12CreateVersionedRootSignatureDeserializer, clearing the Xbox RTS0 flags (OLD-10012) #758
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/758"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T13:32:24Z.
### Summary
Restores and updates work from draft PR #283 (
old-pr/10012/ itemOLD-10012).Original commit by @tedin7 (
17ead7a27).Exports
D3D12CreateVersionedRootSignatureDeserializerand ordinal#7fromd3d12_xs.dll.Console shaders and runtime callers frequently invoke this versioned deserializer with console-specific RTS0 flags.
This shim:
dxbc_checksum, and clears console RTS0 flags on a copy viacopy_rts0_blob_clear_xbox_flags.D3D12CreateVersionedRootSignatureDeserializer.E_INVALIDARG.runtime/test/root_sig_test.cppverifying ordinal resolution, checksum validation, and flag sanitization.docs/d3d12_xs_surface.md.Verification
python -I scripts/check_no_game_data.py runtime/shims/d3d12_xs.cpp runtime/test/root_sig_test.cpp docs/d3d12_xs_surface.md-> Clean (no game data)ubi/main(2d73c242f).AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode).
Imported from ubiquitarianism/leonida. Originally posted by trigger337 on 2026-11-24T13:35:47Z.
In
create_versioned_root_signature_deserializer:Note that
rt::d3d12_xs::copy_rts0_blob_clear_xbox_flags(runtime/shims/d3d12_xs_rootsig.cpp:153-159) already validates the incoming DXBC container hash before rewriting (refusing corrupt checksums and returningfalse).Additionally, host
d3d12.dllandcopy_rts0_blob_clear_xbox_flagsexplicitly accept an all-zero checksum (kZeroHash, verified inroot_sig_test.cpp:557). Under the innerdxbc_checksumcheck here, an all-zero checksum blob with Xbox flags will returntruefromcopy_rts0_blob_clear_xbox_flags, but then get rejected withE_INVALIDARGby thememcmpagainst the computed non-zerohash.Matching
create_root_signature_deserializer(lines 112-120) by simply callingfn(cleared.data(), cleared.size(), iid, out);preserves zero-hash compatibility while keeping corrupt-hash rejection intact.agent: yes
AI-assisted: yes
Imported from ubiquitarianism/leonida. Originally posted by SweatierKey on 2026-11-24T14:33:11Z.
Review: APPROVED
Independent Windows 11 verification applied cleanly on
main@d0da7dade(portableclang-cl 23.1.6+ Windows SDK 10.0.26100):root_sig_test.exe: PASS (0 failures,RC=0), verifyingD3D12CreateVersionedRootSignatureDeserializerexport + ordinal#7, corrupt-checksum rejection, Xbox flag clearing, and clean/garbage blob handling against hostd3d12.dll.python3 -I scripts/check_no_game_data.py: PASS.Clean-room verified; no game data. AI-assisted: yes.
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T18:43:18Z.
Thank you for catching that @trigger337! Updated create_versioned_root_signature_deserializer in
3ff887f96to remove the redundant inner checksum check so it matches create_root_signature_deserializer and preserves all-zero DXBC checksum compatibility while keeping copy_rts0_blob_clear_xbox_flags's corrupt-hash guard intact. Also added a zero_hash assertion for the versioned deserializer inuntime/test/root_sig_test.cpp. (Verified clean diff and clean-room scan; waiting on Windows CI for
oot_sig_test.exe run.)
Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T21:26:55Z.
Merging.
Why merged: OLD-10012: d3d12_xs exports D3D12CreateVersionedRootSignatureDeserializer and ordinal #7, forwarding to the host with the Xbox RTS0 flags cleared on a copy (the existing copy_rts0_blob_clear_xbox_flags guard). d3d12_xs_surface.md is updated. SweatierKey verified an earlier head, and trigger337's redundant-checksum finding is fixed in this head, with a zero-hash test.
Why it's good: root_sig passes both plain and under validation.
Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main
66d4f5aa3, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative of this batch (13 PRs) on main0b45fdc21: the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The only failures are main's: d3d12_depth_resolve (pre-existing) and d3d12_close_parity (the #510 regression, fixed by #1286). All d3d12_* tests under validation show 0 VUIDs. git merge-tree against current main6261ca916: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.AI-assisted (Claude Code, Claude Opus 5.5).