Skip to content

SHADER-181: update pixel input counts after packed-mask correction - #2778

Open
kacper-serewis wants to merge 2 commits into
ItsNotRexed:mainfrom
kacper-serewis:docs/ps-interpolation-2735
Open

kacper-serewis wants to merge 2 commits into
ItsNotRexed:mainfrom
kacper-serewis:docs/ps-interpolation-2735

Conversation

@kacper-serewis

@kacper-serewis kacper-serewis commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

SHADER-181 / PROC-130. Continuation claim. Original claim.

Depends on: #2440 (merged as da958c82).

The saved census with the merged packed-mask reader confirms 77,245 read inputs among 101,024 declared inputs, including 4,529 Constant generic inputs and 345 front-face inputs. Across 12,101 pixel shaders, 10,260 classify as perspective-centre and 1,841 use no pair. The census measures input classification. Hardware delivery of SV_Position remains unverified by this measurement.

The change removes the superseded census block and both references to the old four-shader linear-pair classification from the SHADER-181 row in docs/design.md.

AI-assisted. On Windows, 20 documentation tests, 4 design contract row tests and 30 pixel interpolation tests passed. The one-row diff against main passed git diff --check. Verification reused the saved aggregate without a new corpus scan or archive access. GPU and driver: none used.

@kapitche

Copy link
Copy Markdown
Contributor

Tested on Linux (WSL2 Ubuntu, Python 3.12) and native Windows 11 (Python 3.13.1), CPU only: pass. Docs-only (one row of docs/design.md), so there are no tests or negative control. Merges cleanly with main on both OSes; trial merge with #2780, which edits the same file, is clean. I could not check the new corpus counts without game data.

@ramenbellic

Copy link
Copy Markdown

Code read of 0efaab7: the two changed counts (76,215 → 77,245 and 3,652 → 4,529 read) follow from #2735's per-mask lookup. Other numbers in the same row also depend on rw, and the PR doesn't say they were rechecked:

  • pair_class (tools/ps_interp_modes.py:262-282) uses only read rows, so the "every shader except 4 … with the linear pair" count could move if a packed input is now read.
  • live_non_persp_center_inputs and shaders_with_non_persp_center (tally, 330-363) also use rw.

Could you confirm from the same #2735 run that those are unchanged, or update them too? (The 1,030 extra read rows split 877 Constant / 153 Linear.) Merge after #2735, as the PR says. I didn't rerun the corpus.

AI-assisted code read (Claude Code).

@kacper-serewis kacper-serewis left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and corrected in 9185e6b. I ran both readers on all 12,101 indexed pixel shaders with a matching FSSM and disassembly for every shader. Parent 4947579 classified 10,249 as perspective-centre, seven as flat-only, four as linear-centre, and 1,841 as none. Head ef8e4a9 classified 10,260 as perspective-centre and 1,841 as none. Both counted 9,453 live non-perspective-centre inputs in 9,453 shaders. The old four-shader exception no longer follows from this census, so I removed it in both places. Windows CPU, AI-assisted. All 26 interpolation-mode tests passed.

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.

3 participants