Skip the compile-time check on a DXC without -ftime-report #1393

Manually merged
github merged 1 commit from gh-pr/1393/head into gh-pr/1393/base 2026-11-26 23:03:43 +00:00
Owner

@⁠FoxxoOwO on GitHub · 2026-11-24 10:22 UTC · original
FoxxoOwO:test/dxc-ftime-report-skip → main · +30 −3 · 2 files · 1 commits · merged 2026-11-24 10:44 UTC

What

dxc_compile_time_gvn fails on a DXC older than 1.7.2212 with

dxc failed : Unknown argument: '-ftime-report'
FAIL: condstore_1024 () outcome diagnostic
FAIL: stores_1024 () outcome diagnostic
FAIL: condstore_1024 ('-opt-disable', 'gvn') outcome diagnostic

-ftime-report arrived in DXC 1.7.2212 (December 2022,
microsoft/DirectXShaderCompiler#4736).
The 1.6.2112.16 build that ships with Windows SDK 10.0.22621 has no such flag,
so the check cannot measure pass attribution at all — it never reaches the GVN
profile it is asserting.

The check now probes the flag on the fixture control shader and, when the
compiler itself reports it as an unknown argument, prints
SKIP: this DXC has no -ftime-report; pass attribution cannot be measured and
returns 77, which CMakeLists.txt already declares as this test's
SKIP_RETURN_CODE. AGENTS.md names the DXC version that supports the flag.

Why the probe cannot hide a real regression

The predicate looks only at the compiler's own diagnostic text, and its two
directions are asserted in check_parser(), so a compiler that works can never
be turned into a skip:

check(rejects_ftime("dxc failed : Unknown argument: '-ftime-report'"), ...)
for quiet in ("", four, "dxc failed : Unknown argument: '-Fh'"):
    check(not rejects_ftime(quiet), ...)

four is a real 4-column -ftime-report dump, and an unrelated unknown-argument
error must not trip the probe either. The existing "this DXC no longer shows the
GVN profile" path still returns 77 for a -ftime-report-capable compiler, and
every other mismatch still fails.

Reproduction

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

Before: 1/1 dxc_compile_time_gvn ... ***Failed 0.45 sec
After: 1/1 dxc_compile_time_gvn ... ***Skipped 0.19 sec

Direct run on this toolchain:

python -B tests/dxc_compile_time_check.py "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/dxc.exe"
DXC: dxcompiler.dll: 1.6 - 1.6.2112.16 (e8295973c); dxil.dll: 1.6(101.6.2112.13)
SKIP: this DXC has no -ftime-report; pass attribution cannot be measured
exit 77

The probe's predicate was also checked in both directions against synthetic
compiler output: supported -> True for a timer dump, unsupported -> False
for the unknown-argument error.

Still passing on the same toolchain, so the flag-based attribution is the only
thing skipped: dxc_gvn_output_warp, dxc_gvn_output_hardware (they compile
condstore_256 with and without GVN and compare the whole raw UAV bit for bit)
and the 41 pure-Python checks in AGENTS.md.

Environment

MSVC 19.44.35230.0 · Windows SDK 10.0.22621.0 (DXC 1.6.2112.16) · NVIDIA
GeForce RTX 3070 Ti, driver 32.0.16.2124, debug layer unavailable · Windows 11.

Not measured: a DXC with -ftime-report on this branch. There is none on
the machine that produced this PR, so the "flag is supported, keep checking"
path is covered only by the synthetic predicate assertions above, not by a real
1.7+ run. Reviewers with SDK 10.0.26100 or the NuGet DXC can confirm it in one
command.

Separate from #1369 (SDK 10.0.22621 build blockers); this change touches only a
Python check and AGENTS.md, and needs no rebuild.

**@⁠FoxxoOwO** on GitHub · 2026-11-24 10:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1393) `FoxxoOwO:test/dxc-ftime-report-skip` → `main` · +30 −3 · 2 files · 1 commits · merged 2026-11-24 10:44 UTC ## What `dxc_compile_time_gvn` fails on a DXC older than 1.7.2212 with ``` dxc failed : Unknown argument: '-ftime-report' FAIL: condstore_1024 () outcome diagnostic FAIL: stores_1024 () outcome diagnostic FAIL: condstore_1024 ('-opt-disable', 'gvn') outcome diagnostic ``` `-ftime-report` arrived in DXC **1.7.2212** (December 2022, [microsoft/DirectXShaderCompiler#4736](https://github.com/microsoft/DirectXShaderCompiler/pull/4736)). The 1.6.2112.16 build that ships with Windows SDK 10.0.22621 has no such flag, so the check cannot measure pass attribution at all — it never reaches the GVN profile it is asserting. The check now probes the flag on the fixture control shader and, when the compiler itself reports it as an unknown argument, prints `SKIP: this DXC has no -ftime-report; pass attribution cannot be measured` and returns **77**, which `CMakeLists.txt` already declares as this test's `SKIP_RETURN_CODE`. `AGENTS.md` names the DXC version that supports the flag. ## Why the probe cannot hide a real regression The predicate looks only at the compiler's own diagnostic text, and its two directions are asserted in `check_parser()`, so a compiler that works can never be turned into a skip: ```python check(rejects_ftime("dxc failed : Unknown argument: '-ftime-report'"), ...) for quiet in ("", four, "dxc failed : Unknown argument: '-Fh'"): check(not rejects_ftime(quiet), ...) ``` `four` is a real 4-column `-ftime-report` dump, and an unrelated unknown-argument error must not trip the probe either. The existing "this DXC no longer shows the GVN profile" path still returns 77 for a `-ftime-report`-capable compiler, and every other mismatch still fails. ## Reproduction ``` ctest --preset dev --no-tests=error -R '^dxc_compile_time_gvn$' ``` Before: `1/1 dxc_compile_time_gvn ... ***Failed 0.45 sec` After: `1/1 dxc_compile_time_gvn ... ***Skipped 0.19 sec` Direct run on this toolchain: ``` python -B tests/dxc_compile_time_check.py "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/dxc.exe" DXC: dxcompiler.dll: 1.6 - 1.6.2112.16 (e8295973c); dxil.dll: 1.6(101.6.2112.13) SKIP: this DXC has no -ftime-report; pass attribution cannot be measured exit 77 ``` The probe's predicate was also checked in both directions against synthetic compiler output: `supported -> True` for a timer dump, `unsupported -> False` for the unknown-argument error. Still passing on the same toolchain, so the flag-based attribution is the only thing skipped: `dxc_gvn_output_warp`, `dxc_gvn_output_hardware` (they compile `condstore_256` with and without GVN and compare the whole raw UAV bit for bit) and the 41 pure-Python checks in `AGENTS.md`. ## Environment MSVC 19.44.35230.0 · Windows SDK 10.0.22621.0 (DXC 1.6.2112.16) · NVIDIA GeForce RTX 3070 Ti, driver 32.0.16.2124, debug layer unavailable · Windows 11. **Not measured:** a DXC with `-ftime-report` on this branch. There is none on the machine that produced this PR, so the "flag is supported, keep checking" path is covered only by the synthetic predicate assertions above, not by a real 1.7+ run. Reviewers with SDK 10.0.26100 or the NuGet DXC can confirm it in one command. Separate from #1369 (SDK 10.0.22621 build blockers); this change touches only a Python check and `AGENTS.md`, and needs no rebuild.
-DXC 1.6.2112.16, the build that ships with Windows SDK 10.0.22621, rejects the
flag the check depends on:

  dxc failed : Unknown argument: '-ftime-report'
  FAIL: condstore_1024 () outcome diagnostic

