feat(tools): read raw-deflate shader entries in RPF9 archives #28
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!28
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/28/head"
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?
@Dark3581 on GitHub · 2026-11-22 02:05 UTC · original
Dark3581:feat/shader-scan-rpf9→main· +139 −7 · 3 files · 1 commits · merged 2026-11-22 02:08 UTCWhat
tools/shader_scan.pyfound no shaders in titles that keep them in RPF9 archives, because each entry is stored as raw deflate and the archive's table of contents is not readable. It now:9FPR) without the table of contents:<name> 00 <u8> <u32 stored> <u32> <u32 stored> <u32 size>, thenstoredbytes that must inflate to exactlysizebytes of a valid DXBC container (same header and part-table checks as before);DXILpart by the bitcode slot of its program header (DxilProgramHeader/DxilBitcodeHeader):bitcode,native(NOBCplus anXBCHblock, so the GPU program is precompiled for the console),stuborunknown;programsandstoredcounts to the summary; the JSON still holds names, offsets and part tags only.This is the data the D3D12.X design (#4) needs: whether a title's shaders can go to a desktop driver as DXIL or need a native-code translator.
Tested
python -m unittest discover -s tools/tests: 48/48, including 3 new tests (program classification, RPF9 entries with a size mismatch rejected, entries read only in RPF9 archives) on synthetic data.check_conventions.py,debt_fold.py --check,progress.py --jsonpass.native, matching the count from an independent carve. No game data is in the PR.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.mdDxilContainer.h; RPF9 entry layout measured on a package (also documented by Leonida, GPL-3.0; no code taken)