Skip to content

d3d12_set_descriptor_heaps_test: skip the heap-direct flags where the host cannot serialize them (Windows 10) - #7781

Closed
ddaikodaiko wants to merge 1 commit into
ItsNotRexed:mainfrom
ddaikodaiko:fix/set-descriptor-heaps-win10
Closed

ddaikodaiko wants to merge 1 commit into
ItsNotRexed:mainfrom
ddaikodaiko:fix/set-descriptor-heaps-win10

Conversation

@ddaikodaiko

Copy link
Copy Markdown

Claim: #7333 comment (no item ID yet).

What and why

d3d12_set_descriptor_heaps_test (added in #6674) builds a 1.0 root signature whose flags are CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED, serializes it with the host's D3D12SerializeVersionedRootSignature, and then does CHECK(!blob.empty()) at line 341 before creating the root signature and checking that the flags survive on RootArgumentLayout.

The heap-direct bits are Shader Model 6.6. Windows 10's in-box d3d12.dll predates them: it refuses the description with "Unsupported bit-flag set", so d3d12test::serialize_root_signature returns an empty vector and the test fails on a layer that is doing the right thing. Nothing in the test depended on the failure being real; it is a host capability, not a layer result.

The change probes the serializer, and where it cannot serialize the description it prints

SKIP: direct heap indexing root-signature flags: the host d3d12.dll can't serialize them (e.g. Windows 10)

and skips only that block. This is the guard #4731 already applied to root_signature_oracle for the same Windows 10 behaviour; the rest of the test is unchanged and still runs everywhere.

Testing

Windows 10 19045, Ryzen 5 1600, NVIDIA GeForce RTX 3060 Ti (driver 32.0.16.1088, Vulkan 1.3), MSVC 19.44.35229.0, Windows SDK 10.0.26100.0, RelWithDebInfo.

Before, on 3d21852:

$ ctest -C RelWithDebInfo -R "^d3d12_set_descriptor_heaps$" --output-on-failure
line 341: CHECK failed: !blob.empty()
0% tests passed, 1 tests failed out of 1

After:

$ ctest -C RelWithDebInfo -R "^d3d12_set_descriptor_heaps$" --output-on-failure
Test #213: d3d12_set_descriptor_heaps .......   Passed    0.90 sec
100% tests passed, 0 tests failed out of 1

with the SKIP line above in the test's output, and the remaining report unchanged:

SetDescriptorHeaps: 23 single-list cases, 7 bundle parity cases, ClearState/Reset, lifetime pinning, direct-index
flags (matched host NVIDIA GeForce RTX 3060 Ti) passed

Full ctest -j2 on this host, after this change: 237 configured, 4 failed, the same four Windows 10 items that already have open PRs — root_signature_oracle (#4731), d3d12_close_parity (#6071), d3d12_execute_indirect_validation (#7393) and d3d12_vulkan_device (#7125). Before this change the same run had those four plus d3d12_set_descriptor_heaps, so this is the only one the change touches; nothing new fails.

No game files or GPU-specific data were used; the fix itself is CPU-only and only the test run needs a Vulkan device. AI-assisted.

… host cannot serialize them (Windows 10)

The heap-direct root-signature bits came with Shader Model 6.6; Windows 10's built-in d3d12.dll predates them and refuses to serialize a description that carries them. The test built the description and CHECKed a non-empty blob, so it failed on Windows 10 even though the layer is correct. Probe the serializer first and print SKIP there, as root_signature_oracle does.
@MartinIndra02

Copy link
Copy Markdown

AI-assisted review/test.

PASS on commit 6827b21.

  • Environment: Windows 11 x64, MSVC 19.44.35220, Windows SDK 10.0.26100.0, Vulkan SDK 1.4.363.1, NVIDIA GeForce RTX 3080 (driver 32.0.16.2124 / 621.24).
  • Build: cmake --build --target d3d12_set_descriptor_heaps_test (Ninja, RelWithDebInfo) — succeeded cleanly.
  • Test: d3d12_set_descriptor_heaps_test.exe — passed (23 single-list cases, 7 bundle parity cases, ClearState/Reset, lifetime pinning, direct-index flags (matched host NVIDIA GeForce RTX 3080)).
  • Note for maintainers: d3d12_set_descriptor_heaps_test: set the heap-direct root-signature flag word by hand where the host serializer refuses it (Windows 10) #7718 addresses the same Windows 10 d3d12.dll SM 6.6 root-signature serialization issue by patching the RTS0 flag word by hand rather than skipping the direct-index check.

@ddaikodaiko

Copy link
Copy Markdown
Author

Superseded by #7718, which appeared 44 seconds before this claim and solves it better: it patches the heap-direct bit in the flag word by hand instead of skipping the check, so the direct-index flags are still verified on Windows 10.

Closing in favour of it. Thanks to the reviewer for the Windows 11 PASS and for pointing at #7718.

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.

3 participants