Skip to content

docs/design: remove merge leftovers in 7 more contract rows - #3637

Open
ray3242 wants to merge 5 commits into
ItsNotRexed:mainfrom
ray3242:devin/1795381635-design-leftovers-2
Open

ray3242 wants to merge 5 commits into
ItsNotRexed:mainfrom
ray3242:devin/1795381635-design-leftovers-2

Conversation

@ray3242

@ray3242 ray3242 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: #3574 (comment)

What and why

Seven more contract rows on main (f847748c, rebased onto 4c52ce27) still have an older copy of a rule sitting next to the newer one that replaced it, or a sentence spliced into the middle of another. This removes the older copies and repairs the broken joins, using wording that is already in each row:

  • Packed 16-bit integer ops: drops the old "a constant's high half is not measured … raises Unsupported" paragraph (the row now says constants are full dwords, measured) and the shorter repeat of the gfx1035 verification sentence.

  • v_pack_b32_f16 source modifiers: removes the stitched "abs rests on the ISA's definition … no hardware run with abs exists yet" passage (the row goes on to give the 1,088-kernel abs measurement), repairs the three broken joins it left (| x src |, ` (neg+abs) are measured**), and keeps one copy each of the gfx1036 1,088-kernel measurement, the gfx1035 attribution and the IEEE-mode-1 / checked-by sentences.

  • Image atomics, size and LOD queries: removes the spliced older image_get_resinfo sentence (depth 1), the "translator still differs in the first three" sentence (contradicted by the sentence before it and by Gen.resinfo_words), and the matching "resinfo's depth word" item under Unverified.

  • f16 rounding (SHADER-55, SHADER-56): keeps the first v_fma_mix* sentence and drops four later variants, two of which still say "two roundings, unmeasured" / "not fixed yet".

  • 16-bit interpolation without PerVertexKHR: drops the older 29 − 2N / 30 − 2N and (29 − P) / 2 sentences (superseded by 28 − 2N / 29 − 2N, SHADER-291), and takes an Unverified note out of the middle of the 2·|F| <= 29 − max condition, and drops the standalone repeats of the "fewer than 124 vertex output components" and "fewer than 31 output locations" notes (each stays once in the row's other Unverified lists).

  • Known approximations: collapses the three-times-repeated "the ALU ones follow a MODE toward-zero write (below; …" opening and drops the stale "nearest mode still rounds twice / until fix(translator): round v_fma_mixlo/hi_f16 once to f16 (finding 7079901079) #1774 lands" and "v_cos/exp/log_f16 are unmeasured" clauses, which the same row contradicts (Gen.fma_mix_odd in both modes, SHADER-296 landed, the 65,536-input sweep of all seven), and merges the two sentences listing the seven f16 transcendentals into one that keeps the RX 6700 XT, RX 6800 and gfx1036 evidence.

  • Buffer bounds checking: drops the old "SWIZZLE_ENABLE … are not modelled … Unsupported" sentence and a short repeat; the kept sentence has the same bit positions and Mesa line references and says they are modelled.

  • 16-bit interpolation (follow-up): the sentence saying a PS whose decoded-half location is also an attribute it reads "is rejected (Unsupported)" contradicts the same row's dynamic packing (SHADER-378): assign_f16_half_locations repacks around the collision and raises only when locations run out (test_location_clash_packs_dynamically). Reworded to say that. The same row's dynamic-packing paragraph also said it refused only "> 30 location budget overflows". It now gives the real condition: Unsupported only when 0..29 has fewer than 2·|F| free locations.

  • Known approximations (after main moved to 4c52ce27): dac28e6's merge of 82cb279 kept the old "v_add_f64 steps back one ulp when the TwoSum error shows …" wording and scattered the new FastTwoSum text through the row (( | a x*y | >= < 2^-64 in the fma_mix_odd sentence, and a | b | , FastTwoSum … @Jolymmiles` fragment plus repeats of eleven earlier sentences after the row's end). This restores 82cb279's sentence in place, with escaped pipes, and drops the fragments.

  • f16 rounding: keeps main's new Gen.f16_in denormal-widening paragraph.

Open PRs that touch these rows (#3548, #3220, #3074, #3349, #2086, #1922, #3424) leave these passages in place, and this does not overlap #3145 or #2973. The only number that goes is the +0.0 in the deleted packed-int paragraph's cross-reference; the 29 − 2N style formulas are deleted as superseded. The packed-int row's Not GPU-verified marker is already gone on main, and the existing | x*y | escaping is left for #3424.

Tested

Docs only, no GPU needed. python -I tests/test_docs_design_rows.py passes; a script confirms each changed row has no repeated 14-word run, keeps every other numeric value, and the table cell count is unchanged (row 249 loses the two stray pipes of the stitch). AI-assisted.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No new rule.)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…lation and approximations rows

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@kotorvr

kotorvr commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Read 51cc9e6 on Windows 11 (Python 3.13.7): pass for six rows; one leftover remains in the seventh

How I checked: old and new text of the seven rows compared sentence by sentence and token by token (every number, hex word, backticked name, #N and item ID), looking for anything that is in the old row and nowhere in the new one.

  • Packed 16-bit integer ops: the removed "a constant's high half is not measured … raises Unsupported" paragraph is superseded by text the row keeps ("A constant operand is treated as a 32-bit dword …", "Until 2026-11-22 reading the high half of a constant raised Unsupported"). One leftover is still there: the row now ends "… all eleven ops (wrap, clamp saturation on add/sub/mad, and constant op_sel/op_sel_hi) match bit-for-bit. Not GPU-verified. |". On main that mark sat between the two copies of the hardware sentence; with the second copy gone it directly follows the gfx1035/gfx1036 hardware verification it contradicts. Expected: drop the trailing "Not GPU-verified." too.
  • v_pack_b32_f16 source modifiers: nothing measured is lost: the 192-kernel neg run, the 1,088-kernel gfx1036 run, the gfx1035 int_hw_probe.py run, the 0x7c01/0xfc01/0xfe01/0x7e01/0xfe05/0x7e05 words, the IEEE-mode-1 sentence with SHADER-190 and the "Checked by" list are each present once.
  • Image atomics, size and LOD queries: the kept text (depth word 0 for a 2D image, a 2D array's layers minified, zeros past the last level, "The translator follows all three") matches Gen.resinfo_words (tools/rdna2spirv.py:9835-9842); the removed "depth (1)" and "still differs in the first three" sentences contradicted it.
  • f16 rounding and Known approximations: one v_fma_mix* statement each remains, with the 7-of-7 gfx1036 measurement, SHADER-135, finding 7079901079, the RX 6800 0x3fff/0x4000 words, SHADER-296 / fix(translator): round v_fma_mixlo/hi_f16 once to f16 (finding 7079901079) #1774 and Gen.fma_mix_odd; the transcendentals keep the RX 6700 XT run, the RX 6800 run and the 65,536-input mode_round_probe.py sweep (SHADER-132). The removed "v_cos_f16, v_exp_f16 and v_log_f16 are unmeasured" contradicted the kept "all seven".
  • 16-bit interpolation without PerVertexKHR: both "Unverified" items (fewer than 31 output locations; fewer than 124 vertex output components) are still in the row once each; the SHADER-378 sentence is whole again.
  • Buffer bounds checking: the kept "are modelled; see the Swizzled buffer addressing row" matches the code (tools/rdna2spirv.py:2613-2644 handles SWIZZLE_ENABLE and ADD_TID_ENABLE) and that row exists (docs/design.md:386).
  • python -I tests/test_docs_design_rows.py, tests/test_docs_links.py, tests/test_docs_list_items.py, tests/test_docs_repo_paths.py at the head: OK. git merge-tree with open docs/design.md: drop merge leftovers in two contract rows #3145 (same author, three other rows): clean.

Not verified: the hardware measurements the rows quote. AI-assisted check (Claude Code).

…are repacked, not rejected

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ray3242

ray3242 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the check. I left the trailing Not GPU-verified. in the packed 16-bit integer ops row on purpose: removing that marker is part of open #1922, which strips the stale not-verified markers. Taking it out here as well would duplicate #1922 and make the two PRs conflict. Once #1922 merges, the marker is gone.

@pedro470

Copy link
Copy Markdown

Reviewed 2a7c72ff on Windows 11 with Codex assistance. All 11 documentation checks and 15 f16 interpolation tests passed. The edits preserve the measurement details across the seven rows. I also reproduced a one-row merge conflict with #1922 in “Packed 16-bit integer ops.” Whoever rebases second can keep this cleanup and drop the stale verification marker from that row.

@ray3242

ray3242 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Agreed on the #1922 overlap: it is that one row-247 line. If #1922 merges first, I'll rebase this PR on top of it, keeping its marker removal along with this cleanup. If this one merges first, #1922 only needs to keep dropping the trailing **Not GPU-verified.** when it resolves the conflict.

…gn-stale-leftovers

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	docs/design.md
@thirteenhustler

Copy link
Copy Markdown

Read 11a9a77: the seven rows are cleaned up. The copies this removes are the ones that contradicted the sentence left in place.

Checked each row against main aa2988cc. The hardware sentences, hex words and item ids the description says are kept are still there. The duplicated copy is gone:

  • Image atomics, docs/design.md:357. "depth (1)" and "still differs in the first three" are gone. The kept rule (a 2D image's depth word is 0, a 2D array's layers are max(1, layers >> (BASE_LEVEL + level)), zeros past the last level) is Gen.resinfo_words at tools/rdna2spirv.py:10693-10720.
  • Buffer bounds, :413. SWIZZLE_ENABLE and ADD_TID_ENABLE are modelled at tools/rdna2spirv.py:2746-2775, which is what the row now says.
  • 16-bit interpolation, :399. The "decoded-half location is also an attribute it reads is rejected (Unsupported)" sentence is gone. assign_f16_half_locations (tools/rdna2spirv.py:113-134) keeps the canonical slots when they fit and otherwise packs into free locations in 0..29, raising only when fewer than 2 * N are free. tests/semantic/test_f16_interp_fallback.py:test_location_clash_packs_dynamically is that clash. One leftover phrase, already on main: "refusing only genuine > 30 location budget overflows". F16_HALF_TOP is 29 (:96), and raw attributes consume slots before the count reaches 30.
  • f16 rounding and Known approximations. One v_fma_mix* statement remains, with Gen.fma_mix_odd, the 7-of-7 gfx1036 run and the 65,536-input sweep. The "unmeasured" and "rounds twice until fix(translator): round v_fma_mixlo/hi_f16 once to f16 (finding 7079901079) #1774" copies are gone. The FastTwoSum words 0x7fdd9bb47daa1333 and 0xffefffffffffffff are in the row once.
  • Packed 16-bit integer ops, :263. The row ends on the hardware sentence. The trailing **Not GPU-verified.** that was still on 2a7c72ff is not on this head.
  • v_pack_b32_f16 source modifiers, :265. The 192-kernel neg run, the 1,088-kernel gfx1036 run, the gfx1035 int_hw_probe.py run, and 0x7c01 / 0xfc01 / 0xfe01 / 0x7e01 / 0xfe05 / 0x7e05 are each there once. The broken joins (| x src |, a stray **) are gone.

test_docs_design_rows.py, test_docs_links.py, test_docs_list_items.py, test_docs_repo_paths.py: OK. git diff --check clean. Merge onto aa2988cc is clean; that commit does not touch docs/design.md. The hardware runs quoted in the rows were not repeated.

…f_locations raises it

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ray3242

ray3242 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @thirteenhustler. The > 30 phrase you pointed out is fixed in a3d7b78. The 16-bit interpolation row now says what assign_f16_half_locations does: it raises Unsupported only when 0..29 has fewer than 2·|F| free locations left. The four docs tests and git diff --check pass, and the PR still merges cleanly with #2973 and #3145 onto aa2988cc.

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

Code review of a3d7b78: no issues found. The duplicated fragments are removed without leaving encoding corruption or table damage.

AI-assisted (OpenCode).

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.

5 participants