shader: lower inverse EXEC arms inside mesh lane skips (Part of #3703) #3923

Merged
timbot103 merged 2 commits from upstream-pr/3923 into main 2026-12-03 13:00:47 +00:00
timbot103 commented 2026-12-03 10:41:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-03T10:41:24Z.


Part of #3703

Mesh census row E1

mesh EXEC write inside a lane-skip block accounted for 155 first refusals
on 368a045df. In the earlier work split, 149 of 152 were attributed to an
s_andn2_b64 exec, sN, exec else arm. The source-built CMPX fixture
reproduces that refusal at +0x5c before this change.

The direct mesh frontend pairs two forward EXECZ arms after a supported
unmodified 32-bit CMPX or s_and_b64 mask. The inverse and local restore
must name the same still-valid saved EXEC, proven equal to the enclosing
skip's guard. Each arm runs only for its lanes. The join preserves the
reaching VGPR from each edge.

A missing or mismatched restore, an unproven parent mask, branches within
either arm, and memory or wave-wide effects still refuse. A value first
written on just one edge is still undefined at the join. This independent
branch from origin/main extends #3765's coverage of in-skip EXEC
transitions. The private census delta remains unmeasured.

Verification

Tested 890a95c0 from origin/main d2e6a4ed on Windows 11
26200.9974, MSVC 19.44.35230.0, SDK 10.0.26100.0, and DXC
1.9.2602.17. The D3D12 debug layer was unavailable. Readback used
Microsoft Basic Render Driver (WARP, 1414:008c, driver 10.0.26100.9818)
and NVIDIA GeForce RTX 5080 (10de:2c02, driver 32.0.16.2140).

cmake --preset dev -U INTAKE_PYTHON
cmake --preset release -U INTAKE_PYTHON
cmake --build out/build/dev -- -j 6
cmake --build out/build/release --target compile_dxil offscreen_check startup_indirect_draw_indexed d3d12_xs_shim -- -j 6
ctest --preset dev --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_'
ctest --preset release --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_'
$env:X2W_SYNC_MESH_REQUESTS='1'
ctest --preset release --no-tests=error -j 1 -V -R '^native_mesh_(guarded_allocation|empty_allocation|missing_position)_warp$'
Remove-Item Env:X2W_SYNC_MESH_REQUESTS
ctest --preset pr --no-tests=error -R '^native_mesh_inverse_ir$' -V
ctest --preset dev --no-tests=error -j 1 -V -R '^native_compute_pack_refusals$'
python tests/bidi_controls_check.py
python tests/docs_links_check.py
git diff --check origin/main...HEAD
Run Passed Failed Skipped
Debug mesh regression suite 25 0 0
Release mesh regression suite, first run 23 2 0
Release synchronous WARP rerun 3 0 0
PR preset, new IR test 1 0 0
Debug C++17 pack refusal fixture 1 0 0

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 for
empty allocation and missing position. The first diagnostic was
accepted=1 refused=0 where the fixture expected accepted=1 refused=1.
The synchronous rerun passed all three allocation and position tests.

Four DXIL cases and seven refusal controls passed. On each adapter and in
each configuration, four wave32 and wave64 draws matched all 4,096 pixels.
The two wrong references missed the expected 512 pixels apiece.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5624838171 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3923). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-03T10:41:24Z. --- Part of #3703 ## Mesh census row E1 `mesh EXEC write inside a lane-skip block` accounted for 155 first refusals on `368a045df`. In the earlier work split, 149 of 152 were attributed to an `s_andn2_b64 exec, sN, exec` else arm. The source-built CMPX fixture reproduces that refusal at `+0x5c` before this change. The direct mesh frontend pairs two forward EXECZ arms after a supported unmodified 32-bit CMPX or `s_and_b64` mask. The inverse and local restore must name the same still-valid saved EXEC, proven equal to the enclosing skip's guard. Each arm runs only for its lanes. The join preserves the reaching VGPR from each edge. A missing or mismatched restore, an unproven parent mask, branches within either arm, and memory or wave-wide effects still refuse. A value first written on just one edge is still undefined at the join. This independent branch from `origin/main` extends #3765's coverage of in-skip EXEC transitions. The private census delta remains unmeasured. ## Verification Tested `890a95c0` from `origin/main` `d2e6a4ed` on Windows 11 `26200.9974`, MSVC `19.44.35230.0`, SDK `10.0.26100.0`, and DXC `1.9.2602.17`. The D3D12 debug layer was unavailable. Readback used Microsoft Basic Render Driver (WARP, `1414:008c`, driver `10.0.26100.9818`) and NVIDIA GeForce RTX 5080 (`10de:2c02`, driver `32.0.16.2140`). ```powershell cmake --preset dev -U INTAKE_PYTHON cmake --preset release -U INTAKE_PYTHON cmake --build out/build/dev -- -j 6 cmake --build out/build/release --target compile_dxil offscreen_check startup_indirect_draw_indexed d3d12_xs_shim -- -j 6 ctest --preset dev --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' ctest --preset release --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' $env:X2W_SYNC_MESH_REQUESTS='1' ctest --preset release --no-tests=error -j 1 -V -R '^native_mesh_(guarded_allocation|empty_allocation|missing_position)_warp$' Remove-Item Env:X2W_SYNC_MESH_REQUESTS ctest --preset pr --no-tests=error -R '^native_mesh_inverse_ir$' -V ctest --preset dev --no-tests=error -j 1 -V -R '^native_compute_pack_refusals$' python tests/bidi_controls_check.py python tests/docs_links_check.py git diff --check origin/main...HEAD ``` | Run | Passed | Failed | Skipped | | --- | ---: | ---: | ---: | | Debug mesh regression suite | 25 | 0 | 0 | | Release mesh regression suite, first run | 23 | 2 | 0 | | Release synchronous WARP rerun | 3 | 0 | 0 | | PR preset, new IR test | 1 | 0 | 0 | | Debug C++17 pack refusal fixture | 1 | 0 | 0 | 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 for empty allocation and missing position. The first diagnostic was `accepted=1 refused=0` where the fixture expected `accepted=1 refused=1`. The synchronous rerun passed all three allocation and position tests. Four DXIL cases and seven refusal controls passed. On each adapter and in each configuration, four wave32 and wave64 draws matched all 4,096 pixels. The two wrong references missed the expected 512 pixels apiece. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
timbot103 commented 2026-12-03 12:42:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-03T12:42:28Z.


