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

Open
opened 2026-11-26 20:20:00 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1040
Author: @YaBulochka
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: feat/fixtures-batch5


📝 Commits (1)

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

📊 Changes

17 files changed (+1023 additions, -4 deletions)

View changed files

📝 docs/shader_validation.md (+23 -0)
📝 runtime/test/shaders/check.py (+18 -2)
➕ runtime/test/shaders/cs_w32_lds_atomics_incdec.asm (+99 -0)
➕ runtime/test/shaders/cs_w32_lds_atomics_rtn.asm (+69 -0)
➕ runtime/test/shaders/cs_w32_lds_minmax_f32.asm (+88 -0)
➕ runtime/test/shaders/cs_w32_lds_mskor.asm (+89 -0)
➕ runtime/test/shaders/cs_w32_lds_wrxchg2st64_b64.asm (+71 -0)
➕ runtime/test/shaders/cs_w32_lds_wrxchg_b64.asm (+70 -0)
📝 scripts/run_gpu_tests.py (+23 -2)
📝 tests/semantic/README.md (+5 -0)
➕ tests/semantic/fixtures/disasm/cs_w32_lds_atomics_incdec.s (+79 -0)
➕ tests/semantic/fixtures/disasm/cs_w32_lds_atomics_rtn.s (+51 -0)
➕ tests/semantic/fixtures/disasm/cs_w32_lds_minmax_f32.s (+68 -0)
➕ tests/semantic/fixtures/disasm/cs_w32_lds_mskor.s (+59 -0)
➕ tests/semantic/fixtures/disasm/cs_w32_lds_wrxchg2st64_b64.s (+50 -0)
➕ tests/semantic/fixtures/disasm/cs_w32_lds_wrxchg_b64.s (+47 -0)
➕ tests/semantic/test_batch5_gpu_fixtures.py (+114 -0)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1040 **Author:** [@YaBulochka](https://github.com/YaBulochka) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/fixtures-batch5` --- ### 📝 Commits (1) - [`4f762ac`](https://github.com/ubiquitarianism/leonida/commit/4f762aca48c54a391f1291fb52fd6fe81b6733ff) test(gpu): cover the last three LDS-atomic rows (mskor, inc/dec/min/max, wrxchg b64) ### 📊 Changes **17 files changed** (+1023 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/shader_validation.md` (+23 -0) 📝 `runtime/test/shaders/check.py` (+18 -2) ➕ `runtime/test/shaders/cs_w32_lds_atomics_incdec.asm` (+99 -0) ➕ `runtime/test/shaders/cs_w32_lds_atomics_rtn.asm` (+69 -0) ➕ `runtime/test/shaders/cs_w32_lds_minmax_f32.asm` (+88 -0) ➕ `runtime/test/shaders/cs_w32_lds_mskor.asm` (+89 -0) ➕ `runtime/test/shaders/cs_w32_lds_wrxchg2st64_b64.asm` (+71 -0) ➕ `runtime/test/shaders/cs_w32_lds_wrxchg_b64.asm` (+70 -0) 📝 `scripts/run_gpu_tests.py` (+23 -2) 📝 `tests/semantic/README.md` (+5 -0) ➕ `tests/semantic/fixtures/disasm/cs_w32_lds_atomics_incdec.s` (+79 -0) ➕ `tests/semantic/fixtures/disasm/cs_w32_lds_atomics_rtn.s` (+51 -0) ➕ `tests/semantic/fixtures/disasm/cs_w32_lds_minmax_f32.s` (+68 -0) ➕ `tests/semantic/fixtures/disasm/cs_w32_lds_mskor.s` (+59 -0) ➕ `tests/semantic/fixtures/disasm/cs_w32_lds_wrxchg2st64_b64.s` (+50 -0) ➕ `tests/semantic/fixtures/disasm/cs_w32_lds_wrxchg_b64.s` (+47 -0) ➕ `tests/semantic/test_batch5_gpu_fixtures.py` (+114 -0) </details> ### 📄 Description 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.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1075
No description provided.