[PR #16] [MERGED] Runtime tests: fix two failures on main (d3d12_com stale depth-clear check, root_sig merge of two checksum fixes) #70

Closed
opened 2026-11-26 20:16:42 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/16
Author: @Pixel-Katana
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: fix/main-test-regressions


📝 Commits (2)

  • 0c9864c d3d12_com_test: a depth clear outside [0, 1] closes the list (follow-up to 3ce953ae8)
  • 681847c d3d12_xs_rootsig: accept an all-zero checksum and keep the fail-closed chunk table

📊 Changes

2 files changed (+48 additions, -41 deletions)

View changed files

📝 runtime/shims/d3d12_xs_rootsig.cpp (+45 -39)
📝 runtime/test/d3d12_com_test.cpp (+3 -2)

📄 Description

Two runtime tests fail on main (30daa695). Both come from changes that were merged without the matching follow-up; one commit each.

What and why

d3d12_com (test only). 3ce953ae8 made CommandList::clear_depth_stencil record a depth outside [0, 1] as given, matching WARP, and updated command_list_test, d3d12_clear_test and d3d12_close_parity_test. d3d12_com_test still expected Close to return E_INVALIDARG for ClearDepthStencilView(depth 2.0): line 345: list->Close() == E_INVALIDARG. It now expects S_OK, as the close-parity rows do.

root_sig (d3d12_xs_rootsig.cpp). b95925cbf (an all-zero checksum is accepted, as host d3d12.dll does) and c297bb577 / 5c3487a94 (strict checksum, fail closed on a malformed chunk table) changed copy_rts0_blob_clear_xbox_flags in parallel. Merge 1e029d6df kept the strict early checksum from one and the chunk loop from the other:

  • an all-zero-checksum Xbox blob is rejected before the zero-aware check runs, so root_sig_test fails its two all-zero-checksum cases;
  • the loop skips malformed chunk entries instead of failing, has no RTS0 version check, and leaves min_chunk_off unused.

The function now has 5c3487a94's fail-closed chunk walk and RTS0 version check, with b95925cbf's rule: an all-zero checksum is accepted and stays zero after the rewrite; any other checksum must match. The duplicate total_size and checksum checks inside the loop are gone.

Tested

Windows 11 (10.0.26300), RTX 5080, NVIDIA 621.24, VS 2022 Build Tools 17.14 / MSVC 19.44, Vulkan SDK 1.4.363.0, scripts\build_runtime.ps1; no new warnings.

  • root_sig_test: OK (0 failures), was 2 failures. d3d12_com_test: exit 0, also with LEONIDA_VK_VALIDATION=1.
  • Root-signature tests (root_sig, root_signature, root_signature_oracle, device_proxy*, xs_proxy_mock*): 11/11.
  • ctest (302): only three failures left, all present on main before this change and untouched here: d3d12_execute_indirect_validation, d3d12_vulkan_device (line 6576, tiles == 1), d3d12_depth_resolve. xmem and crt_timed_wait failed once under -j 4 and pass 3/3 run alone.
  • Merges cleanly with the current main (14 commits ahead of the base).

No game data, keys or decryption. AI-assisted.

🤖 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/16 **Author:** [@Pixel-Katana](https://github.com/Pixel-Katana) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `fix/main-test-regressions` --- ### 📝 Commits (2) - [`0c9864c`](https://github.com/ubiquitarianism/leonida/commit/0c9864c98eae8bf3a7fe9c8d758ffb9155e10b14) d3d12_com_test: a depth clear outside [0, 1] closes the list (follow-up to 3ce953ae8) - [`681847c`](https://github.com/ubiquitarianism/leonida/commit/681847c7c39592864dd26605b46b4c83e97f0235) d3d12_xs_rootsig: accept an all-zero checksum and keep the fail-closed chunk table ### 📊 Changes **2 files changed** (+48 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/d3d12_xs_rootsig.cpp` (+45 -39) 📝 `runtime/test/d3d12_com_test.cpp` (+3 -2) </details> ### 📄 Description Two runtime tests fail on `main` (30daa695). Both come from changes that were merged without the matching follow-up; one commit each. ### What and why **`d3d12_com` (test only).** 3ce953ae8 made `CommandList::clear_depth_stencil` record a depth outside [0, 1] as given, matching WARP, and updated `command_list_test`, `d3d12_clear_test` and `d3d12_close_parity_test`. `d3d12_com_test` still expected `Close` to return `E_INVALIDARG` for `ClearDepthStencilView(depth 2.0)`: `line 345: list->Close() == E_INVALIDARG`. It now expects `S_OK`, as the close-parity rows do. **`root_sig` (`d3d12_xs_rootsig.cpp`).** b95925cbf (an all-zero checksum is accepted, as host `d3d12.dll` does) and c297bb577 / 5c3487a94 (strict checksum, fail closed on a malformed chunk table) changed `copy_rts0_blob_clear_xbox_flags` in parallel. Merge 1e029d6df kept the strict early checksum from one and the chunk loop from the other: - an all-zero-checksum Xbox blob is rejected before the zero-aware check runs, so `root_sig_test` fails its two all-zero-checksum cases; - the loop skips malformed chunk entries instead of failing, has no RTS0 version check, and leaves `min_chunk_off` unused. The function now has 5c3487a94's fail-closed chunk walk and RTS0 version check, with b95925cbf's rule: an all-zero checksum is accepted and stays zero after the rewrite; any other checksum must match. The duplicate `total_size` and checksum checks inside the loop are gone. ### Tested Windows 11 (10.0.26300), RTX 5080, NVIDIA 621.24, VS 2022 Build Tools 17.14 / MSVC 19.44, Vulkan SDK 1.4.363.0, `scripts\build_runtime.ps1`; no new warnings. - `root_sig_test`: OK (0 failures), was 2 failures. `d3d12_com_test`: exit 0, also with `LEONIDA_VK_VALIDATION=1`. - Root-signature tests (`root_sig`, `root_signature`, `root_signature_oracle`, `device_proxy*`, `xs_proxy_mock*`): 11/11. - `ctest` (302): only three failures left, all present on `main` before this change and untouched here: `d3d12_execute_indirect_validation`, `d3d12_vulkan_device` (line 6576, `tiles == 1`), `d3d12_depth_resolve`. `xmem` and `crt_timed_wait` failed once under `-j 4` and pass 3/3 run alone. - Merges cleanly with the current `main` (14 commits ahead of the base). No game data, keys or decryption. AI-assisted. 🤖 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 20:16:42 +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#70
No description provided.