-ftime-report arrived in DXC 1.7.2212 (December 2022,
microsoft/DirectXShaderCompiler#4736), so pass attribution cannot be measured
at all on an older compiler. That is a capability of the toolchain, not a
result of this repository, so the check now probes the flag on the fixture
control shader and returns the already-declared skip code 77 with the reason
printed. AGENTS.md names the DXC version that supports the flag.

The probe is a pure predicate over the compiler's own output, so it cannot turn
a working compiler into a skip: check_parser() asserts that a real
-ftime-report dump and an unrelated unknown-argument error are both classified
as usable, and that the unknown -ftime-report error is not.

Measured on MSVC 19.44 / Windows SDK 10.0.22621 (DXC 1.6.2112.16):

  ctest --preset dev --no-tests=error -R '^dxc_compile_time_gvn$'
  -> 1/1 dxc_compile_time_gvn ... ***Skipped

Before this change the same run failed in 0.45 s. A compiler that does have the
flag is not exercised here; dxc_gvn_output_warp/hardware, which compare the raw
UAV bit for bit, still pass on this toolchain.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:03:42 +00:00
github manually merged commit ba073fcad3 into gh-pr/1393/base 2026-11-26 23:03:43 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 10:44 UTC · original · reviewed

Dual-platform peer review of #1393 (ba073fca):

Checks

  • git diff --check origin/main...HEAD: clean.
  • Linux:
    • tests/docs_links_check.py: passed (Checked 16 Markdown files and 301 links.).
    • tests/bidi_controls_check.py: passed (Checked 1145 tracked source, script and build/CI files: no bidirectional controls.).
    • py_compile on tests/dxc_compile_time_check.py: passed.
  • Win2025 (x2w_pipe.py win2025 1393 --regex '^dxc_compile_time_gvn$'):
    • Debug (--preset dev): 1/1 passed (2.25s: dxc_compile_time_gvn).
    • Release (/O2, --preset release): 1/1 passed (2.23s: dxc_compile_time_gvn).

Audit notes

  • tests/dxc_compile_time_check.py: check_sources() and check_parser() still run unconditionally before check_dxc(), and rejects_ftime() requires both "Unknown argument" and "-ftime-report" in the output (verified with negative/positive parser assertions in check_parser()). On DXC builds that support -ftime-report (such as Win2025), ftime_supported() returns True and all outcome/timeout/diagnostic/GVN-share checks execute normally.
  • AGENTS.md: documents the DXC 1.6 / Windows SDK 10.0.22621 capability skip (77).
**@⁠tedin7** on GitHub · 2026-11-24 10:44 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1393#pullrequestreview-6037785103) · **reviewed** Dual-platform peer review of #1393 (`ba073fca`): ### Checks - `git diff --check origin/main...HEAD`: clean. - Linux: - `tests/docs_links_check.py`: passed (`Checked 16 Markdown files and 301 links.`). - `tests/bidi_controls_check.py`: passed (`Checked 1145 tracked source, script and build/CI files: no bidirectional controls.`). - `py_compile` on `tests/dxc_compile_time_check.py`: passed. - Win2025 (`x2w_pipe.py win2025 1393 --regex '^dxc_compile_time_gvn$'`): - **Debug (`--preset dev`)**: **1/1 passed** (`2.25s`: `dxc_compile_time_gvn`). - **Release (`/O2`, `--preset release`)**: **1/1 passed** (`2.23s`: `dxc_compile_time_gvn`). ### Audit notes - `tests/dxc_compile_time_check.py`: `check_sources()` and `check_parser()` still run unconditionally before `check_dxc()`, and `rejects_ftime()` requires both `"Unknown argument"` and `"-ftime-report"` in the output (verified with negative/positive parser assertions in `check_parser()`). On DXC builds that support `-ftime-report` (such as Win2025), `ftime_supported()` returns `True` and all outcome/timeout/diagnostic/GVN-share checks execute normally. - `AGENTS.md`: documents the DXC 1.6 / Windows SDK 10.0.22621 capability skip (`77`).
This discussion has been locked. Commenting is limited to contributors.
No description provided.