Skip to content

docs: drop stale sentences in five design.md contract rows - #5137

Open
s0las16 wants to merge 1 commit into
ItsNotRexed:mainfrom
s0las16:devin/1795422650-docs-contract-rows
Open

s0las16 wants to merge 1 commit into
ItsNotRexed:mainfrom
s0las16:devin/1795422650-docs-contract-rows

Conversation

@s0las16

@s0las16 s0las16 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

claiming: the self-contradicting docs/design.md contract rows (unclaimed finding: by lines9686-rgb)

Five rows in docs/design.md still carried pre-fix text beside the corrected statements; each contradiction was checked against tools/rdna2spirv.py:

  • image_gather4_l (Other additions): border modes 6 and 7 return the S# border colour; only half-border modes 4 and 5 are Unsupported on a literal S# (gather_addr_modes).
  • Scalar select and pack: s_cmov_b64 translates plain 64-bit data pairs and refuses only lane-mask operands.
  • Known approximations: nearest-mode v_fma_mix* rounds the exact fma once via Gen.fma_mix_odd since fix(translator): round v_fma_mixlo/hi_f16 once to f16 (finding 7079901079) #1774 (SHADER-296), and all seven f16 ops are measured.
  • buffer_atomic_{and,or,xor,swap}_x2: an exchange can tear between lanes, and the 8-byte bounds check is measured all-or-nothing.
  • Buffer bounds checking: SWIZZLE_ENABLE and ADD_TID_ENABLE are modelled (Swizzled buffer addressing row).

The sixth row of the finding (Flat pixel inputs) is already fixed by open PR #5084 and left alone.

tests/test_docs_contract_rows.py pins the corrected contract: it fails on all five rows against main's stale text and passes here. tests/test_docs_table_rows.py still passes.

AI-assisted. Docs-only change — verified by the new CPU unit test; no GPU run needed (no shader or runtime change)

Five rows still carried pre-fix text beside the corrected statements:

- image_gather4_l: border modes 6 and 7 return the S# border colour;
  only the half-border modes 4 and 5 are Unsupported on a literal S#.
- Scalar select and pack: s_cmov_b64 translates plain data pairs and
  refuses only lane-mask operands, not the whole opcode.
- Known approximations: nearest-mode v_fma_mix* rounds once via
  Gen.fma_mix_odd since ItsNotRexed#1774 (SHADER-296), and all seven f16 ops are
  measured.
- buffer_atomic_*_x2: an exchange can tear between lanes, and the
  8-byte bounds check is measured all-or-nothing.
- Buffer bounds checking: SWIZZLE_ENABLE and ADD_TID_ENABLE are
  modelled (Swizzled buffer addressing row).

tests/test_docs_contract_rows.py pins the corrected contract; it fails
on all five rows against the stale text.

AI-assisted. Docs-only change; verified by the new unit test
(fails on main, passes here) and tests/test_docs_table_rows.py.

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

Copy link
Copy Markdown
Contributor

Independent CPU verification on Linux (Python 3.13.5, head 6636822d, base main 3faac557):

  • Before (main 3faac557): running the new tests/test_docs_contract_rows.py against main's docs/design.md fails all 5/5 tests, confirming every one of the five stale sentences is present on main.
  • After (6636822d):
    • python3 -I -m py_compile tests/test_docs_contract_rows.py — clean.
    • python3 -I tests/test_docs_contract_rows.py -v — 5/5 OK (0.004s).
    • tests/test_docs_design_rows.py (4/4), tests/test_docs_table_rows.py (2/2), tests/test_docs_links.py (6/6) — all OK.
    • git diff --check origin/main...HEAD — clean.
  • Diff review: verified all five edited rows (Other additions, Scalar select and pack, Known approximations, buffer_atomic_{and,or,xor,swap}_x2, Buffer bounds checking) read cleanly after dropping the superseded text.

Looks good to merge.

@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 6636822df on Windows 11: pytest tests/test_docs_contract_rows.py -q -> 5 passed; test_docs_design_rows.py 2 OK; git diff --check clean.

Five contract rows lose their stale sentences (claims the same row's later text contradicts), and the new tests/test_docs_contract_rows.py pins those removals so the sentences do not come back. Docs only. No blocking issue.

@Atomic258

Copy link
Copy Markdown
Contributor

Independent check — pass (CPU only).

python -I tests/test_docs_contract_rows.py → 5/5 on the head (the new test cross-checks the edited contract rows against the suite). The five design.md deletions remove sentences now contradicted by later measured rows; the new test guards against reintroducing stale claims.

AI-assisted (Devin); no game files.

@lines9686-rgb

Copy link
Copy Markdown
Contributor

Reviewed and tested 6636822 (I'm the finder of SHADER-891), Windows 11 (26200), Python 3.12: pass. For each of the five rows I checked the PR's text against tools/rdna2spirv.py on main 3faac55: the stale sentence is gone and the one that matches the code stays. Buffer bounds checking keeps "modelled" for SWIZZLE_ENABLE/ADD_TID_ENABLE and drops "not modelled ... known gap"; the second Scalar select and pack row no longer calls s_cmov_b64 Unsupported; Other additions refuses only border modes 4 and 5, as gather_addr_modes does; Known approximations has no "rounds twice" for v_fma_mix* and no "unmeasured" for cos/exp/log; buffer_atomic_*_x2 keeps "an exchange can tear" and drops the stale "not measured". tests/test_docs_contract_rows.py passes here and fails 5 against main's design.md, so it guards all five; the other tests/test_docs_*.py pass; merges cleanly with main. The sixth row (Flat pixel inputs, line 325: "read only by v_interp_mov_f32 is declared Flat.") is still there; @kacper-serewis's claim on the adjacent Flat-input rows (follow-up to #5043) looks like it covers it, along with two stale code comments in rdna2spirv.py (~229, ~8924). AI-assisted (Claude Code).

@kotekompotek

Copy link
Copy Markdown

Independent Windows CPU verification on 6636822d:

  • python -m pytest tests/test_docs_contract_rows.py --basetemp D:\temp\pytest_tmp -q: 5 passed in 0.32s

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