Skip to content

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

Open
YaBulochka wants to merge 1 commit into
ProjectLeonida:mainfrom
YaBulochka:feat/fixtures-batch5
Open

YaBulochka wants to merge 1 commit into
ProjectLeonida:mainfrom
YaBulochka:feat/fixtures-batch5

Conversation

@YaBulochka

Copy link
Copy Markdown
Contributor

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:

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

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 24, 2026
…ax, wrxchg b64)

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 (ProjectLeonida#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 (ProjectLeonida#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 (ProjectLeonida#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 (ProjectLeonida#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 (ProjectLeonida#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant