Build with the Windows SDK 10.0.22621 headers and DXC #1369

Manually merged
github merged 2 commits from gh-pr/1369/head into gh-pr/1369/base 2026-11-26 23:01:42 +00:00
Owner

@⁠FoxxoOwO on GitHub · 2026-11-24 09:26 UTC · original
FoxxoOwO:build/windows-sdk-22621 → main · +7 −4 · 3 files · 2 commits · merged 2026-11-24 09:45 UTC

What

Two build blockers that stop cmake --preset dev on the toolchain the Windows
SDK 10.0.22621 install provides (MSVC 19.44, DXC 1.6.2112.16). Each is one
minimal change and neither alters runtime behaviour.

1. src/startup_stubs/d3d12_xs_device.cpp — error C2065: ID3D12Device11

ID3D12Device11 is declared from SDK 10.0.26100 on. The 10.0.22621 d3d12.h
stops at ID3D12Device10 (D3D12_SDK_VERSION 602), so kind_for() did not
compile. That function only compares IIDs, so the interface never has to be
declared: the comparison now uses the literal GUID
5405c344-d457-444e-b4dd-2366e45aee39 (verified against the public
d3d12.h in microsoft/DirectX-Headers,
DEFINE_GUID(IID_ID3D12Device11, ...)), the same way the Xbox-only
command-list GUID on the line below is already handled.

A #if defined(__ID3D12Device11_INTERFACE_DEFINED__) guard (the idiom used in
tests/desktop_gpu.cpp) was rejected: it would make the shim classify the same
request differently depending on the SDK it was compiled with. A device request
for ID3D12Device11 still maps to device_kind on any SDK.

2. CMakeLists.txt + tests/d3d12x_pso.hlsl — dxc failed : DXIL container does not contain the given part.

tests/d3d12x_pso.hlsl embeds no [RootSignature(...)], so -Qstrip_rootsignature
has nothing to strip and the pipeline already uses the signature the test builds
(tests/d3d12x_device_check.cpp: pso_desc.pRootSignature = root.Get()).
DXC 1.6 rejects the pass on a signature-less module; on the versions that accept
it, it is a no-op. tests/compute.hlsl, which does embed a signature, still
strips under the same DXC 1.6 — that is the difference between the two call
sites. The flag is dropped and the shader comment now states why no strip pass
is needed.

Why

AGENTS.md requires only "the Windows SDK" and "DXC". A plain 10.0.22621
install satisfies that and still could not build the tree, so a contributor
following the guide hit two errors unrelated to the change they wanted to make.

CI runs windows-2025 (SDK 10.0.26100, DXC 1.8), where both problems are
invisible — this PR does not change CI behaviour, it restores the local build
path named in AGENTS.md. If you would rather require 10.0.26100 / DXC ≥ 1.7
explicitly, that is the alternative and this PR can be closed in favour of a
documentation change.

Reproduction

.\tools\dev.ps1
cmake --preset dev
cmake --build --preset dev
ctest --preset dev --no-tests=error -j 4

Before: configure succeeds, the build stops twice
(d3d12_xs_shim on the C2065, then d3d12x_pso_cs.h on the DXC error), and
the test run cannot start.

After (out/ build of this branch):

  • cmake --build --preset dev — 0 failures.
  • ctest --preset dev --no-tests=error -j 4 — 843 tests, 841 pass, 2 fail,
    24 skip, 672 s. The two failures are pre-existing and unrelated to this PR:
    • dxc_compile_time_gvn — dxc failed : Unknown argument: '-ftime-report'.
      DXC 1.6 predates that flag, which tests/dxc_compile_time_check.py needs.
      Left as-is here; it needs either a documented DXC minimum or a capability
      skip in that check.
    • compute_store_aot_guard_read_hardware — Timeout at 45 s under
      -j 4. Passes serially (27.4 s). GPU-test contention, not a result
      mismatch.
  • The 41 pure-Python checks listed in AGENTS.md — 0 failures.

Sanity check that the two changed paths still run: d3d12_xs_shim_iids,
d3d12_xs_shim_warp_root, d3d12x_pso_static_sampler_hardware and
d3d12x_pso_reject_warp pass in the run above.

Environment

MSVC 19.44.35230.0 (VS 2022 BuildTools) · Windows SDK 10.0.22621.0 (DXC
1.6.2112.16) · CMake/Ninja from the VS CMake component · NVIDIA GeForce RTX 3070
Ti, driver 32.0.16.2124, debug layer unavailable · Windows 11.

Not measured: a build against SDK 10.0.26100 or newer DXC. The literal IID is
the same value __uuidof(ID3D12Device11) expands to there, and the strip flag
was a no-op, but this branch was only compiled with 10.0.22621.

No game files, dumps or distribution links are involved.

**@⁠FoxxoOwO** on GitHub · 2026-11-24 09:26 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1369) `FoxxoOwO:build/windows-sdk-22621` → `main` · +7 −4 · 3 files · 2 commits · merged 2026-11-24 09:45 UTC ## What Two build blockers that stop `cmake --preset dev` on the toolchain the Windows SDK 10.0.22621 install provides (MSVC 19.44, DXC 1.6.2112.16). Each is one minimal change and neither alters runtime behaviour. **1. `src/startup_stubs/d3d12_xs_device.cpp` — `error C2065: ID3D12Device11`** `ID3D12Device11` is declared from SDK 10.0.26100 on. The 10.0.22621 `d3d12.h` stops at `ID3D12Device10` (`D3D12_SDK_VERSION 602`), so `kind_for()` did not compile. That function only compares IIDs, so the interface never has to be declared: the comparison now uses the literal GUID `5405c344-d457-444e-b4dd-2366e45aee39` (verified against the public [d3d12.h in microsoft/DirectX-Headers](https://github.com/microsoft/DirectX-Headers/blob/main/include/directx/d3d12.h), `DEFINE_GUID(IID_ID3D12Device11, ...)`), the same way the Xbox-only command-list GUID on the line below is already handled. A `#if defined(__ID3D12Device11_INTERFACE_DEFINED__)` guard (the idiom used in `tests/desktop_gpu.cpp`) was rejected: it would make the shim classify the same request differently depending on the SDK it was compiled with. A device request for `ID3D12Device11` still maps to `device_kind` on any SDK. **2. `CMakeLists.txt` + `tests/d3d12x_pso.hlsl` — `dxc failed : DXIL container does not contain the given part.`** `tests/d3d12x_pso.hlsl` embeds no `[RootSignature(...)]`, so `-Qstrip_rootsignature` has nothing to strip and the pipeline already uses the signature the test builds (`tests/d3d12x_device_check.cpp`: `pso_desc.pRootSignature = root.Get()`). DXC 1.6 rejects the pass on a signature-less module; on the versions that accept it, it is a no-op. `tests/compute.hlsl`, which does embed a signature, still strips under the same DXC 1.6 — that is the difference between the two call sites. The flag is dropped and the shader comment now states why no strip pass is needed. ## Why `AGENTS.md` requires only "the Windows SDK" and "DXC". A plain 10.0.22621 install satisfies that and still could not build the tree, so a contributor following the guide hit two errors unrelated to the change they wanted to make. CI runs `windows-2025` (SDK 10.0.26100, DXC 1.8), where both problems are invisible — this PR does not change CI behaviour, it restores the local build path named in `AGENTS.md`. If you would rather require 10.0.26100 / DXC ≥ 1.7 explicitly, that is the alternative and this PR can be closed in favour of a documentation change. ## Reproduction ``` .\tools\dev.ps1 cmake --preset dev cmake --build --preset dev ctest --preset dev --no-tests=error -j 4 ``` Before: configure succeeds, the build stops twice (`d3d12_xs_shim` on the `C2065`, then `d3d12x_pso_cs.h` on the DXC error), and the test run cannot start. After (`out/` build of this branch): - `cmake --build --preset dev` — 0 failures. - `ctest --preset dev --no-tests=error -j 4` — 843 tests, **841 pass**, 2 fail, 24 skip, 672 s. The two failures are pre-existing and unrelated to this PR: - `dxc_compile_time_gvn` — `dxc failed : Unknown argument: '-ftime-report'`. DXC 1.6 predates that flag, which `tests/dxc_compile_time_check.py` needs. Left as-is here; it needs either a documented DXC minimum or a capability skip in that check. - `compute_store_aot_guard_read_hardware` — `Timeout` at 45 s under `-j 4`. Passes serially (27.4 s). GPU-test contention, not a result mismatch. - The 41 pure-Python checks listed in `AGENTS.md` — 0 failures. Sanity check that the two changed paths still run: `d3d12_xs_shim_iids`, `d3d12_xs_shim_warp_root`, `d3d12x_pso_static_sampler_hardware` and `d3d12x_pso_reject_warp` pass in the run above. ## Environment MSVC 19.44.35230.0 (VS 2022 BuildTools) · Windows SDK 10.0.22621.0 (DXC 1.6.2112.16) · CMake/Ninja from the VS CMake component · NVIDIA GeForce RTX 3070 Ti, driver 32.0.16.2124, debug layer unavailable · Windows 11. Not measured: a build against SDK 10.0.26100 or newer DXC. The literal IID is the same value `__uuidof(ID3D12Device11)` expands to there, and the strip flag was a no-op, but this branch was only compiled with 10.0.22621. No game files, dumps or distribution links are involved.
ID3D12Device11 is declared from Windows SDK 10.0.26100 on; the 10.0.22621
d3d12.h stops at ID3D12Device10 (D3D12_SDK_VERSION 602), so building the shim
with that SDK failed:

  src/startup_stubs/d3d12_xs_device.cpp(378): error C2065: ID3D12Device11:
  nedeklarovaný identifikátor

kind_for() only compares IIDs, so the interface never has to be declared. The
literal GUID 5405c344-d457-444e-b4dd-2366e45aee39 comes from the public
DirectX-Headers d3d12.h (DEFINE_GUID(IID_ID3D12Device11, ...)) and follows the
existing practice of the Xbox-only command-list GUID directly below it. A
version guard was rejected because it would make the shim classify the same
request differently depending on the SDK it was compiled with.

Runtime behaviour is unchanged: a device request for ID3D12Device11 still maps
to device_kind on any SDK.
tests/d3d12x_pso.hlsl embeds no [RootSignature(...)], so there is nothing for
-Qstrip_rootsignature to remove and the pipeline already uses the signature the
test creates (tests/d3d12x_device_check.cpp: pso_desc.pRootSignature =
root.Get()). DXC 1.6.2112.16 from the 10.0.22621 SDK treats the pass as an
error on a signature-less module:

  dxc failed : DXIL container does not contain the given part.

The flag is a no-op on the DXC versions that accept it (tests/compute.hlsl,
which does embed a signature, still strips under the same DXC 1.6), so
dropping it keeps the compiled DXIL identical and lets the tree build with the
SDK-named DXC.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:01:40 +00:00
github manually merged commit d6e557bfd6 into gh-pr/1369/base 2026-11-26 23:01:42 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.