[PR #1448] GPU test cs_w32_late_ext: ds_mskor, v_add/sub_nc_i16 clamp, s_buffer_load constant offset (OLD-9908) #1478

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1448
Author: @LouisRiverstone
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: carry-old-9908


📝 Commits (3)

  • 34cc558 GPU test cs_w32_late_ext: ds_mskor, v_add/sub_nc_i16 clamp, s_buffer_load constant offset
  • e41de2c Merge main into
  • 53098ca Merge remote-tracking branch 'ubq/main' into carry-old-9908

📊 Changes

5 files changed (+219 additions, -3 deletions)

View changed files

📝 runtime/test/shaders/check.py (+3 -1)
➕ runtime/test/shaders/cs_w32_late_ext.asm (+70 -0)
📝 scripts/run_gpu_tests.py (+4 -2)
➕ tests/semantic/fixtures/disasm/cs_w32_late_ext.s (+54 -0)
➕ tests/semantic/test_late_ext_fixture.py (+88 -0)

📄 Description

Claimed in the coordination issue as: OLD-9908 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148463379)

Depends on: #650

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

What and why

A GPU test in the cs_w32_*_ext format that CI runs on llvmpipe. It covers three changes that only had CPU checks: ds_mskor_b32/ds_mskor_rtn_b32, v_add/sub_nc_i16 with clamp, and the fix for an s_buffer_load with a constant SGPR offset. 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_late_ext_fixture.py.

Depends on #650. On current main this fixture crashes llvmpipe (exit -11). With the translator from #650, which is my old PR 9916 carried over by TanmaySatyam (out-of-range s_buffer_load reads through the heap base), it passes. So this PR should merge after #650. This PR, #650, #1447 (cs_w32_movrels64) and the other new GPU fixtures all add a name at the same place in check.py and run_gpu_tests.py. Whichever lands second needs a one-line rebase.

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_late_ext on this branch alone: FAIL, exit -11 (llvmpipe segfault).
  • The same with tools/rdna2spirv.py from #650: PASS. Words 0x12345678 0x1234AB78 0xFFFF0001 0x7FFF 0x8000 0x8000 0 0xEEEEEEEE, as expected.
  • python -I tests/semantic/test_late_ext_fixture.py: OK.
  • python -I scripts/run_semantic_tests.py tests/semantic: 477 files, 6227 tests, 0 files failed.

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)

🔄 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/1448 **Author:** [@LouisRiverstone](https://github.com/LouisRiverstone) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `carry-old-9908` --- ### 📝 Commits (3) - [`34cc558`](https://github.com/ubiquitarianism/leonida/commit/34cc5589508e71807885d5473df18f359a8878aa) GPU test cs_w32_late_ext: ds_mskor, v_add/sub_nc_i16 clamp, s_buffer_load constant offset - [`e41de2c`](https://github.com/ubiquitarianism/leonida/commit/e41de2cfda5b47c9288973fe2cc1ddb8894c3744) Merge main into - [`53098ca`](https://github.com/ubiquitarianism/leonida/commit/53098ca27047aef47575611190c515bea769c95f) Merge remote-tracking branch 'ubq/main' into carry-old-9908 ### 📊 Changes **5 files changed** (+219 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/shaders/check.py` (+3 -1) ➕ `runtime/test/shaders/cs_w32_late_ext.asm` (+70 -0) 📝 `scripts/run_gpu_tests.py` (+4 -2) ➕ `tests/semantic/fixtures/disasm/cs_w32_late_ext.s` (+54 -0) ➕ `tests/semantic/test_late_ext_fixture.py` (+88 -0) </details> ### 📄 Description Claimed in the coordination issue as: OLD-9908 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148463379) Depends on: #650 Replaces the carried-over draft #173. I'm the original author of old upstream PR 9908. ### What and why A GPU test in the `cs_w32_*_ext` format that CI runs on llvmpipe. It covers three changes that only had CPU checks: `ds_mskor_b32`/`ds_mskor_rtn_b32`, `v_add/sub_nc_i16` with `clamp`, and the fix for an `s_buffer_load` with a constant SGPR offset. 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_late_ext_fixture.py`. **Depends on #650.** On current `main` this fixture crashes llvmpipe (exit -11). With the translator from #650, which is my old PR 9916 carried over by TanmaySatyam (out-of-range `s_buffer_load` reads through the heap base), it passes. So this PR should merge after #650. This PR, #650, #1447 (`cs_w32_movrels64`) and the other new GPU fixtures all add a name at the same place in `check.py` and `run_gpu_tests.py`. Whichever lands second needs a one-line rebase. 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_late_ext` on this branch alone: FAIL, exit -11 (llvmpipe segfault). - The same with `tools/rdna2spirv.py` from #650: PASS. Words `0x12345678 0x1234AB78 0xFFFF0001 0x7FFF 0x8000 0x8000 0 0xEEEEEEEE`, as expected. - `python -I tests/semantic/test_late_ext_fixture.py`: OK. - `python -I scripts/run_semantic_tests.py tests/semantic`: 477 files, 6227 tests, 0 files failed. 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) --- <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#1478
No description provided.