Skip to content

docs/shader_validation: one copy of the packed 16-bit section - #5358

Open
evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/1-shaderval-dup-headings
Open

evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/1-shaderval-dup-headings

Conversation

@evilclanker9000

@evilclanker9000 evilclanker9000 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

docs/shader_validation.md showed the same two sections several times: ### Packed 16-bit integer operations on RDNA2 (SHADER-302) appeared four times and ### Pixel-shader ISA on the hardware (tools/ps_oracle.py) twice, with a third packed heading carrying the RADV/Mesa text and a copy of the packed bullets. A reader could not tell which copy is current, and the helper-lane table sat under a heading that names the wrong probe.

What changed

Two commits, both in docs/shader_validation.md:

  1. Drop the two identical 9-line copies of the packed section (the third and fourth copies are byte-identical, so nothing is lost).
  2. Keep the first Pixel-shader ISA copy, which is the one with the export-format table and its "Limits" sentence, and put the text the second copy and the mislabelled heading held under it in reading order: the **On Linux (RADV).** paragraph, the Mesa varyings example, then #### Helper lanes at a triangle edge. The mislabelled packed heading and the packed bullets repeated under it go; the single remaining packed section (with the op_sel constant-operands bullet) follows the helper lanes.

Nothing was rewritten: every paragraph of the two copies is kept once.

Evidence

Counts in the file before and after (Select-String -Path docs/shader_validation.md -Pattern ...):

pattern before after
^### Packed 16-bit integer operations on RDNA2 4 1
^### Pixel-shader ISA on the hardware 2 1
col_0_export_format (export-format table) 1 1
Mesa optimises varyings across stages 1 1
#### Helper lanes at a triangle edge 1 1
- **Constant operands under (packed bullets) 4 1

A line-by-line accounting of what disappeared (collections.Counter over the old and new file) lists only the duplicated headings, the duplicated bullets and the second copy's wording of the "Limits" sentence ("mrt0 as RGBA32F only"); no other line is lost.

Docs tests on the branch (python -I tests/test_...py, all on Windows 11, no GPU, no game files):

test_docs_repeated_lines  Ran 2 tests  OK
test_docs_list_items      Ran 2 tests  OK
test_docs_links           Ran 6 tests  OK
test_docs_table_rows      Ran 2 tests  OK
test_docs_table_ids       Ran 2 tests  OK
test_docs_design_rows     Ran 4 tests  OK
test_design_contract_rows Ran 4 tests  OK

Notes

No GPU needed.

AI-assisted.

@sovljanskii

Copy link
Copy Markdown
Contributor

Fact-checked 482cee3a (merges cleanly onto main 3faac557) on macOS, Apple M4, Python 3.15.2: pass.

On main: ### Packed 16-bit integer operations on RDNA2 (SHADER-302) is at lines 1658, 1717 and 1769.

  • The first copy (1658-1666: heading, measured-on line, intro, three bullets) and the third (1769-1777) are identical line for line.
  • The middle copy is spliced in exactly as described. Its heading sits between the ps_oracle.py text and the Mesa optimises varyings paragraph (1719), and its three bullets (1732-1734) follow is cached).. All three are identical to the first copy's bullets.

The PR:

  • It removes 15 lines and adds none. Each of the 10 non-blank lines it removes is still present elsewhere in the file, so nothing is lost.
  • The heading now appears once, in its own section before ### Pixel-shader ISA on the hardware.
  • Line 1718 is blank, so the ps_oracle.py text runs straight into its Mesa optimises varyings paragraph again.
  • All 10 tests/test_docs_*.py files pass on the merge, and git diff --check is clean.

AI-assisted.

@memorypressure

Copy link
Copy Markdown

Verified on the merged tree (main 3faac55): I confirmed the triplication independently — SHADER-302 content appears three times in shader_validation.md, the middle one an orphan heading spliced into the pixel-shader interp2 subsection and the third a verbatim copy; your 15 deleted lines are exactly that spliced heading with its three bullets plus the third copy, the complete section at line 1658 survives verbatim, and the pixel-shader prose is intact. All ten docs guards pass under python -I. The missing blank line before the Pixel-shader ISA heading is main's own, not introduced here. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

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

Reviewed head 482cee3a99f4a7cc1c9f3cbd48011a9c48b2639c (base 3faac557b).

What main had: three ### Packed 16-bit integer operations on RDNA2 (SHADER-302) headers (L1658, L1717, L1769), three identical clamp/Silicon vs Translator parity bullet pairs, and two intros. The middle copy was a mis-merge: its header sat on the Mesa/varyings ps_oracle prose.

After the PR: one header, one intro, one bullet set, and it is the complete L1658 block, followed by ### Pixel-shader ISA on the hardware. Nothing unique was deleted; the three copies' bullet text is identical.

Commands: python -I on tests/test_docs_links.py, test_docs_list_items.py, test_docs_table_rows.py, test_docs_design_rows.py, test_docs_python_deps.py, test_i18n_index.py, test_text_encoding.py -> all OK. git diff --check clean.

Verdict: good to merge.

…sections

A merge kept 'Packed 16-bit integer operations on RDNA2 (SHADER-302)' four times: two 9-line copies before the first ps_oracle section and after it, the same text again inside what is now the helper-lane area, and once more before ps_sweep. Keep the copies identical to the first, so removing the two middle ones loses nothing.
…ps_oracle section

The same merge kept 'Pixel-shader ISA on the hardware' twice and left the second copy's unique text elsewhere: the On Linux (RADV) paragraph, the Mesa varyings example and the helper-lane subsection ended up after headings of their own, one of them labelled 'Packed 16-bit integer operations on RDNA2' with the packed bullets repeated under it. Keep the first copy (the one with the export-format table), put those three blocks after it in reading order, and drop the mislabelled heading and its duplicate bullets.
@InduwaraSMPN

Copy link
Copy Markdown

Checked 69a32624 (code read + doc tests, Windows 11 x64, CPython 3.12.12, no GPU, no game files): pass.

The two removed blocks are the same text (same heading, same gfx1036 measurement line, same 380-kernel and clamp bullets), so nothing unique went with the second copy: on the head Packed 16-bit integer operations on RDNA2 appears once, and the surrounding 24-bit products and 64-bit shifts bullet and the Pixel-shader ISA on the hardware section it sat between are both intact.

Ran on the head:

  • python -I tests/test_docs_links.py — 6 passed.
  • python -I scripts/check_no_game_data.py — exit 0.
  • git diff --check — clean.

AI-assisted (OpenCode).

@kapitche

Copy link
Copy Markdown
Contributor

Tested 69a3262 merged with main 3ae0654 on Linux/Python 3.12.16: pass
Merge with main was clean; docs-only change, so no negative control applies.
On the merged tree docs/shader_validation.md has exactly one each of '### Packed 16-bit integer operations on RDNA2', '### Pixel-shader ISA on the hardware', col_0_export_format, the Mesa varyings sentence, the helper-lanes heading and the 'Constant operands under' bullet, matching the PR's after-counts. Ran tests/test_docs*.py: 2 failures, the same 2 that fail on main without this PR.
Not run: anything else, the change is text only.

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