shader: mask primitive edge flags in staged mesh exports #3764
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3764"
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 R0Y00 on 2026-12-01T17:03:37Z.
Refs #3763 and #3641.
Mesh primitive exports pack each 9-bit index alongside a separate edge flag. Mask the index consistently in both emission paths. Exercise the staged path with all three edge flags set while retaining the allocation and emission ordering checks.
Local validation: the related Mesh86 CTest selection passed 24/24 on the combined local tree. This PR carries only the primitive-index change and its regression case. The isolated PR head still needs CI. Geometry production and visible output are tracked separately.
Additional local reproduction on the combined Release build, with the same regression-test blob as this PR head:
16 passed, 0 failed, 0 skipped. Windows 11 x64, RTX 4060 Laptop GPU, NVIDIA driver 616.56, including WARP and hardware tests. Isolated PR-head CI is pending.
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-01T20:41:49Z.
Review: APPROVED
Reviewed
66513d80by reading the diff; not built or run.Verdict: approve. The staged path no longer culls flagged triangles.
meshPackedIndicesstaged, the mask was1023. Any index with its edge flag set (bits 9/19/29) became>= 512, hit theuge vertex_countcheck and culled the triangle (gfx1013_direct_mesh.inl:234-243). With511, both paths read the same 9-bit index. Bit 31 still culls throughslt packed, 0.0x20280600decodes to indices 0, 1 and 2, each with its flag set.mesh-masked-outputsreaches the staged branch (@meshPackedIndicesis asserted). Under the old code it emits threeand …, 1023, so the newnot 1023assertion fails there: the case is a working control.Tests:
native_direct_mesh(in theprfilter) carries the case, and CI ran it: Windows, gfx1013 and Linux jobs green at this head.