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

Merged
FoxxoOwO merged 1 commit from upstream-pr/1393 into main 2026-11-24 10:44:45 +00:00
FoxxoOwO commented 2026-11-24 10:22:42 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by FoxxoOwO on 2026-11-24T10:22:42Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6579641778 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1393). Originally posted by [FoxxoOwO](https://github.com/FoxxoOwO) on 2026-11-24T10:22:42Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 11:02:48 +00:00
tedin7 commented 2026-11-24 11:02:48 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T10:44:33Z.

Review: COMMENTED


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).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6037785103 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1393#pullrequestreview-6037785103). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T10:44:33Z. **Review:** COMMENTED --- 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`).
Sign in to join this conversation.
No reviewers
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!1386
No description provided.