shader: count a 32-bit SALU write in a mesh SAVEEXEC arm as one SGPR (Part of #3703) #3787
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3787
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3785"
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?
@mumba17 on GitHub · 2026-12-01 22:02 UTC · original
mumba17:shader/mesh-saveexec-salu32-writes→main· +16 −1 · 2 files · 1 commits · merged 2026-12-02 01:50 UTCPart of #3705. Fixes the 13 programs that stop at
unproven mesh mask operandon the current stack.Problem
validate_saveexecrecords every scalar destination written in a SAVEEXEC then arm as a register pair. That covers lane masks, but a 32-bit SALU write also marked its neighbour. Those writes become the arm'sscalar_clobbers, which are cleared at the join.In all 13 programs, a lane mask lives in
s[8:9](s_cselect_b64 s[8:9], exec, 0) across a nested SAVEEXEC whose then arm runss_lshl_b32 s7, .... The join cleareds8, and the laters_and_b64 s[2:3], vcc, s[8:9]was refused as an unproven mask.The same over-count made an else arm that reads such a neighbour refuse as
else arm reads a scalar the then arm writes.Change (
gfx1013_direct_mesh.inl)In the then-arm scan, a SOP1/SOP2/SOPK result marks
dst+1only when the opcode name has64(the_b64/_u64/_i64forms, plus*_b64sources such ass_bcnt1_i32_b64, kept as before). VOP results with an SGPR destination (compare masks,v_readfirstlane) and scalar loads are unchanged.Tests (
tests/native_direct_mesh_check.py)saveexec-then-b32-neighbour: the then arm writess29withs_mov_b32, and the else arm readss30. It lowers tophi [ 7, then ], [ 3, else ].saveexec-then-b64-pair:s_mov_b64 s[30:31]in the then arm still keeps the else arm's read ofs31refused.Validation (Windows 11, MSVC, Windows SDK 10.0.26100)
ctest --test-dir out/build/dev -R "native_direct_mesh|mesh": 210/210 (the twomesh_two_exitshardware tests skip as usual).main+ #3710 + #3711 + #3712 + #3731 + #3762 + #3767 + #3772 + #3784 + this: 988 of 1,569 translate, up from 975. 13 gained, none lost. Onmainalone these programs stop at earlier walls. Counts only; request bytes stay local.Independent of #3784; the two touch different lines.
AI-assisted.
🤖 Generated with Claude Code
s_bitset1_b32, then stop at a scalar loop #3705github-bot referenced this pull request2026-12-01 22:37:57 +00:00
github-bot referenced this pull request2026-12-01 23:07:13 +00:00