test(gpu): cover the last three LDS-atomic rows (mskor, inc/dec/min/max, wrxchg b64) #1040

Open
github-bot wants to merge 1 commit from github-bot/gh-1040 into main AGit
Owner

@⁠YaBulochka on GitHub · 2026-11-24 17:06 UTC · original
YaBulochka:feat/fixtures-batch5 → main · +1023 −4 · 17 files · 1 commits · open

Claimed in the coordination issue as: carried over from the closed original repository (branch feat/fixtures-batch5); no new claim

Depends on: none. Overlaps #173 (ds_mskor), #522 (ds_mskor atomicity) and #413 (which names existing GPU fixtures for the atomics rows); this PR adds the remaining three LDS-atomic rows (321, 322, 324), so the overlapping rows can be dropped from whichever lands second.

What and why

Six wave32 GPU fixtures for the last docs/design.md LDS-atomic rows without a GPU check. Each stores eight words derived in its header, and lane 0 alone runs the atomics:

  • cs_w32_lds_mskor (#321): ds_mskor_b32 and ds_mskor_rtn_b32, including DATA2 bits outside DATA being ORed in and the returned old word;
  • cs_w32_lds_atomics_incdec / _rtn (#322): ds_inc/dec/rsub_u32 at the DATA-1, DATA, above-DATA, 0 and 1 boundaries, the rsub wrap, and the pre-op word each _rtn_ form returns;
  • cs_w32_lds_minmax_f32 (#322): ds_min/max_f32 and the returning forms with a qNaN in either operand, -0/+0 and +inf/-inf;
  • cs_w32_lds_wrxchg_b64 (#324): ds_wrxchg_rtn_b64 and ds_wrxchg2_rtn_b64, the old pair, vdst order at *8 offsets 1 and 2, and the words written;
  • cs_w32_lds_wrxchg2st64_b64 (#324): ds_wrxchg2st64_rtn_b64 at *64 offsets 1 and 2 (0x200/0x400) over a 2 KiB LDS.

Registered in check.py (both wave32 lists and CS_DUMPS) and scripts/run_gpu_tests.py (the main table, the 64-bit exclusion and the skip list); tests/semantic/test_batch5_gpu_fixtures.py replays the same eight words through the translator and spirv_mini_interp and keeps the headers and runner tables in step. The .s fixtures are generated from the author's hand-written .asm sources, not game dumps. docs/design.md rows 321, 322 and 324 and docs/shader_validation.md name them.

Tested

  • python3 -m unittest discover -s tests/semantic -p "test_batch5_gpu_fixtures.py": 3 tests, OK.
  • python3 -m pytest tests/test_shader_checks.py -x -q: 91 passed, 405 subtests passed.
  • python3 tests/semantic/regen_fixtures.py --check: clean.
  • GPU (the author's measurement, not repeated here): gfx1036, RADV, Mesa 27.0.0-devel; 8/8 words per fixture, through both runners.

AI-assisted: yes.

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; the existing rows now name the GPU confirmation.)
**@⁠YaBulochka** on GitHub · 2026-11-24 17:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1040) `YaBulochka:feat/fixtures-batch5` → `main` · +1023 −4 · 17 files · 1 commits · open Claimed in the coordination issue as: carried over from the closed original repository (branch `feat/fixtures-batch5`); no new claim Depends on: none. Overlaps #173 (`ds_mskor`), #522 (`ds_mskor` atomicity) and #413 (which names existing GPU fixtures for the atomics rows); this PR adds the remaining three LDS-atomic rows (321, 322, 324), so the overlapping rows can be dropped from whichever lands second. ### What and why Six wave32 GPU fixtures for the last `docs/design.md` LDS-atomic rows without a GPU check. Each stores eight words derived in its header, and lane 0 alone runs the atomics: - `cs_w32_lds_mskor` (#321): `ds_mskor_b32` and `ds_mskor_rtn_b32`, including DATA2 bits outside DATA being ORed in and the returned old word; - `cs_w32_lds_atomics_incdec` / `_rtn` (#322): `ds_inc/dec/rsub_u32` at the `DATA-1`, `DATA`, above-DATA, 0 and 1 boundaries, the rsub wrap, and the pre-op word each `_rtn_` form returns; - `cs_w32_lds_minmax_f32` (#322): `ds_min/max_f32` and the returning forms with a qNaN in either operand, -0/+0 and +inf/-inf; - `cs_w32_lds_wrxchg_b64` (#324): `ds_wrxchg_rtn_b64` and `ds_wrxchg2_rtn_b64`, the old pair, vdst order at `*8` offsets 1 and 2, and the words written; - `cs_w32_lds_wrxchg2st64_b64` (#324): `ds_wrxchg2st64_rtn_b64` at `*64` offsets 1 and 2 (0x200/0x400) over a 2 KiB LDS. Registered in `check.py` (both wave32 lists and `CS_DUMPS`) and `scripts/run_gpu_tests.py` (the main table, the 64-bit exclusion and the skip list); `tests/semantic/test_batch5_gpu_fixtures.py` replays the same eight words through the translator and `spirv_mini_interp` and keeps the headers and runner tables in step. The `.s` fixtures are generated from the author's hand-written `.asm` sources, not game dumps. `docs/design.md` rows 321, 322 and 324 and `docs/shader_validation.md` name them. ### Tested - `python3 -m unittest discover -s tests/semantic -p "test_batch5_gpu_fixtures.py"`: 3 tests, OK. - `python3 -m pytest tests/test_shader_checks.py -x -q`: 91 passed, 405 subtests passed. - `python3 tests/semantic/regen_fixtures.py --check`: clean. - GPU (the author's measurement, not repeated here): gfx1036, RADV, Mesa 27.0.0-devel; 8/8 words per fixture, through both runners. AI-assisted: yes. ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (No new rule; the existing rows now name the GPU confirmation.)
Six wave32 fixtures for the docs/design.md rows 321, 322 and 324, each an
eight-word dump and lane 0 alone running the atomics:

- cs_w32_lds_mskor (#321): ds_mskor_b32 and ds_mskor_rtn_b32, including DATA2
  bits outside DATA being ORed in (0x11223344, mask 0x0000FFFF, DATA2 8 ->
  0x11220008) and the rtn old word.
- cs_w32_lds_atomics_incdec / _atomics_rtn (#322): ds_inc/dec/rsub_u32 at the
  DATA-1, DATA, above-DATA, 0 and 1 boundaries, the rsub wrap, and the pre-op
  word each _rtn_ form returns.
- cs_w32_lds_minmax_f32 (#322): ds_min/max_f32 and the returning forms with a
  qNaN in either operand, -0/+0 and +inf/-inf.
- cs_w32_lds_wrxchg_b64 (#324): ds_wrxchg_rtn_b64 and ds_wrxchg2_rtn_b64, the
  old pair, vdst order at *8 offsets 1 and 2, and the words written.
- cs_w32_lds_wrxchg2st64_b64 (#324): ds_wrxchg2st64_rtn_b64 at *64 offsets 1
  and 2 (0x200/0x400) over a 2 KiB LDS, with *8 markers so a wrong unit fails.

Registered in check.py (CS_DUMPS and both wave32 lists), run_gpu_tests.py
(every table and the wave64 exclusion), and regen_fixtures.py. Pinned by
tests/semantic/test_batch5_gpu_fixtures.py, which runs the same eight words
through spirv_mini_interp.

Both runners pass on the RDNA2 iGPU (gfx1036, RADV Mesa 27.0.0-devel), 8/8
words per fixture. No translator mismatch appeared.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:34:47 +00:00
This pull request has changes conflicting with the target branch.
  • runtime/test/shaders/check.py
  • scripts/run_gpu_tests.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1040/head:github-bot/gh-1040'
git switch 'github-bot/gh-1040'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1040'
git switch 'github-bot/gh-1040'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1040'
git switch 'github-bot/gh-1040'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1040'
git switch 'main'
git merge --squash 'github-bot/gh-1040'
git switch 'main'
git merge --ff-only 'github-bot/gh-1040'
git switch 'main'
git merge 'github-bot/gh-1040'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.