shader: admit modeled scalar ALU in pixel_aot masked regions #1057
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1064"
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 romn4rch on 2026-11-24T00:01:38Z.
Change
Implements the narrow scalar-ALU follow-up for #987 (Refs #987). Masked pixel_aot regions now accept only the existing lowerings for
s_mov_b32,s_movk_i32,s_add_i32,s_mul_i32, signeds_cmp_*_i32, ands_cselect_b32, with inputs the scalar tracker can prove. Region-written SGPRs and SCC remain usable within that region but are treated as conditional after restore; reads reject until an unconditional rewrite. Scalar loads and other scalar operations remain refused. Both openers, save-pair checks, and existing empty-wave-skip rules are preserved.Added translation controls, fixture binary round-trip inputs, WARP and hardware CTest entries, and experiment documentation. The draw fixture checks mixed, full, and empty masks and expects the unmasked reference to mismatch.
Verification
& .\out\pe-env\Scripts\python.exe -B tests\pixel_aot_check.py— passed.cmake --build --preset dev --target offscreen_check— passed with the Visual Studio 2022 x64 developer environment loaded bytools/dev.ps1.ctest --preset dev --no-tests=error -R '^pixel_aot_region_scalar_alu_warp$' -V— passed (1/1), Windows 11 build 26300, WARP backend. The deliberate unmasked-reference negative control was detected as a mismatch; no unexpected mismatch occurred.ctest --preset dev --no-tests=error -R '^pixel_aot_region_waits_warp$' -V— passed (1/1), preserving the existing masked-wait stage.& .\out\pe-env\Scripts\python.exe -B tests\docs_links_check.py— passed (15 Markdown files, 237 links).& .\out\pe-env\Scripts\python.exe -B tests\bidi_controls_check.py— passed (889 tracked files checked).git diff --check— passed.llvm-mc,llvm-objcopy, andLLVM-C.dllare unavailable in this environment.Evidence and follow-up
Fixtures are synthetic, source-built instruction sequences in
tests/pixel_aot_check.py; no game files or proprietary binaries are used. WARP readback verifies only these fixtures and does not establish behavior for arbitrary shaders. The LLVM round-trip remains to be run in an environment with LLVM 15 gfx1013 support.Checklist
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T00:18:46Z.
I resolved the shared scalar-tracker conflict and kept both mask invalidation and masked-region definedness. I also corrected the round-trip fixture: LLVM 15 rejects two distinct literal operands on the same scalar select, so the fixture materializes the same constants before the region. The full LLVM 15 binary suite and all six Windows Release masked-region tests passed on the integrated candidate (RTX 4060 Laptop and WARP).
Candidate:
8e45488a08