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:
@@ -5,7 +5,9 @@ fn main(){
|
||||
for n in sylpheed_formats::mesh::xbg7_resource_names(&bytes) {
|
||||
if !filter.is_empty() && !n.contains(&filter) { continue }
|
||||
if let Some((m,stride))=sylpheed_formats::mesh::debug_resource_params(&bytes,&n) {
|
||||
println!("{n:<28} stride {stride} markers {:?}", &m[..m.len().min(4)]);
|
||||
let strides = sylpheed_formats::mesh::debug_decl_strides(&bytes, &n);
|
||||
println!("{n:<28} decl-stride {stride} markers {:?} per-sub-mesh strides {:?}",
|
||||
&m[..m.len().min(4)], strides);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user