Repository navigation
Require descriptor comparisons to gate EXEC at each waterfall access - #3
MichaelSmithAI wants to merge 2 commits into
Conversation
|
Thank you for this. I am not merging it; the branch took the other fix offered for the same report, and the reasons are on the upstream thread: Marvisak#566 (comment) In short, from an independent review and runs on an RTX 5070 and WARP:
Both are tests on One thing this PR accepts that the branch now refuses: a loop split over two blocks by an unconditional branch (your I am leaving this open for you to close, since it is your PR. The title was not used in these tests. AI-assisted. |
A reviewer of Marvisak#566 found a shader that samples with the first active lane's descriptor even though the loop compares every lane's descriptor with it. The comparison result never narrows EXEC before the sample. The current matcher accepts the loop and emits a per-lane handle, changing which texture some lanes sample.
This change checks the mask at each resource access. It follows positive mask conjunctions back to the descriptor equality comparisons and requires coverage for every descriptor dword. For wave64 the same comparison must contribute to both halves of EXEC. When the check cannot establish that, resource tracking returns the existing unsupported reason.
The wave32 regression compares two versions of the joined-descriptor fixture. The gated version lowers with one nonuniform handle. The version that saves EXEC without narrowing it is refused. The wave64 control checks the original fixture and a variant that restores only the upper lanes before the access.
The second commit addresses a loop that masks the access correctly, then clears EXEC before its retry branch. The matcher ignores a branch edge only when a statically zero EXEC makes that edge impossible (both words for wave64). A valid loop split across two blocks still lowers.
On 6638098 the two access-mask regressions fail. On e162729 the dead-retry regression fails and the multi-block control passes. With both commits, all 75 shader library tests pass on Linux with Rust 1.98.1. The asset-policy check also passes. The reviewer's Windows result is reported on the parent PR. Our tests use synthetic shaders and do not measure retail rendering or the effect on the parent's translation counts.
This addresses the access-mask condition raised in review. A proof that the loop back edge retries exactly the remaining lanes and general lowering for first-lane broadcast are separate work.
AI assistance was used to implement and independently test this change.