You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Decode FSSM listings at the compiled wave size - #9556
The Python disassembler always emitted wave32 operand spellings. The FSSM header already records the compiled wave size.
Pass that size through both initial disassembly and fallback scanning. The synthetic CLI test checks one compare encoded identically for wave32 and wave64, expecting vcc_lo and vcc respectively. With the original code the wave64 case emitted vcc_lo.
30 shader disassembly tests passed on Windows. In the combined run, the 5,957-test Linux semantic suite reproduced the baseline failures in test_image_atomics_guard and test_image_store_d16. No game files were used.
Independent Linux CLI check at aadfda67 with LLVM 23.1.4. I assembled a synthetic v_cmp_eq_u32_e32 and v_cndmask_b32_e32 in explicit wave32 and wave64 modes. The instruction bytes are identical, so the FSSM flag is the input that distinguishes the desired operand spelling.
Using both a valid code offset and the backward-scan path, the parent's Python backend printed vcc_lo for the wave64 fixture. The PR printed vcc for both wave64 instructions and kept vcc_lo for the wave32 fixture. #8916 at 5e67de97 applied cleanly on top in a scratch worktree. All four CLI cases and all 30 focused tests passed there.
Two remaining paths are worth recording separately from the fresh Python result:
--skip-existing reused a pre-fix Python wave64 listing byte for byte, so its two operands stayed vcc_lo. A fresh run over the same input wrote vcc. A resume marker that covers the decoder mode would let an existing workspace refresh those listings.
The default llvm-mc backend still printed vcc_lo for both header variants at gfx1030 on this LLVM. Setting LLVM_MC='llvm-mc -mattr=+wavefrontsize64,-wavefrontsize32' for the single wave64 fixture produced vcc for both instructions. Applying the header mode per input would cover that backend too.
Synthetic headers and instructions only. AI-assisted (Codex).
CPU check at aadfda67e on macOS 27.0.1 (arm64), Python 3.12.10 (pytest 9.2.0) — tool only, no GPU.
python -m pytest tests/test_shader_disasm.py -q: 30 passed, 8 subtests passed on the head.
Against main's tools/shader_disasm.py the PR's test file gives 1 failed, 30 passed — test_python_backend_uses_the_fssm_wave_size with operand='vcc' — so the new wave-size case is exercised, but only that one subtest is new coverage. The other 29 pass on both, which is expected for a single-path change.
Not checked: the LLVM backend path (needs llvm-mc), and neither side needs a game copy. AI-assisted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue.
The Python disassembler always emitted wave32 operand spellings. The FSSM header already records the compiled wave size.
Pass that size through both initial disassembly and fallback scanning. The synthetic CLI test checks one compare encoded identically for wave32 and wave64, expecting vcc_lo and vcc respectively. With the original code the wave64 case emitted vcc_lo.
30 shader disassembly tests passed on Windows. In the combined run, the 5,957-test Linux semantic suite reproduced the baseline failures in test_image_atomics_guard and test_image_store_d16. No game files were used.
Developed with AI assistance.