shader: lower delayed EXEC restores in mesh CMPX arms (Part of #3703) #3917
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3917"
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 timbot103 on 2026-12-03T10:21:14Z.
Part of #3703
Mesh census row E2
mesh SAVEEXEC then arm depends on EXECaccounted for 277 first refusals in the368a045dfcensus, including 127 moved there by #3843. This change targetsthe local-restore case of the distant CMPX restores described in the work split.
Inside a SAVEEXEC then arm, the compiler now accepts a copy of EXEC followed by
one supported CMPX and a forward EXECZ skip to a common tail of EXEC-independent
scalar ALU and wait instructions. The tail must end at a restore of that exact
copy inside the then arm. The existing nested diamond joins the VGPRs at the
skip target and executes the scalar work on both paths before continuing under
the restored mask.
The matcher still refuses branches into or across the nested region, vector and
memory operations in the tail, EXEC- or VCC-dependent tail instructions,
wrong or clobbered saved masks, and reads of scalar values defined only in the
skipped body. Backward branches and shared exits that would reach an enclosing
inverse with narrowed EXEC remain refused. The exact instruction schedule and
first-refusal delta for the 277 capture programs remain unverified.
Verification
Tested
b1cd99f3based ond2e6a4edon Windows 1126200.9974, MSVC19.44.35230.0, Windows SDK10.0.26100.0, and DXC1.9.2602.17. The D3D12debug layer was unavailable. The GPUs were Microsoft Basic Render Driver
(WARP,
1414:008c, driver10.0.26100.9818) and NVIDIA GeForce RTX 5080(
10de:2c02, driver32.0.16.2140).The full Debug build, Release target build, bidi check, Markdown link check
and diff check passed. The first Release run reproduced the known asynchronous
WARP failures in guarded allocation, empty allocation, and missing position.
The first diagnostic was
accepted=1 refused=0for guarded allocation, wherethe fixture expected
accepted=1 refused=1. The synchronous retry passed allthree.
The new IR fixture passed four DXIL cases and 11 refusal controls. For each
adapter and configuration, wave32 and wave64 mesh readback matched all 4,096
pixels across four draws. Each wrong reference, which omits the scalar tail
on the empty path, produced the expected 512 mismatches.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T12:06:14Z.
Review: APPROVED
Approved
b1cd99f3. The nested CMPX arms rejoin before the EXEC-independent scalar tail, and the restore still consumes its exact saved pair. Independent MSVC Debug and SDK DXC on Windows build 26300: native_mesh_saveexec_cmpx_tail_ir passed four IR cases and eleven refusals. The source-built renderer matched 1,024 pixels in each of the four wave32/wave64 and inverse/no-inverse draws on each adapter. The wrong tail reference differed in 512 pixels with both guest wave sizes on both adapters. Inbox WARP 10.0.26100.9818, RTX 4060 Laptop 32.0.16.1656, debug layer enabled, zero debug errors and no skips.