feat(xbg7): read the per-sub-mesh vertex declarations (XBG7_SUBMESH_DECLS, off by default)

desc_dump shows each index marker is followed by its OWN element triples: n201_01
declares strides 24, 24, 24 and 28 (the last sub-mesh has a fourth element), which
matches the runtime capture's stride=28 on that draw and the four distinct vertex
shaders. parse_vertex_decl read the first declaration for the whole pool.

all_vertex_decls reads one per marker; anchor_grouped_meshes uses each sub-mesh's
own stride for the pool walk, the pivot validation and the read. debug_grouped_report
follows the same setting so the diagnostic cannot blame the wrong gate — at n201_01's
capture-proven pool start it now reports "pad 0: ACCEPTED" instead of a NaN position.

With XBG7_SUBMESH_DECLS=1: resources that never decode 85 -> 47, resources decoding
in no container 63 -> 30, capture oracles unchanged (93/93 index runs, 42/42 index
counts), consistency unchanged at 96.

Off by default because selection has not caught up: the three n201_0x copies then
settle on one pool (twin_pairs_do_not_share_a_buffer fails), production still picks
a start 4 bytes before sub-mesh #1 rather than the proven one even though the proven
start validates and is unclaimed, and four newly decoded ptc_pack .dat composites
carry degenerate triangles. Format truth is settled; choosing among candidates is
the remaining work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NptfmpjdpNCKEez6d2xvA9
This commit is contained in:
2026-08-13 11:45:20 +00:00
parent 27577538cb
commit 4cdbbc2d48
6 changed files with 272 additions and 23 deletions

View File

@@ -468,10 +468,11 @@ fn decoded_index_runs_have_almost_no_degenerate_triangles() {
}
}
}
// The one: `_rou_f402_dead` in `Stage_S09`, whose degenerate-free block is
// claimed by `e_rou_f003_Near` — both 24-vertex bounding boxes, the identity
// class that needs descriptor-level data, not another heuristic. Anything
// else appearing here is a regression.
// The one at default settings: `_rou_f402_dead` in `Stage_S09`, whose
// degenerate-free block is claimed by `e_rou_f003_Near` — both 24-vertex
// bounding boxes, the identity class that needs descriptor-level data. (With
// `XBG7_SUBMESH_DECLS=1` four newly decoded `ptc_pack` `.dat` composites join
// it; that knob is off by default.) Anything else here is a regression.
assert!(
offenders.len() <= 1,
"{} decoded index runs contain degenerate triangles (expected ≤ 1): {:?}",