Repository navigation
Conversation
|
Independent CPU verification of
No blocker found from this check. |
|
Code read at 2c9b862 (macOS, Python 3.15.2;
Constant reads are unaffected as far as I can see: No game files. AI-assisted (Claude Code). |
|
Code read of 2c9b862, plus a sample measurement on a local build of the game (counts only):
AI-assisted review (Claude Code); no approval or change request. |
|
Reviewed and tested
Review: I read
AI-assisted (Claude Code); I checked the results. |
|
Tested 2c9b862 on Linux 6.12.113+, Python 3.12.3 (no GPU, no game data): pass. Ran
Please replace the PR description. It says this adds |
|
Thanks all. Pushed
Ran on Ubuntu (WSL2), Python 3.12.16: |
|
Verified on Linux: merges cleanly into current main; tests/test_shader_disasm.py passes (20 tests) and the three existing consumers of code_range (fspx_unpack 23, fssm_crosscheck 6, semantic printed_encoding 7) all pass unchanged. Data-block detection is pinned with hand-written blobs; the design.md note quotes aggregate counts only. Heads-up for maintainers: #4210 edits the same two files (tools/shader_disasm.py and tests/test_shader_disasm.py) and the two heads do NOT merge-trees cleanly — expect a rebase, not just ordering. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
kacper-serewis
left a comment
There was a problem hiding this comment.
At 41db9e8, test_signature_includes_the_disassembler_tool_digest fails. Include the shader_disasm.py digest in the resume signature so existing work folders regenerate stale disassembly. All 16 disassembler tests and 44 other resume tests passed. Across all 26,503 cached blobs, 1,473 ranges shortened at a unique matching boundary and 25,030 stayed identical. AI-assisted CPU check; no GPU.
|
Before/after on my own 1.0.2.1 copy (26,503 FSSM blobs), main 03b09a0 vs this PR 41db9e8, same translator: counts below. Windows 11, Python 3.13.1, llvm-mc 23.1.6 ( Disassembly, all 26,503 blobs
Translation. A full pass measured about 4 shaders/s here (~110 min per side), over the 60-minute budget I set, so I translated the 1,473 affected listings plus a 500-shader random control (fixed seed, over all 26,503; 26 of them are also affected, so 1,947 distinct shaders). The other 25,030 listings are byte-identical between main and PR, so their translator input is identical and I did not run them.
In the control, the 474 shaders that are not among the 1,473 are byte-identical, and the 22 that differ are 22 of the 26 affected ones. All 1,473 affected listings pass Why 1,227 differ. The listing with undecodable words used to go through If byte-stable output matters, applying |
|
Follow-up to my measurement above, pushed as What changed:
Measured on my own 1.0.2.1 copy (counts only). Windows 11, Python 3.13.1, llvm-mc 23.1.6,
So all 1,473 are byte-identical to the output before #3402, and the control is identical too. The earlier 1 of 240 that did not translate under the cut translates here; I did not isolate why, but New test: tests/semantic as a whole: I ran |
|
Tested 0e37ea9 on Intel UHD 630 (CFL GT2), Mesa 25.2.8 ANV, Ubuntu 24.04, LEONIDA_VK_DEVICE=Intel: no change from main.
The PR's own Python tests were not run here. AI-assisted. |
|
Full
Per-test diff against main, both platforms: the only difference is the 3 new tests of So with the parallel runner the full suite finishes in about 4 minutes on Linux and 9 minutes on Windows, nowhere near the 25-minute limit that the earlier serial run hit. Translator mutation ( Raw per-test tables are not attached; counts only. |
0e37ea9 to
fb6c626
Compare
|
@ItsNotRexed thanks. The reverted state on main is what was wrong: main now has the
Ubuntu (WSL2), Python 3.12.16, |
|
Tested fb6c626 (trial-merged onto main 561b65a, fast-forward) on Windows 11 Pro 26200, Python 3.12, llvm-mc 23.1.6, NVIDIA GeForce RTX 5090 (610.88) machine: pass (no GPU-visible change).
No game files. AI-assisted. |
… ends before a constant-data block
…isting work folders re-disassemble
…reverted with ItsNotRexed#3402; make_game carries the change again)
fb6c626 to
2524429
Compare
|
Tested the current head 2524429 (the last check above was fb6c626) on Windows 11 26200, Python 3.12.10, llvm-mc 23.1.6, CPU only. pass, and the point @ItsNotRexed raised is addressed at this head:
AI-assisted: yes |
|
Answering the open items. Status of reachable-code trimming: it landed in this PR (commit 901edf4, Measured again today, my own 1.0.2.1 copy, counts only, Linux, Python 3.12.16, llvm-mc 23.1.6 (
|
|
Independent macOS check at head 2524429 (Apple M2, Python 3.13.18, llvm-mc 21.1.8). The disassembler now ends the code range before a trailing constant-data block, with synthetic semantic coverage and a stage-resume regression.
No issue found; synthetic listings only. AI-assisted. |
|
Independent check of What exists
Method (my own 1.0.2.1 copy, counts only)
Result (the same in both flag modes)
The reference run also translates 1,473/1,473, and all 1,473 pass Conclusion: #3402 completes BUILD-1448, and nothing more is needed once it merges. Linux, Python 3.14.10, SPIRV-Tools v2026.4, CPU only (no GPU run). AI-assisted (Claude Code, Claude Opus 5.5). |
|
checked: full GPU suite at head |
|
✅ Automated security review: CLEAN (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
AI-assisted.
What broke: some carved blobs end with a constant-data block after the real code (
s_endpgm, a dword count N, N data dwords, a closings_endpgm,s_code_endpadding).shader_disasm.code_rangecounted the data as code, so those blobs showed invalid words and a range that ends too late. Repro: a synthetic blob with that tail;code_rangeon main ends 8 dwords late (0x138 instead of 0x130 in the test).Fix:
data_block_startcuts the range at the count dword only when the count equals the distance to the closings_endpgmand the dword before it is ans_endpgm;code_rangeapplies it on the header path. The block is documented indocs/design.md. Because the listings depend on this tool,llvm_mc_signature()inmake_game.pynow also carries the sha256 oftools/shader_disasm.py, so an existing work folder re-disassembles instead of keeping the old, longer ranges.Measured earlier on a 26,503-blob build (counts only): 1,473 blobs have such a block, all 1,473 decode with no invalid word once it is excluded, and none of the other 25,030 matches the pattern. The translator takes its re-anchor path only when a listing has invalid words, so these 1,473 listings now go through
check_printed_encodings, whose docstring was measured on 25,030 listings. I have not rerun the full translation before/after, so that docstring is unchanged.Tests:
tests/test_shader_disasm.py(new cases: block cut, zero-length block, mismatched count not cut) andtests/test_shader_stage_resume.py(signature includes the tool digest); alsotest_make_game_resume.py,test_make_game_preflight.py,test_make_game_dry_run.py,test_fspx_shaders_stage.py,test_make_game_translator_flags.py,test_docs_design_rows.py. Ubuntu (WSL2), Python 3.12.16: all OK.Negative control: with
tools/shader_disasm.pyfromupstream/mainthe new block test fails (code ends 8 dwords late); withmake_game.pyfromupstream/mainthe new signature test fails.