shader: keep 9-bit mesh primitive indices #3377
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3377
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3375"
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?
@lambirou on GitHub · 2026-11-28 16:06 UTC · original
lambirou:gpu/mesh-edge-mask→main· +10 −1 · 2 files · 1 commits · merged 2026-11-28 18:08 UTCThe direct mesh primitive export packs three 10-bit slots. Each slot holds a 9-bit vertex index with the edge flag in bit 9 (docs/experiments.md, primitive export row). The C++ frontend masked with 1023, so an index with the edge flag set became 512..1023 and the
triangle[c] >= verticesguard culled the primitive.gfx2hlsl.pyalready masks with 511.This keeps the 9-bit index and leaves the bit-31 null check unchanged.
The existing
native_direct_meshfixture used0x00200400, which has no edge flags. It now also covers0x20280600: indices (0,1,2) with all three edge flags set. The old mask fails the new assertion.Result: 1/1 passed. Negative control with the old 1023 mask: 0/1, assertion on the 511 mask fails.
Refs #2413.
@lambirou on GitHub · 2026-11-28 16:07 UTC · original
Release /O2 also passes on the same tree: \cmake --build --preset release --target compile_dxil\ then \ctest --preset release --no-tests=error -R '^native_direct_mesh$' -V\ -> 1/1 passed, 0 failed, 0 skips.
@Leyukaka on GitHub · 2026-11-28 18:08 UTC · original · approved these changes
GPU review of
24b895d7.0x20280600it gave 512/513/514 and the triangle was culled; 511 gives (0, 1, 2).maind418f70ewith this PR and 11 other open PRs merged locally:native_direct_meshpasses, and putting 1023 back makes it fail.Approve.
github-bot referenced this pull request2026-11-30 04:04:37 +00:00