TEST-722-PSB-OPLOAD: move PSB OpLoad out of OpAccessChain and tighten ps_w64 checks #910

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

@⁠markankamaransheogarat-sys on GitHub · 2026-11-24 15:09 UTC · original
markankamaransheogarat-sys:ubiq/test-722-psb-load → main · +82 −12 · 3 files · 1 commits · open

Summary

  • Move the unreachable if p[0] == "psb": load branch out of OpAccessChain into OpLoad in tests/semantic/spirv_wave_interp.py, fixing PhysicalStorageBuffer loads.
  • Tighten ps_w64 wave64/wave32 checks and add regression tests for PSB OpLoad in tests/semantic/test_spirv_wave_interp.py and tests/semantic/test_wave64_halves.py.

Verification

  • python3 -I tests/semantic/test_spirv_wave_interp.py: 20/20 passed.
  • python3 -I tests/semantic/test_wave64_halves.py: 126/126 passed.

AI-assisted: yes (synthetic tests only, no game files).

**@⁠markankamaransheogarat-sys** on GitHub · 2026-11-24 15:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/910) `markankamaransheogarat-sys:ubiq/test-722-psb-load` → `main` · +82 −12 · 3 files · 1 commits · open ### Summary - Move the unreachable `if p[0] == "psb":` load branch out of `OpAccessChain` into `OpLoad` in `tests/semantic/spirv_wave_interp.py`, fixing PhysicalStorageBuffer loads. - Tighten `ps_w64` wave64/wave32 checks and add regression tests for PSB `OpLoad` in `tests/semantic/test_spirv_wave_interp.py` and `tests/semantic/test_wave64_halves.py`. ### Verification - `python3 -I tests/semantic/test_spirv_wave_interp.py`: 20/20 passed. - `python3 -I tests/semantic/test_wave64_halves.py`: 126/126 passed. AI-assisted: yes (synthetic tests only, no game files).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:27:39 +00:00
Author
Owner

@⁠qhukz13 on GitHub · 2026-11-24 15:39 UTC · original · reviewed

Checked 1d5b44581 (Linux, CPU only, no game files). Merges cleanly with current main.

  • The fix is right: in OpAccessChain the psb branch sat after the access-chain-into-psb case, which already returns, so it never ran; in OpLoad it now does.
  • test_physical_storage_buffer_load_and_store_readback catches it: with main's spirv_wave_interp.py it errors (IndexError), with this one it passes.
  • test_wave64_halves.py passes with and without the interpreter change, so its part is a separate tightening. The new heap checks follow the fixture's own header (ps_w64_b_ballot_atomic.asm: the wanted pixels are x % 4 == 1, each stores y * 64 + x + 1 in a slot of its own), which is stricter than the old "16 distinct slots" and also catches a write past the last slot. The tier C change now checks wave32 against the reference on every fixed channel instead of only w32 != w64.
  • tests/semantic/test_spirv_wave_interp.py 20 OK, tests/semantic/test_wave64_halves.py 126 OK.

LGTM.

**@⁠qhukz13** on GitHub · 2026-11-24 15:39 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/910#pullrequestreview-6042417061) · **reviewed** Checked 1d5b44581 (Linux, CPU only, no game files). Merges cleanly with current `main`. - The fix is right: in `OpAccessChain` the `psb` branch sat after the access-chain-into-psb case, which already returns, so it never ran; in `OpLoad` it now does. - `test_physical_storage_buffer_load_and_store_readback` catches it: with `main`'s `spirv_wave_interp.py` it errors (`IndexError`), with this one it passes. - `test_wave64_halves.py` passes with and without the interpreter change, so its part is a separate tightening. The new heap checks follow the fixture's own header (`ps_w64_b_ballot_atomic.asm`: the wanted pixels are `x % 4 == 1`, each stores `y * 64 + x + 1` in a slot of its own), which is stricter than the old "16 distinct slots" and also catches a write past the last slot. The tier C change now checks wave32 against the reference on every fixed channel instead of only `w32 != w64`. - `tests/semantic/test_spirv_wave_interp.py` 20 OK, `tests/semantic/test_wave64_halves.py` 126 OK. LGTM.
github-bot force-pushed github-bot/gh-910 from 1d5b445811 to 0e9abdc7d4 2026-11-26 11:36:46 +00:00 Compare
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/910/head:github-bot/gh-910'
git switch 'github-bot/gh-910'

Merge

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