Repository navigation
Conversation
Add --shader-list FILE to rdna2spirv.py and make_game.py so only the shaders whose stems are listed in FILE are translated, instead of all 26,503. This cuts retranslation time for testing translator changes on a small subset of the corpus. make_game.py skips verify_translation_completeness() when --shader-list is given (the subset index is intentionally incomplete) and drops any previous full index before re-translating. rdna2spirv.py reads the list of shader stems (one per line) and filters the .s files from the disassembly directory before translation, after the existing --limit and --shard filters. Tested on a 5-shader subset: exactly 5 translated, index.json has 5 entries. No game data, no translator rule changed. Co-Authored-By: Claude Code <noreply@anthropic.com>
…s full index When --shader-list is given, write the subset translation to <spirv>/subset/ instead of the main <spirv>/ directory. Never drop or overwrite the existing full index.json. The full index always survives a subset translation run. verify_translation_completeness() is only called for full translations. Co-Authored-By: Claude Code <noreply@anthropic.com>
When --shader-list is given, write the subset to <spirv>/subset/ and skip all full-index fingerprint checks (translator digest, wave64 mode, fallback flags). The existing spirv/index.json is never read, dropped, or overwritten by a subset run. Carving/unpacking/disassembly no longer drop the full index when a subset is requested. Adds tests: - tests/test_make_game_empty_translation.py: full index survives a subset translation run; translate() is called with the subset dir and the shader list. - tests/test_rdna2spirv_cli.py: --shader-list filters .s files by stem, only listed shaders are translated and indexed. Co-Authored-By: Claude Code <noreply@anthropic.com>
When --shader-list is used, the shard plan (shards.json) did not hash the list file's contents, so overwriting the same list with a different selection and reusing the output folder kept the old shards instead of re-translating the newly requested entries. Add a sha256 of the list contents to the plan so a changed list is detected as a plan mismatch, dropping the old parts and starting only the missing shards. Adds SubsetListIdentityTest covering: same list reuses finished shards, changed list re-translates, and overwriting the same file path with new content re-translates. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Tested
AI-assisted; synthetic fixtures only, no game data. |
|
Confirmed the stale subset cache I reported in #565 is fixed at
On the old head the overwrite row returned 0/2 requested and retained both A entries. The full index stayed byte-identical in all five runs with a stale full-index translator fingerprint. The three CPU only. Synthetic inputs only. AI-assisted verification (OpenAI Codex). |
tiguan26
left a comment
There was a problem hiding this comment.
Approving. Merged into current main (42537e7) with no conflicts, Linux, Python 3.13. test_make_game_empty_translation.py, test_rdna2spirv_cli.py (37 tests) and test_shader_stage_resume.py pass, and the full translator suite gives 487 files / 6,279 tests with only test_int32_to_f64 failing, the same spirv-opt crash as on main here. --shader-list filters by stem and its content is part of the shard plan identity, so a subset run cannot resume another list's plan.
AI-assisted (Claude).
|
The rebase dropped the full build's early spirv-opt check for --compact-spirv. The follow-up restores it and adds a regression test that fails on the published head. The four targeted suites passed locally on Windows (111 passed, one skipped). AI-assisted: yes. |
tiguan26
left a comment
There was a problem hiding this comment.
Rechecked e89c291 and approving again. Merged into current main (b9320a1) with no conflicts. tests/test_make_game_empty_translation.py, tests/test_rdna2spirv_cli.py and tests/test_shader_stage_resume.py pass (102 passed, 1 skipped), and the full translator suite gives 490 files / 6,292 tests with only test_int32_to_f64 failing, the same baseline failure as main here (Linux, Python 3.13).
The restored need("spirv-opt") sits before the full translation starts, next to the spirv-as/spirv-val checks, so a missing spirv-opt under --compact-spirv stops the run before any index is written. The new test checks exactly that.
AI-assisted (Claude).
Claimed in the coordination issue as: SHADER-SUBSET (#14 (comment))
What and why
Translator:
--shader-listto translate only a subset of shaders. Replaces closed PR #565 whose head conflicted with upstream/main. Rebased on upstream main at 0bc8105.tools/rdna2spirv.py --shader-list FILEandmake_game.py --shader-list FILE: subset writes to<spirv>/subset/, never touches the fullspirv/index.json, skips fingerprint checks andverify_translation_completeness.SubsetListIdentityTestcases intests/test_shader_stage_resume.pycover same-list reuse, changed-list re-translate, and same-path overwrite re-translate.Tested
tests/test_shader_stage_resume.py: 50 passed (3 new SubsetListIdentityTest cases)tests/test_rdna2spirv_index_write.py: 8 passed, 1 skipped (9 total)tests/test_make_game_empty_translation.py: 16 passedtests/test_rdna2spirv_cli.py: 37 passedpython -m compileall -q make_game.py tools tests: cleanpython -I make_game.py --help: cleanGPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist: