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.

Preserve the adjacent p10/p20 contract and remove superseded read counts and the unsupported four-shader position inference. The CPU recount of all 12,101 cached pixel shaders reproduces the saved aggregate.

@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.

AI-assisted integration at 4365872, including merged prerequisite #2440. A private Windows CPU recount covered all 12,101 cached pixel shaders and matched the saved aggregate in every field. 77,245 of 101,024 declared inputs were read. All 64 targeted tests passed. No GPU was used.

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ran this at 436587289 on Windows 11: test_docs_design_rows.py 2 OK; git diff --check clean.

The SHADER-181 row's self-contradiction is resolved: "every interpolated generic pixel input" is now qualified, the duplicated mid-row census sentence and the "101,024 declared / 76,215 read" fragment are gone, "at most one barycentric pair" replaces the absolute "one", the SV_Position-delivery sentence no longer claims a measurement the census does not make, and the residual list drops the "4 linear-pair position shaders" (which contradicted SV_Position being outside the census). metadata-only change; no product code. No blocking issue.

@vibryxcx

Copy link
Copy Markdown

Tested 4365872 on AMD Radeon RX 6800 (RDNA2, discrete, gfx1030), AMD 26.8.1 (Windows 32.0.21045.5002), Windows 11 Pro 25H2 (build 26200), MSVC 14.44, RelWithDebInfo: pass.

  • Docs only (the SHADER-181 row of docs/design.md); ctest and run_gpu_tests.py (201/217, 16 skipped) identical to main here, and the docs tests pass.
  • Context: the large file list is the rebase; the content change is the one row, which matches @Kam471's and @kapitche's reading above. I didn't recount the pixel-input census (it needs the corpus).

No game files. AI-assisted (Claude Code).

@YordiLorenzo

Copy link
Copy Markdown

Tested ffa9144 on Linux, Python 3.12.16: pass

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.

6 participants