Commit Graph

8 Commits

Author SHA1 Message Date
23205312b5 bvh_rehydrate: validate leaf order, box child count, --geom spec, and saturate f32 overflow 2026-11-25 00:13:28 +01:00
687f51beca bvh_rehydrate: harden staged output cleanup (BVH-REHYDRATE-STAGE-CLEANUP) 2026-11-24 16:10:07 +01:00
bb6f692191 Reject non-finite BVH transform coefficients (#6616)
Squash-merged after diff review of PR #6616
2026-11-23 11:15:07 -06:00
2693dc59e4 bvh_rehydrate: write a parent-table entry only inside [64, offsetToElements) (ASSET-567) (#6788)
Squash-merged after diff review of PR #6788 - bvh_rehydrate: write a parent-table entry only inside [64, offsetToElements) (ASSET-567)
2026-11-23 09:50:38 -06:00
c51298b5a4 tools: stage bvh_rehydrate write, preflight input collision and create --out parent 2026-11-22 23:32:34 +01:00
e44be4ac4d tools/bvh_rehydrate.py: refuse an --out that replaces an input file
--out naming the dehydrated BLAS, a --geom VB/IB file or the --compare
reference exited 0 after replacing that input with the output; with
--compare the reference was even destroyed before the diff ran, so the
tool then reported 0 bytes differing. Refuse up front with the samefile
guard the other data tools use (exit 2, an input error), with refusal
tests in tests/test_bvh_rehydrate.py.
2026-11-22 19:48:59 +01:00
ec8ec4c9a4 Fix what the round-40 merges broke
- docs: one row per topic again in design.md (59 topics merged sentence by sentence, keeping every
  number) and README.md (the current models/character rows); one Other languages line.
- docs/i18n: the two Spanish quickstarts had been concatenated; keep #1912's, drop #2277's row.
- make_game: the shader fingerprint covers spirv_asm.py and its tables; LF settings write.
- tools: pe_shader_containers, gamedata_maps and anim_rigs use report_paths.same_report_path (BUILD-589);
  stdout guard on five tools; LF text writes in three; user_sgpr_census tolerates an unreachable --json.
- tests: fspx stage fakes write real carve/unpack indexes (c7408a1f); typed f16 stores round toward zero
  (SHADER-358); test_ci_registration's helper is no longer collected as a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:55:07 -05:00
db4be7ae6c tools/bvh_rehydrate.py: a CPU reference that rehydrates a dehydrated BLAS
Written from the packing in docs/bvh.md §4a, standard library only. Inputs are float3 vertices with uint16, uint32 or no indices, and an optional 3x4 geometry transform. It does the header copy, the leaf chunks (vertex-order slots, the paired fourth vertex), the box groups by level with their stored overrides, BOX16 outward rounding with the +-inf overflow, the parent entries and the compressionParams leaf frame. Float arithmetic is rounded to float32 per operation. On the 8 measured samples whose geometry is identified, the output is byte-identical to XboxBvhBuilder.dll's RehydrateRaytracingAccelerationStructureX (checked locally; no sample is in the repository). The 15 tests in tests/test_bvh_rehydrate.py are synthetic. docs/bvh.md §7 documents it, including the console's size convention, 64 * (totalSizeIn64BNodes + 1) bytes, which xdxr_bvh.py validate reads as one unit less.
2026-11-22 17:17:01 +01:00