mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #998] [MERGED] tools: decode the pipeline-library compute programs llvm-mc refuses #1037
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1037
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/998
Author: @Kokonotcu
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142
Base:
main← Head:fix/library-compute-decode📝 Commits (3)
ebcb0actools: decode the pipeline-library compute programs llvm-mc refusesbf0c4d9tests: fspx_unpack takes the decoder listing when llvm-mc reports invalid wordsbec14f2tools: the last pipeline-library compute programs of 1.0.2.1📊 Changes
8 files changed (+190 additions, -25 deletions)
View changed files
📝
tests/semantic/test_salu_flbit_64.py(+4 -2)📝
tests/semantic/test_salu_quadmask_bitreplicate.py(+9 -0)📝
tests/test_fspx_unpack.py(+28 -4)📝
tools/fspx_unpack.py(+70 -6)📝
tools/rdna2_decode.py(+26 -0)📝
tools/rdna2spirv.py(+38 -10)📝
tools/shader_disasm.py(+13 -1)📝
tools/shader_library.py(+2 -2)📄 Description
llvm-mc 21 cannot decode SMEM loads whose SOFFSET is null (0x7D). Because of that, whole pipeline-library compute programs of 1.0.2.1 disassembled with invalid words and failed to translate. A retail boot also reached 50 more library programs that had no translation; dumped from the running game, all 50 now translate and pass spirv-val.
Changes
compute=True, passed by shader_library and fspx_unpack), it falls back tordna2_decode.disasm_byteswhen that leaves fewer invalid words than llvm-mc.--last-endpgm: early exits branch past the first s_endpgm, and data after the code can hold s_endpgm words, so a program ends at the first s_endpgm whose listing keeps every branch inside the code.vccas its base reads the vcc_lo/vcc_hi pair.s_flbit_i32_b64of a lane mask reads the wave's 64-bit mask (18 library programs), ass_ff1_i32_b64already does.s_bitreplicate_b64_b32of a lane mask into plain scalar data replicates the wave's mask word (6 library programs). From a constant into vcc it sets each lane's bit as the exec form does (6 programs).v_cmp_*_dppinto vcc (12 compares in reductions) is taken when every lane writes (full row/bank masks with bound_ctrl:1, or DPP8).test_salu_flbit_64: the lane-mask case now translates; the subgroup op is outside the single-invocation interpreter, so the test checks that.test_fspx_unpack: the invalid-word case takes the decoder's listing; new cases cover the two-word prologue,code_range_lastand branch checks.test_salu_quadmask_bitreplicate: new case for bitreplicate into vcc.Result
Library programs: 2633 of 2684 translated after the first commit; the 50 the retail boot then dumped as missing all translate after the second.
Testing
These pass:
tests/semantic/test_salu_flbit_64.pytests/semantic/test_salu_quadmask_bitreplicate.pytests/test_fspx_unpack.pytests/test_shader_library.pytests/test_rdna2_decode.pytests/test_shader_disasm.pytests/test_rdna2spirv_decode.pyThe VOPC-DPP path is checked only by spirv-val, since the interpreter runs no subgroup ops. Tested on an RTX 3080 Laptop, i7-11800H, Windows 10.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.