[Research] XboxBvhBuilder.dll internals: vtable +0x2D0 / +0x490 calls and global flags blocking BVH build #3275
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?
Imported from Marvisak/VIctory. Originally posted by megaliv3 on 2026-11-26T15:36:30Z.
Hi! Noticed in the README status table that "The title's ray-tracing structures are never built". I did some static analysis on
XboxBvhBuilder.dll(from build1.0.2.1) in Ghidra and wanted to share a few specific RVA offsets and command-list interactions in case they help with HLE debugging:Key Findings in
XboxBvhBuilder.dllNon-standard
ID3D12GraphicsCommandList6VTable Calls (ExecuteBatchedBvhBuild@0x18000e6a0):+0x2D0: Called in a loop over batch elements when global flag0x1800d773cis non-zero. Writes a 32-bit0marker directly to GPU memory (WriteValueImmediatestyle).+0x490: Called betweenstd::functioncompute passes when global flag0x1800d773bis non-zero, passing a memory range struct ({0x100000000, &{0x8000000080, 0x1000000010}}) for Xbox GPU cache flushing.+0x0D0: StandardResourceBarrier(UAV) emitted at the end ofBuildRaytracingAccelerationStructureBatched2X(0x1800216a0) if0x1800d773c != 0.Compute Pass Emitter & Ring Buffer Check (
0x180020760):0x4002c400/IT_DISPATCH_DIRECT).elsefallback branch (+0x108,+0x0C8,+0x168,+0x128,+0x070) when the ring-buffer space check fails.((count + 3) >> 2 + 0x1f) >> 5) indicates[numthreads(128, 1, 1)](4 elements per lane, 32 lanes).Global State Flags & Validation:
0x1800d7b4c(bool): Toggled bySet64BitMortonCodes(bool)(0x180021bd0), doubles Morton buffer allocation in the scratch layout calculator (0x18000e4c0).0x1800d7b4e(bool): Alters scratch buffer offset packing in0x18000e4c0.BuildRaytracingAccelerationStructureBatched2Xthrows C++ exception0x80070057(E_INVALIDARG) ifDestAccelerationStructureDatais not 256-byte aligned, and rejects postbuild info type0x10(OFFLINE_STATISTICS) at runtime.External Xbox Imports:
d3d12_xs.dll->D3D12SerializeVersionedRootSignaturexmem.dll->XMemVirtualQueryHope these offsets are useful if you decide to tackle BVH building next!
Imported from Marvisak/VIctory. Originally posted by ZeOs360 on 2026-11-27T08:35:21Z.
A data point on +0x2D0 and +0x490 from runs where the BVH builder does run.
Setup:
main63bcca4with #2098, #2118, #2703, #2841, #2810 and #2501 merged (plus #2875, #2821, and local changes and diagnostics), diagnostics build, RX 7800 XT 16 GB, Windows 11. There the builder's shaders run: in the first such run they were dispatched in 709 of the 723 frames after their first use.method not implemented object="command list" slot=...the first time it is called. Across 18 runs of 2.5 to 20 minutes, that line never appears for any command-list slot. The only unimplemented methods logged are two device slots (0x1c8 and 0x218).barrier_groupsincrates/victory-gpu/src/list.rs, slot 146 of the newer lists' table).So on this setup the path that calls +0x2D0 is not taken; going by your reading, its flag stays zero here. I don't know whether the console sets it, so I can't say whether taking that path would change the builder's results.
AI-assisted: written with Claude Code (Claude Opus 5.5). I checked the code and ran the builds on my machine.