shader: prove reflected mesh clip PARAM aliases (Part of #3703) #3927

Manually merged
github merged 3 commits from github-bot/gh-3925 into gh-pr/3925/base 2026-12-03 13:42:23 +00:00 AGit
Owner

@⁠timbot103 on GitHub · 2026-12-03 10:42 UTC · original
timbot103:shader/mesh-clip-param-alias → main · +146 −16 · 4 files · 3 commits · merged 2026-12-03 13:41 UTC

Part of #3705

P3 · Unsupported packed vertex export

The census at 368a045df put 467 programs in this first-refusal row. Of those, 403 reached it after #3834 admitted more staged export masks and 61 after #3846 lowered additional image loads. The census gives no breakdown by PARAM usage, flags or enabled mask.

This change targets a source-built reproduction of the same refusal. It accepts a PARAM copy of a provable single POS1 clip-distance row, including partial masks and intervening PARAM exports in the same EXEC scope. The alias needs one matching reflection record, matching columns and mask, and identical enabled VGPR sources. Changed sources, intervening writes, unmatched masks or columns, ambiguous records, cull distance and other usage values still refuse. The fixture verifies 3 DXIL modules and 7 refusal controls.

Depends on 82aa325f (shader/mesh-packed-signature-order). The private census still needs to be rerun to establish how many of the 467 programs use this export form.

Verification

Windows 11 10.0.26200.9974, MSVC 19.44.35230.0, DXC 1.9.2602.17 (21d28f727). Microsoft Basic Render Driver (WARP) 10.0.26100.9818 and NVIDIA GeForce RTX 5080 32.0.16.2140 (621.40). The D3D12 debug layer was unavailable on both adapters.

Built with cmake --build out/build/dev -- -j 6 and cmake --build out/build/release --target compile_dxil offscreen_check startup_indirect_draw_indexed -- -j 6.

Tested commit bbafdceb.

ctest --preset dev --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' # 24 passed, 0 failed, 0 skipped
ctest --preset release --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' # 21 passed, 3 failed, 0 skipped
$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$' # 3 passed, 0 failed, 0 skipped
Remove-Item Env:X2W_SYNC_MESH_REQUESTS
ctest --preset pr --no-tests=error -R '^native_mesh_clip_param_alias_dxil$' # 1 passed, 0 failed, 0 skipped
ctest --preset dev --no-tests=error -R '^native_compute_pack_refusals$' # 1 passed, 0 failed, 0 skipped

The existing mesh readbacks passed on the RTX 5080 (5/5 in Debug and Release) and WARP (5/5 in Debug). On Release WARP, the two read-first-lane tests passed and the three allocation tests reproduced #3666. The first allocation test reported accepted=1 refused=0, with one archived refusal expected. All three passed with synchronous mesh requests.

python -B tests/bidi_controls_check.py, python -B tests/docs_links_check.py, and git diff --check origin/main...HEAD passed.

🤖 Generated with Claude Code

**@⁠timbot103** on GitHub · 2026-12-03 10:42 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3925) `timbot103:shader/mesh-clip-param-alias` → `main` · +146 −16 · 4 files · 3 commits · merged 2026-12-03 13:41 UTC Part of #3705 ## P3 · Unsupported packed vertex export The census at `368a045df` put 467 programs in this first-refusal row. Of those, 403 reached it after #3834 admitted more staged export masks and 61 after #3846 lowered additional image loads. The census gives no breakdown by PARAM usage, flags or enabled mask. This change targets a source-built reproduction of the same refusal. It accepts a PARAM copy of a provable single POS1 clip-distance row, including partial masks and intervening PARAM exports in the same EXEC scope. The alias needs one matching reflection record, matching columns and mask, and identical enabled VGPR sources. Changed sources, intervening writes, unmatched masks or columns, ambiguous records, cull distance and other usage values still refuse. The fixture verifies 3 DXIL modules and 7 refusal controls. Depends on `82aa325f` (`shader/mesh-packed-signature-order`). The private census still needs to be rerun to establish how many of the 467 programs use this export form. ## Verification Windows 11 `10.0.26200.9974`, MSVC `19.44.35230.0`, DXC `1.9.2602.17` (`21d28f727`). Microsoft Basic Render Driver (WARP) `10.0.26100.9818` and NVIDIA GeForce RTX 5080 `32.0.16.2140` (`621.40`). The D3D12 debug layer was unavailable on both adapters. Built with `cmake --build out/build/dev -- -j 6` and `cmake --build out/build/release --target compile_dxil offscreen_check startup_indirect_draw_indexed -- -j 6`. Tested commit `bbafdceb`. ```powershell ctest --preset dev --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' # 24 passed, 0 failed, 0 skipped ctest --preset release --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' # 21 passed, 3 failed, 0 skipped $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$' # 3 passed, 0 failed, 0 skipped Remove-Item Env:X2W_SYNC_MESH_REQUESTS ctest --preset pr --no-tests=error -R '^native_mesh_clip_param_alias_dxil$' # 1 passed, 0 failed, 0 skipped ctest --preset dev --no-tests=error -R '^native_compute_pack_refusals$' # 1 passed, 0 failed, 0 skipped ``` The existing mesh readbacks passed on the RTX 5080 (5/5 in Debug and Release) and WARP (5/5 in Debug). On Release WARP, the two read-first-lane tests passed and the three allocation tests reproduced #3666. The first allocation test reported `accepted=1 refused=0`, with one archived refusal expected. All three passed with synchronous mesh requests. `python -B tests/bidi_controls_check.py`, `python -B tests/docs_links_check.py`, and `git diff --check origin/main...HEAD` passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 10:48:55 +00:00
Author
Owner

