Skip to content

docs/shader_validation: one copy of the SHADER-302 packed-16-bit section (EGEN-SHIVAL-S302-DUP) - #6969

Closed
Vonsek wants to merge 2 commits into
ProjectLeonida:mainfrom
Vonsek:deepseek/7-shival-s302-dup
Closed

Vonsek wants to merge 2 commits into
ProjectLeonida:mainfrom
Vonsek:deepseek/7-shival-s302-dup

Conversation

@Vonsek

@Vonsek Vonsek commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

docs/shader_validation.md shows the SHADER-302 packed-16-bit measurement (heading, measurement note, the 380-kernel sentence and its three op_sel / clamp / parity bullets) three times, and one of the copies is spliced into the middle of the ps_oracle page.

What changed, in two commits:

  1. Drop the two later, byte-identical copies of the whole section (they sat between the ps_oracle export-format paragraph and its heading, and between the helper-lane section and "Real pixel shaders"). The first copy at line 1885 stays.
  2. Drop the third leftover: a bare ### Packed 16-bit integer operations on RDNA2 (SHADER-302) heading between the RADV paragraph and the "Mesa optimises varyings" note, plus the same three bullets after the RADV "Checked on the Ryzen 7 9800X3D iGPU" text. One blank line is restored between the two ps_oracle paragraphs the splice split, so they stay two paragraphs.

Nothing unique is lost: every deleted line was compared byte for byte with the copy that stays.

Test, no GPU needed. A check that asserts the copies are identical and then deletes them:

before: headings [1885, 1948, 2009, 2061]   bullets [1891, 1954, 2024, 2067]
after:  headings [1885]                     bullets [1891]
python -I tests/test_docs_repeated_lines.py  exit=0  Ran 2 tests  OK
python -I tests/test_docs_list_items.py      exit=0  Ran 3 tests  OK
python -I tests/test_docs_links.py           exit=0  Ran 7 tests  OK
python -I tests/test_docs_table_rows.py      exit=0  Ran 2 tests  OK
python -I tests/test_docs_repo_paths.py      exit=0  Ran 3 tests  OK
git diff --check                             clean

The existing docs tests all pass before and after: tests/test_docs_repeated_lines.py only looks 3 lines ahead, so it cannot see copies hundreds of lines apart. That is why the duplicates survived; this is a docs fix, so it adds no new test.

Notes: The ps_oracle section itself is also duplicated (its intro, --show-template block and "Checked on" paragraph appear twice, at 1894-1947 and 1957-1993). I left it alone because it is a separate merge leftover of a different section, and reported it as a finding instead of growing this PR.

No GPU. NVIDIA RTX 5080 / AMD RDNA2 iGPU not used.

AI-assisted.

… section

The section (heading, measurement note, corpus sentence, op_sel/clamp/parity bullets) was copied whole into two later places in the ps_oracle page, so a reader met the same 380-kernel result three times. Keep the first copy at 1885 and drop the two later ones, byte-identical, plus the blank lines they left before the next heading.
…ts from the ps_oracle section

A merge left the SHADER-302 heading between the RADV paragraph and the Mesa varying note, and its three bullets after the RADV checked-on text, so the op_sel/clamp/parity claims about 380 packed-16-bit kernels sat in the middle of the ps_oracle page. Remove the splice and keep one blank line between the two ps_oracle paragraphs it split.
@neoisg8

neoisg8 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested on Windows 11 (AMD Ryzen CPU), AI-assisted review.

Verification of PR #6969:

  • Deduplication: Audited docs/shader_validation.md: confirmed the Packed 16-bit integer operations on RDNA2 (SHADER-302) heading and its 3 bullets now appear exactly once (at line 1885) instead of 4 times across the file. The spliced fragments inside tools/ps_oracle.py (Windows and RADV descriptions) and before the helper probe section are cleanly excised without affecting adjacent prose.
  • Validation Suite:
    • python -I tests/test_docs_repeated_lines.py: 2/2 passed.
    • python -I tests/test_docs_list_items.py: 3/3 passed.
    • python -I tests/test_docs_links.py: 7/7 passed.
    • python -I tests/test_docs_table_rows.py: 2/2 passed.
    • python -I tests/test_docs_repo_paths.py: 3/3 passed.
    • git diff --check origin/main: clean.

Clean docs cleanup, no merge conflicts or regressions.

@kapitche

Copy link
Copy Markdown
Collaborator

Tested dc56225 merged with main 8575d36 on Linux/Python 3.12.16: pass

Merge was clean (24 deleted lines in docs/shader_validation.md). There is no code or test, so no negative control applies. What I checked, by comparing the file on upstream/main with the merged one:

  • On main the "Packed 16-bit integer operations on RDNA2 (SHADER-302)" heading appears four times (lines 1949, 2012, 2073, 2125). The merged file keeps the first (line 1949 onward: heading, the measurement line, the 380-kernel paragraph and the three bullets) and drops the other three.
  • The three bullets (op_sel constants, clamp saturation, 380/380 parity) are byte-identical in all four places on main, and the 2012 and 2125 copies are identical to the first one in heading, measurement line and paragraph, so nothing is lost.
  • The copy at 2073 had split the PS-oracle section: its heading sat in the middle of the Mesa-varyings paragraph and its three bullets after "nothing is cached"; both are gone, so that section now reads as one text.
  • No markdown link in the tree points at the heading's anchor (grep for packed-16-bit-integer-operations-on-rdna2 finds nothing), so removing the -1/-2/-3 duplicate anchors breaks no link.

@skorex

skorex commented Nov 23, 2026

Copy link
Copy Markdown

Duplicate of #4923

#4923 makes the same change and was opened earlier. Topic: docs/shader_validation: one SHADER-302 section.

Suggest closing this PR in favour of #4923, and porting anything this one adds that #4923 lacks there.

@KoertLichtendonk

Copy link
Copy Markdown
Contributor

Coordinator note: SHADER-302 already has an open PR, #6160 by @shoal-rat (opened 13:18 UTC), so this looks like a duplicate. Please compare the two and either close this one or say here what it adds. The maintainer decides which one is merged.

Raxstreams pushed a commit to Raxstreams/Leonida that referenced this pull request Nov 23, 2026
…wn file

test_docs_repeated_lines.py compares lines within three of each other, so a
section a merge kept twice, dozens of lines apart, gets through: main has 30
such paragraphs in six docs (design.md's two "PAL stage descriptors"
sections, models.md's two effect-record sections, ...).

test_docs_repeated_paragraphs.py splits each tracked Markdown file into
paragraphs (outside code fences, whitespace folded, table rows and headings
left out) and flags one of 80 or more characters that occurs twice. The 30
repeats already on main are listed in KNOWN with the open pull requests that
remove them (ItsNotRexed#5755, ItsNotRexed#6552, ItsNotRexed#5350, ItsNotRexed#5169, ItsNotRexed#5598, ItsNotRexed#4855, ItsNotRexed#6969, ItsNotRexed#5358, ItsNotRexed#5345),
so only a new one fails; an entry whose repeat is gone is not an error, and
those pull requests can merge in any order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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