Repository navigation
fix(meshlet): recognize joint-index streams in packed vertex blocks - #3584
Conversation
|
Independent Windows CPython 3.12.10 check at dbe76fd: all 84 synthetic tests passed (meshlet_page 48, vertex_types 28, restofworld_model_join 8). Replacing only tools/meshlet_page.py with current main f847748 gives exactly two failures: the 0x25 stride assertion and the new joint-index stream-before-another-slot case. Restoring the PR source passes; diff checks and the isolated worktree are clean. This pins actual slot recognition and block traversal rather than a test-only model. I did not rerun the retail corpus comparison and used no game files or GPU. AI-assisted review. |
|
Independent CPU check of
No issues found. No game data. AI-assisted (OpenCode). |
|
Tested 5f8531b on Windows 11, Python 3.12.10 (CPU only, synthetic fixtures, no game files): pass.
|
Claim on #3381. Related format measurements: #2787 and #2859. The code change applies directly to main.
What changed
A packed vertex block can contain a four-byte joint-index stream tagged
0x25. The slot-type table omitted type 5, so a directory scan silently skipped the entire block, including its supported position stream. This change lets the existing stride rule size that slot. The synthetic regression puts the joint indices between two other streams and checks the offset of the next meshlet group. An unknown type still exercises the rejection path.Verification
I ran the base (
f847748c) and PR (dbe76fd8) page readers against every distinct primary-LOD vertex buffer reached by the pinned decoder in my Xbox 1.0.2.1data.rpf. The comparison covers 3,314 buffers from 3,175 decoded drawables.All 3,021 newly accepted blocks carried
0x25in slot 8. Each declared a four-byte stride in the separate system layout, and its distance to the following stream equaled four bytes times the vertex count. The four outstanding blocks contain only a position slot, so this reader lacks a following stream from which to infer the vertex count. Its error was the same on both revisions.On one buffer checked separately through the directory CLI, the base found zero pages and the PR found one. Every one of its 1,656 XYZ triples matched the pinned decoder at binary32 precision. The related authored-shader check on #2519 independently exercised the position layout.
All 84 tests passed: 48 in
test_meshlet_page.py, 28 intest_vertex_types.py, and eight intest_restofworld_model_join.py. Applying only the updated tests on the base produced two failures in the slot-tag suite.git diff --checkpassed.CPU-only on Intel Core Ultra 7 265K, Windows 11 Home 25H2 build 26200.9974, Python 3.12.10. NVIDIA GeForce RTX 5070 (621.01) and Intel Graphics (32.0.101.9150) were installed and idle. The fixtures are synthetic. The game data and buffers stayed local. AI-assisted.