Skip to content

shader: prove packed mesh PARAM order and coverage (Part of #3703) - #3924

Draft
timbot103 wants to merge 1 commit into
R0Y00:mainfrom
timbot103:shader/mesh-packed-signature-order
Draft

timbot103 wants to merge 1 commit into
R0Y00:mainfrom
timbot103:shader/mesh-packed-signature-order

Conversation

@timbot103

Copy link
Copy Markdown
Contributor

Part of #3703

P2 · Unproven packed mesh signature rows

The census at 368a045df put 740 programs in this first-refusal row. The work split described exp param0 after higher PARAM exports or inside a SAVEEXEC skip. This change proves both shapes on source-built input.

  • Resolve a reflected packed FP16 row without its own output record when exactly one preceding packed record can own it. Attribute ownership depends on signature register order independently of instruction order.
  • On direct allocation, accept a packed PARAM before POS0 and within an EXECZ skip when the reaching SAVEEXEC mask is exactly the allocated flat-thread vertex range. Staged allocation retains its position-coverage proof.
  • Competing row owners, missing source DWORDs, duplicate targets and narrower masks still refuse. The fixture verifies 3 DXIL modules and 4 refusal controls.

The private census still needs to be rerun to measure the first-refusal delta.

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 82aa325f.

ctest --preset dev --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' # 23 passed, 0 failed, 0 skipped
ctest --preset release --no-tests=error -j 1 -V -R 'native_direct_mesh|native_direct_container|native_mesh_' # 20 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_packed_order_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 #3664. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant