Commit Graph

11 Commits

Author SHA1 Message Date
9a967e1901 rdna2spirv, fssm_header: read authoritative wave size from FSSM 0xD4 bit 5 2026-11-22 06:54:06 -08:00
5be53a713c shader: SHADER-181 translator half; FSSM flags bits are the read method (reconcile with #1256)
Per the split in #1218, #1256 owns the PS interpolation-mode decoder and
census; this keeps the translator side of what #1246 put on main.

- fssm_header: read_methods()/READ_MOV/READ_INTERP/read_name() replace
  interpolation_modes()/MODE_*/mode_name(); the bits say how the code reads
  each input (0x01 v_interp_mov, 0x02 v_interp_p1/p2), as #1256 names them.
- rdna2spirv: check_read_methods() (same rule, refuses 0 of 12,101 PS);
  index.json records ps_flat_interpolants.
- Remove tools/ps_interp_census.py and its test (#1256's ps_interp_modes.py
  covers it).
- docs/design.md: the row becomes the translator-side "PS v_interp read
  methods" row; the "PS interpolation modes" row is #1256's.

Depends on: #1256

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:53:08 +00:00
f93fdc7314 Merge pull request #1246 from kotorvr
# Conflicts:
#	docs/design.md
2026-11-22 04:07:52 -05:00
c3123e33b4 shader: decode PS interpolation modes; refuse modes the translator doesn't model (SHADER-181)
The FSSM pixel-input record's flags bits 0-1 hold the interpolation mode
(1 flat, 2 linear = perspective-center). Over the 12,101 PS of the 1.0.2.1
corpus they are 1 or 2 only, agree with the v_interp form the code uses in
every shader, and match PSV0's per-input InterpolationMode (linear or
constant; no centroid, sample or noperspective input). The FSSM holds no
SPI_PS_INPUT_ENA/ADDR word.

- fssm_header: interpolation_modes(), mode names, tally of PS modes.
- rdna2spirv: check_interpolation_modes() refuses a read position whose
  mode disagrees or is 0/3 (rejects 0 of 12,101 PS; shard 0/12 output is
  byte-identical to main).
- ps_interp_census.py: PSV0 + FSSM + disassembly census (stdlib).
- docs/design.md: contract row with method and counts.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:00:29 +00:00
c9ae925658 fssm_header.py: filter regular files, catch read OSErrors and clean up --limit parsing 2026-11-22 07:23:25 +01:00
193b2e5107 BUILD: keep fssm_header table-only entry counts in the PS scope 2026-11-21 21:16:26 -06:00
a67d215b2c fssm_header.py: a missing path is one line, and --limit can't be negative
files_of() treated anything that is not a file as a folder, so a
missing path ended in a FileNotFoundError traceback. --limit was a
plain int used as paths[:limit], so --limit -1 silently dropped the
last blob and --limit -5 the last five, reported as a normal tally.
The path is now checked first (exit 2, one line), and --limit must be
0 or more (an argparse error otherwise).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 01:55:59 +01:00
69e754c7d6 fssm_header: fall back when the nearest stage index is empty 2026-11-22 00:48:17 +01:00
4c7652f17c fssm_header.py: search both locations for shader stages 2026-11-22 00:20:29 +01:00
2fecf12124 fssm_header: parse the post-code binding table
Decode the filler, header, 20-byte records and name record after
code_end, and add a --bindings summary. Measured over 26,503 blobs:
5,640,704 records, all parse.
2026-11-21 21:59:15 +00:00
bbd15cf20d Tools: clean-room FSSM pixel input table decoder 2026-11-21 18:38:26 +00:00