Repository navigation
Conversation
… on Windows 10 Windows 10's built-in d3d12.dll refuses root signature flags 0x400 and 0x800 (CBV_SRV_UAV / SAMPLER_HEAP_DIRECTLY_INDEXED) with "Unsupported bit-flag set". The title builds every program's root signature from the shader's PRIV chunk and serializes it; a refusal leaves a null program in its pass table, and the title crashed reading it (game_scarlett_master.exe+0xb5a5f8, boots 5-9). The flags the host refuses are asked once per bit; the description is serialized without them and they are written back into the blob's RTS0 flags (container hash recomputed), so CreateRootSignature still sees them. The shim test covers it, and its target now links presentx_capture.cpp, which d3d12_xs_device.cpp needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lixonik
left a comment
There was a problem hiding this comment.
Independent Windows 10 check at d1029668 from a full Git checkout. I built the standalone d3d12_xs_root_signature_test sources with Microsoft DirectX-Headers v1.614.1 and the system D3D12 runtime. The PR test linked against the base shim at 21625bca fails the heap-indexed serialization case with 0x80070057. Linked against the PR shim, it passes, including the 1.0 and WARP 1.1 cases. Native 1.2 was skipped because this runtime lacks it.
I also exercised the new fallback separately, with a synthetic 1.2 description, no static sampler flags, flags 0xc01, and no error blob requested. The shim emitted a 1.1 RTS0 payload preserving 0xc01, and it passed the same hash check as the 1.1 test.
AI-assisted. Synthetic inputs and WARP only. No title boot or hardware GPU run.
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Reviewed and verified fix for SM 6.6 heap-directly-indexed root signature flags (0x400/0x800) on Windows 10. Probing refused flags dynamically, stripping them before invoking the host D3D12 serializer, and patching them back into the RTS0 chunk with container checksum recomputation prevents crashes at boot without breaking newer OS environments. Test coverage in d3d12_xs_root_signature_test.cpp validates DXBC container integrity and flag persistence. Approved.
|
I checked the host serializer for #683 (PR head d102966) on Windows 11 build 26300, with
For the 12 overlapping cases, an additional check read the RTS0 flags field in the This measures serialization on this host. The probes created no D3D12 device. I did AI use — DeepSeek Harness (DeepSeek V4.1 Flash) ran the original probes and drafted the |
Merging. **Why merged:** on Windows 10, the in-box `d3d12.dll` refuses root-signature flags `0xC00` (heap directly indexed) in its serializer, so the title is left with a null program and stops about 15 s in (`exe+0xb5a5f8`, a read of `0x68`); testers on Windows 10 hit this every boot. This retries only after the host has refused, and only when `0xC00` is in the description. It covers both the versioned and the legacy `D3D12SerializeRootSignature`, patches the flags back into `RTS0` after checking the container hash (failing closed), and it's claimed as D3D12-SET-HEAPS-BLOB. It's the better of the two PRs for this. #683 does the same for the versioned path only, by probing each bit through a static that captures the first serializer pointer. **Why it's good:** on this Windows 11 host the real serializer accepts the flags, so I also checked the refusal path independently with a harness: a fake serializer that refuses `0xC00` and forwards everything else to the real Windows 11 serializer, on the RTX 4070 SUPER's hardware D3D12 device. #1353's wrappers (versioned 1.0 and 1.1, legacy 1.0) return S_OK after exactly one refusal; the flags read back as `0xc01` through the host deserializer; hardware `CreateRootSignature` succeeds; an unrelated failure is passed through; and a host that accepts the flags gets a byte-identical blob, 16/16. root_sig, root_signature, root_signature_oracle, d3d12_set_descriptor_heaps, d3d12_xs_root_signature, d3d12_draw, bundle, device_proxy and xs_proxy_mock* pass 14/14, both plain and with `LEONIDA_VK_VALIDATION=1`. The repository-consistency set gives 578/5/0. It merges cleanly onto main after #984 (neither #984 nor DadaCap's prototype carries this fix). Minor note: it returns S_FALSE ("flags lost") if a blob can't be patched, which is fine. AI-assisted (Claude Code, Claude Opus 5.5).
|
@Kokonotcu: #1353, which does the same fix for the Windows 10 root-signature flags, has just been merged. It retries only after a refusal, covers both the versioned and the legacy serializer, and checks the hash before patching. I tested both PRs; details are in my merge note on #1353. One part of this PR would still be useful on top of main: logging the host's error message for the first few serializer failures. If you rebase just that piece as a small PR, I'll test it. Otherwise this one can probably be closed as covered by #1353. Thanks for finding the crash in the first place. AI-assisted (Claude Code, Claude Opus 5.5). |
Windows 10's built-in d3d12.dll refuses root signature flags 0x400 and 0x800 (CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED / SAMPLER_HEAP_DIRECTLY_INDEXED) with "Unsupported bit-flag set (root signature flags c00)".
The retail title builds each program's root signature from the shader's PRIV chunk and serializes it through
D3D12SerializeVersionedRootSignature. A refusal leaves a null program in the pass table, and the title crashed reading it (game_scarlett_master.exe+0xb5a5f8, a read of[0+0x68]) about 15 s into every boot on a Windows 10 host. Measured with a new log of the host's error message:Change
CreateRootSignaturetherefore still sees the heap-indexing flags.d3d12_xs_root_signature_testcovers it: a 1.1 description with 0x400 | 0x800 | 0x1 serializes, its RTS0 flags keep all three bits and its hash is valid.Verified: Windows 10 19045, RTX 3080 Laptop:
d3d12_xs_root_signature_testpasses (the 1.2 case skips, as before, on a d3d12.dll without 1.2). On the retail boot the b5a5f8 crash is gone and the run continues past it.On a host whose d3d12.dll already accepts the flags (Windows 11 / Agility), the probe finds nothing refused and the path is unchanged.
🤖 Generated with Claude Code