[PR #363] [MERGED] d3d12_xs_surface: SDK discovery skips a newer driver-kit include folder (TEST-WIN-SWEEP) #415

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/363
Author: @ItsMrDubey
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: win-partial-sdk


📝 Commits (1)

  • 7853f64 d3d12_xs_surface: SDK discovery skips a newer driver-kit include folder without the D3D headers

📊 Changes

2 files changed (+31 additions, -2 deletions)

View changed files

📝 tests/test_d3d12_xs_surface.py (+27 -0)
📝 tools/d3d12_xs_surface.py (+4 -2)

📄 Description

Claimed in the coordination issue as: TEST-WIN-SWEEP (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121328982)

What and why

python -I tests/test_d3d12_xs_surface.py fails on a Windows PC that has a Windows Driver Kit beside the SDK. The WDK installs its own version folder under Windows Kits\10\Include (here 10.0.26100.0, 43 driver headers in um\, no d3d11.h/d3d12.h/dxgidebug.h) next to the full SDK (10.0.19041.0). find_sdk_include() took the numerically newest folder with a um\ directory, so check_sdk() parsed the driver headers, found none of the 83 standard GUIDs and test_standard_iids_match_sdk failed (assert errors == []) instead of checking against the SDK that is installed.

Automatic discovery now takes the newest version folder whose um\ has d3d12.h; with only a driver kit it finds nothing and the SDK check skips, as it does with no SDK. An explicit WINDOWS_SDK_INCLUDE/SDK_INCLUDE is still taken as given. The numeric-sort test now gives its fake SDK folders a d3d12.h, and a new test covers a newer driver-kit folder beside an SDK, and a driver kit alone.

Found by the Windows test sweep (TEST-WIN-SWEEP).

Tested

Windows 11, Python 3.11.9 and 3.12.9, no GPU needed:

  • python -I tests/test_d3d12_xs_surface.py: before AssertionError in test_standard_iids_match_sdk (exit 1); after ok (exit 0). Same with py -3.12 -I.
  • The new test fails against the old find_sdk_include (returns the 10.0.26100.0\um folder) and passes with the fix.
  • py -3.12 -m pytest tests/test_d3d12_xs_surface.py: 9 passed, 1 skipped (SCARAB_REF unset).
  • python -I tools/d3d12_xs_surface.py --sdk --require-sdk: sdk: 83/83 standard GUIDs match ...\10.0.19041.0\um, PASS.
  • python -I tests/test_resource_hygiene.py: OK. python -I scripts/check_no_game_data.py on both changed files: clean.
  • Linux/macOS: discovery only runs over ProgramFiles folders, which are unset there; the tests build their own folders with os.path.join.

AI-assisted: yes

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. n/a: no translator rule

🔄 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/363 **Author:** [@ItsMrDubey](https://github.com/ItsMrDubey) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `win-partial-sdk` --- ### 📝 Commits (1) - [`7853f64`](https://github.com/ubiquitarianism/leonida/commit/7853f64af513381210ab245b7924af7c9e357889) d3d12_xs_surface: SDK discovery skips a newer driver-kit include folder without the D3D headers ### 📊 Changes **2 files changed** (+31 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_d3d12_xs_surface.py` (+27 -0) 📝 `tools/d3d12_xs_surface.py` (+4 -2) </details> ### 📄 Description Claimed in the coordination issue as: TEST-WIN-SWEEP (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121328982) ### What and why `python -I tests/test_d3d12_xs_surface.py` fails on a Windows PC that has a Windows Driver Kit beside the SDK. The WDK installs its own version folder under `Windows Kits\10\Include` (here `10.0.26100.0`, 43 driver headers in `um\`, no `d3d11.h`/`d3d12.h`/`dxgidebug.h`) next to the full SDK (`10.0.19041.0`). `find_sdk_include()` took the numerically newest folder with a `um\` directory, so `check_sdk()` parsed the driver headers, found none of the 83 standard GUIDs and `test_standard_iids_match_sdk` failed (`assert errors == []`) instead of checking against the SDK that is installed. Automatic discovery now takes the newest version folder whose `um\` has `d3d12.h`; with only a driver kit it finds nothing and the SDK check skips, as it does with no SDK. An explicit `WINDOWS_SDK_INCLUDE`/`SDK_INCLUDE` is still taken as given. The numeric-sort test now gives its fake SDK folders a `d3d12.h`, and a new test covers a newer driver-kit folder beside an SDK, and a driver kit alone. Found by the Windows test sweep (TEST-WIN-SWEEP). ### Tested Windows 11, Python 3.11.9 and 3.12.9, no GPU needed: - `python -I tests/test_d3d12_xs_surface.py`: before `AssertionError` in `test_standard_iids_match_sdk` (exit 1); after `ok` (exit 0). Same with `py -3.12 -I`. - The new test fails against the old `find_sdk_include` (returns the `10.0.26100.0\um` folder) and passes with the fix. - `py -3.12 -m pytest tests/test_d3d12_xs_surface.py`: 9 passed, 1 skipped (SCARAB_REF unset). - `python -I tools/d3d12_xs_surface.py --sdk --require-sdk`: `sdk: 83/83 standard GUIDs match ...\10.0.19041.0\um`, PASS. - `python -I tests/test_resource_hygiene.py`: OK. `python -I scripts/check_no_game_data.py` on both changed files: clean. - Linux/macOS: discovery only runs over `ProgramFiles` folders, which are unset there; the tests build their own folders with `os.path.join`. AI-assisted: yes ### Checklist - [x] 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. n/a: no translator rule --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:17:48 +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#415
No description provided.