Skip to content

root_signature_oracle_test: Windows 10 can't serialize the heap-direct flags; check the other flags there - #4731

Open
etcetera-yt wants to merge 1 commit into
ItsNotRexed:mainfrom
etcetera-yt:root-signature-oracle-win10-heap-direct
Open

etcetera-yt wants to merge 1 commit into
ItsNotRexed:mainfrom
etcetera-yt:root-signature-oracle-win10-heap-direct

Conversation

@etcetera-yt

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: new TEST item (claim).

What and why

root_signature_oracle fails on every Windows 10 PC. The case 1.1 with every root-signature flag (added in #3340) sets CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and SAMPLER_HEAP_DIRECTLY_INDEXED. Those came with Shader Model 6.6, and Windows 10's built-in d3d12.dll refuses them:

FAIL 1.1 with every root-signature flag: Microsoft serializer accepts it
serializer error: Unsupported bit-flag set (root signature flags c7f).

The test already skips the 1.2 cases on such a host, and this change does the same here:

  • It first asks the host to serialize an empty 1.1 signature with only the two heap-direct bits.
  • If the host refuses, it prints SKIP 1.1 with every root-signature flag: the heap-direct bits (...) and round-trips the flag word without them.
  • The other seven flags are still checked on Windows 10. That is what catches a parser reading the flags from the wrong header word, the reason the case exists.

Hosts that serialize the heap-direct bits (Windows 11, an Agility SDK runtime) run the case unchanged.

Tested

NVIDIA GeForce RTX 5060 Ti, driver 621.14, Windows 10 19045, MSVC (VS 2022 Build Tools), RelWithDebInfo, branch on main 98fa503f.

  • Baseline main 98fa503f: root_signature_oracle fails with the output above. Full ctest -j2 was 163/166, with and without LEONIDA_VK_VALIDATION=1. The failures were root_signature_oracle, d3d12_indirect_dispatch_count (d3d12_indirect_dispatch_count_test: check the layer against the expected count (WARP 22621 reuses a stale count) #4653) and d3d12_conservative_raster (TEST-907).
  • This branch: root_signature_oracle_test.exe exits 0, with 53 PASS lines and the two SKIP lines (heap-direct bits; 1.2), and the four 1.1 with every root-signature flag checks pass.
  • Negative control: parse_rts0 reading the flags from header offset 16 instead of 20 (runtime/src/root_signature.cpp:284), the bug the case is for. On this Windows 10 host the test then fails, FAIL 1.1 with every root-signature flag: the whole PC flag word round-trips ... plus 3 more, 4 FAILURES, exit 1. Restored.
  • Full ctest with and without validation: running now; I'll post the results here.

Not tested: a host that serializes the heap-direct bits (Windows 11). There the probe succeeds and the case is the same as on main.

AI-assisted: yes (Claude Code).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (not a translator change)

🤖 Generated with Claude Code

https://claude.ai/code/session_01GZEZyXGTTXs4V33hrBw1tD

…ct bits where the host can't serialize them

"1.1 with every root-signature flag" (ItsNotRexed#3340) sets CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and
SAMPLER_HEAP_DIRECTLY_INDEXED, which came with Shader Model 6.6. Windows 10's built-in d3d12.dll refuses them
("Unsupported bit-flag set (root signature flags c7f)"), so the test failed on every Windows 10 PC. As for the
1.2 cases, the test now asks the host first. Where it can't serialize the heap-direct bits, it prints SKIP for
them and round-trips the other seven flags, so a parser reading the wrong header word is still caught there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GZEZyXGTTXs4V33hrBw1tD
@dcastell1

Copy link
Copy Markdown
Contributor

Tested d1b1d0d on Windows 10-compatible path elsewhere? Not quite: RTX 5090, Windows 11 (10.0.26300), 621.24, MSVC 19.44: pass. Built root_signature_test and root_signature_oracle_test from this tree and ran ctest -R root_signature → 2/2 passed (0.07 s / 0.01 s).

So the oracle still works where the host can serialise; the new "can't serialise here" branch is the one I cannot exercise on this OS build.

@Kam471 Kam471 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.

Built and ran root_signature_oracle_test at d1b1d0dbc on Windows 11: exit 0 (the run includes the 1.2 non-normalized-coordinates cases: version, two-range table, root SRV, samplers, field round-trips, canonical codec). git diff --check clean.

On a host that cannot serialize the heap-direct flags, the test now compares the flag word with those bits masked out and still checks the rest, instead of failing the whole row. No blocking issue.

@etcetera-yt

Copy link
Copy Markdown
Contributor Author

Full ctest on this branch (d1b1d0db), RTX 5060 Ti, driver 621.14, Windows 10 19045, RelWithDebInfo, ctest -j2:

The incremental rebuild of the changed test had no warnings. AI-assisted (Claude Code).

@Atomic258

Copy link
Copy Markdown
Contributor

Re-ran at head d1b1d0db on Windows 11 (10.0.26300), RTX 5090 (driver 617.42) present, MSVC 14.44 / Ninja / RelWithDebInfo — this test exercises the D3D12 root-signature serializer/parser, no Vulkan device needed.

cmake --build runtime\build --target root_signature_oracle_test root_signature_test
.\runtime\build\root_signature_oracle_test.exe   → exit 0
.\runtime\build\root_signature_test.exe          → exit 0

root_signature_oracle_test: all checks PASS including the four 1.1 with every root-signature flag checks — on this host D3D12SerializeVersionedRootSignature accepts the heap-direct bits, so the new probe succeeds and the case runs with the full flag word, same as main. The SKIP branch (host can't serialize the bits, e.g. Windows 10) is not exercisable on Windows 11; the author's Windows 10 ctest run (164/166, same two pre-existing failures as main) covers it. No blocking issue.

AI-assisted (Devin).

@memorypressure

Copy link
Copy Markdown

Reviewed on Linux: the capability probe is well-shaped — it isolates exactly the two SM6.6 heap-direct bits, and on a host that cannot serialize them the remaining flag word is still round-trip checked rather than the whole test skipping. The Windows run itself could not be executed here; CI legs were still queued at check time. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

@etcetera-yt

Copy link
Copy Markdown
Contributor Author

Thanks @dcastell1, @Atomic258 and @Kam471 for the Windows 11 runs (the probe succeeds there and the full flag word is checked, as on main), and @memorypressure for the review. AI-assisted (Claude Code).

@trvxoo-glitch

Copy link
Copy Markdown

Tested d1b1d0d on AMD Radeon RX 6700 XT (RDNA2), AMD driver 32.0.21045.29003 (Vulkan 26.11.2), Windows 10 Pro 22H2 build 19045 (in-box D3D12, no Agility SDK), MSVC 14.51, Ninja RelWithDebInfo: pass.

  • main 3faac55 on this PC: root_signature_oracle fails: FAIL 1.1 with every root-signature flag: Microsoft serializer accepts it, with serializer error: Unsupported bit-flag set (root signature flags c7f).
  • this PR: ctest -R "^root_signature_oracle$" passes.

AI-assisted comment.

@etcetera-yt

Copy link
Copy Markdown
Contributor Author

Thanks @trvxoo-glitch for the independent Windows 10 19045 run (RX 6700 XT, in-box D3D12): main fails with the same c7f error and this PR passes. AI-assisted (Claude Code).

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.

6 participants