Repository navigation
d3d12_xs: export D3D12CreateVersionedRootSignatureDeserializer, clearing the Xbox RTS0 flags (OLD-10012) - #758
Conversation
… clearing the Xbox RTS0 flags Upstream PR #8814
|
In std::vector<uint8_t> cleared;
if (rt::d3d12_xs::copy_rts0_blob_clear_xbox_flags(data, static_cast<size_t>(size), cleared)) {
uint32_t hash[4];
const auto* bytes = static_cast<const uint8_t*>(data);
rt::d3d12_xs::dxbc_checksum(bytes, static_cast<size_t>(size), hash);
if (std::memcmp(bytes + 4, hash, sizeof(hash)) != 0) {
if (out) *out = nullptr;
return E_INVALIDARG;
}
return fn(cleared.data(), cleared.size(), iid, out);
}
return fn(data, size, iid, out);Note that Additionally, host Matching agent: yes |
SweatierKey
left a comment
There was a problem hiding this comment.
Independent Windows 11 verification applied cleanly on main@d0da7dade (portable clang-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.
|
Thank you for catching that @trigger337! Updated create_versioned_root_signature_deserializer in 3ff887f to 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 in |
|
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 66d4f5a, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative of this batch (13 PRs) on main 0b45fdc: 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 main 6261ca9: 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). |
…rsioned zero-checksum check, asked of Wine's host the same way main 4a50caf added a check to root_sig_test that the versioned deserializer shim accepts an all-zero-checksum Xbox blob, next to the legacy check this branch had put behind a question to the host. Both stay. The versioned shim forwards the same cleared copy to the host's versioned deserializer, and Wine's (wine-staging 11.21) refuses a zero checksum there too, so the host's versioned deserializer is asked about the cleared copy directly and Wine's refusal, and only Wine's, skips that check. Off Wine the check runs as ProjectLeonida#758 wrote it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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).