OLD-6536: GPU fixtures declare their expected words in their own header (prototype, three fixtures) #390

Open
github-bot wants to merge 2 commits from github-bot/gh-390 into main AGit
Owner

@⁠lines9686-rgb on GitHub · 2026-11-24 04:24 UTC · original
lines9686-rgb:fixture-expect-headers → main · +165 −12 · 8 files · 2 commits · draft

Claimed in the coordination issue as: OLD-6536 (carried over from the original repository, same author)

What and why

Every new compute fixture adds a row to two shared lists, the want table in scripts/run_gpu_tests.py and the cases in runtime/test/shaders/check.py. In the original repository those lists were where most open pull requests conflicted with each other.

This is a prototype of the other way round: a fixture states its expected words in its own leading comment, as ; expect: <words> (and an optional ; groups: N). runtime/test/shaders/fixture_expect.py reads the header. Both runners run every such fixture with vk_compute_test ... dump and compare the words, so a new fixture needs no row in either list. Three fixtures move over: cs_bounds, cs_smem_bounds and cs_buf_fmt8 (the last was checked only by run_gpu_tests.py until now, and check.py checks it too). A fixture the device cannot run is a SKIP, as for the listed dumps.

Draft: whether to migrate the remaining fixtures this way is a maintainer's decision. If yes, a follow-up converts the rest mechanically.

Tested

tests/test_fixture_expect.py (the parser, and that a header fixture has no row left in either runner), tests/test_shader_checks.py (87 tests) and tests/test_run_gpu_tests.py: OK.

GPUs tested: n/a (the moved fixtures compare the same words as before)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (scripts/check_no_game_data.py over every changed file: clean).
  • A new translator rule is in the contract table of docs/design.md: n/a

🤖 Generated with Claude Code

**@⁠lines9686-rgb** on GitHub · 2026-11-24 04:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/390) `lines9686-rgb:fixture-expect-headers` → `main` · +165 −12 · 8 files · 2 commits · draft Claimed in the coordination issue as: `OLD-6536` (carried over from the original repository, same author) ### What and why Every new compute fixture adds a row to two shared lists, the `want` table in `scripts/run_gpu_tests.py` and the cases in `runtime/test/shaders/check.py`. In the original repository those lists were where most open pull requests conflicted with each other. This is a prototype of the other way round: a fixture states its expected words in its own leading comment, as `; expect: <words>` (and an optional `; groups: N`). `runtime/test/shaders/fixture_expect.py` reads the header. Both runners run every such fixture with `vk_compute_test ... dump` and compare the words, so a new fixture needs no row in either list. Three fixtures move over: `cs_bounds`, `cs_smem_bounds` and `cs_buf_fmt8` (the last was checked only by `run_gpu_tests.py` until now, and `check.py` checks it too). A fixture the device cannot run is a SKIP, as for the listed dumps. Draft: whether to migrate the remaining fixtures this way is a maintainer's decision. If yes, a follow-up converts the rest mechanically. ### Tested `tests/test_fixture_expect.py` (the parser, and that a header fixture has no row left in either runner), `tests/test_shader_checks.py` (87 tests) and `tests/test_run_gpu_tests.py`: OK. GPUs tested: n/a (the moved fixtures compare the same words as before) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (`scripts/check_no_game_data.py` over every changed file: clean). - [x] A new translator rule is in the contract table of `docs/design.md`: n/a 🤖 Generated with [Claude Code](https://claude.com/claude-code)
runtime/test/shaders/fixture_expect.py reads "; expect: <words>" (and an optional "; groups:") from a compute
fixture's leading comment block. scripts/run_gpu_tests.py and check.py both run every such fixture with
vk_compute_test ... dump and compare, so a new fixture needs no row in either shared list. cs_bounds,
cs_smem_bounds and cs_buf_fmt8 move over; cs_buf_fmt8 was checked by run_gpu_tests.py only and is now checked by
check.py too. tests/test_fixture_expect.py covers the parser and that a header fixture has no row left in either
runner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:57:16 +00:00
Author
Owner

@⁠ubiquitarianism on GitHub · 2026-11-24 04:51 UTC · original

This works and the tests pass: test_fixture_expect 7/7, and test_shader_checks and test_run_gpu_tests are unchanged. I'm holding it because it's a draft prototype, and moving all fixtures to self-declared expectations is a project-wide decision. Once that's agreed, un-draft it or convert the remaining fixtures in a follow-up.

**@⁠ubiquitarianism** on GitHub · 2026-11-24 04:51 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/390#issuecomment-7122399631) This works and the tests pass: `test_fixture_expect` 7/7, and `test_shader_checks` and `test_run_gpu_tests` are unchanged. I'm holding it because it's a draft prototype, and moving all fixtures to self-declared expectations is a project-wide decision. Once that's agreed, un-draft it or convert the remaining fixtures in a follow-up.
This pull request has changes conflicting with the target branch.
  • tests/test_shader_checks.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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