Translate indexed mesh vertices and verify visible triangle coverage #492

Merged
R0Y00 merged 1 commit from upstream-pr/498 into main 2026-11-22 07:58:21 +00:00
R0Y00 commented 2026-11-22 07:51:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T07:51:25Z.


Scope

Extend the bounded two-wave mesh specialization to one indexed vertex layout. Follow packed halfword indices, the specialized header and the constructed vertex descriptor to a three-word raw SRV fetch. Keep the vertex payload and both transforms on the GPU. Existing uniform-position callers retain their previous ABI.

Verification

  • python3 -B tests/mesh_indexed_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 assembled the source-built program and passed translation through the synthetic native container. Rejection controls include stale descriptors, missing waits and out-of-range indices.
  • ctest --preset dev --no-tests=error -R "^mesh_(entry|indexed)_draw_" -V exercises original and indexed fixtures on hardware and WARP, with a plain mesh shader and an instrumented variant.
  • A local 1,028-byte native entry translated from its first instruction to the mesh exports. Two different vertex buffers produced 1,024 and 276 green pixels in a 32×32 target. Both complete images, positions and indices matched CPU references. Replacing the first vertex with the second left zero covered pixels and caused exactly 276 mismatches against the partial reference.
  • Windows build 26200.9974, RTX 4060 Laptop driver 32.0.16.1656 and WARP 10.0.26100.9818, debug layer enabled. CI uses only source-built data. The original application's geometry and draw state remain unverified.

A full inventory contained 9,282 MS records. Of 531 records with native extents up to 1,200 bytes, one translated to an indexed vertex load under this exact specialization. Coverage counts include that one record. The other 530 short entries remain outside this verified profile.

With the partial triangle held fixed, applying nonidentity object and projection matrices produced a third footprint of 66 pixels. All 1,024 pixels and all exported positions matched an independently composed CPU reference on hardware and WARP.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6539983142 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/498). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T07:51:25Z. --- ## Scope Extend the bounded two-wave mesh specialization to one indexed vertex layout. Follow packed halfword indices, the specialized header and the constructed vertex descriptor to a three-word raw SRV fetch. Keep the vertex payload and both transforms on the GPU. Existing uniform-position callers retain their previous ABI. ## Verification - `python3 -B tests/mesh_indexed_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1` assembled the source-built program and passed translation through the synthetic native container. Rejection controls include stale descriptors, missing waits and out-of-range indices. - `ctest --preset dev --no-tests=error -R "^mesh_(entry|indexed)_draw_" -V` exercises original and indexed fixtures on hardware and WARP, with a plain mesh shader and an instrumented variant. - A local 1,028-byte native entry translated from its first instruction to the mesh exports. Two different vertex buffers produced 1,024 and 276 green pixels in a 32×32 target. Both complete images, positions and indices matched CPU references. Replacing the first vertex with the second left zero covered pixels and caused exactly 276 mismatches against the partial reference. - Windows build 26200.9974, RTX 4060 Laptop driver 32.0.16.1656 and WARP 10.0.26100.9818, debug layer enabled. CI uses only source-built data. The original application's geometry and draw state remain unverified. A full inventory contained 9,282 MS records. Of 531 records with native extents up to 1,200 bytes, one translated to an indexed vertex load under this exact specialization. Coverage counts include that one record. The other 530 short entries remain outside this verified profile. With the partial triangle held fixed, applying nonidentity object and projection matrices produced a third footprint of 66 pixels. All 1,024 pixels and all exported positions matched an independently composed CPU reference on hardware and WARP.
upstream-sync closed this pull request 2026-11-24 06:43:21 +00:00
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!492
No description provided.