GPU test cs_w32_movrels64: s_movrels_b64 (OLD-9913) #1447

Open
github-bot wants to merge 3 commits from github-bot/gh-1447 into main AGit
Owner

@⁠LouisRiverstone on GitHub · 2026-11-25 00:24 UTC · original
LouisRiverstone:carry-old-9913 → main · +209 −3 · 5 files · 3 commits · open

Claimed in the coordination issue as: OLD-9913 (#14)

Replaces the carried-over draft #179. I'm the original author of old upstream PR 9913.

What and why

An old upstream PR merged s_movrels_b32/s_movrels_b64 with CPU-only checks, and the cs_w32_pk_rel_ext fixture covers only the b32 form. This adds a GPU fixture, runtime/test/shaders/cs_w32_movrels64.asm: s_movrels_b64 pairs with an M0 set at run time, an overlapping source and destination pair (even-aligned, because LLVM 22+ rejects s[21:22]), and SCC kept. The fixture is wired into check.py and scripts/run_gpu_tests.py. Its disassembly is in tests/semantic/fixtures/disasm/ and is checked by tests/semantic/test_movrels64_fixture.py.

The old branch's final diff, applied on current main as one commit. It applied cleanly.

Tested

  • python -I scripts/run_gpu_tests.py --filter cs_w32_movrels64: PASS with llvm-mc 21.1 and with llvm-mc 23. Words 0x5EED0111 0x5EED0222 0x5EED0444 0x5EED0555 0x5EED0555 0x5EED0111 0x5EED0222 1, as expected.
  • python -I tests/semantic/test_movrels64_fixture.py: OK.
  • python -I scripts/run_semantic_tests.py tests/semantic: 477 files, 6228 tests, 0 files failed.

The old PR was also checked on real GPUs by other people (RX 6800, RTX 3080 Ti, RX 9070 XT, RTX 4090, RTX 5090, Steam Deck and others), on the branch as it was then.

GPUs tested: llvmpipe (Mesa, LLVM 21.1.8) on Linux under WSL2

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • 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. (n/a: no translator rule changes)
**@⁠LouisRiverstone** on GitHub · 2026-11-25 00:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1447) `LouisRiverstone:carry-old-9913` → `main` · +209 −3 · 5 files · 3 commits · open Claimed in the coordination issue as: OLD-9913 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Replaces the carried-over draft #179. I'm the original author of old upstream PR 9913. ### What and why An old upstream PR merged `s_movrels_b32`/`s_movrels_b64` with CPU-only checks, and the `cs_w32_pk_rel_ext` fixture covers only the `b32` form. This adds a GPU fixture, `runtime/test/shaders/cs_w32_movrels64.asm`: `s_movrels_b64` pairs with an M0 set at run time, an overlapping source and destination pair (even-aligned, because LLVM 22+ rejects `s[21:22]`), and SCC kept. The fixture is wired into `check.py` and `scripts/run_gpu_tests.py`. Its disassembly is in `tests/semantic/fixtures/disasm/` and is checked by `tests/semantic/test_movrels64_fixture.py`. The old branch's final diff, applied on current `main` as one commit. It applied cleanly. ### Tested - `python -I scripts/run_gpu_tests.py --filter cs_w32_movrels64`: PASS with llvm-mc 21.1 and with llvm-mc 23. Words `0x5EED0111 0x5EED0222 0x5EED0444 0x5EED0555 0x5EED0555 0x5EED0111 0x5EED0222 1`, as expected. - `python -I tests/semantic/test_movrels64_fixture.py`: OK. - `python -I scripts/run_semantic_tests.py tests/semantic`: 477 files, 6228 tests, 0 files failed. The old PR was also checked on real GPUs by other people (RX 6800, RTX 3080 Ti, RX 9070 XT, RTX 4090, RTX 5090, Steam Deck and others), on the branch as it was then. GPUs tested: llvmpipe (Mesa, LLVM 21.1.8) on Linux under WSL2 AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] 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. (n/a: no translator rule changes)
- GPU test cs_w32_movrels64: s_movrels_b64
- cs_w32_movrels64: an even-aligned overlap pair (LLVM 22+ rejects s[21:22])
- test_movrels64_fixture: runs under python -I

