Skip to content

d3d12: build against every Windows SDK 10.0.26100 (BUILD-970) - #3653

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
agulerman:build-970-sdk-612-compat
Nov 23, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
agulerman:build-970-sdk-612-compat

Conversation

@agulerman

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: BUILD-970 code fix (claim on #3574, "claiming: new item: BUILD-970 code fix"). Complements #3506, which only edits the README's SDK wording.

What and why

The README asks for "Windows SDK 10.0.26100 or newer", but the SDK's d3d12.h changed within 10.0.26100: 10.0.26100.6584 ships D3D12_SDK_VERSION 612, later builds 616. main uses names that only newer headers declare, so it no longer compiles on the older 10.0.26100 builds (BUILD-970):

  • D3D12_FEATURE_D3D12_OPTIONS21 and its payload, with D3D12_WORK_GRAPHS_TIER_NOT_SUPPORTED and D3D12_EXECUTE_INDIRECT_TIER_1_0 (header 613);
  • D3D12_INDIRECT_ARGUMENT_TYPE_INCREMENTING_CONSTANT (613);
  • D3D12_FEATURE_D3D12_OPTIONS20 with D3D12_RECREATE_AT_TIER_NOT_SUPPORTED, and D3D12_FEATURE_PREDICATION (611).

Instead of raising the documented SDK, they join the two feature values runtime/shims/d3d12_feature_compat.h already declares for this reason: ABI values and payload structs in rt::d3d12::compat, used by d3d12_vulkan_device.cpp and d3d12_vulkan_device_test.cpp. Where the header has the real declarations (D3D12_SDK_VERSION >= 611 / 613), static_asserts check that values, sizes and field offsets agree, so a later header can't silently diverge.

Tested

No Windows machine: cross-built on Linux with clang-cl 19 / lld-link 19 against xwin's MSVC CRT and Windows SDK 10.0.26100 (d3d12.h 616), per docs/testing.md, with the older headers taken from Microsoft's DirectX-Headers tags and put ahead of the SDK's d3d12.h (/I):

d3d12.h main (f847748) this PR
610 (DirectX-Headers v1.610.2) fails (OPTIONS20, PREDICATION, OPTIONS21, ...) builds, 0 errors
611 (v1.611.0) fails, 18 errors builds, 0 errors
613 (v1.613.0) builds builds
616 (the SDK's own) builds builds, static_asserts checked

I couldn't get the exact 10.0.26100.6584 header (xwin only offers the newest 10.0.26100 build); 612 lies between 611 and 613, both of which build.

Runtime tests under Wine 9.0 (Ubuntu 24.04) on Mesa llvmpipe 25.2.8, no GPU:

  • d3d12_vulkan_device (the CheckFeatureSupport checks for OPTIONS20/21 and PREDICATION) and d3d12_indirect_rt pass in both the 616 and the 610 build; d3d12_indirect_zero and d3d12_predicated_copy skip there, as on main.
  • Full ctest -j4 on the 616 build: the same 126/140 pass as on main in this setup. The 14 failures are the same Wine/llvmpipe ones (d3d12_private_data, d3d12_subresource_copy and d3d12_compute compare with vkd3d as the "host"; zero LUID; 8-wide subgroups; ...). The exceptions were the timeouts of xdxr_build (on main) and d3d12_xdxr_rt (here) under parallel load; both pass when run alone.

Not tested: MSVC itself, a real Windows SDK 10.0.26100.6584 install, a GPU.

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. (No translator change.)

AI-assisted (Claude Code). No game files used.

🤖 Generated with Claude Code

The README asks for "Windows SDK 10.0.26100 or newer", but the SDK's
d3d12.h changed within 10.0.26100: 10.0.26100.6584 ships
D3D12_SDK_VERSION 612, later builds 616. main used names from newer
headers, so it stopped compiling on the older 10.0.26100 builds:

- D3D12_FEATURE_D3D12_OPTIONS21 and its payload, with
  D3D12_WORK_GRAPHS_TIER_NOT_SUPPORTED and
  D3D12_EXECUTE_INDIRECT_TIER_1_0 (header 613);
- D3D12_INDIRECT_ARGUMENT_TYPE_INCREMENTING_CONSTANT (613);
- D3D12_FEATURE_D3D12_OPTIONS20 with D3D12_RECREATE_AT_TIER_NOT_SUPPORTED,
  and D3D12_FEATURE_PREDICATION (611).

They join the two feature values d3d12_feature_compat.h already declares
for the same reason: ABI values and payload structs in rt::d3d12::compat,
used by the device and its test. Where the header has the real
declarations, static_asserts check that the values, sizes and offsets
agree.

The runtime and every test now build against DirectX-Headers v1.610.2,
v1.611.0 and v1.613.0's d3d12.h (put ahead of the SDK's) and against the
SDK's own 616 header. Before this change, 611 failed with 18 errors and
610 with more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GN11jcpJWD4phrXJyDgED6

@0xTehuti 0xTehuti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested \61d8911c\ on Windows 11 Pro build 26100, MSVC 19.44 (VS 2022 Community), Windows SDK 10.0.26100, NVIDIA GeForce RTX 2070 SUPER (driver 595.79, Vulkan 1.4.329).

  • Build: Clean Ninja build with CMake 4.4 and MSVC 19.44.
  • Compatibility verification: Header compatibility wrappers in \d3d12_feature_compat.h\ and fallback checks in \d3d12_vulkan_device.cpp\ successfully build on Windows SDK 10.0.26100.
  • Device test execution: \d3d12_vulkan_device_test.exe\ executed cleanly against physical GPU (195 queries, 60 resolves, 75 copy cases, depth24 clears, castable formats all matched host).
  • CTest: \ctest -R d3d12_vulkan_device\ passed 1/1 (9.86s, exit 0).

Resolves BUILD-970 for Windows SDK 10.0.26100 builds. LGTM.

@0xTehuti 0xTehuti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 61d8911c on Windows 11 Pro build 26100, MSVC 19.44 (VS 2022 Community), Windows SDK 10.0.26100, NVIDIA GeForce RTX 2070 SUPER (driver 595.79, Vulkan 1.4.329).

  • Build: Clean Ninja build with CMake 4.4 and MSVC 19.44.
  • Compatibility verification: Header compatibility wrappers in d3d12_feature_compat.h and fallback checks in d3d12_vulkan_device.cpp successfully build on Windows SDK 10.0.26100.
  • Device test execution: d3d12_vulkan_device_test.exe executed cleanly against physical GPU (195 queries, 60 resolves, 75 copy cases, depth24 clears, castable formats all matched host).
  • CTest: ctest -R d3d12_vulkan_device passed 1/1 (9.86s, exit 0).

Resolves BUILD-970 for Windows SDK 10.0.26100 builds. LGTM.

@justr4mzi

Copy link
Copy Markdown
Contributor

Tested 61d8911c on Windows 11 25H2 (build 26200.9974), MSVC 19.44.35230.0 (VS 2022 BuildTools), Windows SDK 10.0.26100.0 (D3D12_SDK_VERSION = 616), AMD Radeon RX 6700 XT, driver AMD proprietary 26.11.2 (Vulkan 1.4.315):

  • Build (RelWithDebInfo, Ninja, -DLEONIDA_REQUIRE_VULKAN=ON): d3d12_vulkan_device_test, d3d12_method_variants_test, d3d12_indirect_zero_test, and gta6rt built cleanly (verifying all #if D3D12_SDK_VERSION >= 611 and >= 613 static_asserts in runtime/shims/d3d12_feature_compat.h against SDK 616).
  • ctest --test-dir runtime/build -R ^(d3d12_vulkan_device|d3d12_indirect_zero|d3d12_method_variants)$ --output-on-failure:
    • d3d12_method_variants: Passed (0.52 s)
    • d3d12_indirect_zero: Passed (0.44 s)
    • d3d12_vulkan_device: FORMAT_INFO (195 queries, 0 mismatches), CheckFeatureSupport options (45 feature queries compared, 1 host-unsupported skipped, 0 mismatches), FORMAT_SUPPORT (94 formats, 0 mismatches), new formats (11/11, 0 failures), copy comparison (0/75 differ) all matched the host; failed only at line 5184: command_queue(host.p, rt_desc) == S_OK on this elevated session (known host GLOBAL_REALTIME refusal on main, tracked in Tests: skip the host realtime-queue check when the host driver refuses it #2422).

AI-assisted (Gemini, Antigravity).

@MKmajster

Copy link
Copy Markdown

Tested 61d8911 with MSVC against the older d3d12.h versions (the comment above covers MSVC with the SDK's 616 only): VS 2022 Build Tools, MSVC 19.44.35229, Ninja RelWithDebInfo, Windows 11 24H2 (26100). The installed Windows SDK 10.0.26100 has d3d12.h 616. The older headers are Microsoft's DirectX-Headers tags, put ahead of the SDK's with /I<tag>\include\directx /I<tag>\include in CMAKE_CXX_FLAGS, as in your cross-build. Targets: gta6rt_d3d12_com and d3d12_vulkan_device_test, -k 0 so every error is counted.

d3d12.h main f847748 this PR
610 (v1.610.2) fails, 68 error lines (D3D12_FEATURE_DATA_D3D12_OPTIONS20/21 undeclared, ...) builds, 0 errors
611 (v1.611.0) fails, 27 error lines (D3D12_FEATURE_DATA_D3D12_OPTIONS21, ...) builds, 0 errors
613 (v1.613.0) builds builds
616 (the SDK's own) builds builds, so the 611/613 static_asserts hold under MSVC

So MSVC matches the clang-cl table. main's failures on 610/611 also show the /I headers really replace the SDK's.

On the GPU (NVIDIA GeForce RTX 3070, driver 617.42), d3d12_vulkan_device_test built against the 610 header with this PR exits 0 and ends with "... GetCopyableFootprints, GetResourceTiling and CheckFeatureSupport error paths all matched", like main built against 616. The two logs differ only in pointer values and in two extra QueryInterface: unknown IID lines from the 616 build. The 611 and 616 builds of the PR pass too.

Not checked: the actual SDK 10.0.26100.6584 install (header 612). It lies between 611 and 613, which both build.

No game files. AI-assisted (Claude).

@VeTkN

VeTkN commented Nov 23, 2026

Copy link
Copy Markdown

Tested 61d8911 on Windows 11 Pro (26200), RTX 5070, NVIDIA 621.24, MSVC 14.51 (VS 2026 Build Tools 18.10), Windows SDK 10.0.26100.8249 (D3D12_SDK_VERSION 616) via scripts/build_runtime.ps1: pass, with one failure that predates this PR (below).

  • Builds with the VS 2026 toolset: exit 0, 214 s.
  • Full ctest -j 4: 132 passed, 8 skipped, 1 failed out of 141. d3d12_vulkan_device passes.
  • The one failure, d3d12_multithread, is not from this PR: it ends the same way on the PR's parent f847748. On both, it exits with 0xc0000409 after about 3 s and prints nothing, in 20 of 20 runs alone and in both full runs. Windows Error Reporting records a fail-fast in ucrtbase.dll with code 7 (FAST_FAIL_FATAL_APP_EXIT, what abort() raises).

AI-assisted (Claude).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants