shader_metadata_probe fails with the DXC 1.7.2308 validator from the original SDK 10.0.26100 #97

Closed
opened 2026-11-21 15:57:12 +00:00 by rasptum · 3 comments
rasptum commented 2026-11-21 15:57:12 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-21T15:57:12Z.


## Reproduction

Clean checkout of 88fd8c5, first-build steps from the README including the Python environment, then:

ctest --preset dev --no-tests=error -R '^shader_metadata_probe$' -V

Expected and observed behavior

shader_metadata_probe fails. Container validation succeeds, but every module-only validation call returns E_INVALIDARG:

File "tools\probe_roots.py", line 81, in validate_shader
ValueError: Validator operation unavailable for module: {'call_hr': '0x80070057'}

Passing the DXBC container, the DXIL part, or the raw bitcode with --module all give 0x80070057. --container on the same file returns status 0x00000000.

Cause: the DXC version in the SDK. root_probe loads dxil.dll from the directory of the dxc that CMake finds. This machine has the original SDK 10.0.26100 release, which ships DXC 1.7.2308 (dxil.dll 101.7.2308.24). I built a second root_probe in a separate build directory with -DDXC_EXECUTABLE pointing at the official DXC v1.9.2609 release (Microsoft-signed, SHA-256 matched the release digest). I ran both against the same .cso files from the original build:

root_probe built against shader_probe_check.py
SDK DXC 1.7.2308 Fails, call_hr 0x80070057
DXC 1.9.2609 Passes

So the README requirement "Windows SDK 10.0.26100 with DXC" can be met by an SDK whose validator lacks this operation. I have not narrowed down the minimum version (somewhere after 1.7.2308, at or before 1.9.2609).

Possible fixes, for the maintainers to choose: state a minimum DXC version in the first-build step, check the validator version at configure time, or have the test report a named skip when module-only validation is unavailable.

Environment

  • Windows 10 22H2, build 19045.6466
  • VS Build Tools 2022 17.14, MSVC 14.44.35207
  • Windows SDK 10.0.26100, DXC 1.7.2308.16, dxil.dll 101.7.2308.24
  • Python 3.13 venv from requirements-dev.txt
  • Not a graphics test, but for completeness: RTX 3060 (driver 32.0.15.9636) and WARP 10.0.19041.5794, debug layer unavailable

The rest of the clean build: all three smoke tests passed, and the full suite is 74 of 75 pass or skip once the separate Windows 10 WARP shader-model failures are fixed (#99).

AI-assisted (Claude Code); built and run locally on the configuration above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6531059490 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/98). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-21T15:57:12Z. --- ## Reproduction Clean checkout of `88fd8c5`, first-build steps from the README including the Python environment, then: ```powershell ctest --preset dev --no-tests=error -R '^shader_metadata_probe$' -V ``` ## Expected and observed behavior `shader_metadata_probe` fails. Container validation succeeds, but every module-only validation call returns `E_INVALIDARG`: ```text File "tools\probe_roots.py", line 81, in validate_shader ValueError: Validator operation unavailable for module: {'call_hr': '0x80070057'} ``` Passing the DXBC container, the DXIL part, or the raw bitcode with `--module` all give `0x80070057`. `--container` on the same file returns `status 0x00000000`. **Cause: the DXC version in the SDK.** `root_probe` loads `dxil.dll` from the directory of the `dxc` that CMake finds. This machine has the original SDK 10.0.26100 release, which ships DXC **1.7.2308** (`dxil.dll` 101.7.2308.24). I built a second `root_probe` in a separate build directory with `-DDXC_EXECUTABLE` pointing at the official [DXC v1.9.2609 release](https://github.com/microsoft/DirectXShaderCompiler/releases/tag/v1.9.2609) (Microsoft-signed, SHA-256 matched the release digest). I ran both against the **same** `.cso` files from the original build: | `root_probe` built against | `shader_probe_check.py` | |---|---| | SDK DXC 1.7.2308 | Fails, `call_hr 0x80070057` | | DXC 1.9.2609 | Passes | So the README requirement "Windows SDK 10.0.26100 with DXC" can be met by an SDK whose validator lacks this operation. I have not narrowed down the minimum version (somewhere after 1.7.2308, at or before 1.9.2609). Possible fixes, for the maintainers to choose: state a minimum DXC version in the first-build step, check the validator version at configure time, or have the test report a named skip when module-only validation is unavailable. ## Environment - Windows 10 22H2, build 19045.6466 - VS Build Tools 2022 17.14, MSVC 14.44.35207 - Windows SDK 10.0.26100, DXC 1.7.2308.16, `dxil.dll` 101.7.2308.24 - Python 3.13 venv from `requirements-dev.txt` - Not a graphics test, but for completeness: RTX 3060 (driver 32.0.15.9636) and WARP 10.0.19041.5794, debug layer unavailable The rest of the clean build: all three smoke tests passed, and the full suite is 74 of 75 pass or skip once the separate Windows 10 WARP shader-model failures are fixed (#99). _AI-assisted (Claude Code); built and run locally on the configuration above._
Leyukaka commented 2026-11-24 06:47:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-21T16:15:45Z.


I looked at the DXC sources to narrow down the version. This comes from reading the code only; I haven't run any older DXC release.

  • root_probe --module calls IDxcValidator::Validate with DxcValidatorFlags_ModuleOnly (tools/root_probe.cpp:49).
  • The validator built into dxcompiler already routed ModuleOnly to module validation at v1.7.2308. The gap is specific to the separate dxil.dll.
  • Up to and including v1.8.2407, dxil.dll was not built from the public repository: tools/clang/tools/dxildll does not exist at those tags. DXC's unit test has a comment saying raw-bitcode validation "is not supported through DXIL.dll" (tools/clang/unittests/HLSL/ValidationTest.cpp). That comment and its skip are unchanged on main today, so I read it as describing the old closed-source dxil.dll, not current behaviour.
  • dxil.dll moved into the repository in #6866, merged 2024-09-05. The compare API shows it is not in v1.8.2407 and is in v1.8.2502, and there is no tag in between. At v1.8.2502 its Validate forwards to hlsl::validateWithDebug, the shared path that sends DxcValidatorFlags_ModuleOnly to runDxilModuleValidation.

So my working assumption is that module-only validation through dxil.dll first works in DXC v1.8.2502. That fits your two data points (1.7.2308 fails, 1.9.2609 passes), but it is not measured. Running shader_probe_check.py with dxil.dll from v1.8.2407 and from v1.8.2502 would confirm or refute it.

Two possible fixes, for you to choose:

  1. Version-gated skip. Read the validator version (IDxcVersionInfo on the validator, or the dxil.dll file version) and return 77 only when it is below 1.8.2502. An E_INVALIDARG from a newer validator would still fail the test, so a regression in root_probe isn't hidden. This needs SKIP_RETURN_CODE 77 on shader_metadata_probe, which it doesn't have today.
  2. Documentation only. Name the minimum DXC version, not the SDK version, in the first-build step, since the SDK can ship different DXC builds.

