mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1984] fspx_unpack: --backend auto, used by the FSPX stage (FSPX-UNPACK-AUTO-BACKEND) #1991
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#1991
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/1984
Author: @ImLele69
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fspx-unpack-auto-backend📝 Commits (2)
70315b5tools: add auto fallback to python disassembler in shader_disasm and shader_library64ac9defspx_unpack: --backend auto, and make_game uses it for the FidelityFX programs📊 Changes
8 files changed (+125 additions, -11 deletions)
View changed files
📝
make_game.py(+1 -1)📝
tests/test_fspx_shaders_stage.py(+3 -2)📝
tests/test_fspx_unpack.py(+15 -2)📝
tests/test_shader_disasm.py(+42 -0)📝
tests/test_shader_library.py(+41 -0)📝
tools/fspx_unpack.py(+6 -2)📝
tools/shader_disasm.py(+11 -3)📝
tools/shader_library.py(+6 -1)📄 Description
Claimed in the coordination issue as FSPX-UNPACK-AUTO-BACKEND (#1608). Depends on #1712, which adds
backend="auto"totools/shader_disasm.py. This branch is #1712 plus one commit.What and why
With llvm-mc 21 or 22, five of the 29 FSPX programs of
amd_fidelityfx_upscaler_xbox.dll(05, 06, 08, 09, 28) are disassembled with invalid words, and the translator refuses them. The title then reads through the missing pipeline: the access violation atamd_fidelityfx_upscaler_xbox.dll+0x65ff(read of 0x10) reported in #1608 by CLHelper, kurrutako and Snooozs. Here it showed up as soon as the boot ran withLEONIDA_DEVICE_TYPE=6. #1862 fixes the two programs that llvm-mc 23 leaves out; it doesn't help older llvm-mc builds. The Linux packages andscripts/build_llvm_mc.ps1's default are 21.1.8.#1712's
autobackend decodes those five with the pure-Python decoder and no invalid words. This change:tools/fspx_unpack.py: a--backend {llvm-mc,python,auto}option for--disasm, passed toshader_disasm.disasm. The default staysllvm-mc, so direct uses and the existing tests are unchanged.make_game.py: the FSPX stage runsfspx_unpack.py ... --disasm --backend auto, as #1712 does for the pipeline library.fspx_unpack.pyis already inFSPX_TOOLS, so a cached FSPX set is rebuilt once.Tested
rdna2spirv.py --no-asm --wave64-emulate.0 invalid words.LEONIDA_DEVICE_TYPE=6):amd_fidelityfx_upscaler_xbox.dll+0x65ffright at the world start.no translated compute shader for FSPXlines, to a later and unrelated stop.python -I tests/test_fspx_unpack.py(35, including the newtest_auto_backend_replaces_a_listing_with_invalid_words, which fails without the change),test_fspx_shaders_stage.py,test_fspx_unpack_out.py,test_shader_disasm.pyandtest_shader_library.pypass.test_fspx_shaders_stage.pychanges in two places:--backend autoon the unpack command line.llvm-mcalone. Withauto, the Python decoder would read its program and the stage would not fail, which is the point of the change but not what that test checks.No game files in the change or the tests.
AI-assisted (Claude Code).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.