Repository navigation
Conversation
|
Independent Windows Python 3.12 check of c022ed9 against main 1c93c86, using four hand-written synthetic listings and the real make_game.translate sharded path.
All input was synthetic. AI-assisted verification. Retest at The selected suites show 55 passed, 3 failed and 1 skipped (requires SPIRV-Tools). The two SerialOverlapTest cases still raise TypeError for the new required shader_list keyword, and the translator dependency check still misses rdna2_decode.py and rdna2_isa_tables.py. The two overlap and five dependency tests all pass on upstream main 21625bc (7/7). Synthetic inputs only. AI-assisted. |
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>
b9b0dc4 to
01d444c
Compare
|
All review feedback from issuecomment-7126316415 is addressed and verified locally:
No game data, no translator rule changed. Tested locally (Windows, Python stdlib only). CI checks are pending on the PR head. AI-assisted: yes (Claude Code). |
|
Retested
The switched runs kept 2/2 finished shards and returned success. The serialized The full Synthetic inputs only. CPU test. AI-assisted: OpenAI Codex. Integration check on newer main. GitHub still lists |
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>
|
Thanks for the thorough retest, @sodove. The stale-subset-cache issue you found is now fixed in d50e1a4. What changedThe shard plan ( With this change:
TestsAdded Synthetic inputs only, no game data, no GPU needed. Tested locally on Windows, Python stdlib only. AI-assisted: yes (Claude Code). |
Claimed in the coordination issue as: SHADER-SUBSET (issue #14)
What and why
Add
--shader-list FILEtotools/rdna2spirv.pyandmake_game.pyso 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.pyskipsverify_translation_completeness()when--shader-listis given (the subset index is intentionally incomplete)and never touches the existing
spirv/index.json— the full indexalways survives a subset run. The subset is written to a separate
<spirv>/subset/directory.The content of the list is part of the shard plan's identity: the same list reuses finished shards, while a changed list (or the same file rewritten with other stems) translates again.
rdna2spirv.pyreads the list of shader stems (one per line) andfilters the
.sfiles from the disassembly directory beforetranslation, after the existing
--limitand--shardfilters.This is the translation half of the "translate only the shaders the
game actually uses" item. The other half — runtime instrumentation to
record which shader IDs
--runrequests — is C++ work not includedhere. This PR builds on PR #497's
native_hashes.txtindex(conceptually) but does not depend on it:
--shader-listworks withany list of shader stems.
Tested
python -I tools/rdna2spirv.py <work>/shaders/dxbc/disasm --out <scratch> --shader-list <5-stem-list> --no-asm --no-validate --assembler python:index.jsonhas 5 entries matching the listpy_compile+compileallon both files: OKcheck_no_game_data.pyon both files: OKpython -I tests/test_make_game_empty_translation.py(15 tests, including new full-index-survives-subset test): OKpython -I tests/test_rdna2spirv_cli.py(37 tests, including new --shader-list filter test): OKpython -I tests/test_shader_stage_resume.py(including the new subset-list identity test): OKGPU: not needed (CPU-only translation). No game files used.
AI-assisted: yes
Checklist