rdna2spirv: a wave64 VALU mask operand printed as one SGPR is the pair (SHADER-W64-SDST-PAIR) #1021

Manually merged
github merged 1 commit from gh-pr/1021/head into gh-pr/1021/base 2026-11-26 09:33:56 +00:00
Owner

@⁠DadaCap on GitHub · 2026-11-24 17:00 UTC · original
DadaCap:w64-sdst-pair → main · +114 −0 · 3 files · 1 commits · merged 2026-11-24 22:49 UTC

Claim: SHADER-W64-SDST-PAIR (#14).

The shader listings come from llvm-mc without +wavefrontsize64, so a VALU instruction's lane-mask SGPR is printed as one register: v_cmp_gt_u32_e64 s8, ... for the s[8:9] a wave64 writes, v_cndmask_b32_e64 ..., s10 for the s[10:11] it reads. The translator wrote s8 alone. A scalar 64-bit instruction prints the pair, and mask_src gives lanes 32..63 the high register's bit (since 804f4aeff), so after s_mov_b64 exec, s[8:9] those lanes had whatever s9 held before. The semantic tests print the pair, so none of them saw it.

widen_wave64_masks makes the operand the pair once a program is known to be wave64: v_cmp_* with an SDST, the carry out and in of v_*_co_*, v_div_scale, v_mad_[ui]64_[ui]32 and the mask of v_cndmask.

How it was found: a 128-thread pipeline-library compute shader (lib_cs_03141) hung an RTX 5080 (device lost) while the retail title's loading screen runs. The translated shader also loops for ever in test_wave64_emulate_opt.run_emulated_workgroup with the title's own constants; with this it ends after 76 barriers, and the title gets past it.

Tested

  • tests/semantic/test_wave64_single_sdst.py (new): both printed forms translate to the same module, natively and emulated, and all 64 lanes are run. On main: 2 failures, 1 error.
  • scripts/run_semantic_tests.py tests/semantic: 470 files, 6,165 tests; the one file that fails, test_image_cube_store_glc, cannot start llvm-mc on this machine (FileNotFoundError).
  • Corpus, with --wave64-emulate, on my boot stack (main plus other open pull requests): 26,503 translated before and after, the 2,671 pipeline-library programs too, none lost. I did not run spirv-val over the new modules separately; the translator's own assembly step accepted them all.
  • RTX 5080, driver 621.24, Windows 11. No game data.

The modules have to be translated again (make_game.py --stages shaders).

AI-assisted (Claude Code, Opus 5.5).

🤖 Generated with Claude Code

**@⁠DadaCap** on GitHub · 2026-11-24 17:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1021) `DadaCap:w64-sdst-pair` → `main` · +114 −0 · 3 files · 1 commits · merged 2026-11-24 22:49 UTC Claim: SHADER-W64-SDST-PAIR (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14). The shader listings come from llvm-mc without `+wavefrontsize64`, so a VALU instruction's lane-mask SGPR is printed as one register: `v_cmp_gt_u32_e64 s8, ...` for the `s[8:9]` a wave64 writes, `v_cndmask_b32_e64 ..., s10` for the `s[10:11]` it reads. The translator wrote `s8` alone. A scalar 64-bit instruction prints the pair, and `mask_src` gives lanes 32..63 the high register's bit (since 804f4aeff), so after `s_mov_b64 exec, s[8:9]` those lanes had whatever `s9` held before. The semantic tests print the pair, so none of them saw it. `widen_wave64_masks` makes the operand the pair once a program is known to be wave64: `v_cmp_*` with an SDST, the carry out and in of `v_*_co_*`, `v_div_scale`, `v_mad_[ui]64_[ui]32` and the mask of `v_cndmask`. How it was found: a 128-thread pipeline-library compute shader (`lib_cs_03141`) hung an RTX 5080 (device lost) while the retail title's loading screen runs. The translated shader also loops for ever in `test_wave64_emulate_opt.run_emulated_workgroup` with the title's own constants; with this it ends after 76 barriers, and the title gets past it. ### Tested - `tests/semantic/test_wave64_single_sdst.py` (new): both printed forms translate to the same module, natively and emulated, and all 64 lanes are run. On `main`: 2 failures, 1 error. - `scripts/run_semantic_tests.py tests/semantic`: 470 files, 6,165 tests; the one file that fails, `test_image_cube_store_glc`, cannot start llvm-mc on this machine (`FileNotFoundError`). - Corpus, with `--wave64-emulate`, on my boot stack (`main` plus other open pull requests): 26,503 translated before and after, the 2,671 pipeline-library programs too, none lost. I did not run `spirv-val` over the new modules separately; the translator's own assembly step accepted them all. - RTX 5080, driver 621.24, Windows 11. No game data. The modules have to be translated again (`make_game.py --stages shaders`). AI-assisted (Claude Code, Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:33:54 +00:00
github manually merged commit bc7143b5f1 into gh-pr/1021/base 2026-11-26 09:33:56 +00:00
Author
Owner

