Shader sample c l forms #1479

Closed
vsking2000 wants to merge 2 commits from upstream-pr/1479 into main
vsking2000 commented 2026-11-25 01:12:55 +00:00 (Migrated from github.com)

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


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:5483180757 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1479). Originally posted by [vsking2000](https://github.com/vsking2000) on 2026-11-25T01:12:55Z. --- 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:01 +00:00 (Migrated from github.com)

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


Tested cce1f4181 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_sample_c_l_forms (from tests/semantic): OK (1 skipped) at this head. The same file on main fails 14 + 57 errors (1 skipped) — the new _c_l forms are refused there.
  • tests/test_texel_offsets.py + tests/test_translate.py (pytest 9.2.0 from tests/requirements.txt in a venv): 755 passed, 2 failed. Both failures are cs_dpp_cmp.asm (test_gpu_samples_translate_and_validate, test_wave64_emulate_uses_no_subgroup_ops): Homebrew LLVM 23 llvm-mc rejects v_cmp_gt_f32_dpp … dpp8:[…] with "dpp variant of this instruction is not supported". The same 2 fail on main with the same command, so it is a pre-existing local toolchain issue, not this PR.
  • GPU regression, --filter ps_sample_c on MoltenVK 1.4.2: 4/4 PASS (ps_sample_c, _b, _lz, _lz_a16).
  • Not run: GPU execution of the new _c_l forms — no .asm fixture; semantic evidence only.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7150029427 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1479#issuecomment-7150029427). Originally posted by [GeorgiyDemo](https://github.com/GeorgiyDemo) on 2026-11-25T01:51:01Z. --- Tested `cce1f4181` 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_sample_c_l_forms` (from `tests/semantic`): **OK** (1 skipped) at this head. The same file on `main` fails **14 + 57 errors** (1 skipped) — the new `_c_l` forms are refused there. - `tests/test_texel_offsets.py` + `tests/test_translate.py` (pytest 9.2.0 from `tests/requirements.txt` in a venv): **755 passed, 2 failed**. Both failures are `cs_dpp_cmp.asm` (`test_gpu_samples_translate_and_validate`, `test_wave64_emulate_uses_no_subgroup_ops`): Homebrew LLVM 23 `llvm-mc` rejects `v_cmp_gt_f32_dpp … dpp8:[…]` with "dpp variant of this instruction is not supported". The same 2 fail on `main` with the same command, so it is a pre-existing local toolchain issue, not this PR. - GPU regression, `--filter ps_sample_c` on **MoltenVK 1.4.2**: **4/4 PASS** (`ps_sample_c`, `_b`, `_lz`, `_lz_a16`). - Not run: GPU execution of the new `_c_l` forms — no `.asm` fixture; semantic evidence only. AI-assisted; synthetic fixtures only, no game data.
tiguan26 commented 2026-11-25 06:07:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-25T06:07:02Z.

Review: APPROVED


Approving. Merged into current main (42537e7) with no conflicts; the PR's tests pass and the full translator suite gives 488 files / 6,291 tests with only test_int32_to_f64 failing, as on main here (Linux, Python 3.13). The address width now follows LLVM's order ([offset,] z-compare, coordinates, LOD): under a16 the offset and compare keep a dword each and coordinates plus LOD pack in pairs, so fixed + (ncoord + 2) // 2; the LOD of the fold comes from the c_l address too; and a 3D view, dmask other than 0x1, tfe/lwe or another modifier is refused with its own message.

AI-assisted (Claude).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6052639080 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1479#pullrequestreview-6052639080). Originally posted by [tiguan26](https://github.com/tiguan26) on 2026-11-25T06:07:02Z. **Review:** APPROVED --- Approving. Merged into current main (42537e7) with no conflicts; the PR's tests pass and the full translator suite gives 488 files / 6,291 tests with only `test_int32_to_f64` failing, as on main here (Linux, Python 3.13). The address width now follows LLVM's order ([offset,] z-compare, coordinates, LOD): under a16 the offset and compare keep a dword each and coordinates plus LOD pack in pairs, so fixed + (ncoord + 2) // 2; the LOD of the fold comes from the c_l address too; and a 3D view, dmask other than 0x1, tfe/lwe or another modifier is refused with its own message. AI-assisted (Claude).
MoonEyes commented 2026-11-27 22:42:59 +00:00 (Migrated from github.com)

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


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:7229558049 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1479#issuecomment-7229558049). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T22:42:59Z. --- 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).
MoonEyes commented 2026-11-28 18:01:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T18:01:50Z.


Hi @vsking2000, thanks for this pull request. It currently conflicts with main (conflicting file(s): tools/rdna2spirv.py), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243474403 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1479#issuecomment-7243474403). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T18:01:50Z. --- Hi @vsking2000, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `tools/rdna2spirv.py`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 11:47:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:47:27Z.

Review: CHANGES_REQUESTED


This PR cannot merge in its current state:

  • Merge conflict with main in tools/rdna2spirv.py.
  • No CI run on current head cce1f41.
  • Unfilled PR description: the body is still the raw PR template without summary, test results, or coordination-issue claim.

Please rebase onto current main, fill out the PR description (including the coordination claim), and obtain a green CI run.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130614257 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1479#pullrequestreview-6130614257). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:47:27Z. **Review:** CHANGES_REQUESTED --- This PR cannot merge in its current state: - **Merge conflict** with `main` in `tools/rdna2spirv.py`. - **No CI run** on current head `cce1f41`. - **Unfilled PR description**: the body is still the raw PR template without summary, test results, or coordination-issue claim. Please rebase onto current `main`, fill out the PR description (including the coordination claim), and obtain a green CI run. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 17:23:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:23:39Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7319227565 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1479#issuecomment-7319227565). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:23:39Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

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!1479
No description provided.