Skip to content

docs/design.md: one Scalar select and pack row again, with s_cmov_b64 supported - #2913

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
jaybeebabageyus:ht-scmov
Nov 23, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
jaybeebabageyus:ht-scmov

Conversation

@jaybeebabageyus

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: issuecomment-7083746790 (new PROC item, self-sourced; found in issuecomment-7083604496 while fixing PROC-132).

What and why

docs/design.md on main (ec8ec4c9) names the "Scalar select and pack" topic twice:

  • line 330: the row the round-40 fix (ec8ec4c9) stitched from the five s_cmov_b64-titled rows sentence by sentence. It has two Source: RDNA2 ISA SOP1/SOP2/SOPK and two CPU-checked groups, a pasted half-sentence fragment ("D[63:0], SCC read and not written, ..."), and ends "Not measured on RDNA2." immediately after listing the gfx1035 (SHADER-137) and native gfx1036 tools/hw_oracle/tools/salu_diff.py measurements.
  • line 335: the pre-merge row without s_cmov_b64 in the topic cell, which still says "s_cmov_b64 ... stay Unsupported, Translator: wave64 lane masks used as integers read back as per-lane bools; wave64 inferred from mnemonics #210" - but the translator supports s_cmov_b64 on plain 64-bit scalar data pairs (43f8e34; tools/rdna2spirv.py raises Unsupported only for lane-mask pairs and non-SGPR destinations) and tests/semantic/test_salu_cmov_b64.py checks it.

The pair survives tests/test_docs_design_rows.py only because the two topic cells differ. The repair keeps one row with the s_cmov_b64 topic cell and the pre-merge superset content: the lane-mask rationale ("any dword that is or has been a lane mask ... 0/-1 EITHER constants are data", matching the translator's any_ever_mask_word checks), the LLVM SOPInstructions.td source, the test_salu_cmov_b64.py CPU list, the cs_w32_salu64.asm/cs_w32_int_ext.asm GPU-test naming, the NVIDIA reviewer runs (#613/#449), the gfx1035 SHADER-137 verification, the gfx1036 int_hw_probe salu_cmov_pack/salu_cmov_b64 measurements (#2087) and the gfx1036 salu_diff 500-program run - and drops the duplicated sentence groups, the stale "Not measured on RDNA2." tail and the line-335 duplicate. 1 file, 1 insertion, 2 deletions.

Tested

Docs-only change, CPU only, no GPU needed (Windows 11 26200, Python 3.11.9):

  • python -I tests/test_docs_design_rows.py - 2 tests OK
  • python -I tests/test_docs_links.py - 5 tests OK
  • python -I tests/test_docs_list_items.py - 2 tests OK
  • python -I tests/test_docs_repo_paths.py - 2 tests OK

No game data, keys or decryption; no game files anywhere in the diff.

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: this PR only deduplicates the existing Scalar select and pack row, keeping every confirmation note it already had.)

AI-assisted.

… supported

- the round-40 fix (ec8ec4c) stitched the five s_cmov_b64-titled rows
  into one sentence by sentence: two Source:/CPU-checked groups, a
  pasted half-sentence fragment, and "**Not measured on RDNA2.**"
  right after the gfx1035 (SHADER-137) and gfx1036 measurements the row
  itself lists; the older row without s_cmov_b64 in the topic survived
  at line 335, so test_docs_design_rows does not flag the pair
  (self-sourced; found by @jayneebabageyus in issuecomment-7083604496
  while fixing PROC-132).
- keep one row with the s_cmov_b64 topic cell: the lane-mask rationale,
  the SOPInstructions.td source and the test_salu_cmov_b64.py CPU list
  from the pre-merge row (43f8e34), the cs_w32_salu64/cs_w32_int_ext
  GPU-test naming (8564110), the gfx1035 SHADER-137 and gfx1036
  int_hw_probe/salu_diff measurements (06f36ce, fe7edb5); the stale
  "Not measured on RDNA2." tail and the line-335 duplicate dropped.
- docs checks 4/4 green (11 tests).

AI-assisted.

# Conflicts:
#	docs/design.md
@shdann

shdann commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Tested 51746cc on Windows, CPython 3.14.7, CPU only (no GPU, no game files): pass. This is a documentation change, so the check was whether the revised Scalar select and pack row is true of the translator.

  • python -m pytest -q tests/semantic/test_salu_cmov.py tests/semantic/test_salu_cmov_b64.py tests/semantic/test_salu_pack.py tests/semantic/test_salu64_bitwise_data.py (venv with the pinned tests/requirements.txt): 44 passed, 882 subtests passed, on this head and on the merge base (f847748), as expected for a docs-only change.
  • Hand-built pixel-shader probe through the test module's load/export helpers: with s[8:9] = 0x1122334455667788, s_cmov_b64 s[8:9], -2 leaves the pair unchanged when SCC = 0 and gives 0xfffffffffffffffe when SCC = 1. Both agree with the row's "supported" statement for s_cmov_b64.

No contradiction found. AI-assisted.

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