Commit Graph

4 Commits

Author SHA1 Message Date
7e188ec40c tools/pal_stages.py: guard path type, fold stem lookup safely, and clarify index message 2026-11-26 20:33:24 +08:00
abe47df11e tools: handle corrupt XBCH zlib, case-insensitive extensions and index errors in pal_stages.py 2026-11-25 20:21:02 +08:00
f5ff1546e5 pal_stages: --limit 0 scans nothing and reports a clean run (EGEN-PAL-STAGES-LIMIT-ZERO) (#6933)
Squash-merged after diff review of PR #6933 - pal_stages: --limit 0 scans nothing and reports a clean run (EGEN-PAL-STAGES-LIMIT-ZERO)
2026-11-23 09:43:39 -06:00
755b1f6d14 pal_stages: read the FSSM stage-descriptor table
The FSSM header holds 0x88-byte hardware-stage records from 0x100; a record starts with
u64 0x000000C0_0002_AAHH (HH = PAL hardware stage, AA = API stage). tools/pal_stages.py
decodes them from a bare FSSM or from every tag-0x0D payload of a container, and reports
the sentinel words. tools/fssm_unpack.unpack_all() exposes the payloads the tool needs.

Measured on the 26,503-blob corpus: 26,308 blobs have one record and 195 (all GS) have
two, the second at 0x188 being the VS copy. The API id equals the carve-index stage in
26,698/26,698 blobs (0 VS, 1 PS, 2 GS, 3 CS, 6 MS). Hardware id 7 appears for all 9,282
mesh shaders and nowhere else; 2 appears only in the first payload of the 195 two-payload
VS containers. 860 blobs (1,055 records) fill unused fields with paired
0xDEADBEEFDEADBEEF qwords, never a lone 32-bit word; the other 25,643 records use zeros.

Tests: tests/test_pal_stages.py (synthetic FSSM and container), plus the fssm_unpack,
fssm_crosscheck, fssm_header, fssm_wave_size, make_game and shader-stage suites.
2026-11-23 03:55:38 +03:00