shader: lower EXEC mask snapshots in acyclic pixel shaders (Part of #3814) #3928
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!3928
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3926"
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?
@timbot103 on GitHub · 2026-12-03 10:53 UTC · original
timbot103:shader/pixel-acyclic-exec-masks→main· +340 −15 · 6 files · 4 commits · merged 2026-12-03 13:01 UTCPart of #3816.
Change
E1 tracks the first refusal
undefined graphics register 126. The censusreported 175 remaining stages after #3836 advanced 49. It identified
s_cselect_b64 s[lo:hi], exec, 0ands_mov_b64 s[lo:hi], execoutsideloops. This branch is based directly on
origin/mainand uses the existingacyclic mask and EXEC region proofs.
An integration check against #3920 found adjacent edits in
src/gfx1013_direct_graphics.inlanddocs/experiments.mdto reconcilewhen the branches meet.
In a wave64 pixel shader, accept an EXEC copy at a proven exact-coverage
tail or outside matched read-only mask regions. Accept the EXEC-or-zero
select with a reaching scalar comparison and wave-uniform SCC. The
invocation bit can feed CNDMASK, a proven AND, or a one-armed AND_SAVEEXEC
ending in a matching
s_mov_b64 exec, savedrestore. A reachingunmodified copy of the current base EXEC also supports a same-mode
restore.
Numeric EXEC and mask-word reads, unsupported select operands, unknown
SCC, clobbered pairs, missing definitions at joins, and unproved EXEC
changes still refuse.
Verification
Commit
5aa86473ond2e6a4ed. Windows 11 Pro build10.0.26200.9974, MSVC19.44.35230, and DXC1.9.2602.17(
21d28f727). WARP reported driver10.0.26100.9818, the GeForce RTX5080 reported
32.0.16.2140(621.40), and the D3D12 debug layer wasunavailable.
The base compiler already accepted plain EXEC copies at entry and after an
SCC join. The fixture reproduced six
undefined graphics register 126refusals on the base compiler. The three SAVEEXEC cases refused during CFG
construction with
graphics branch on a wave mask. The patch compiles allnine cases and checks thirteen near-miss refusals. WARP and the RTX 5080
matched all 16 pixels in each of the nine draws in Debug and Release.
Every wrong reference produced the expected mismatch. All nine also compiled
through
compile_dxil $DXC_BIN_DIR cache gfx1013-mesh86-ps fixture.ps86 fixture.csowith a synthetic
rootsig_1_1sidecar declaring direct CBV/SRV/UAV andsampler heap indexing. The effect on the private census is unmeasured.
The full Debug build and the selected Release target build completed.
To reproduce the base diagnostics, set
$BASE_COMPILERto an executablebuilt from
d2e6a4edand$DXC_BIN_DIRto the SDK compiler directory.The baseline mode expects all nine refusals and exits successfully if
each diagnostic matches.
This touches the same graphics translator area as #3920 (L2); whichever lands second will be reconciled.
🤖 Generated with Claude Code
@timbot103 on GitHub · 2026-12-03 12:20 UTC · original
7b380775makes thenumeric-selectrefusal control pass both alone and together with #3920 (L2). With #3920, the selected EXEC pair is tracked symbolically, so the numeric read is refused earlier, withunbound numeric SGPR s20. The control accepts either message and still requires a nonzero exit and no DXIL. Results: this PR alone passed 71/71 in Debug and Release. Merged with #3920, it passed 74/74 in Debug. The PR-preset control passed on both trees. A combined build of all the open wave branches (#3919–#3926) also passed. The only textual overlap with #3920 is in the docs index and the state declarations.@timbot103 on GitHub · 2026-12-03 12:46 UTC · original
Merged
mainafter #3920 (L2) landed. The resolution keeps both the L2 loop lowering and this PR's acyclic EXEC-mask lowering. It also fixes the review nit on #3920: the L2 doc now links to the census table (comment 7368270349) instead of the claim. The pixel suite passed 74/74 in Debug and Release. The full PR preset had 334 passes, 0 failures and 8 capability skips, and the full Debug build succeeded. Marked Ready for review, keeping within 5 non-draft PRs per #3516.@R0Y00 on GitHub · 2026-12-03 13:01 UTC · original · approved these changes
Independently reviewed
ec615aae. Checked reaching SCC, exclusion of unproven regions, and invalidation of saved and selected EXEC tags on scalar overwrite. Windows MSVC Debug, Windows 11 build 26300, D3D12 debug layer enabled.ctest --preset dev --no-tests=error -j 1 -V -R '^native_pixel_acyclic_exec_masks_(controls|warp|hardware)$'passed 3/3. WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656) matched 16 pixels per draw and rejected the wrong reference. Disabling the new EXEC snapshot lowering made the scc-true control fail at +0x14 with undefined graphics register 126. The restored binary passed.