@⁠quartz-heron-58 on GitHub · 2026-11-24 17:29 UTC · original

Retail check on a second NVIDIA card, with the fence loss made visible by #1028 (which builds on #980).

Setup: boot-prototype at 9173e790 plus #980 and #1028 cherry-picked; RTX 4080, driver 621.24, Windows 11 26300, MSVC; own 1.0.2.1 copy; LEONIDA_LAZY_PSO=1, LEONIDA_GPU_REGION_MB=10240, LEONIDA_AUTOPRESS=1, the OBS capture layer disabled, no LEONIDA_SKIP_INT3. Shaders: the whole stage translated again (main corpus, pipeline library, FSPX, BVH, executable) with this pull request's commit bc7143b5 merged with #674, #593 and #957. One conflict, with #674: widen_wave64_masks and restore_vcc_tuples are added at the same place in tools/rdna2spirv.py; I kept both. test_wave64_single_sdst.py, test_vcc_tuple_fallback.py and test_dpp_compare.py pass in that tree. 26,503 of 26,503 corpus shaders and 2,623 of 2,684 library programs translate and pass spirv-val, the same counts as without this commit.

shaders without this PR shaders with it
runs 5 on this tree while #1028 was being written, the fault report printed in 2 of them 1
stop the title's fatal exit at 74 to 79 s the same exit at 89.5 s
loss seen as a fence counter of UINT64_MAX, then vkDeviceWaitIdle returning VK_ERROR_DEVICE_LOST the same
VK_EXT_device_fault report 3 and 2 address faults in those 2 runs, all INSTRUCTION_POINTER_UNKNOWN, addresses 0x2000af410 to 0x2000af700 INSTRUCTION_POINTER_FAULT at 0x2000ceee0, and one entry of type NONE with address 0xb700000000, precision 0x1000
nvlddmkm event 153 at the stop 2 or 3 6

So on this card the device is still lost during the load, but not the same way: the report changes from the hang shape to a fault with an address, about 12 s later. That fits the endless dispatch being gone and a second problem behind it. One run with the fix, so it shows the change, not a rate.

Lines that are in the log of the run with the fix and in none of the 12 earlier runs on this machine, all just before the loss: first calls of list slots 85, 51, 129, 61, 39, 86 and 26 and device slot 71; unimplemented ID3D12Device8::CreateSamplerFeedbackUnorderedAccessView; ExecuteIndirect with a DISPATCH_MESH signature is not replayed yet; nothing was recorded; RehydrateRaytracingAccelerationStructureBatched2X is not implemented yet; E_NOTIMPL; WriteToSubresource/ReadFromSubresource staging copy failed; replay result 10. I have not established which of them, if any, leads to the fault.

