Commit Graph

8 Commits

Author SHA1 Message Date
8dc7bf55fc Merge pull request #879 from narekshaghoyandev/ubiq-bvh-packing-check-continuations-and-nan
OLD-7594: bvh_packing_check: fix bvh4-chunk continuation joining and NaN/Inf root checks
2026-11-28 14:06:18 +01:00
4b32bdc85f bvh_packing_check: fix bvh4-chunk continuation joining and NaN/Inf root checks 2026-11-24 14:53:57 +00:00
2e4ef18d85 docs/bvh.md: the BVH4 parent table's start and extent (BUILD-1390)
offsetToParents = 0x40 - (((offsetToNodes - offsetToElements) / 16) & ~127),
so the first box node's entry lands in [0x40, 0xc0); one entry per box unit
follows, and offsetToElements is their end rounded up to 128. The bytes
from 0x40 to offsetToElements are zero. Holds on all 272,874 streams of
core_bvh4.rpf and shared_minigame000_bvh4.rpf (272,858 box roots for the
extent); counts only.

totalSizeIn64BNodes + 1 also counts the level table's units, which have no
entry: that is why the header-only end missed on about 13,400 streams.

tools/bvh_packing_check.py checks the three rules (parent_offset,
parent_area_nonzero, parent_extent); the synthetic fixture moves to the
console layout for its four leaves and three BOX16 units.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:24:55 -05:00
7718a79020 Validate BVH packing header offsets (#6665)
Squash-merged after diff review of PR #6665
2026-11-23 11:02:11 -06:00
303567105f bvh_packing_check: do not drop zlib streams starting at a window boundary (#6304)
Squash-merged after diff review of PR #6304 - bvh_packing_check: do not drop zlib streams starting at a window boun…
2026-11-23 08:22:11 -06:00
0c7eea0ee2 bvh_packing_check: guard --json directory, missing parent, and write errors (#5937)
Squash-merged after review of PR #5937 - bvh_packing_check: guard --json directory, missing parent, and write errors
2026-11-23 08:08:02 -06:00
1321c7a504 bvh_packing_check: count continuation streams once, test every guard
Joined continuation streams are counted as `continuation`; one that starts
in a later window is no longer counted there again as `raw`. Five more
synthetic cases cover too_many_children, child_not_a_node, invalid_child,
root_not_a_box and leaves_past_end. core_bvh4.rpf: kinds now sum to
565,596 as in docs/bvh.md §1, 271,637/271,637 still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:17:01 +01:00
2c108e91bd bvh_packing_check: the §4a packing holds on every BVH4 stream (ASSET-330)
A geometry-free check of the dehydrated packing that bvh_rehydrate reads:
level table, group fit, child counts and override masks, child pointer
targets and widths, one parent per node and leaf, vertex-order bytes and
stored overrides inside sceneBounds. 272,874 of 272,874 streams of
core_bvh4.rpf and shared_minigame000_bvh4.rpf pass; docs/bvh.md gets the
counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:34:49 +01:00