d3d12_title_va_test, d3d12_compute_test: serialize root signatures through the shared helper, so the heap-directly-indexed cases run on Windows 10 #2059

Manually merged
github merged 1 commit from gh-pr/2059/head into gh-pr/2059/base 2026-11-26 10:16:28 +00:00
Owner

@⁠qhukz13 on GitHub · 2026-11-25 19:14 UTC · original
qhukz13:cont/test-serialize-win10 → main · +6 −26 · 2 files · 1 commits · merged 2026-11-26 01:25 UTC

Item: TEST-SERIALIZE-HEAP-DIRECT-WIN10

Problem

d3d12_title_va_test.cpp and d3d12_compute_test.cpp each carry their own serialize(). It calls the in-box D3D12SerializeVersionedRootSignature directly. Windows 10's d3d12.dll refuses D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED at every root signature version. Measured on 10.0.19041.7291 with a small probe of the same root signature: 1.0 and 1.1 both return 0x80070057, "Unsupported bit-flag set (root signature flags 400)"; without the flag both serialize.

So on Windows 10 the cases that set the flag end at an empty blob before they reach the code they test:

  • d3d12_geometry_views stops at d3d12_title_va_test.cpp:1067 (!root_blob.empty()), so it never checks GeometryViews there. The failure looks like the no-Resizable-BAR one in #1678, but the cause is different.
  • d3d12_compute fails at its heap-directly-indexed case (d3d12_compute_test.cpp:569).

Fix

Both serialize() functions now call d3d12test::serialize_root_signature (runtime/test/d3d12_test_shaders.h, from a330747f2), which already retries without the two flags and writes them back into the blob. The local SerializeFn alias is dropped. Tests only; no runtime change.

Testing

Windows 10 Pro 19045, GeForce GTX 1050 Ti (Pascal, 4 GB, no Resizable BAR), NVIDIA 582.66, MSVC (VS 18 Build Tools), RelWithDebInfo, base 9f9a7c5f3.

  • On main: d3d12_geometry_views and d3d12_compute fail on every run.
  • With this change: d3d12_compute, d3d12_title_va, d3d12_title_va_shadow, d3d12_geometry_views, d3d12_title_window_cap, d3d12_api_descriptor_copy, d3d12_api_descriptor_copy_off, d3d12_rebound_tables, d3d12_rebound_tables_off, d3d12_rebound_second_device: 10/10 pass, 3 runs each, plain and with LEONIDA_VK_VALIDATION=1, no validation messages.
  • python -I scripts/check_no_game_data.py on both files: clean.

AI-assisted (Claude Code, Opus 5.5).

🤖 Generated with Claude Code

**@⁠qhukz13** on GitHub · 2026-11-25 19:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2059) `qhukz13:cont/test-serialize-win10` → `main` · +6 −26 · 2 files · 1 commits · merged 2026-11-26 01:25 UTC Item: `TEST-SERIALIZE-HEAP-DIRECT-WIN10` ### Problem `d3d12_title_va_test.cpp` and `d3d12_compute_test.cpp` each carry their own `serialize()`. It calls the in-box `D3D12SerializeVersionedRootSignature` directly. Windows 10's `d3d12.dll` refuses `D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED` at every root signature version. Measured on 10.0.19041.7291 with a small probe of the same root signature: 1.0 and 1.1 both return `0x80070057`, "Unsupported bit-flag set (root signature flags 400)"; without the flag both serialize. So on Windows 10 the cases that set the flag end at an empty blob before they reach the code they test: - `d3d12_geometry_views` stops at `d3d12_title_va_test.cpp:1067` (`!root_blob.empty()`), so it never checks `GeometryViews` there. The failure looks like the no-Resizable-BAR one in #1678, but the cause is different. - `d3d12_compute` fails at its heap-directly-indexed case (`d3d12_compute_test.cpp:569`). ### Fix Both `serialize()` functions now call `d3d12test::serialize_root_signature` (`runtime/test/d3d12_test_shaders.h`, from a330747f2), which already retries without the two flags and writes them back into the blob. The local `SerializeFn` alias is dropped. Tests only; no runtime change. ### Testing Windows 10 Pro 19045, GeForce GTX 1050 Ti (Pascal, 4 GB, no Resizable BAR), NVIDIA 582.66, MSVC (VS 18 Build Tools), RelWithDebInfo, base `9f9a7c5f3`. - On main: `d3d12_geometry_views` and `d3d12_compute` fail on every run. - With this change: `d3d12_compute`, `d3d12_title_va`, `d3d12_title_va_shadow`, `d3d12_geometry_views`, `d3d12_title_window_cap`, `d3d12_api_descriptor_copy`, `d3d12_api_descriptor_copy_off`, `d3d12_rebound_tables`, `d3d12_rebound_tables_off`, `d3d12_rebound_second_device`: 10/10 pass, 3 runs each, plain and with `LEONIDA_VK_VALIDATION=1`, no validation messages. - `python -I scripts/check_no_game_data.py` on both files: clean. AI-assisted (Claude Code, Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Both tests carried their own copy of serialize(), which calls the in-box
D3D12SerializeVersionedRootSignature directly. Windows 10's d3d12.dll
(10.0.19041) refuses CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED at root signature
1.0 and 1.1 (E_INVALIDARG, "Unsupported bit-flag set"), so the cases that
set it stopped at an empty blob before reaching the code they test.
d3d12test::serialize_root_signature (d3d12_test_shaders.h) already retries
without the flags and puts them back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:27 +00:00
github manually merged commit f2e3a77fea into gh-pr/2059/base 2026-11-26 10:16:28 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-26 01:25 UTC · original

Merged, thanks! This looks right.

  • Same bytes where the host accepts the flags: the helper only retries without the heap-directly-indexed flags when the host serializer fails, so on Windows 11 and Wine the blobs are unchanged; on Windows 10 these cases now reach the code they test.
  • Nothing lost: no EXPECT was removed, and the CachedPSO host comparison only sees blobs without the flags.
  • Tested: the full Windows suite under Wine on llvmpipe and the gfx1036 iGPU (RADV), merged onto main f1afede5e: all 13 d3d12_title_va*/d3d12_compute*/d3d12_geometry_views/d3d12_rebound_* tests pass on both, and nothing went from pass to fail because of this.
  • Optional: the one-line serialize() wrappers could go, with callers using d3d12test::serialize_root_signature directly.
  • Checked on main f1afede5e + f2e3a77fe: it merges cleanly; the semantic suite passes (495 files, 6,333 tests, 0 files failed); the 15 docs and writer tests pass; check_no_game_data.py is clean on the 2 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-26 01:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2059#issuecomment-7179766154) Merged, thanks! This looks right. - **Same bytes where the host accepts the flags:** the helper only retries without the heap-directly-indexed flags when the host serializer fails, so on Windows 11 and Wine the blobs are unchanged; on Windows 10 these cases now reach the code they test. - **Nothing lost:** no `EXPECT` was removed, and the CachedPSO host comparison only sees blobs without the flags. - **Tested:** the full Windows suite under Wine on llvmpipe and the gfx1036 iGPU (RADV), merged onto `main` `f1afede5e`: all 13 `d3d12_title_va*`/`d3d12_compute*`/`d3d12_geometry_views`/`d3d12_rebound_*` tests pass on both, and nothing went from pass to fail because of this. - **Optional:** the one-line `serialize()` wrappers could go, with callers using `d3d12test::serialize_root_signature` directly. - **Checked on `main` `f1afede5e` + `f2e3a77fe`:** it merges cleanly; the semantic suite passes (495 files, 6,333 tests, 0 files failed); the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 2 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.