Skip to content

docs: remove the duplicate contract rows a merge left behind - #2067

Closed
Kam471 wants to merge 1 commit into
ItsNotRexed:mainfrom
Kam471:docs/dedupe-design-rows
Closed

Kam471 wants to merge 1 commit into
ItsNotRexed:mainfrom
Kam471:docs/dedupe-design-rows

Conversation

@Kam471

@Kam471 Kam471 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

docs: remove the duplicate contract rows a merge left behind

tests/test_docs_design_rows.py fails on current origin/main (4eb6155d) with three subtests. The merge kept both sides of several contract-table edits, so 24 topics in docs/design.md name two to six rows, [models.md](models.md) appears twice in docs/README.md, and two docs/testing.md "Known problems" topics repeat.

Failing topics before

docs/design.md (24): Models; Scalar/buffer memory; Images and samplers (core); Typed buffer loads; Integer clamp; Buffer format stores; Output modifiers on hardware (gfx1150); Sum of absolute differences; v_mqsad_u32_u8; s_sext_i32_i8/s_sext_i32_i16/s_flbit_i32; v_lerp_u8; s_bfe_u32/s_bfe_i32 past bit 31; 64-bit scalar data ops; s_quadmask_b32/_b64/s_bitreplicate_b64_b32; 64-bit scalar bitwise ops; Constant lane masks; Vector integer additions; Relative SGPR reads; d16 and f16 format narrowing; v_cvt_pknorm_i16_f32/v_cvt_pknorm_u16_f32; f16 rounding; 16-bit interpolation without PerVertexKHR; v_fmac_f16/v_interp_p2/mov_f32 output modifiers; Known approximations.

docs/README.md (1): [models.md](models.md). docs/testing.md (2): "Validation errors without a VUID..." and "Validation errors that only your machine shows...".

What changed

One row per topic. The kept row is the one with the current measured values; the stale copy is gone. Where two rows each held a current fact, the kept row keeps both facts (no new numbers).

  • Models: kept the 382,781 re-count row: 4,686 fragments, 30,343 bone-bound, 126,301,454 triangles for the non-levels.rpf archives; the levels.rpf geometry cells are marked † and remain unmeasured. Removed the old 55,417/89,887/2.64 billion row. Same correction in docs/README.md.
  • Integer clamp, Buffer format stores, Output modifiers, Relative SGPR reads: kept the newest rule and folded in the verified facts the removed copy still held (RDNA2 clamp verification, BGRA views + narrow-int stores, v_fma_mix* denormal operands, RDNA2 s_movrels verification).
  • Hardware-verified integer rows: kept the RDNA2-verified copies for SAD, v_mqsad_u32_u8, sext/flbit, v_lerp_u8, s_bfe past bit 31, 64-bit scalar data ops, s_quadmask/s_bitreplicate, 64-bit scalar bitwise ops, and v_cvt_pknorm_*.
  • Typed buffer loads, Constant lane masks, f16 rounding, --f16-interp-fallback, Known approximations, Vector integer additions, d16 narrowing: kept the newest, most complete row.
  • docs/testing.md: kept the row naming VK_LOADER_LAYERS_DISABLE=~implicit~ with the overlay exception, and the row that names both RivaTuner and OBS layer switches; removed the pre-update copies.
  • docs/design.md fix-up: added the † marker the task requested for the unmeasured levels.rpf geometry cells.

Verification

python -I tests/test_docs_design_rows.py   # Ran 2 tests ... OK
python -I tests/test_docs_links.py         # Ran 5 tests ... OK
git diff --check                           # clean
 docs/README.md  |  3 +--
 docs/design.md  | 42 +++++-------------------------------------
 docs/testing.md |  3 ---
 3 files changed, 6 insertions(+), 42 deletions(-)

Commit: bc71d901 on docs/dedupe-design-rows, based on origin/main 4eb6155d.

Open PRs touching the same rows

No other PR is doing this dedupe. Several open PRs edit one of the rows this change collapses, so expect merge conflicts there: #2053 (s_quadmask/s_bitreplicate, and its body lists #2028 v_cvt_pknorm_*, #1926 v_mqsad_u32_u8, #1495 64-bit scalar data ops, #1922 EXEC/64-bit scalar bitwise, #1970 f16 omod), and #2022 (buffer formats). This diff keeps those rows' current measured text and removes only the flagged duplicates.

Not pushed.

@dcastell1

dcastell1 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Code read + CPU tests, 935edd4: pass (tests/test_docs_links.py → 5 passed).

Dedupe checked mechanically against main: the table goes from 211 rows / 166 unique topics / 35 duplicated topics to 166 rows / 166 unique / 0 duplicated, and no topic present on main is missing afterwards. So this is a lossless dedupe, not a row being dropped.

Note there are three open PRs for PROC-106 (#2063, #2067, #2073): all three reach the same 166/0 state, but they keep different copies of the duplicated rows (#2073 carries the newest wording, e.g. uint/sint 8/16 in Buffer format stores and the SHADER-137 placement; #2067 adds the † marker). Worth merging only one.

@HQasper

HQasper commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Code read on 935edd4f against main 4eb6155d: the Known approximations row this PR keeps is stale about v_fma_mix*.

  • Where: docs/design.md:342 in this branch, the sentence "In nearest mode the translator still rounds v_fma_mix{lo,hi}_f16 twice (f32 Fma, then narrow), but the hardware rounds once there as well: ... the fix is Gen.fma_mix_odd in nearest mode too, SHADER-296)."
  • On current main (4eb6155d, which this PR does not change, it is docs/ only) the translator does not round twice there. tools/rdna2spirv.py:6549-6551 is
        elif op in ("v_fma_mixlo_f16", "v_fma_mixhi_f16"):
            vals = self.fma_mix_srcs(a, mods)
            r = self.fma_mix_odd(*vals)

so fma_mix_odd runs unconditionally and #1774 / SHADER-296 is already in. The measurement is recorded at docs/shader_validation.md:1049 ("v_fma_mix* f16 rounding in nearest mode"), so the row describes main's behaviour before #1774 while pointing at a section that already documents the fix.

  • Why it matters: the contract table is where contributors read what the translator does before adding rules; as written, a reader concludes a known 1-ulp nearest-mode bug is still open when the code has fixed it.

The dedupe itself is fine and the test is green at this head. I ran, on Windows 11 x64 with Python 3.13.14, python -I on each:

  • tests/test_docs_design_rows.py -> Ran 2 tests / OK
  • tests/test_docs_links.py -> Ran 5 tests / OK
  • tests/test_docs_list_items.py -> Ran 2 tests / OK
  • tests/test_docs_repo_paths.py -> Ran 2 tests / OK
  • tests/test_i18n_index.py -> Ran 5 tests / OK

and with docs/ taken from 4eb6155d in the same tree, tests/test_docs_design_rows.py gives FAILED (failures=3), so the green is this PR's rows.

Suggested fix for the row: use the wording #2073 keeps, which says v_fma_mix{lo,hi}_f16 rounds once "in both nearest-even and toward-zero modes", cites SHADER-135 / finding 7079901079, and states "fixed for nearest mode in SHADER-296 / #1774" with the docs/shader_validation.md pointer. That keeps the dedupe green and the row true.

AI-assisted.

@Kam471

Kam471 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #2398, which redoes the dedupe on current main; this branch went DIRTY after the merge rounds changed the duplicate groups.

@Kam471 Kam471 closed this Nov 22, 2026
ItsNotRexed added a commit that referenced this pull request Nov 22, 2026
# Conflicts:
#	docs/README.md
#	docs/design.md
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.

3 participants