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>
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>
AI-assisted. Addresses IAmNotSiob's review on #512 (he is taking the
arithmetic sites under SHADER-56/#513; f16_roundtrip stays here).
SPIR-V's OpQuantizeToF16 returns +0/-0 when the magnitude is too small for a
normal f16, and it pins no rounding mode. The docstring, the design row and the
test's rule text now say "round to nearest, f16 denormals flushed to signed
zero" and warn against reusing the helper where denormals or a rounding mode
matter.
The mini-interpreter used struct.pack('<e'), which keeps f16 subnormals: it was
more precise than any conforming driver, so a test could pass here and fail on a
GPU. It now flushes after float_to_half, and the test's independent oracle does
the same. A new case pins 1e-6 -> +0.0 and -1e-6 -> -0.0 through a translated
flagged shader (PS input 1e-6 is an f16 subnormal, 6.1e-5 is the smallest
normal); without the interpreter flush that test is red.
Existing 1.1 -> 1.099609375 pin and the opcode pin are unchanged.
AI-assisted. Follow-up to merged #274, per Vonsek RTX 5080 review on it.
Pack/Unpack round-trip is folded to a no-op (expected 0x3f802000, observed 0x3f801800, not f16); emit one OpQuantizeToF16, teach mini-interp, pin value and opcode in tests.
AI-assisted (fixer lane, orchestrated). tools/fssm_header.py already decoded the pixel-input table; rdna2spirv.py ignored it.
- PS translate() reads the fssm/<name>.fssm sidecar (same convention as CS) and declares every table position 0..count-1 as a fragment input at that Location, including positions the code never reads.
- A 32-bit v_interp read (p1/p2/mov) of a 16-bit-flagged position (flag bit 4) is rounded f32->f16->f32; *_f16-opcode reads already narrow and are unchanged; reads past the table still declare; no sidecar (or empty table) is byte-identical to the old path.
- shader_meta() records ps_interpolants (count) and ps_fp16_interpolants (flagged positions).
- docs/design.md: contract-table row with corpus measurements and the fixture confirmation (synthetic + mini_interp, no GPU).
Verified: tests/test_rdna2spirv_pixelinput.py 9 passed (synthetic FSSM blobs + hand-written listings, empty DXBC; no llvm-mc/spirv-tools/GPU/game data); full suite 1066 passed + 366 subtests on the dev branch; compileall + make_game --help green. Claimed as SHADER-15 in #156 before starting.