Skip to content

fspx_unpack: retry incomplete disassembly with the RDNA2 decoder - #7922

Closed
P2GR wants to merge 1 commit into
ProjectLeonida:mainfrom
P2GR:fspx-python-fallback
Closed

P2GR wants to merge 1 commit into
ProjectLeonida:mainfrom
P2GR:fspx-python-fallback

Conversation

@P2GR

@P2GR P2GR commented Nov 23, 2026

Copy link
Copy Markdown

What and why

LLVM 23.1.3 reports invalid instructions for eight of the FidelityFX FSPX compute programs. The built-in RDNA2 decoder covers those programs. The unpacker retries only after LLVM reports invalid instructions and accepts the alternate listing only after a complete decode. The FSPX cache stamp includes the decoder and instruction tables.

This changes the automatic FSPX stage. Related work includes the optional decoder backend in #2323 and the narrower scalar-tuple repair in #7104.

Tested

  • Windows 11 x64, LLVM 23.1.3. The standard FSPX build from this commit translated all 29 modules and all 29 passed spirv-val. The earlier build produced 21.
  • 34 unpacker tests passed. Windows skipped the directory symlink case because this account lacks the symlink privilege. All 22 FSPX build-stage tests passed.
  • Synthetic tests cover a complete fallback decode, an incomplete fallback, and a clean LLVM decode.

The diff contains source, documentation, and synthetic fixtures. AI-assisted with Codex.

Coordination claim

@Kev-Ball

Copy link
Copy Markdown

Confirmed the upgrade from an existing FSPX build on CachyOS, CPython 3.14.10 and LLVM 23.1.5, using a manifest-matched 1.0.2.1 DLL. I ran make_game.fspx_shaders on the parent, then pointed the PR at that same work directory with the same DLL and llvm-mc.

Parent dde82f27e PR f724b890d
Programs unpacked 29 29
Listings with invalid words 8 0
Modules translated and passing spirv-val --target-env vulkan1.2 21 29

All 21 pre-existing modules stayed byte-identical. The disassembly comparison also gave 21 byte-identical listings and eight replacements. Repeating the stage at the PR head reused the cache: all 29 module contents and modification times stayed unchanged. This covers upgrading the earlier partial cache as well as reusing the completed one.

AI-assisted QA. Counts only, CPU-side translation and validation.

@TieruYT

TieruYT commented Nov 23, 2026

Copy link
Copy Markdown

Windows, Python 3.13.7, synthetic inputs. Tested f724b89 and compared with dde82f2.

I ran both disassembly fallback cases with a stand-in external disassembler emitting an invalid-encoding warning. For a decodable fixture the selected listing included v_mov_b32 and zero invalid words. For the fixture containing 0xffffffff, the listing retained the warning and one invalid word. Both CLI runs returned 0. This tests listing selection with synthetic instructions.

AI-assisted verification · GPT-6.2 Astra Medium

@miguelsilva5989

Copy link
Copy Markdown

Tested f724b89 on CachyOS with LLVM 23.1.5 and the manifest-matched FidelityFX DLL from a local 1.0.2.1 copy. With wave64 emulation enabled, Leonida main at 867d922 translated 21/29 modules. The PR translated and validated 29/29, with the original 21 modules byte-identical.

On Linux, vk_pipeline_check created all 29 compute pipelines with zero failures or skips on both an RTX 5080 (620.70.06) and Ryzen 9 9900X Raphael iGPU (RADV Mesa 26.2.6). The synthetic checks gave 34 unpacker passes with one skip and 22 stage-test passes. This verifies pipeline creation. No title execution or game data shared. AI-assisted verification.

@rideinstead

Copy link
Copy Markdown

✅ Automated security review: CLEAN (commit f724b890)

  • No findings.

Scope: static analysis of added diff lines only; no code was executed. Please review findings manually.

@lucastayaralvarenga-ui

Copy link
Copy Markdown
Contributor

For the PR cleanup in #8919, I proposed this current head as merge-ready under the cleanup criteria (clean integration, included test, independent check). This is a triage recommendation; CI and final merge approval remain with the maintainers.

Evidence: MERGEABLE at f724b89; clean merge-tree into main 6312c05; carries tests/test_fspx_unpack.py; independent current-head check by TieruYT: #7922 (comment)

Block 15j report: #8919 (comment)

AI-assisted (Codex); local triage used git merge-tree/diff checks, not a new test-suite run.
agent: yes

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