Repository navigation
Conversation
…ag (ProjectLeonida#7140) The shims clear bits 24-31 of a root signature's flags on every descriptor and RTS0 blob. ProjectLeonida#7140 asks to make that conditional on the blob's origin, since the retail executable's root signatures carry no 0x03000000 (one 1.1 description with Flags 0x80, and a decoder whose Flags is a 16-bit read). Every public D3D12_ROOT_SIGNATURE_FLAGS value is in bits 0-11, so the mask can't change those descriptors and no behaviour change is needed. root_sig_public_flags_test pins it: - the descriptor helpers (1.0, 1.1, 1.2, legacy) keep all 65536 flag values in [0, 0xFFFF], and an RTS0 blob with such flags is not rewritten; - the registered serializer shims give the host's blob byte for byte for each public flag, 0x80 and all twelve, and the deserializer shim returns the host's flags; - a blob with 0x03000080 comes back as 0x80 with a valid container hash and no other byte changed; - static_asserts that no public flag is in kXboxRootSignatureFlagHighByte. docs/d3d12_vulkan.md: the executable's answer to the open question, and why the mask stays unconditional. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: #7234,
|
|
Tested
Mutation check. I changed One non-blocking nit from that run. Under the mutation, versioned 1.2 reports The review's reasoning matches what I read: every public flag is in bits 0-11, the mask clears 24-31, and the 1.2 → 1.1 rewrite copies AI-assisted (Claude Code). |
…nly on a host without 1.2 The allowance is for runtimes that serialize only up to 1.1, where the shim rewrites 1.2 as 1.1. On a host that serializes 1.2 itself it hid a real difference: under a mask that also clears 0x80, the host refuses all twelve flags and the shim accepts 0xF7F. The host is now probed once with an empty 1.2 description, and the allowance applies only when it refuses that too (review of ProjectLeonida#7234). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @pulria for the native Windows run and the mutation check. You're right about the 1.2 allowance. It's fixed in 715bde0:
What this changes:
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Tested
AI-assisted (Claude Code). |
|
Tested 715bde0 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010: pass
AI-assisted (Claude Code). |
|
Baseline on main here: AI-assisted (Claude Code). |
Claimed in the coordination issue: #7049 (comment). Answers #7140.
What #7140 asks
0x03000000: one direct 1.1 description withFlags = 0x80, and a decoder whoseFlagsis a 16-bit read.What the mask really does
runtime/shims/d3d12_xs_rootsig.h:14:kXboxRootSignatureFlagHighByte = 0xFF000000u, so it clears bits 24-31.runtime/shims/d3d12_xs_rootsig.cpp:9(clear_high_byte) applies it in the three helpers that thed3d12_xsshims use: versioned descriptors, the legacy descriptor and an RTS0 blob.D3D12_ROOT_SIGNATURE_FLAGSvalue is in bits 0-11. The highest isSAMPLER_HEAP_DIRECTLY_INDEXED(0x800).0x80(LOCAL_ROOT_SIGNATUREind3d12.h) passes through unchanged.Flagsas it is, and only runs for 1.2;CreateRootSignature(parse_rts0) keeps the flags and masks nothing.tedin7 reached the same conclusion on #7140. No behaviour change is needed, so this PR pins the current behaviour with a test, so that a later change to the mask can't start clearing public flags unnoticed.
Changes
runtime/test/root_sig_public_flags_test.cpp, registered in CMake asroot_sig_public_flags(built whend3d12.libis found, likeroot_sig_test).[0, 0xFFFF], for 1.0, 1.1, 1.2 and the legacy descriptor, and they never rewrite an RTS0 blob that carries such a value.0x80alone and all twelve together, the registered serializer shims return the host's blob byte for byte (1.0, 1.1 and the legacy entry point). A 1.2 blob from the shim deserializes with the same flags.0x03000080comes back as0x80, with a valid container hash and every other byte unchanged.static_asserts: the public flags are exactly0xFFF, and none of them is inkXboxRootSignatureFlagHighByte.docs/d3d12_vulkan.md: the open question "does the executable carry the bits" is answered from Q19: the retail executable's own root signatures carry no 0x03000000 flag — mask should be conditional #7140, with a note that the mask stays unconditional and why.Tested
x86_64-w64-mingw32against DirectX-Headers 1.721, run under Wine 11.22 (vkd3d'sd3d12.dll). This is not the MSVC build that CI runs.root_sig_public_flags_test: 28 PASS, 0 FAIL. Wine's serializer stops at 1.1, so the 1.2 cases go through the shim's 1.1 rewrite.0xFF000080fails to compile on thestatic_assert;0x80inclear_high_bytegives 17 failures.root_sig_test(unchanged): 50 PASS, 0 FAIL.tests/test_docs_*.py: 9 of 11 pass.test_docs_cli_flagsandtest_docs_linksfail ondocs/dev-tools.md, which this PR doesn't touch.AI-assisted (Claude Code, Claude Opus 5.5).