Skip to content

docs/design.md: drop the stitched FClamp med3 fragment from the float min/max/med3 row - #2973

Open
ray3242 wants to merge 1 commit into
ItsNotRexed:mainfrom
ray3242:devin/1795373985-design-med3-stitch
Open

ray3242 wants to merge 1 commit into
ItsNotRexed:mainfrom
ray3242:devin/1795373985-design-med3-stitch

Conversation

@ray3242

@ray3242 ray3242 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: #2891 (comment), from the finding at #2891 (comment).

What and why

The "Float min/max/med3 with NaN, v_fract" row of docs/design.md has a leftover from a merge. After "…hardware-verified on RDNA2 (gfx1035, wave32 & wave64).", it repeats an older version of the text: "FMin/FMax, whose NaN result GLSL.std.450 leaves to the implementation). med3 is FClamp(z, NMin(x, y), NMax(x, y)), and when an operand can be a NaN, … selects NMin(NMin(x, y), z) instead." That contradicts the sentence just before it and Gen.med3_f in tools/rdna2spirv.py, which emits NMin(NMax(z, NMin(x, y)), NMax(x, y)) and no FClamp.

This PR deletes only that duplicated fragment. Docs only. #2945 fixes other leftovers like this one but does not touch this row. #2139 and #2437 rewrite the row and still carry the fragment.

Tested

No GPU (docs-only change).

  • python -I tests/test_docs_design_rows.py: OK
  • python -m unittest discover -s tests/semantic -p test_float_nan_fract.py: OK
  • The git diff --word-diff output removes only that fragment.

AI-assisted (Devin).

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

@kotorvr

kotorvr commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Read 8128b41 on Windows 11 (Python 3.13.7): pass

  • Character-level diff of the row against its merge base f847748: one contiguous deletion of 284 characters, nothing added, cell count unchanged. The deleted span is the second "FMin/FMax, whose NaN result … med3 is FClamp(z, NMin(x, y), NMax(x, y)) … selects NMin(NMin(x, y), z) instead." that follows "hardware-verified on RDNA2 (gfx1035, wave32 & wave64)."
  • The sentence that stays is the one the code implements: Gen.med3_f at tools/rdna2spirv.py:4512-4524 emits NMin(NMax(z, NMin(x, y)), NMax(x, y)) and no FClamp. The kept text still has "(before: FMin/FMax, whose NaN result GLSL.std.450 leaves to the implementation)" and the OpIsNan select of NMin(NMin(x, y), z), so no statement is lost.
  • After the deletion the row reads straight from the med3 hardware sentence into "v_fract_f32 is Fract followed by …".
  • python -m unittest discover -s tests/semantic -p test_float_nan_fract.py: 24 tests, OK.
  • test_docs_design_rows 2, test_docs_links 5, test_docs_list_items 2, test_docs_repo_paths 2, test_i18n_index 5, all OK; git diff --check clean.

AI-assisted check (Claude Code).

@kapitche

Copy link
Copy Markdown
Contributor

Read 8128b41 against main f847748: accurate

  • Test merge into main is clean; tests/test_docs_{design_rows,links,list_items,repo_paths}.py pass on the merge (Python 3.12.16, Linux).
  • The removed tail at docs/design.md:306 (med3 is FClamp(z, NMin(x, y), NMax(x, y)) ...) is the pre-fix wording; the sentence that stays (NMin(NMax(z, NMin(x, y)), NMax(x, y)), OpIsNan select to NMin(NMin(x, y), z)) matches Gen.med3_f at tools/rdna2spirv.py:3839-3875. The row now describes med3 once.

@junaydirfan

Copy link
Copy Markdown

Reviewed aa2652d9 against main d0835dd9: looks right, no blocking issue.

Docs only, no GPU needed. AI-assisted (Claude Code).

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.

4 participants