d3d12_xs_surface: SDK discovery skips a newer driver-kit include folder (TEST-WIN-SWEEP) #363

Manually merged
github merged 1 commit from gh-pr/363/head into gh-pr/363/base 2026-11-26 08:55:49 +00:00
Owner

@⁠ItsMrDubey on GitHub · 2026-11-24 03:56 UTC · original
ItsMrDubey:win-partial-sdk → main · +31 −2 · 2 files · 1 commits · merged 2026-11-24 13:37 UTC

Claimed in the coordination issue as: TEST-WIN-SWEEP (#14)

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
**@⁠ItsMrDubey** on GitHub · 2026-11-24 03:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/363) `ItsMrDubey:win-partial-sdk` → `main` · +31 −2 · 2 files · 1 commits · merged 2026-11-24 13:37 UTC Claimed in the coordination issue as: TEST-WIN-SWEEP (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### 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
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:55:47 +00:00
github manually merged commit 7853f64af5 into gh-pr/363/base 2026-11-26 08:55:49 +00:00
Author
Owner

@⁠Oliwettoo on GitHub · 2026-11-24 10:30 UTC · original

Looks good. Requiring um/d3d12.h skips a WDK-only version folder, and an explicit WINDOWS_SDK_INCLUDE/SDK_INCLUDE is still taken as given. tests/test_d3d12_xs_surface.py passes with the PR on current main (Linux; the discovery path itself is Windows-only). Ship. AI-assisted review.

**@⁠Oliwettoo** on GitHub · 2026-11-24 10:30 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/363#issuecomment-7128883457) Looks good. Requiring `um/d3d12.h` skips a WDK-only version folder, and an explicit `WINDOWS_SDK_INCLUDE`/`SDK_INCLUDE` is still taken as given. `tests/test_d3d12_xs_surface.py` passes with the PR on current `main` (Linux; the discovery path itself is Windows-only). Ship. AI-assisted review.
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 13:37 UTC · original

Merging.

Why merged: d3d12_xs_surface SDK discovery skips a Windows Kits version folder that lacks um/d3d12.h (a WDK-only folder), while an explicit WINDOWS_SDK_INCLUDE/SDK_INCLUDE is still taken as given. Reviewed as good by Oliwettoo.

Why it's good: Its tests: 18 passed, 1 skipped. The runtime build on this machine is unaffected (same ctest).

Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bca8 or 51f316092) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c242f (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones).

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

**@⁠QemmHD** on GitHub · 2026-11-24 13:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/363#issuecomment-7133099361) Merging. **Why merged:** d3d12_xs_surface SDK discovery skips a Windows Kits version folder that lacks um/d3d12.h (a WDK-only folder), while an explicit WINDOWS_SDK_INCLUDE/SDK_INCLUDE is still taken as given. Reviewed as good by Oliwettoo. **Why it's good:** Its tests: 18 passed, 1 skipped. The runtime build on this machine is unaffected (same ctest). Tested on Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, alone on main (21625bca8 or 51f316092) and in a cumulative merge of #497, #278, #310, #334, #346, #340, #355, #361, #363, #620 and #577 (which carries #540) on main 2d73c242f (git merge-tree: 0 conflicts against current main). Repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests): 566 passed / 5 skipped / 0 failed on main and on main + batch. compileall OK. Full ctest: 302/304 on main and on main + batch (the same two pre-existing failures, d3d12_execute_indirect_validation and d3d12_depth_resolve, no new ones). AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.