Skip to content

d3d12_xs: export D3D12CreateVersionedRootSignatureDeserializer, clearing the Xbox RTS0 flags - #8814

Open
tedin7 wants to merge 3 commits into
ItsNotRexed:mainfrom
tedin7:c2-d3d12xs-versioned-rootsig
Open

tedin7 wants to merge 3 commits into
ItsNotRexed:mainfrom
tedin7:c2-d3d12xs-versioned-rootsig

Conversation

@tedin7

@tedin7 tedin7 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Expose the versioned root signature deserializer and clear Xbox RTS0 flags on a copy before forwarding to the host. AI-assisted.

Why

The versioned entry was missing from the shim registry. The host deserializer handles version conversion.

Tested

  • p2, synthetic root_sig_test: ordinal 7 resolves to the named shim; 0 failures (5 skipped).

  • p2, synthetic root_sig_test: checksum regression before fix 55 pass, 1 fail, 5 skip; after fix 56 pass, 0 fail, 5 skip. The clean blob succeeds and garbage fails.

  • git diff --check and python -I scripts/check_no_game_data.py on the changed source and test files passed. GPU and driver: not established; this test exercises host deserialization.

Known limits

The legacy deserializer still uses the shared rewrite helper without validating the original checksum. The versioned entry validates it only when clearing Xbox flags; other blobs are forwarded to the host unchanged.

@ItsNotRexed: an exe PR, as you asked.

Claim: #8683 (comment)

@abnalstlll-byte abnalstlll-byte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on Windows 11.

  • Correctly exports \D3D12CreateVersionedRootSignatureDeserializer\ in
    untime/shims/d3d12_xs.cpp:
    • Strips Xbox-specific flags via \copy_rts0_blob_clear_xbox_flags.
    • Computes and verifies the 16-byte DXBC checksum (
      t::d3d12_xs::dxbc_checksum), cleanly rejecting corrupted blobs with \E_INVALIDARG\ before forwarding to the host.
    • Updates entry 7 in \docs/d3d12_xs_surface.md\ to present.
  • Unit test in
    untime/test/root_sig_test.cpp\ validates flag clearing, checksum verification, and error paths.
  • Clean-room check and \git diff --check\ pass.

LGTM!

@lohant27-netizen

Copy link
Copy Markdown

Tested 98b55d038 on Windows 11 (10.0.26300), NVIDIA GeForce RTX 5070 (driver 32.0.16.2101, subgroup 32), MSVC with SDK 10.0.26100, Release, merged onto main 867d922f0 together with #8815, #8814, #8809, #8784, #8783 and #8813 (no conflicts): pass.

@smowlyy

smowlyy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Verified head 182ec232b merged onto main (867d922f0) on native Windows 11 (10.0.26300.9974, MSVC 19.44, RelWithDebInfo):

  • python -I scripts/check_no_game_data.py on all 3 changed files: clean (exit 0)
  • cmake --build runtime/build --target root_sig_test --parallel: built cleanly
  • ctest --test-dir runtime/build -R '^root_sig$' --output-on-failure -V: 1/1 passed (root_sig_test: OK (0 failures))

AI-assisted.

@philip-roy-jones

Copy link
Copy Markdown

I compared the named D3D12CreateVersionedRootSignatureDeserializer shim at 182ec232 with System32 D3D12 on Windows 11 x64. I used a synthetic 1.0 descriptor table with three shader-resource views starting at t5, register space 2, table offset 4.

The host with the standard fixture, the shim with the same fixture, and the shim with a checksummed console-format copy all returned S_OK for creation, the 1.1 request and the subsequent 1.0 request. The 1.1 view retained all three descriptors, their register, space and offset. All three paths reported range flags 0x3 (DESCRIPTORS_VOLATILE | DATA_VOLATILE). The unconverted view still reported 1.0, and all 108 input bytes matched the original after release.

I added a CPU-only regression directly on this PR head. As a control, I substituted the same object's unconverted view in the console-path assertion. It failed at the version check (CTest exit 8). Restoring the test gave 1/1 passing. Test commit.

I also built and linked the existing root_sig_test with the shared fixture helper. I ran the new conversion CTest only. It uses the named API and creates no graphics device. Windows build 26200.9974, MSVC 19.51, synthetic inputs. AI-assisted (Codex).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants