diff options
| author | zneel <14263028+zneel@users.noreply.github.com> | 2026-11-22 20:16:04 +0100 |
|---|---|---|
| committer | zneel <14263028+zneel@users.noreply.github.com> | 2026-11-22 23:30:06 +0100 |
| commit | b8c07f8ccfe866987a54ff52e0e0e9a050d2ac8a (patch) | |
| tree | e36521241de0927aca478a3acd1173ca010ea744 /scripts/run_gpu_tests.py | |
| parent | a3d682840fb2e2332b1f5ea40915d9a5fc25eac1 (diff) | |
XDXR builder: pair sibling triangles into TRI0/TRI1 leaves
A bottom-level build without ALLOW_UPDATE now pairs triangles, as the
console builder does in its offline BLASes. The pass that writes the nodes
above the leaves pairs a triangle with a later sibling (among that node's at
most four children) that shares an edge in the opposite direction (the same
vertex bits), from the same geometry, both active. The first triangle is
rotated to put the shared edge in slots 1 -> 2, the sibling's third vertex
goes in slot 3, its primitive in PrimitiveIndex2, and each node type's remap
byte returns D3D12's barycentrics for its own vertex order.
The node keeps one child per triangle with its own box, so the tree, the
layout and the sizes do not change; the TRI1 child points at the first
leaf and the sibling's leaf is left unused. Pairs never cross nodes: one
thread owns each rewritten leaf and each parent-table entry. A refit
rewrites the leaves one triangle each, so the layer does not pair builds
with ALLOW_UPDATE (xdxr_pair), and record_blas ignores `pair` for updates.
check-build now compares barycentrics as well as hits, and checks a case's
"pairs" field: at least one TRI1 node, or none. New cases: paired grids
(BOX32 and BOX16), a transform, a mixed scene, the radix path, and two that
must not pair (pairs split across geometries, edges shared in the same
direction), plus a D3D12 BLAS without ALLOW_UPDATE. Mutating the geometry or
the direction rule, or the remap byte, fails check-build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_gpu_tests.py')
0 files changed, 0 insertions, 0 deletions