mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #583] [CLOSED] fspx_unpack: test and document the 24-byte prologue (FSPX-SHORT-PROLOGUE) #626
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#626
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/583
Author: @Tyrannys
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:fix/fspx-short-prologue📝 Commits (1)
3af97a1fspx_unpack: test and document the 24-byte prologue main already takes (FSPX-SHORT-PROLOGUE)📊 Changes
2 files changed (+22 additions, -0 deletions)
View changed files
📝
docs/fspx.md(+8 -0)📝
tests/test_fspx_unpack.py(+14 -0)📄 Description
Claimed in the coordination issue as: FSPX-SHORT-PROLOGUE (claimed in #14)
Item: FSPX-SHORT-PROLOGUE (claimed in #14).
tools/fspx_unpack.pycode_rangeonly knew the 36-byte prologue (VOP3 opcode 0x180, bits 31..16 =0xD580, at words 0, 3 and 6). Some programs of the pipeline library inshaders.rpfcarry only words 0 and 3: a 24-byte prologue, with the code starting at word 6 (s_inst_prefetchin all of them). Read from word 0 they never decode.Counted over the whole 1.0.2.1 library (2,684 programs): 50 have the 24-byte form; before this change 1 of the 50 translated. With it, all 50 disassemble with 0 invalid words, and 49 translate and pass
spirv-val(the last stops ats_sethalt). A program whose words 0, 3 and 6 are all prologue words still takes the 36-byte form.shader_library.pywrites"prologue": start > 0for both forms. The runtime needs no change: the game passes these programs as FSPX payloads, which it reads by directory.Found while booting the retail executable: four of the slot-67 compute pipelines the title creates were these programs.
Changes:
tools/fspx_unpack.py:SHORT_PROLOGUE_WORDS/SHORT_PROLOGUE_SIZE,code_rangefalls back to them.tools/shader_library.py: theprologueflag covers both sizes.tests/test_fspx_unpack.py:test_short_prologue(synthetic words, no game data).docs/fspx.md: the 24-byte variant and the counts.Tested (Windows 11, Python 3.12):
python -I tests/test_fspx_unpack.py,tests/test_shader_library.py,tests/test_fspx_unpack_out.py,tests/test_fspx_shaders_stage.py,tests/test_text_write_line_endings.py, all OK. The corpus counts come from a local work folder on an RTX 4070 SUPER box; no GPU test involved.AI-assisted (Claude Code).
GPUs tested: n/a (CPU-only Python tests)
AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.