Skip to content

shader_disasm: honor compiled wave size in the LLVM backend - #9654

Closed
LukeOsland1 wants to merge 2 commits into
ProjectLeonida:mainfrom
LukeOsland1:codex/llvm-fssm-wave-mode
Closed

LukeOsland1 wants to merge 2 commits into
ProjectLeonida:mainfrom
LukeOsland1:codex/llvm-fssm-wave-mode

Conversation

@LukeOsland1

Copy link
Copy Markdown
Contributor

Depends on: #9556

The default LLVM backend ignored the compiled wave size even after the Python decoder began using it. An identical synthetic compare in two FSSM containers consequently had the wave32 destination on gfx1013 in both listings. Pass the known wave size through LLVM target features for both the scan and the final decode. Headerless inputs retain the selected CPU default. The build signature changes so a resumed build refreshes existing listings once. Open #3402 also changes that signature for a separate code-range fix.

On the parent both explicit-mode regression cases failed and the unknown-size control passed. With this change real LLVM decoded the full VCC destination for wave64 and its low half for wave32, with zero invalid words for both synthetic inputs. A resume regression checks that dependent translation runs once when upgrading an existing folder.

Windows checks passed: 31 disassembler, 47 shader-stage resume, 42 FSSM header, 22 FSPX shader stage and 13 BVH shader stage tests. Python compileall and isolated make_game --help passed. CPU and LLVM verification, no GPU run for this change. AI-assisted implementation and testing.

Coordination claim, no item ID assigned

@catminou4

Copy link
Copy Markdown
Contributor

Tested 50da74e on macOS 26 arm64, Python 3.12, CPU only, no game files: pass. python -I tests/test_shader_disasm.py — 31 tests OK; python -I tests/test_shader_stage_resume.py — 47 tests OK. AI-assisted (Devin).

@molodayamama

Copy link
Copy Markdown
Contributor

Independent Windows check on 50da74ec037f197b397993ad0af45f2a2f790ce2

python -I tests/test_shader_disasm.py passed (31 passed). This exercised the shader disassembly fixture suite, including compiled wave size propagation. The run used the repository's test fixtures. I did not verify live game execution or GPU behavior.

AI-assisted check.

@DrArroway

Copy link
Copy Markdown

Tested 50da74ec0 on CachyOS Linux 7.3.5, Python 3.14.10, LLVM 23.1.5 (llvm-mc): pass.

  • python3 -m unittest tests/test_shader_disasm.py tests/test_shader_stage_resume.py: 78/78 tests OK (2.973s).

@RAINighty

Copy link
Copy Markdown

Tested 50da74ec0 merged with main 5d74c2723 (clean merge) on Windows 11 (10.0.26300), Python 3.13.15 in UTF-8 mode (PYTHONUTF8=1; venv with the pinned tests/requirements.txt), with llvm-mc 21.1.8 (AMDGPU) and SPIRV-Tools v2026.4 on PATH: pass.

  • tests/test_shader_disasm.py with this PR: passes (Ran 31 tests in 3.268s, OK). On main: passes (Ran 29 tests in 2.835s, OK).
  • tests/test_shader_stage_resume.py with this PR: passes (Ran 47 tests in 9.309s, OK). On main: passes (Ran 46 tests in 9.211s, OK).
  • Negative control: this PR's test with main's version of make_game.py, tools/shader_disasm.py fails (Ran 31 tests in 3.226s, FAILED (failures=3)), so the new test does catch the problem.
  • Code not reviewed beyond running it. No GPU or game files.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants