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

Closed
opened 2026-11-26 21:19:55 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2059
Author: @qhukz13
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142

Base: main ← Head: cont/test-serialize-win10


📝 Commits (1)

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

📊 Changes

2 files changed (+6 additions, -26 deletions)

View changed files

📝 runtime/test/d3d12_compute_test.cpp (+3 -13)
📝 runtime/test/d3d12_title_va_test.cpp (+3 -13)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2059 **Author:** [@qhukz13](https://github.com/qhukz13) **Created:** 11/25/2026 **Status:** ✅ Merged **Merged:** 11/26/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `cont/test-serialize-win10` --- ### 📝 Commits (1) - [`f2e3a77`](https://github.com/ubiquitarianism/leonida/commit/f2e3a77feaf03ea6f6eef800e43bb180d6925a7e) d3d12_title_va_test, d3d12_compute_test: serialize root signatures through the shared helper, so the heap-directly-indexed cases run on Windows 10 ### 📊 Changes **2 files changed** (+6 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/d3d12_compute_test.cpp` (+3 -13) 📝 `runtime/test/d3d12_title_va_test.cpp` (+3 -13) </details> ### 📄 Description 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:19:55 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2065
No description provided.