Merged main (a44d1967) after #3917 landed. The resolution relocates the inverse-arm helper and keeps #3917's delayed-restore handling. The mesh suite passed 29/29 in Debug. Release passed 26/29; the 3 failures are the existing asynchronous WARP allocation fixtures, which pass with X2W_SYNC_MESH_REQUESTS=1. The PR preset passed 2/2, covering both #3917's and this PR's IR tests, and the WARP and RTX 5080 readbacks for both features passed. Marked Ready for review, keeping within 5 non-draft PRs per #3514.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7378715615 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3923#issuecomment-7378715615). Originally posted by [timbot103](https://github.com/timbot103) on 2026-12-03T12:42:28Z. --- Merged `main` (`a44d1967`) after #3917 landed. The resolution relocates the inverse-arm helper and keeps #3917's delayed-restore handling. The mesh suite passed 29/29 in Debug. Release passed 26/29; the 3 failures are the existing asynchronous WARP allocation fixtures, which pass with `X2W_SYNC_MESH_REQUESTS=1`. The PR preset passed 2/2, covering both #3917's and this PR's IR tests, and the WARP and RTX 5080 readbacks for both features passed. Marked Ready for review, keeping within 5 non-draft PRs per #3514.
R0Y00 commented 2026-12-03 13:00:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T13:00:38Z.

Review: APPROVED


Independently reviewed dc12a496. The paired arm consumes the saved parent EXEC, verifies both skip targets and the restore, and refuses wave-sensitive bodies. Windows MSVC Debug, Windows 11 build 26300, D3D12 debug layer enabled. ctest --preset dev --no-tests=error -j 1 -V -R '^native_mesh_inverse_(ir|warp|hardware)$' passed 3/3. The IR check verified four paired cases and seven refusals. WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656) matched 1,024 pixels per positive; the two wrong-reference controls had 512 mismatches each on both adapters. Forcing the new paired-arm gate off made the IR fixture reject its positive CMPX arm at +0x5c. The restored binary passed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6170294750 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3923#pullrequestreview-6170294750). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T13:00:38Z. **Review:** APPROVED --- Independently reviewed dc12a496. The paired arm consumes the saved parent EXEC, verifies both skip targets and the restore, and refuses wave-sensitive bodies. Windows MSVC Debug, Windows 11 build 26300, D3D12 debug layer enabled. `ctest --preset dev --no-tests=error -j 1 -V -R '^native_mesh_inverse_(ir|warp|hardware)$'` passed 3/3. The IR check verified four paired cases and seven refusals. WARP 10.0.26100.9818 and RTX 4060 Laptop (32.0.16.1656) matched 1,024 pixels per positive; the two wrong-reference controls had 512 mismatches each on both adapters. Forcing the new paired-arm gate off made the IR fixture reject its positive CMPX arm at +0x5c. The restored binary passed.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3923
No description provided.