The copy of #583 in this branch replaced main's check that both short
prologue words are literal-bearing VOP3 opcode-0x180 words
(words[k+1] & 0xFFFE0100 == 0x03FE0100, the shape fspx_prologue_probe.py
checks) with a looser SRC2 == 0xff test. Keep main's check, as #583's head
(3af97a1ec, by Tyrannys) does, with this branch's named constants, and take
that head's test_short_prologue (the stricter check refuses 0x03FF0000)
and its docs/fspx.md paragraph.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The retail boot reached 50 pipeline-library compute programs that had no
translation. Dumped from the running game, they all translate and pass
spirv-val after these changes:
- fspx_unpack.code_range: some programs carry a 24-byte hash prologue
(two VOP3 words, then s_inst_prefetch) instead of 36 bytes; two or three
hash words now count (shader_library uses the same range).
- fspx_unpack --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.
- rdna2spirv: v_cmp_*_dpp into vcc (12 compares in reductions), taken when
every lane writes (full row/bank masks with bound_ctrl:1, or DPP8).
- rdna2spirv: s_bitreplicate_b64_b32 of a constant into vcc (6 programs),
as the exec form does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 of the 2,684 library programs in shaders.rpf (1.0.2.1) start with two VOP3
opcode-0x180 words (words 0 and 3) instead of three, and their code starts at
word 6. code_range only knew the 36-byte form, so it disassembled them from
word 0 and they never decoded: 1 of the 50 translated. With the 24-byte form
all 50 disassemble with 0 invalid words and 49 translate and pass spirv-val.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A program whose disassembly fails now leaves no .dxbc or fspx/ files
behind, so a failed run's output matches a run that never reached it.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
A game compute shader's COMPUTE_PGM_RSRC2 and group size come from its
FSSM header (0x138..0x144), and the re-anchoring of undecodable words
reads the FSSM blob. The FidelityFX DLL's programs have no FSSM:
fspx_unpack.py writes the program as fspx/<name>.code and the kind-0
fields as fspx/<name>.json. native_blob and cs_dispatch_state use those
when there is no fssm/<name>.fssm; with one, nothing changes. Tests cover
the FSPX case, the FSSM taking precedence, and neither being an error.
The DLL's status codes (short, magic, directory, missing kind 0/6), skipped
out-of-range entries, the kind-0 decode for wave32 and wave64, the prologue
and s_endpgm range, containers inside other bytes, and the CLI on a DLL-like
file, a bare payload and inputs without FSPX. No game data.