Not checked: whether lib_cs_03141 is dispatched in my run (I do not log dispatches), and the semantic suite beyond the three files above. On your note that VK_EXT_device_fault reported nothing for the hang: here it answers only after vkDeviceWaitIdle has returned VK_ERROR_DEVICE_LOST; before that the count query returns VK_ERROR_UNKNOWN (details in #1028).

Counts and driver addresses only, no game data. AI-assisted.

**@⁠quartz-heron-58** on GitHub · 2026-11-24 17:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1021#issuecomment-7139268698) Retail check on a second NVIDIA card, with the fence loss made visible by #1028 (which builds on #980). Setup: `boot-prototype` at `9173e790` plus #980 and #1028 cherry-picked; RTX 4080, driver 621.24, Windows 11 26300, MSVC; own 1.0.2.1 copy; `LEONIDA_LAZY_PSO=1`, `LEONIDA_GPU_REGION_MB=10240`, `LEONIDA_AUTOPRESS=1`, the OBS capture layer disabled, no `LEONIDA_SKIP_INT3`. Shaders: the whole stage translated again (main corpus, pipeline library, FSPX, BVH, executable) with this pull request's commit `bc7143b5` merged with #674, #593 and #957. One conflict, with #674: `widen_wave64_masks` and `restore_vcc_tuples` are added at the same place in `tools/rdna2spirv.py`; I kept both. `test_wave64_single_sdst.py`, `test_vcc_tuple_fallback.py` and `test_dpp_compare.py` pass in that tree. 26,503 of 26,503 corpus shaders and 2,623 of 2,684 library programs translate and pass `spirv-val`, the same counts as without this commit. | | shaders without this PR | shaders with it | |---|---|---| | runs | 5 on this tree while #1028 was being written, the fault report printed in 2 of them | 1 | | stop | the title's fatal exit at 74 to 79 s | the same exit at 89.5 s | | loss seen as | a fence counter of `UINT64_MAX`, then `vkDeviceWaitIdle` returning `VK_ERROR_DEVICE_LOST` | the same | | `VK_EXT_device_fault` report | 3 and 2 address faults in those 2 runs, all `INSTRUCTION_POINTER_UNKNOWN`, addresses `0x2000af410` to `0x2000af700` | `INSTRUCTION_POINTER_FAULT` at `0x2000ceee0`, and one entry of type `NONE` with address `0xb700000000`, precision `0x1000` | | `nvlddmkm` event 153 at the stop | 2 or 3 | 6 | So on this card the device is still lost during the load, but not the same way: the report changes from the hang shape to a fault with an address, about 12 s later. That fits the endless dispatch being gone and a second problem behind it. One run with the fix, so it shows the change, not a rate. Lines that are in the log of the run with the fix and in none of the 12 earlier runs on this machine, all just before the loss: first calls of list slots 85, 51, 129, 61, 39, 86 and 26 and device slot 71; `unimplemented ID3D12Device8::CreateSamplerFeedbackUnorderedAccessView`; `ExecuteIndirect with a DISPATCH_MESH signature is not replayed yet; nothing was recorded`; `RehydrateRaytracingAccelerationStructureBatched2X is not implemented yet; E_NOTIMPL`; `WriteToSubresource/ReadFromSubresource staging copy failed; replay result 10`. I have not established which of them, if any, leads to the fault. Not checked: whether `lib_cs_03141` is dispatched in my run (I do not log dispatches), and the semantic suite beyond the three files above. On your note that `VK_EXT_device_fault` reported nothing for the hang: here it answers only after `vkDeviceWaitIdle` has returned `VK_ERROR_DEVICE_LOST`; before that the count query returns `VK_ERROR_UNKNOWN` (details in #1028). Counts and driver addresses only, no game data. AI-assisted.
Author
Owner

@⁠fin-github on GitHub · 2026-11-24 18:00 UTC · original · reviewed

  • tests/semantic/test_wave64_single_sdst.py on the PR: 3 tests OK. The same file against main (32950551e):
    2 failures and 1 error, so it catches the bug.
  • unittest discover -s tests/semantic -p "test_wave64*.py": 268 tests OK.

Question: the e64 forms can also print vcc_lo as the SDST (v_cmp_gt_u32_e64 vcc_lo, ...,
v_cndmask_b32_e64 ..., vcc_lo). widen_wave64_masks leaves special operands alone, which
test_wave32_keeps_single_registers asserts for the e32 case. I see the existing vcc_lo handling
(vcc_half_keeps_mask, rdna2spirv.py:1629, and the mask-destination path near 6058). Does that already give the
e64 vcc_lo SDST the full VCC in wave64? If so, a single line in the docstring or the design.md row would save the
next reader from asking the same thing.

Nit: in elif op.startswith("v_") and "_co_" in op or op in (...), and binds tighter than or, which is what
you want here. Parentheses would make that clear at a glance.

Tested on Windows 11 Pro 26200, CPython 3.14.4, MSVC from VS 18 Community, applied on main 32950551e. No GPU or game files used. AI-assisted (Claude Code).

**@⁠fin-github** on GitHub · 2026-11-24 18:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1021#pullrequestreview-6044650038) · **reviewed** - `tests/semantic/test_wave64_single_sdst.py` on the PR: 3 tests OK. The same file against `main` (32950551e): 2 failures and 1 error, so it catches the bug. - `unittest discover -s tests/semantic -p "test_wave64*.py"`: 268 tests OK. Question: the e64 forms can also print `vcc_lo` as the SDST (`v_cmp_gt_u32_e64 vcc_lo, ...`, `v_cndmask_b32_e64 ..., vcc_lo`). `widen_wave64_masks` leaves `special` operands alone, which `test_wave32_keeps_single_registers` asserts for the e32 case. I see the existing `vcc_lo` handling (`vcc_half_keeps_mask`, `rdna2spirv.py:1629`, and the mask-destination path near 6058). Does that already give the e64 `vcc_lo` SDST the full VCC in wave64? If so, a single line in the docstring or the design.md row would save the next reader from asking the same thing. Nit: in `elif op.startswith("v_") and "_co_" in op or op in (...)`, `and` binds tighter than `or`, which is what you want here. Parentheses would make that clear at a glance. Tested on Windows 11 Pro 26200, CPython 3.14.4, MSVC from VS 18 Community, applied on main 32950551e. No GPU or game files used. AI-assisted (Claude Code).
Author
Owner

@⁠DadaCap on GitHub · 2026-11-24 18:07 UTC · original

@⁠quartz-heron-58 thank you, this is a very useful check, and the vkDeviceWaitIdle tip works here too: with it, my report gives an address where the fault query answered nothing before.

Two of your new lines are explained:

  • CreateSamplerFeedbackUnorderedAccessView: it is console device slot 71, the unordered-access twin of slot 70 (a view from a resource description, a view description and a GPU address). Forwarded to the PC method it writes nothing, so descriptor tables keep leftover memory and the culling programs read it as V#s. Details in #14 (finding of today, next to RT-TITLE-TEXTURE-VIEWS / #1079).
  • ExecuteIndirect with a DISPATCH_MESH signature: #424 and #429 replay it.

After both, the remaining fault on my RTX 5080 was a read in a 24 GiB GPU window (protection 0x801) outside the region. Covering it with a sparse buffer gave one run with no device loss; that run still ended later in an access violation I have not looked into.

On the conflict with #674: keeping both functions is right.

AI-assisted.

**@⁠DadaCap** on GitHub · 2026-11-24 18:07 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1021#issuecomment-7140195934) @⁠quartz-heron-58 thank you, this is a very useful check, and the `vkDeviceWaitIdle` tip works here too: with it, my report gives an address where the fault query answered nothing before. Two of your new lines are explained: - `CreateSamplerFeedbackUnorderedAccessView`: it is console device slot 71, the unordered-access twin of slot 70 (a view from a resource description, a view description and a GPU address). Forwarded to the PC method it writes nothing, so descriptor tables keep leftover memory and the culling programs read it as V#s. Details in https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 (finding of today, next to RT-TITLE-TEXTURE-VIEWS / #1079). - `ExecuteIndirect with a DISPATCH_MESH signature`: #424 and #429 replay it. After both, the remaining fault on my RTX 5080 was a read in a 24 GiB GPU window (protection `0x801`) outside the region. Covering it with a sparse buffer gave one run with no device loss; that run still ended later in an access violation I have not looked into. On the conflict with #674: keeping both functions is right. AI-assisted.
Author
Owner

@⁠milk4sale on GitHub · 2026-11-24 18:14 UTC · original

Tested on another setup, with counts over the whole corpus (1.0.2.1, all 26,503 listings, llvm-mc backend), this head bc7143b5f alone:

  • The premise holds on every listing. In the wave64 shaders all 292,733 compares into a one-register SGPR name an even register, and so do all 6,988 carry-outs; wave32 code names an odd one in 137,832 of 299,058 compares. No listing names a pair. LLVM 23.1.4 assembles v_cmp_gt_u32_e64 s4, 40, v1 (default) and ... s[4:5], ... (+wavefrontsize64) to the same eight bytes.
  • Reach. On main, 13,314 wave64 shaders (7,120 PS, 4,918 MS, 664 CS, 612 VS) read such a pair back with a 64-bit scalar op while the mask analysis knew nothing of the high register: 162,431 reads, mostly s_and_b64 (86,137), s_or_b64 (50,843) and s_and_saveexec_b64 (15,399).
  • Full translation, no --wave64-emulate: 26,503 translated, 26,503 pass spirv-val. 19,453 modules differ from main 1504c1af6, all wave64 (MS 9,282 of 9,282, PS 8,021 of 10,974, VS 1,169 of 2,236, CS 786 of 1,154, GS 195 of 195); none of the 2,662 wave32 modules changes.
  • A side effect worth having: SHADER-10 tiers (wave64 VS/PS/GS on 32-wide subgroups, wave64_halves.py --census). The halves analysis took the pair for "a lane mask combined with a register that is not one". With this change 504 shaders leave tier C and none enters it: A 5,059 -> 5,267, B 101 -> 397, C 8,245 -> 7,741; tainted-branch 6,534 -> 1,181.
  • GPU. A compute fixture in the one-register form (six compares and a carry-out, read back by s_and_b64, s_or_b64, s_xor_b64, s_andn2_b64, s_and_saveexec_b64, s_mov_b64 exec, s_bcnt1/s_ff1 and SCC, with another mask, 0 or nothing in the high register beforehand): RTX 4070 Ti, Linux, driver 620.70.06, subgroup 32, LEONIDA_W64_EMULATE=1. main stores none of its eight ISA-derived words, this branch all eight. It is #1090, stacked on this one (TEST-W64-SDST-PAIR-GPU).
  • scripts/run_semantic_tests.py tests/semantic on this head plus that fixture: 472 files, 6,176 tests, 0 files failed.
  • #1091 (SHADER-W64-WQM-UVOTE) also builds on this: with the pair in place, a uniform vote under s_wqm_b64 exec, exec becomes visible to the halves analysis, and 452 more pixel shaders leave tier C.

Not checked: a 64-wide device (--require-wave64), and the retail title. Counts and opcode names only, no game data. AI-assisted (Claude Code).

**@⁠milk4sale** on GitHub · 2026-11-24 18:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1021#issuecomment-7140366004) Tested on another setup, with counts over the whole corpus (1.0.2.1, all 26,503 listings, llvm-mc backend), this head `bc7143b5f` alone: - **The premise holds on every listing.** In the wave64 shaders all 292,733 compares into a one-register SGPR name an even register, and so do all 6,988 carry-outs; wave32 code names an odd one in 137,832 of 299,058 compares. No listing names a pair. LLVM 23.1.4 assembles `v_cmp_gt_u32_e64 s4, 40, v1` (default) and `... s[4:5], ...` (`+wavefrontsize64`) to the same eight bytes. - **Reach.** On `main`, 13,314 wave64 shaders (7,120 PS, 4,918 MS, 664 CS, 612 VS) read such a pair back with a 64-bit scalar op while the mask analysis knew nothing of the high register: 162,431 reads, mostly `s_and_b64` (86,137), `s_or_b64` (50,843) and `s_and_saveexec_b64` (15,399). - **Full translation, no `--wave64-emulate`:** 26,503 translated, 26,503 pass `spirv-val`. 19,453 modules differ from `main` `1504c1af6`, all wave64 (MS 9,282 of 9,282, PS 8,021 of 10,974, VS 1,169 of 2,236, CS 786 of 1,154, GS 195 of 195); none of the 2,662 wave32 modules changes. - **A side effect worth having: SHADER-10 tiers** (wave64 VS/PS/GS on 32-wide subgroups, `wave64_halves.py --census`). The halves analysis took the pair for "a lane mask combined with a register that is not one". With this change 504 shaders leave tier C and none enters it: A 5,059 -> 5,267, B 101 -> 397, C 8,245 -> 7,741; `tainted-branch` 6,534 -> 1,181. - **GPU.** A compute fixture in the one-register form (six compares and a carry-out, read back by `s_and_b64`, `s_or_b64`, `s_xor_b64`, `s_andn2_b64`, `s_and_saveexec_b64`, `s_mov_b64 exec`, `s_bcnt1`/`s_ff1` and SCC, with another mask, 0 or nothing in the high register beforehand): RTX 4070 Ti, Linux, driver 620.70.06, subgroup 32, `LEONIDA_W64_EMULATE=1`. `main` stores none of its eight ISA-derived words, this branch all eight. It is #1090, stacked on this one (TEST-W64-SDST-PAIR-GPU). - `scripts/run_semantic_tests.py tests/semantic` on this head plus that fixture: 472 files, 6,176 tests, 0 files failed. - #1091 (SHADER-W64-WQM-UVOTE) also builds on this: with the pair in place, a uniform vote under `s_wqm_b64 exec, exec` becomes visible to the halves analysis, and 452 more pixel shaders leave tier C. Not checked: a 64-wide device (`--require-wave64`), and the retail title. Counts and opcode names only, no game data. AI-assisted (Claude Code).
Author
Owner

@⁠thesubtleties on GitHub · 2026-11-24 19:21 UTC · original

Tested bc7143b5f (#1021) and 9f1a072f7 (#1090), each merged onto main 3aa97542. NVIDIA RTX 3080 (620.73.04) and AMD Raphael RDNA2 iGPU gfx1036 (RADV, Mesa 26.3.1), CachyOS.

  • cs_w64x_cmp_sdst passes on gfx1036 with native 64-wide subgroups, and with LEONIDA_W64_EMULATE=1 on gfx1036 and the 3080. With main's rdna2spirv.py it fails in all three (16384 16384, five 0xffffffff, 1).
  • No other GPU test changes from main (3080 and gfx1036, native and emulated).
  • run_semantic_tests.py tests/semantic: 471 files / 6,171 tests (#1021) and 472 / 6,179 (#1090), 0 failed.

This runs translated SPIR-V, not native RDNA2 code. Not tested: game corpus. AI-assisted (Claude Code)

**@⁠thesubtleties** on GitHub · 2026-11-24 19:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1021#issuecomment-7141977070) Tested `bc7143b5f` (#1021) and `9f1a072f7` (#1090), each merged onto main `3aa97542`. NVIDIA RTX 3080 (620.73.04) and AMD Raphael RDNA2 iGPU gfx1036 (RADV, Mesa 26.3.1), CachyOS. - `cs_w64x_cmp_sdst` passes on gfx1036 with native 64-wide subgroups, and with `LEONIDA_W64_EMULATE=1` on gfx1036 and the 3080. With main's `rdna2spirv.py` it fails in all three (`16384 16384`, five `0xffffffff`, `1`). - No other GPU test changes from main (3080 and gfx1036, native and emulated). - `run_semantic_tests.py tests/semantic`: 471 files / 6,171 tests (#1021) and 472 / 6,179 (#1090), 0 failed. This runs translated SPIR-V, not native RDNA2 code. Not tested: game corpus. AI-assisted (Claude Code)
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 22:49 UTC · original

Merged. Thanks, and thanks to everyone who tested it. Checked locally on main 0f98d193c + bc7143b5f:

  • Claim: valid. SHADER-W64-SDST-PAIR was posted at 16:38 UTC, before this PR, and is unedited.
  • tests/semantic/test_wave64_single_sdst.py: against main's translator it gives 2 failures and 1 error; with this PR all 3 tests pass.
  • Semantic suite on the merge: 474 files, 6,194 tests, 0 files failed. The 12 test_docs_* files, test_text_write_line_endings and check_no_game_data.py on the three changed files are clean.
  • Counts over the corpus (1.0.2.1, 26,503 listings): 19,453 of the 23,841 wave64 shaders print a VALU mask operand as one SGPR; none uses an odd register, none is already printed as a pair, none is at s105 or above. A slice of 832 shaders translates and passes spirv-val 832 of 832 before and after.
  • CI did not run on this PR (the workflows were waiting for approval), so the merge rests on the runs above and on the reports here from milk4sale, thesubtleties and quartz-heron-58.

On fin-github's question: yes, an e64 vcc_lo mask already means the full VCC in wave64: mask_dst stores vcc_lo to the whole %vcc and mask_src loads %vcc for it. A line saying so in the docstring would help the next reader.

Two small things for a follow-up, neither blocking:

  • test_wave32_keeps_single_registers calls the helper directly, so the wave32 path itself isn't exercised.
  • The contract row could also cite the GPU fixture from #1090 once that is in.

#1090 and #1091 are stacked on this one and can move now.

AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-24 22:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1021#issuecomment-7146689169) Merged. Thanks, and thanks to everyone who tested it. Checked locally on `main` `0f98d193c` + `bc7143b5f`: - **Claim:** valid. `SHADER-W64-SDST-PAIR` was posted at 16:38 UTC, before this PR, and is unedited. - **`tests/semantic/test_wave64_single_sdst.py`:** against `main`'s translator it gives 2 failures and 1 error; with this PR all 3 tests pass. - **Semantic suite on the merge:** 474 files, 6,194 tests, 0 files failed. The 12 `test_docs_*` files, `test_text_write_line_endings` and `check_no_game_data.py` on the three changed files are clean. - **Counts over the corpus (1.0.2.1, 26,503 listings):** 19,453 of the 23,841 wave64 shaders print a VALU mask operand as one SGPR; none uses an odd register, none is already printed as a pair, none is at `s105` or above. A slice of 832 shaders translates and passes `spirv-val` 832 of 832 before and after. - **CI did not run on this PR** (the workflows were waiting for approval), so the merge rests on the runs above and on the reports here from `milk4sale`, `thesubtleties` and `quartz-heron-58`. On `fin-github`'s question: yes, an `e64` `vcc_lo` mask already means the full VCC in wave64: `mask_dst` stores `vcc_lo` to the whole `%vcc` and `mask_src` loads `%vcc` for it. A line saying so in the docstring would help the next reader. Two small things for a follow-up, neither blocking: - `test_wave32_keeps_single_registers` calls the helper directly, so the wave32 path itself isn't exercised. - The contract row could also cite the GPU fixture from #1090 once that is in. #1090 and #1091 are stacked on this one and can move now. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.