Carried over from old-pr/9913 (old upstream PR 9913), rebased on main.
# Conflicts:
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:51:42 +00:00
Author
Owner

@⁠GeorgiyDemo on GitHub · 2026-11-25 00:50 UTC · original

Tested cf0d9ca35 on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against main b4b7756e8 (new GPU fixture; no translator or C++ changes, binaries from the build at 66d4f5aa3):

  • tests/semantic/test_movrels64_fixture.py: OK at this head.
  • GPU, --filter cs_w32_movrels64: 1/1 PASS on MoltenVK 1.4.2 and 1/1 PASS on KosmicKrisp (Mesa 26.3.1), words 1592590609 1592590882 1592591428 1592591701 1592591701 1592590609 1592590882 1.
  • This is a new fixture — runtime/test/shaders/cs_w32_movrels64.asm does not exist on main, so there is no before/after to compare; the s_movrels_b64 form it covers had no GPU fixture before.

AI-assisted; synthetic fixtures only, no game data.

**@⁠GeorgiyDemo** on GitHub · 2026-11-25 00:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1447#issuecomment-7148931140) Tested `cf0d9ca35` on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against `main` `b4b7756e8` (new GPU fixture; no translator or C++ changes, binaries from the build at `66d4f5aa3`): - `tests/semantic/test_movrels64_fixture.py`: **OK** at this head. - GPU, `--filter cs_w32_movrels64`: **1/1 PASS** on **MoltenVK 1.4.2** and **1/1 PASS** on **KosmicKrisp** (Mesa 26.3.1), words `1592590609 1592590882 1592591428 1592591701 1592591701 1592590609 1592590882 1`. - This is a new fixture — `runtime/test/shaders/cs_w32_movrels64.asm` does not exist on `main`, so there is no before/after to compare; the `s_movrels_b64` form it covers had no GPU fixture before. AI-assisted; synthetic fixtures only, no game data.
Author
Owner

@⁠CodingRule on GitHub · 2026-11-25 12:20 UTC · original

GPU test on an NVIDIA Ada card, for the record: this passes on an RTX 4090.

  • Tested: this branch's head e781a408 merged onto main 0d80bc5d (clean merge), test programs built from that main with scripts\build_runtime.ps1.
  • Command: python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_movrels64, once native and once with LEONIDA_W64_EMULATE=1.
  • Result: 1/1 translated and spirv-val clean, 1/1 passed in both modes, with the expected words/pixels from the fixture header. Nothing skipped.
  • Device: NVIDIA GeForce RTX 4090 (Ada / AD102), driver 591.86, Vulkan 1.4.325, subgroup 32..32, Windows 11 Pro build 26200. llvm-mc 21.1.8 (scripts\build_llvm_mc.ps1), SPIRV-Tools v2026.4, MSVC 14.44.35207.

Only the filtered fixture(s) were run for this PR, not the full suite or ctest; the full-suite baseline for this card on main is in #1777. Synthetic fixtures only, no game files. AI-assisted (Claude Code ran the tests and wrote this comment).

**@⁠CodingRule** on GitHub · 2026-11-25 12:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1447#issuecomment-7162239112) GPU test on an NVIDIA Ada card, for the record: this passes on an **RTX 4090**. - **Tested:** this branch's head `e781a408` merged onto `main` `0d80bc5d` (clean merge), test programs built from that `main` with `scripts\build_runtime.ps1`. - **Command:** `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_movrels64`, once native and once with `LEONIDA_W64_EMULATE=1`. - **Result:** 1/1 translated and `spirv-val` clean, 1/1 passed in both modes, with the expected words/pixels from the fixture header. Nothing skipped. - **Device:** NVIDIA GeForce RTX 4090 (Ada / AD102), driver 591.86, Vulkan 1.4.325, subgroup 32..32, Windows 11 Pro build 26200. llvm-mc 21.1.8 (`scripts\build_llvm_mc.ps1`), SPIRV-Tools v2026.4, MSVC 14.44.35207. Only the filtered fixture(s) were run for this PR, not the full suite or ctest; the full-suite baseline for this card on `main` is in #1777. Synthetic fixtures only, no game files. AI-assisted (Claude Code ran the tests and wrote this comment).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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