shader: pixel_aot wave32 masked regions (s_and_saveexec_b32, b32 closes and else) #2137
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#2137
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?
@legacy-code-archaeologist on GitHub · 2026-11-25 01:25 UTC · original
pixel_aotlowers the structured masked region only in its wave64 spellings (#651, #1315 stages A and B). #1315 measured that wave32 regions are common in the same input. Its author counted 11,723 simple regions in 967 PS records opening withs_and_saveexec_b32 saved, vcc_loand closing withs_mov_b32 exec_lo, saved; 3,117 of them (805 records) have ans_andn2_b32 exec_lo, saved, exec_loelse. Todaylower(..., wave_size=32)refuses the opener as an unsupported instruction, anddocs/experiments.mdlists the wave32 close and else as rejected.Proposed scope (one PR, all gated on the existing
wave_size=32guest profile)s_and_saveexec_b32 sN, vcc_lo|sM, under the same preconditions as the b64 opener: no open region, the entry mask, a save register that is valid and not pending, and a condition tracked in exactly one register. Every other spelling, and any failed precondition, is refused asUnsupported execution mask save.s_mov_b32 exec_lo, sNands_or_b32 exec_lo, exec_lo, sNon the saved register.s_andn2_b32 exec_lo, sN, exec_lo, once per region.s_cbranch_execztargets in their b32 spellings.Evidence plan
pixel_aot_exec_regions_{warp,hardware}draws gain the wave32 variants, run on WARP, a Quadro M1000M and an Intel HD 530.+wavefrontsize32.Out of scope
v_cmpxopener afters_mov_b32 saved, exec_lo(4,681 regions in #1315).s_or_saveexec_b32,s_xor_b32 exec_loand the other saveexec or wrexec variants.scan_unsupported_shaderssupport list.I'll take this unless someone already has it. I'll link the PR here.
AI-assisted.
@tedin7 on GitHub · 2026-11-25 01:40 UTC · original
Picking up wave32 masked regions (
s_and_saveexec_b32, b32 closes and else) per the proposed scope, with Linux + Win2025 verification tests.@legacy-code-archaeologist on GitHub · 2026-11-25 01:50 UTC · original
@tedin7 thanks, but please hold off: I opened this issue as a claim and the implementation is already done locally. It is in its final pre-commit review, and the PR follows within the hour.
The branch already covers:
tools/pixel_aot.py;check_wave32_region_controls, which asserts HLSL equality against each wave64 twin across the plain, else, wait, scalar-ALU, scalar-load and body families and pins every refusal with its message;pixel_aot_exec_regions_{warp,hardware}, passing on WARP, a Quadro M1000M and an Intel HD 530;+wavefrontsize32;form_coverage_checkupdate.If you want to help, a Linux or Win2025 run of the PR once it is up would be useful. A second implementation would only duplicate it.
AI-assisted.
@legacy-code-archaeologist on GitHub · 2026-11-25 02:03 UTC · original
PR: #2163 (opener, both closes, else, width-gated skip target; controls with HLSL equality against each wave64 twin; draws on WARP, Quadro M1000M and Intel HD 530; LLVM 15 round trip with +wavefrontsize32).
AI-assisted.