I can prepare either one.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7065510933 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/98#issuecomment-7065510933). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-21T16:15:45Z. --- I looked at the DXC sources to narrow down the version. This comes from reading the code only; I haven't run any older DXC release. - `root_probe --module` calls `IDxcValidator::Validate` with `DxcValidatorFlags_ModuleOnly` (`tools/root_probe.cpp:49`). - The validator built into `dxcompiler` already routed `ModuleOnly` to module validation at v1.7.2308. The gap is specific to the separate `dxil.dll`. - Up to and including **v1.8.2407**, `dxil.dll` was not built from the public repository: `tools/clang/tools/dxildll` does not exist at those tags. DXC's unit test has a comment saying raw-bitcode validation "is not supported through DXIL.dll" (`tools/clang/unittests/HLSL/ValidationTest.cpp`). That comment and its skip are unchanged on main today, so I read it as describing the old closed-source `dxil.dll`, not current behaviour. - `dxil.dll` moved into the repository in [#6866](https://github.com/microsoft/DirectXShaderCompiler/pull/6866), merged 2024-09-05. The compare API shows it is not in v1.8.2407 and is in **v1.8.2502**, and there is no tag in between. At v1.8.2502 its `Validate` forwards to `hlsl::validateWithDebug`, the shared path that sends `DxcValidatorFlags_ModuleOnly` to `runDxilModuleValidation`. So my working assumption is that module-only validation through `dxil.dll` first works in **DXC v1.8.2502**. That fits your two data points (1.7.2308 fails, 1.9.2609 passes), but it is not measured. Running `shader_probe_check.py` with `dxil.dll` from v1.8.2407 and from v1.8.2502 would confirm or refute it. Two possible fixes, for you to choose: 1. **Version-gated skip.** Read the validator version (`IDxcVersionInfo` on the validator, or the `dxil.dll` file version) and return 77 only when it is below 1.8.2502. An `E_INVALIDARG` from a newer validator would still fail the test, so a regression in `root_probe` isn't hidden. This needs `SKIP_RETURN_CODE 77` on `shader_metadata_probe`, which it doesn't have today. 2. **Documentation only.** Name the minimum DXC version, not the SDK version, in the first-build step, since the SDK can ship different DXC builds. I can prepare either one. _AI-assisted._
R0Y00 commented 2026-11-24 06:47:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T16:31:09Z.


#110 documents how to select a working validator. #114 now also has a release comparison and a proposed capability skip. If you still have the original SDK installed, a native Windows run of the old-validator path on #114 would complement the Wine measurements.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7065706273 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/98#issuecomment-7065706273). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T16:31:09Z. --- #110 documents how to select a working validator. #114 now also has a release comparison and a proposed capability skip. If you still have the original SDK installed, a native Windows run of the old-validator path on #114 would complement the Wine measurements.
Asnardd commented 2026-11-24 06:47:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Asnardd on 2026-11-21T16:52:21Z.


Result for the 1.8.2502 case on native Windows

shader_metadata_probe passes with the validator from Windows SDK 10.0.26100, which on my machine ships DXC 1.8.2502.11 (dxil.dll is on the same version). No -DXC_EXECUTABLE override, CMake picked the SDK dxc

So the module-only validation failure seems limited to 1.7.2308, at least 1.8.2502 is fine

Setup:

  • Clean clone of commit 2d96d6d
  • Windows 11 build 26200
  • VS 2026 Community, MSVC 19.50.35721, CMake 4.3.0, Ninja
  • Python 3.14.3 venv (pefile 2024.8.26, iced-x86 1.21.0)
  • RTX 5060, driver 32.0.16.1088

Full suite passed (76/76) only bvh_wave64_hardware and bvh_wave64_warp skipped (expected on NVIDIA)

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7066000111 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/98#issuecomment-7066000111). Originally posted by [Asnardd](https://github.com/Asnardd) on 2026-11-21T16:52:21Z. --- Result for the 1.8.2502 case on native Windows shader_metadata_probe passes with the validator from Windows SDK 10.0.26100, which on my machine ships DXC 1.8.2502.11 (dxil.dll is on the same version). No -DXC_EXECUTABLE override, CMake picked the SDK dxc So the module-only validation failure seems limited to 1.7.2308, at least 1.8.2502 is fine Setup: - Clean clone of commit 2d96d6d - Windows 11 build 26200 - VS 2026 Community, MSVC 19.50.35721, CMake 4.3.0, Ninja - Python 3.14.3 venv (pefile 2024.8.26, iced-x86 1.21.0) - RTX 5060, driver 32.0.16.1088 Full suite passed (76/76) only bvh_wave64_hardware and bvh_wave64_warp skipped (expected on NVIDIA)
Sign in to join this conversation.
No labels
No milestone
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.

Reference
R0Y00/Xbox2Windows#97
No description provided.