diff options
| author | romainveurrier <romain.veurrier@gmail.com> | 2026-11-23 17:57:27 +0100 |
|---|---|---|
| committer | romainveurrier <romain.veurrier@gmail.com> | 2026-11-23 17:57:27 +0100 |
| commit | 242a5dbf14a1324d6605da8268769189d5e1892c (patch) | |
| tree | bd453cd46b4ab2b1bd2cf3824201664d1ab2c4e7 /runtime/src/main.cpp | |
| parent | 511e3826ba8addd4adcd08270d788bc8cc4d4389 (diff) | |
runtime: serve XboxBvhBuilder.dll with the layer's XDXR builder (RT-5, boot stop 18)
The package's XboxBvhBuilder.dll creates 52 console compute programs as
pipelines in its constructor, on the title's thread. Translated, they take
25-60 s to compile on a cold driver cache (#7231/#7049: 31.2 s for one on
an RTX 4080, 59.5 s for all 52 on an RX 9070 XT), longer than the title's
~30 s startup watchdog, so a first boot ends at the builder.
runtime/shims/xbox_bvh_builder.cpp serves the seven exports the executable
imports (measured statically on 1.0.2.1: constructor 1 call site,
destructor 1, Set64BitMortonCodes 8, GetRaytracingAccelerationStructure-
PrebuildInfo 3, BuildRaytracingAccelerationStructureBatched2X 6,
CopyRaytracingAccelerationStructure 2, RehydrateRaytracingAcceleration-
StructureBatched2X 4) with the layer's own XDXR builder (D3D-178). The
loader binds imports to a shim before a bundled module, so the DLL is not
loaded and its programs are never created.
- each BATCHED_DESC2 element (docs/xdxr.md §1) is one layer build with its
postbuild descriptions; the offline-statistics type (0x10), which the DLL
refuses by throwing, skips the element instead (a shim must not throw);
- XDXR stream records and Set64BitMortonCodes tune the console builder's
heuristics and are ignored (logged once);
- prebuild sizes and copies are the layer's;
- the builder's state is kept in a table keyed by `this`: nothing is
written into the title's object, whose size isn't known;
- rehydration answers E_NOTIMPL for now (stage 2);
- LEONIDA_BVH_BUILDER=console keeps the bundled DLL.
xbox_bvh_builder_test (12 checks) calls the exports through the shim
registry as the title binds them; xdxr_bvh.py check-build validates the
BLAS, TLAS and compacted BLAS it builds (0/1000 rays differ on each).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions