mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:25:53 +01:00
[PR #598] [MERGED] xdxr_bvh: handle D3D12 inactive primitives and NaN bounds (OLD-10063) #640
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#640
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/598
Author: @jarvixaiassistant-glitch
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142
Base:
main← Head:fix/old-10063-xdxr-bvh-nan-inactive📝 Commits (2)
9e105b9xdxr_bvh: handle D3D12 inactive primitives and NaN bounds428f941xdxr_bvh: reject non-finite determinant or inverse in invert_affine📊 Changes
2 files changed (+202 additions, -37 deletions)
View changed files
📝
tests/test_xdxr_bvh.py(+116 -0)📝
tools/xdxr_bvh.py(+86 -37)📄 Description
Claimed in the coordination issue as: OLD-10063
What and why
Carries forward
old-pr/10063(draft #329) ontomain(d7576d56a), preservingShotTechOp's original commit verbatim perCONTRIBUTING.mdand adding one focused hardening commit on top:ShotTechOp): Updatestools/xdxr_bvh.pyto handle D3D12 inactive triangles (NaN vertices → empty box(+inf, -inf), never paired; zero-length edges skipped during pairing), inactive TLAS instances (blas_va == 0, zero mask, emptyblas_bounds, or NaN-transformed corners → empty world box), NaN-safe_box_test, and explicit NaN child-box rejection invalidate(), plus synthetic unit tests intests/test_xdxr_bvh.py.JARVIX): Updatesinvert_affine()intools/xdxr_bvh.pyto reject non-finite determinants (not math.isfinite(det)) and non-finite inverse entries. Previously, aNaNin an inactive TLAS instance's rotation or translation bypasseddet == 0and packedNaNfloats into the instance record's inverse matrix instead of triggeringbuild_tlas()'s zero-matrix fallback. Addstest_nan_transform_falls_back_to_zero_inverse_in_tlascovering both rotation and translation NaNs.Tested
All synthetic CPU/stdlib/docs checks on Windows 11 x64, Python 3.12.14, Node v24.19.0 (no game files):
python -I tests/test_xdxr_bvh.py -v— 54/54 passed (reproducedinvert_affine()returning all-NaN before the hardening commit; 54/54 pass after)python -I scripts/check_no_game_data.py— passed (0 forbidden tracked extensions)python -m compileall -q make_game.py tools tests— passedpython -I tests/test_text_write_line_endings.py,tests/test_report_paths.py,tests/test_i18n_index.py, and alltests/test_docs_*.py— passednode --test tests/test_viewer_streaming.cjs— passedGPUs tested: n/a (CPU BVH reference / unit tests only)
AI-assisted: yes (JARVIX multi-model team: Antigravity + DeepSeek-V4-Pro + NVIDIA NIM Nemotron-3.5-Lightning & Nemotron-3-Ultra-550B)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (N/A — CPU BVH reference tool only, no shader-translator rule changed.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.