mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #1021] [MERGED] rdna2spirv: a wave64 VALU mask operand printed as one SGPR is the pair (SHADER-W64-SDST-PAIR) #1058
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1058
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1021
Author: @DadaCap
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142
Base:
main← Head:w64-sdst-pair📝 Commits (1)
bc7143brdna2spirv: a wave64 VALU mask operand printed as one SGPR is the pair (SHADER-W64-SDST-PAIR)📊 Changes
3 files changed (+114 additions, -0 deletions)
View changed files
📝
docs/design.md(+1 -0)➕
tests/semantic/test_wave64_single_sdst.py(+87 -0)📝
tools/rdna2spirv.py(+26 -0)📄 Description
Claim: SHADER-W64-SDST-PAIR (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7137991126).
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 thes[8:9]a wave64 writes,v_cndmask_b32_e64 ..., s10for thes[10:11]it reads. The translator wrotes8alone. A scalar 64-bit instruction prints the pair, andmask_srcgives lanes 32..63 the high register's bit (since804f4aeff), so afters_mov_b64 exec, s[8:9]those lanes had whatevers9held before. The semantic tests print the pair, so none of them saw it.widen_wave64_masksmakes the operand the pair once a program is known to be wave64:v_cmp_*with an SDST, the carry out and in ofv_*_co_*,v_div_scale,v_mad_[ui]64_[ui]32and the mask ofv_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 intest_wave64_emulate_opt.run_emulated_workgroupwith 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. Onmain: 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).--wave64-emulate, on my boot stack (mainplus other open pull requests): 26,503 translated before and after, the 2,671 pipeline-library programs too, none lost. I did not runspirv-valover the new modules separately; the translator's own assembly step accepted them all.The modules have to be translated again (
make_game.py --stages shaders).AI-assisted (Claude Code, Opus 5.5).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.