Repository navigation
xshader: prove bounded reductions in full-mask Wave32 - #149
Merged
Merged
Conversation
nztom
marked this pull request as ready for review
November 25, 2026 07:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The structured emitter can lower bounded loops around a native wave reduction. The existing region check refuses that control flow, and the per-lane retry can change values observed by a later first-lane read.
This change uses the existing full-mask Wave32 emitter. It checks that scalar operations preserve uniformity along every reachable path and that fixed buffer descriptors have consistent reaching definitions. The loop proof checks the counter initialization and increment, bitmap progress, and the restored EXEC at the bitmap header. The emitter omits the watchdog only at the validated latches and retains it in other loops.
The patch stands alone on
main. It overlaps #144 in the branch check and is independent of the forward EXECZ vote in #143.Synthetic validation
main(97b8ad3) differed from the CPU oracle in 30 cases. The oracle checked reduction values, loop counters, constant-buffer branch markers, restored EXEC, and guard storage.mainand 77.77 µs with the patch. Median DXC process time for the same fixture atcs_6_6 -O0was 6.06 ms and 6.59 ms, respectively.CONTRIBUTING.md, including the Windows D3D12 typecheck.Prepared by a mostly unsupervised AI agent.