reprend #2174: rdna2spirv: seed the POPS collision word so the wait loop ends (SHADER-POPS-COLLISION-SEED) #2731

Merged
OreoFR merged 4 commits from upstream-pr/2731 into main 2026-11-30 16:24:03 +00:00
OreoFR commented 2026-11-30 13:38:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T13:38:50Z.


Carries #2174 by @QemmHD, because it conflicts with main after #2566 and the reminder to merge main (https://github.com/ProjectLeonida/mandy/pull/2174#issuecomment-7256005008) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped.

Item: SHADER-POPS-COLLISION-SEED-CARRY (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7280119323; original item SHADER-POPS-COLLISION-SEED).

What this branch is

  • The author's branch at 15350f6da, unchanged (no rebase, author commits kept).
  • A merge of main (from the carry preparation of 29/11) that resolves the conflict, then a merge of current main f9f3ec4c6, which had a new conflict (below). Both merge commits carry Co-authored-by the author.
  • Nothing else: the change itself is the original PR's; see #2174 for what and why, and the verifications posted there.

What conflicted and how it was resolved

  • runtime/test/vk_harness.cpp: main's two-stage has_cap scan, plus the PR's needs_interlock = has_cap(fs_code, 5378).
  • New with f9f3ec4c6: tools/rdna2spirv.py, _translate (straight-line and CFG paths): main now passes extra=meta_extra to _shader_meta.collect and reads the literal samplers right after it; the PR's g.note_pops_word(insns) follows that block, still before fit_shared_memory / needs_barrier_rounds as in the PR.

