hw_oracle's vcvars script is fixed on main by #2667 (UTF-8 + chcp 65001), so this
branch takes main's runner.py and drops its own 8.3-name version. Two of main's
new hw_oracle tests decoded that UTF-8 script as ASCII, which fails when %TEMP%
holds a non-ASCII user name; they now decode it as UTF-8.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five tests that only the Linux CI runs fail on Windows:
- test_report_paths: the darwin patch kept Windows' os.path.normcase,
which lowercases; use posixpath.normcase there too.
- test_audio_wav, test_audio_stage_resume: cmd.exe decodes the fake
ffmpeg.cmd with the OEM code page, not UTF-8; write non-ASCII paths as
their 8.3 short names, the file in the OEM code page.
- test_make_game_submodule, tools/spirv_metal_set0.py: text=True decodes
UTF-8 child output with the ANSI code page and the reader thread dies;
errors="replace".
- test_spirv_metal_set0_cli_errors: read the Python child's stderr in the
locale encoding it writes, not UTF-8.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`spirv_metal_set0.py in.spv out.spv` ended in a traceback when spirv-dis
or spirv-as was not on PATH (FileNotFoundError) or rejected its input, such
as a missing or non-SPIR-V in.spv (CalledProcessError).
The command line now goes through cli(), which reports either as one line
and exit 1: the program, its exit status and the first line it wrote, or
the program that could not be started with a hint about PATH and
SPIRV_DIS / SPIRV_AS (Windows does not name the program in that error, so
_run() adds it). main() still raises as before; the existing tests that
call it are unchanged and pass.
tests/test_spirv_metal_set0_cli_errors.py needs no SPIRV-Tools: SPIRV_DIS
and SPIRV_AS point at the Python interpreter or at a missing path. All 7
tests fail on the tool as it was.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
spirv_gs_to_compute.py and spirv_metal_set0.py parse argv by hand, so
--help fell into the arity check and printed the usage line to stderr
with exit 2. Answer it with the usage on stdout and return 0, before
reading vulkan_bindless.h in spirv_metal_set0, and pin both with a test.
On Windows a redirected stdout uses the console's ANSI code page, and python -I ignores PYTHONUTF8 and
PYTHONIOENCODING, so a caller path with a character outside that code page ended a run with
UnicodeEncodeError as soon as a tool printed it. #1406 fixed make_game.py; every CLI tool in tools/ now starts
its __main__ block the same way (stdout errors="replace").
tests/test_tool_stdout_encoding.py checks every tool's __main__ block and reruns two measured crashes
(analyze_4240_full.py, meshlet_page.py) with a private-use-named input. Found by @abilliontokens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SPIRV-Cross 1.4.363.0 puts every runtime descriptor array of an argument
buffer at one ID and comments all but one out as "Overlapping binding", so a
native Metal shader can't reach set 0's images or samplers. The tool sizes the
runtime arrays from runtime/src/vulkan_bindless.h and moves each binding to
its own ID range, for spirv-cross --msl-decoration-binding. The Vulkan module
and layout are unchanged. All 17 set-0 test shaders convert with no overlap
and compile; cs_imgstore writes all 3x64 texels correctly in a native Metal
dispatch on an Apple A18 Pro.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>