d3d12_xs: export D3D12CreateVersionedRootSignatureDeserializer, clearing the Xbox RTS0 flags (OLD-10012) #758
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!758
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/758/head"
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?
@abnalstlll-byte on GitHub · 2026-11-24 13:32 UTC · original
abnalstlll-byte:restore/old-10012-versioned-root-sig-deserializer→main· +58 −1 · 3 files · 2 commits · merged 2026-11-24 21:26 UTC### 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).
@trigger337 on GitHub · 2026-11-24 13:35 UTC · original
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
@SweatierKey on GitHub · 2026-11-24 14:33 UTC · original · approved these changes
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.
@abnalstlll-byte on GitHub · 2026-11-24 18:43 UTC · original
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.)
@QemmHD on GitHub · 2026-11-24 21:26 UTC · original
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).