Commit Graph

13 Commits

Author SHA1 Message Date
fcedc33eb0 tools/spirv_stubs.py: preflight stub targets and harden CLI parsing 2026-11-26 20:28:02 +08:00
72bf7aeef4 spirv_stubs: read the shader index as utf-8-sig, so a Windows BOM is not a JSON error (EGEN-SPIRVSTUBS-BOM) (#6331)
Squash-merged after review of PR #6331 - spirv_stubs: read the shader index as utf-8-sig, so a Windows BOM is not a JSON error (EGEN-SPIRVSTUBS-BOM)
2026-11-23 08:06:40 -06:00
f83a7c7265 Merge pull request #4175 from leather147
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:02 -05:00
18156b0418 spirv_stubs: retain inherited permissions on Windows 2026-11-23 02:53:31 +03:00
5d3f4d0435 spirv_stubs: publish each generated stub atomically 2026-11-23 02:46:20 +03:00
464394d42f spirv_stubs: validate interface location lists (BUILD-1135) 2026-11-23 01:46:12 +03:00
6f0f0692c3 Fix SPIR-V stub errors for invalid interface locations 2026-11-22 20:00:00 +03:00
89cf18645e Merge pull request #1428 from Dominik 2026-11-22 06:38:01 -05:00
f698bf2206 tools: a path outside the console's code page no longer crashes a tool's output
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>
2026-11-22 11:27:00 +00:00
42537d6987 classify_carve, spirv_stubs: -h/--help prints usage instead of being read as a path
Both tools parse sys.argv by hand, so --help was taken as the input folder:
classify_carve reported '--help: does not exist' (exit 2) and spirv_stubs
'missing --help/index.json' (exit 1). -h and --help now print the usage to
stdout and exit 0 without touching the file system. Tests cover both flags
on both tools and fail on the previous code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:22:32 +00:00
712ec323a9 BUILD: report a malformed spirv stubs index without a traceback 2026-11-21 23:55:20 -06:00
4344e368ec BUILD: report a malformed spirv stubs index without a traceback 2026-11-21 23:26:40 -06:00
7837080454 Tools: add pure-Python SPIR-V stub generator and graphics metadata fields
- Add tools/spirv_stubs.py to emit minimal deduplicated SPIR-V 1.0 VS/PS
  partner stubs into <spirv>/stubs/ using only the standard library.
- Record writes_depth, gs_input_locations, and gs_output_locations in
  shader_meta() (keeping all existing fields intact and avoiding overlap
  with PR #76 / PR #83 fields).
- Generate stubs automatically when rdna2spirv.py or build.py writes index.json.
2026-11-21 16:18:01 -03:00