Shader gather4 c lz #1482

Merged
vsking2000 merged 2 commits from upstream-pr/1482 into main 2026-11-28 11:52:51 +00:00
vsking2000 commented 2026-11-25 01:13:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by vsking2000 on 2026-11-25T01:13:28Z.


Claimed in the coordination issue as:

Depends on:

Fixes:

What and why

Tested

GPUs tested:

AI-assisted:

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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5483186560 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1482). Originally posted by [vsking2000](https://github.com/vsking2000) on 2026-11-25T01:13:28Z. --- Claimed in the coordination issue as: <!-- the item ID from the open "Coordinating who works on what" issue, for example TEST-17, or a link to your claim --> Depends on: <!-- #N for every pull request this one builds on or conflicts with (the coordination issue's Commands section, AGENTS.md); delete the line if it builds on none and conflicts with none --> Fixes: <!-- #N for each issue this closes (GitHub closes it on merge); delete the line if it closes none --> ### What and why <!-- What this changes and the problem it solves. --> ### Tested <!-- What you ran and on which GPU and driver (CONTRIBUTING.md). For the shader translator: how many shaders translate and pass spirv-val, before and after. --> GPUs tested: <!-- vendor, model, driver and OS of each GPU the GPU tests ran on, or n/a --> AI-assisted: <!-- yes or no (AGENTS.md asks a coding agent to say so) --> ### 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.
GeorgiyDemo commented 2026-11-25 01:51:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by GeorgiyDemo on 2026-11-25T01:51:00Z.


Tested 12677c341 on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against main c266c269e (translator-only PR; binaries from the build at 66d4f5aa3):

  • python3 -m unittest test_gather4_c_lz (from tests/semantic): OK at this head. The same file on main fails 7 + 52 errors — the _lz compare-gather form is refused there.
  • GPU regression, --filter ps_gather on MoltenVK 1.4.2: 4/4 PASS (ps_gather4_c_l, ps_gather_border, ps_gather_sampler_lod, ps_gather_wrap).
  • Not run: GPU execution of the new image_gather4_c_lz form itself — no .asm fixture for it; the semantic suite is the evidence here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7150029013 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1482#issuecomment-7150029013). Originally posted by [GeorgiyDemo](https://github.com/GeorgiyDemo) on 2026-11-25T01:51:00Z. --- Tested `12677c341` on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against `main` `c266c269e` (translator-only PR; binaries from the build at `66d4f5aa3`): - `python3 -m unittest test_gather4_c_lz` (from `tests/semantic`): **OK** at this head. The same file on `main` fails **7 + 52 errors** — the `_lz` compare-gather form is refused there. - GPU regression, `--filter ps_gather` on **MoltenVK 1.4.2**: **4/4 PASS** (`ps_gather4_c_l`, `ps_gather_border`, `ps_gather_sampler_lod`, `ps_gather_wrap`). - Not run: GPU execution of the new `image_gather4_c_lz` form itself — no `.asm` fixture for it; the semantic suite is the evidence here. AI-assisted; synthetic fixtures only, no game data.
tiguan26 commented 2026-11-25 05:56:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-25T05:56:33Z.

Review: APPROVED


Approving. Merged into current main (42537e7) with no conflicts; the PR's test passes and the full translator suite gives 488 files / 6,295 tests with only test_int32_to_f64 failing, as on main here (Linux, Python 3.13). The address order after the optional offset dword is z-compare then coordinates, the _o offset reads signed 6-bit x/y at [5:0] and [13:8] as for image_gather4_lz_o, and a dmask other than 0x1, a 3D view or an untranslated modifier is refused rather than guessed.

AI-assisted (Claude).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6052548506 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1482#pullrequestreview-6052548506). Originally posted by [tiguan26](https://github.com/tiguan26) on 2026-11-25T05:56:33Z. **Review:** APPROVED --- Approving. Merged into current main (42537e7) with no conflicts; the PR's test passes and the full translator suite gives 488 files / 6,295 tests with only `test_int32_to_f64` failing, as on main here (Linux, Python 3.13). The address order after the optional offset dword is z-compare then coordinates, the _o offset reads signed 6-bit x/y at [5:0] and [13:8] as for image_gather4_lz_o, and a dmask other than 0x1, a 3D view or an untranslated modifier is refused rather than guessed. AI-assisted (Claude).
MoonEyes commented 2026-11-27 22:43:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T22:43:04Z.


Hi @vsking2000, thanks for this pull request.

CONTRIBUTING.md asks contributors to claim their work in the coordination issue ("Coordinating who works on what", currently #1608) before opening a pull request: post claiming: <ID> there, or a one-line description if the item is not listed yet, and put the ID in the pull request. I could not find a claim from you for this one.

The claim matters because "it is claimed in the coordination issue by the pull request's author" is the first item on the maintainers' checklist for a mergeable pull request, and because it lets others see that the work is taken before they write it a second time.

Could you post the claim in #1608 and put its ID (or a link to it) on the pull request's "Claimed in the coordination issue as:" line? If you already claimed it in another form, a link to your comment is enough.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7229559389 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1482#issuecomment-7229559389). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T22:43:04Z. --- Hi @vsking2000, thanks for this pull request. CONTRIBUTING.md asks contributors to claim their work in the coordination issue ("Coordinating who works on what", currently #1608) before opening a pull request: post `claiming: <ID>` there, or a one-line description if the item is not listed yet, and put the ID in the pull request. I could not find a claim from you for this one. The claim matters because "it is claimed in the coordination issue by the pull request's author" is the first item on the maintainers' checklist for a mergeable pull request, and because it lets others see that the work is taken before they write it a second time. Could you post the claim in #1608 and put its ID (or a link to it) on the pull request's "Claimed in the coordination issue as:" line? If you already claimed it in another form, a link to your comment is enough. AI-assisted (Claude Code, Claude Opus 5.5).
sodove commented 2026-11-28 10:44:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T10:44:26Z.


#1482 | head 12677c3414093d4c91b4333de9062d2016765f2c | python3 -m unittest discover -s tests/semantic -p test_gather4_c_lz.py -v | red: 16 run, 7 failures, 52 errors | green: 16 passed | Red → green

The baseline failed the comparison-gather operand-order and layout cases. The merged file exercised the 2D, array and cube variants.

Captured 38 distinct complete SPIR-V module(s) emitted while rerunning test_gather4_c_lz.py on the merged tree. All assembled and passed spirv-val for Vulkan 1.2 with --allow-offset-texture-operand.

Base 3bd936ecd98995bca3e1da83d5e28d2343001aef was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238091140 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1482#issuecomment-7238091140). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T10:44:26Z. --- #1482 | head `12677c3414093d4c91b4333de9062d2016765f2c` | `python3 -m unittest discover -s tests/semantic -p test_gather4_c_lz.py -v` | red: 16 run, 7 failures, 52 errors | green: 16 passed | **Red → green** The baseline failed the comparison-gather operand-order and layout cases. The merged file exercised the 2D, array and cube variants. Captured 38 distinct complete SPIR-V module(s) emitted while rerunning test_gather4_c_lz.py on the merged tree. All assembled and passed spirv-val for Vulkan 1.2 with --allow-offset-texture-operand. Base `3bd936ecd98995bca3e1da83d5e28d2343001aef` was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7237873883).
DadaCap commented 2026-11-28 11:52:53 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:52:53Z.


Merged, thank you @vsking2000! This translator PR (Shader gather4 c lz) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238843941 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1482#issuecomment-7238843941). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T11:52:53Z. --- Merged, thank you @vsking2000! This translator PR (Shader gather4 c lz) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1482
No description provided.