@⁠timbot103 on GitHub · 2026-12-03 13:06 UTC · original

Marked Ready for review. This PR is still stacked on #3926, so please land #3926 first. Until then the diff includes #3926's commit; this PR's own change is the top commit, bbafdceb.

**@⁠timbot103** on GitHub · 2026-12-03 13:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3925#issuecomment-7379324463) Marked Ready for review. This PR is still stacked on #3926, so please land #3926 first. Until then the diff includes #3926's commit; this PR's own change is the top commit, `bbafdceb`.
#3924 landed (squashed). Replay only this PR's commit bbafdceb onto main:
the tree equals git merge-tree --merge-base=82aa325f main bbafdceb.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠timbot103 on GitHub · 2026-12-03 13:16 UTC · original

No longer stacked: #3926 has merged. ea024fcb replays only this PR's commit bbafdceb onto main. Its tree equals git merge-tree --merge-base=82aa325f main bbafdceb, so the diff against main is the 4-file P3 change alone. The mesh suite passed 32/32 in Debug. Release passed 29/32; the 3 failures are the existing asynchronous WARP allocation fixtures, which pass with X2W_SYNC_MESH_REQUESTS=1. The P3 fixture passed in Debug, Release and the PR preset, and a full Debug build including the C++17 native_compute_pack_refusal_check succeeded.

**@⁠timbot103** on GitHub · 2026-12-03 13:16 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3925#issuecomment-7379563940) No longer stacked: #3926 has merged. `ea024fcb` replays only this PR's commit `bbafdceb` onto `main`. Its tree equals `git merge-tree --merge-base=82aa325f main bbafdceb`, so the diff against `main` is the 4-file P3 change alone. The mesh suite passed 32/32 in Debug. Release passed 29/32; the 3 failures are the existing asynchronous WARP allocation fixtures, which pass with `X2W_SYNC_MESH_REQUESTS=1`. The P3 fixture passed in Debug, Release and the PR preset, and a full Debug build including the C++17 `native_compute_pack_refusal_check` succeeded.
github-bot changed target branch from main to gh-pr/3925/base 2026-12-03 13:42:17 +00:00
github manually merged commit ea024fcb12 into gh-pr/3925/base 2026-12-03 13:42:23 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 13:40 UTC · original · approved these changes

Independently reviewed ea024fcb. The alias requires one matching reflected clip row, identical enabled sources and unchanged execution scope. The tracked location only advances through contiguous PARAM exports, and only one matching alias is consumed. Rebuilt compile_dxil in Windows MSVC Debug and ran ctest --preset dev --no-tests=error -j 1 -V -R '^native_mesh_clip_param_alias_dxil$': 1/1 passed (three DXIL modules and seven refusal controls). In a local mutation, removing same_sources allowed enabled-source-changed to emit DXIL and the refusal assertion failed. The restored compiler passed again.

**@⁠R0Y00** on GitHub · 2026-12-03 13:40 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3925#pullrequestreview-6170912990) · **approved these changes** Independently reviewed ea024fcb. The alias requires one matching reflected clip row, identical enabled sources and unchanged execution scope. The tracked location only advances through contiguous PARAM exports, and only one matching alias is consumed. Rebuilt compile_dxil in Windows MSVC Debug and ran `ctest --preset dev --no-tests=error -j 1 -V -R '^native_mesh_clip_param_alias_dxil$'`: 1/1 passed (three DXIL modules and seven refusal controls). In a local mutation, removing same_sources allowed enabled-source-changed to emit DXIL and the refusal assertion failed. The restored compiler passed again.
This discussion has been locked. Commenting is limited to contributors.
No description provided.