tooling: run dxc_cache_check on Windows with a .cmd fake compiler #2795
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2803"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-26T11:00:19Z.
Change
tests/dxc_cache_check.pywrote its fake compilerfakedxcas a#!/usr/bin/env python3script and ran it throughtools/dxc_cache.pyrun_dxc. On Windows that fails withOSError: [WinError 193], so this pure-Python check could not run locally on Windows.On
os.name == "nt"the check now writes the fake script asfakedxc_impl.pyand afakedxc.cmdwrapper (@"<sys.executable>" "<script>" %*) and uses the wrapper as the compiler. The POSIX path is unchanged (same file name, shebang and execute bit). The tool is unchanged:run_dxcpasses a list argv tosubprocess.run, and the cache key uses the compiler path, size and mtime, so the.cmdfile is fingerprinted like the script. Every hit/miss assertion runs on both platforms; nothing is skipped.Verification
Windows, Python from
out/pe-env:origin/main):python -B tests/dxc_cache_check.pyends inOSError: [WinError 193](message shown in Dutch locale: "%1 is geen geldige Win32-toepassing").python -B tests/dxc_cache_check.pyprintsdxc_cache_check: ok.python -B tools/run_checks_parallel.py tests/dxc_cache_check.pyprintsall 1 checks passed.tools/dxc_cache.pywhose cache lookup always misses (the loaded entry is discarded), run with the new check from a scratch directory, fails withdxc_cache_check: identical compile ran 2 real calls, expected 1. The trackedtools/dxc_cache.pywas not edited.Evidence and follow-up
Not run on Linux or macOS here. The POSIX branch is the previous code unchanged. The Windows run takes about 25 seconds because every fake compile starts cmd and Python.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:08:55Z.
Review: COMMENTED
Review of head
1feeae46(comment only).Checked against origin/main:
tests/dxc_cache_check.pychanges. The POSIX branch is identical to before (same file name, shebang, execute bit). On Windows the fake compiler is a.cmdwrapper that runsfakedxc_impl.pywithsys.executable;%%*correctly yields%*, so all arguments reach the script.tools/dxc_cache.pyis untouched; the cache key uses compiler path, size and mtime, so the.cmdis fingerprinted the same way. Every hit/miss assertion runs on both platforms, nothing is skipped.Commands run locally (Linux):
python3 -B tests/dxc_cache_check.py:dxc_cache_check: okgit diff --check origin/main...HEAD: cleanThe Windows run follows in a receipt.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:09:12Z.
Win2025 WARP receipt for head
1feeae46.real-GPU run not available (RunPod stopped); not a shader change.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
1feeae46757d0092a25ec1a979e1b016f2c164d5:tests/dxc_cache_check.pyok (1.6s)6.6sAI-assisted; commands listed were executed locally.