Tests

  • On this branch (main f9f3ec4c6 merged), Windows 11, Python 3.12, no GPU used: tests/semantic/test_pops_collision_seed.py: 12 OK.
  • Earlier merge: green 12 OK; GPU (RTX 4070 Laptop 8 GB) run_gpu_tests --filter ps_pops_wait_loop: PASS 4096/4096; red (main's rdna2spirv.py): 1 failure + 14 errors, GPU FAIL; full semantic suite 530 files / 6537 tests, same 2 failures as main.
  • python -I scripts/check_no_game_data.py on every file this PR changes: clean.
  • CI on this PR covers the rest (C++ build and ctest, the full translator suite).

Depends on: none.

Needs an independent verifier before merge (red/green on another machine), as for any carry.

AI-assisted (Claude Code, oreofr-agent).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5566380933 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2731). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T13:38:50Z. --- Carries #2174 by @QemmHD, because it conflicts with `main` after #2566 and the reminder to merge `main` (https://github.com/ProjectLeonida/mandy/pull/2174#issuecomment-7256005008) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped. Item: `SHADER-POPS-COLLISION-SEED-CARRY` (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7280119323; original item `SHADER-POPS-COLLISION-SEED`). ### What this branch is - The author's branch at `15350f6da`, unchanged (no rebase, author commits kept). - A merge of `main` (from the carry preparation of 29/11) that resolves the conflict, then a merge of current `main` `f9f3ec4c6`, which had a new conflict (below). Both merge commits carry `Co-authored-by` the author. - Nothing else: the change itself is the original PR's; see #2174 for what and why, and the verifications posted there. ### What conflicted and how it was resolved - `runtime/test/vk_harness.cpp`: `main`'s two-stage `has_cap` scan, plus the PR's `needs_interlock = has_cap(fs_code, 5378)`. - New with `f9f3ec4c6`: `tools/rdna2spirv.py`, `_translate` (straight-line and CFG paths): `main` now passes `extra=meta_extra` to `_shader_meta.collect` and reads the literal samplers right after it; the PR's `g.note_pops_word(insns)` follows that block, still before `fit_shared_memory` / `needs_barrier_rounds` as in the PR. ### Tests - On this branch (`main` `f9f3ec4c6` merged), Windows 11, Python 3.12, no GPU used: `tests/semantic/test_pops_collision_seed.py`: 12 OK. - Earlier merge: green 12 OK; GPU (RTX 4070 Laptop 8 GB) `run_gpu_tests --filter ps_pops_wait_loop`: PASS 4096/4096; red (`main`'s `rdna2spirv.py`): 1 failure + 14 errors, GPU FAIL; full semantic suite 530 files / 6537 tests, same 2 failures as `main`. - `python -I scripts/check_no_game_data.py` on every file this PR changes: clean. - CI on this PR covers the rest (C++ build and `ctest`, the full translator suite). Depends on: none. **Needs an independent verifier before merge** (red/green on another machine), as for any carry. AI-assisted (Claude Code, oreofr-agent). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
OreoFR commented 2026-11-30 13:46:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T13:46:13Z.


Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest, no GPU), main f9f3ec4c6.

  • MEASURED, red (main + only this PR's tests): tests/semantic/test_pops_collision_seed.py: 1 failed.
  • MEASURED, green (main + merge --no-ff of f474c74b0): 12 passed, 8 subtests passed.
  • READ IN CODE: tests/semantic/spirv_wave_interp.py is a helper with no tests of its own ("no tests ran" on both sides).
  • Not covered: the C++ build, ctest and the rest of the suite (CI).

Not independent: this PR and this check share the same owner (OreoFR). Treat it as a second-machine run, not an independent review.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7280329537 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2731#issuecomment-7280329537). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T13:46:13Z. --- Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest, no GPU), `main` `f9f3ec4c6`. - MEASURED, red (`main` + only this PR's tests): `tests/semantic/test_pops_collision_seed.py`: 1 failed. - MEASURED, green (`main` + `merge --no-ff` of `f474c74b0`): 12 passed, 8 subtests passed. - READ IN CODE: `tests/semantic/spirv_wave_interp.py` is a helper with no tests of its own ("no tests ran" on both sides). - Not covered: the C++ build, `ctest` and the rest of the suite (CI). **Not independent:** this PR and this check share the same owner (OreoFR). Treat it as a second-machine run, not an independent review. AI-assisted: Claude Code
KelboLive commented 2026-11-30 14:33:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T14:33:04Z.


Independent check on Windows/NVIDIA (not the author), at f474c74b0.

  • tests/semantic/test_pops_collision_seed.py: 12 passed (python -I -m unittest discover -s tests/semantic -p test_pops_collision_seed.py).
  • Full translator suite on this branch: 550 files, 6,687 tests, 0 files failed (395 s, 32 jobs).
  • GPU: built the branch's vk_harness change and ran run_gpu_tests.py --build build --filter pops:
    ps_pops_wait_loop 4096/4096 pixels exact — 1/1 passed. The device has fragmentShaderPixelInterlock, so it ran rather than skipping.

Machine: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711, MSVC 14.52.37025, Vulkan SDK 1.4.363.0, llvm-mc 21.1.8.

No regressions seen. As with the other carries, a rebase on current main before merge would keep history linear.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7281552539 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2731#issuecomment-7281552539). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T14:33:04Z. --- Independent check on Windows/NVIDIA (not the author), at `f474c74b0`. - `tests/semantic/test_pops_collision_seed.py`: **12 passed** (`python -I -m unittest discover -s tests/semantic -p test_pops_collision_seed.py`). - Full translator suite on this branch: **550 files, 6,687 tests, 0 files failed** (395 s, 32 jobs). - GPU: built the branch's `vk_harness` change and ran `run_gpu_tests.py --build build --filter pops`: `ps_pops_wait_loop 4096/4096 pixels exact` — **1/1 passed**. The device has `fragmentShaderPixelInterlock`, so it ran rather than skipping. Machine: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711, MSVC 14.52.37025, Vulkan SDK 1.4.363.0, llvm-mc 21.1.8. No regressions seen. As with the other carries, a rebase on current `main` before merge would keep history linear. AI-assisted: yes (opencode).
OreoFR commented 2026-11-30 15:07:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T15:07:44Z.


ed699ed76 fixes the red linux-python-and-viewer job (found by MoonEyes): tests/test_rdna2_decode.py::test_parity_with_llvm_mc_on_shader_fixtures failed on this PR's new fixture runtime/test/shaders/ps_pops_wait_loop.asm (s_add_i32), where llvm-mc prints src_pops_exiting_wave_id and tools/rdna2_decode.py gave raw src_239. The decoder now names source operand 239 like llvm-mc; tools/rdna2spirv.py and tools/shader_ir.py already expected that name.

  • MEASURED (macOS 27.2.1, Apple M5, Python 3.12.16, llvm-mc from Homebrew LLVM): every test file that uses rdna2_decode, cpu_ref or cf_ref (19 files): before 1 failed, 356 passed, 1 skipped, after 357 passed, 1 skipped, 1834 subtests passed. test_rdna2_decode.py + test_pops_collision_seed.py + test_translate.py: 768 passed.
  • Without llvm-mc the parity test is skipped, which is why the earlier Windows and Mac runs were green.
  • Same owner as the carry: needs someone else's check.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7282476178 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2731#issuecomment-7282476178). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T15:07:44Z. --- `ed699ed76` fixes the red `linux-python-and-viewer` job (found by MoonEyes): `tests/test_rdna2_decode.py::test_parity_with_llvm_mc_on_shader_fixtures` failed on this PR's new fixture `runtime/test/shaders/ps_pops_wait_loop.asm` (`s_add_i32`), where llvm-mc prints `src_pops_exiting_wave_id` and `tools/rdna2_decode.py` gave `raw src_239`. The decoder now names source operand 239 like llvm-mc; `tools/rdna2spirv.py` and `tools/shader_ir.py` already expected that name. - MEASURED (macOS 27.2.1, Apple M5, Python 3.12.16, llvm-mc from Homebrew LLVM): every test file that uses `rdna2_decode`, `cpu_ref` or `cf_ref` (19 files): before `1 failed, 356 passed, 1 skipped`, after `357 passed, 1 skipped, 1834 subtests passed`. `test_rdna2_decode.py` + `test_pops_collision_seed.py` + `test_translate.py`: 768 passed. - Without llvm-mc the parity test is skipped, which is why the earlier Windows and Mac runs were green. - Same owner as the carry: needs someone else's check. AI-assisted: Claude Code
MoonEyes commented 2026-11-30 16:22:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:22:19Z.


Verified by MoonEyes (another owner than OreoFR) on head ed699ed76: Windows 11, Python 3.14, no LLVM, no GPU run.

  • tests/semantic/test_pops_collision_seed.py 12 OK on this head; red on the earlier head f474c74b0 (without rdna2spirv.py of the change: 9 failures, 4 errors). rdna2_decode.py changed since (source 239 named): the Linux CI job that compares it with llvm-mc is green on this head.
  • Corpus slice, tools/rdna2spirv.py --wave64-emulate, shards 0, 12, 24 and 36 of 48 (2,209 shaders), main 20fe0c754 against main + this pull request: 2,209 translated and 2,209 pass spirv-val in both; 1 of 2,145 SPIR-V files differs (+32 bytes).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284557330 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2731#issuecomment-7284557330). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T16:22:19Z. --- Verified by MoonEyes (another owner than OreoFR) on head `ed699ed76`: Windows 11, Python 3.14, no LLVM, no GPU run. - `tests/semantic/test_pops_collision_seed.py` 12 OK on this head; red on the earlier head `f474c74b0` (without `rdna2spirv.py` of the change: 9 failures, 4 errors). `rdna2_decode.py` changed since (source 239 named): the Linux CI job that compares it with llvm-mc is green on this head. - Corpus slice, `tools/rdna2spirv.py --wave64-emulate`, shards 0, 12, 24 and 36 of 48 (2,209 shaders), `main` `20fe0c754` against `main` + this pull request: 2,209 translated and 2,209 pass `spirv-val` in both; 1 of 2,145 SPIR-V files differs (+32 bytes). AI-assisted (Claude Code).
MoonEyes commented 2026-11-30 16:23:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:23:59Z.


Merging. Head ed699ed76 merges cleanly with main ffa0f8ed4 and does not force a rebase of #2566. Counts equal on the slice, 1 file differs; red/green on Windows 11 by another owner. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284601273 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2731#issuecomment-7284601273). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T16:23:59Z. --- Merging. Head `ed699ed76` merges cleanly with `main` `ffa0f8ed4` and does not force a rebase of #2566. Counts equal on the slice, 1 file differs; red/green on Windows 11 by another owner. Merged by MoonEyes. AI-assisted (Claude Code).
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!2731
No description provided.