shader: open wave32 v_cmpx masked regions in pixel_aot #2207
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2215"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-25T05:32:52Z.
Refs #2137 (follow-up to #2163, which left this opener out).
Under the declared wave32 guest profile,
lower(..., wave_size=32), av_cmpxnow opens a wave32 masked region whens_mov_b32 sN, exec_loof the entry mask directly precedes it. The save is that one SGPR. The region closes and switches with the wave32 spellings from #2163 (s_mov_b32/s_or_b32 exec_lo,s_andn2_b32 exec_lo, skips), and the compare keeps VCC and SCC as the wave64v_cmpxregion does. #1315's author counted 4,681 such regions in their local input; that count is not checked here, and no corpus run is part of this PR.Behaviour
Unsupported v_cmpx execution mask save:execinstead ofexec_lo;s_wqm_b32first).Write overlaps an outstanding scalar load;Expected a numeric register;sN+1is an ordinary register.s_mov_b32save is still refused first, socheck_cmpx_controlsis unchanged.v_cmpxopener.Evidence
Commit
98e5d6baona8a7b1d6. The draws ran on the same code onab9a020c; upstream has not changed anypixel_aotfile since. Windows 11 build 26100, debug layer unavailable.python -B tests/pixel_aot_check.pycheck_wave32_region_controlsderives wave32 twins of everyv_cmpxfixture and requires them to lower to identical HLSL. The fixtures arecmpx_regionwith both closes,cmpx_skip,cmpx_observables, the class regions, allCMPX_PREDICATE_GROUPSin e32 and e64, the f32/f16 class groups in e32 and e64,cmpx64_groupi64/u64 × 2 × 2 (translate_int),cmpxf64_groupoverCMPF64_GROUPS(translate_f64), and thev_cmpxelse, wait, scalar-ALU, scalar-load and body families. Each twin is also refused without the profile.check_wave32_cmpx_refusalsexecspelling acceptedpixel_aot_cmpx_regions_warp(WARP 10.0.26100.8972)pixel_aot_cmpx_regions_hardware,XBOX2WINDOWS_ADAPTER=Quadro(NVIDIA Quadro M1000M, 32.0.15.7371)XBOX2WINDOWS_ADAPTER=Intel(Intel HD Graphics 530, 31.0.101.2111)pixel_aot_check.py binary, LLVM 15.0.7, wave32 twins ofcmpx_region(both closes) andcmpx_skip_asmwith+wavefrontsize32,-wavefrontsize64ctest -R '^pixel_aot_' -E '_hardware$' -j 3form_coverage_check,docs_links_checkI counted the draw statuses with a temporary print in
run_pixel_batch, which is not part of this PR. The integer, binary64 and_e64twins are covered by the equality control only and are not drawn. Like the #2163 draws, the wave32 draws lower to identical HLSL, so they add no pixel evidence beyond the equality control, and nothing here runs on gfx1013.Not in this PR
AI-assisted.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T05:36:04Z.
Review: COMMENTED
Review of head
98e5d6ba116d8a361055fdfc501035c9cb09a57e. P1: 0. P2: 0.Logic: under the wave32 profile,
s_mov_b32 sN, exec_lodirectly before av_cmpxnow opens a width-32 region. The save must hold the entry mask (("entry", "w32")), not a whole-quad mask. Close and else use the wave32 spellings, and the compare keeps VCC and SCC as the wave64 opener does. Without the profile the save is refused. The region builder, the comments and the docs/experiments.md paragraph are consistent. No other open PR covers this opener.Commands executed locally:
python3 tests/pixel_aot_check.py: rc 0 (the wave32 equality control now covers the v_cmpx fixtures, with refusals pinned incheck_wave32_cmpx_refusals)python3 tests/docs_links_check.py: pass (18 files, 408 links)python3 tests/bidi_controls_check.py: passgit diff --check origin/main...HEAD: cleanpixel_aot_check.pyfails incheck_wave32_region_controls. Killed.execspelling accepted for the save. The same check fails. Killed. Both reverted.x2w_pipe.py win2025 2215 --scope direct --targets offscreen_check --regex '^pixel_aot_(cmpx|exec)_regions_warp$': Debug 2/2 passed, Release 2/2 passed. This includes the new wave32 twin draws and mutants.AI-assisted; commands listed were executed locally.