mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1759] [MERGED] xbox_bvh_builder: implement RehydrateRaytracingAccelerationStructureBatched2X (RT-XDXR-BVH-REHYDRATE-BATCHED2X) #1772
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#1772
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/1759
Author: @abnalstlll-byte
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:feat/rt-xdxr-bvh-rehydrate-batched2x📝 Commits (5)
07e89b1xbox_bvh_builder: implement RehydrateRaytracingAccelerationStructureBatched2X (RT-XDXR-BVH-REHYDRATE-BATCHED2X)cb1cb86xbox_bvh_builder: rebuild from geometry and refuse source-only rehydration (RT-XDXR-BVH-REHYDRATE-BATCHED2X)b352aa9xbox_bvh_builder: supply scratch buffer and address review feedback (RT-XDXR-BVH-REHYDRATE-BATCHED2X)65235f3test: update rehydration test comment to specify geometry rebuild (RT-XDXR-BVH-REHYDRATE-BATCHED2X)ef205eexbox_bvh_builder: review fixes for batched rehydration (RT-XDXR-BVH-REHYDRATE-BATCHED2X)📊 Changes
7 files changed (+421 additions, -30 deletions)
View changed files
📝
docs/xdxr.md(+18 -3)📝
runtime/CMakeLists.txt(+2 -1)📝
runtime/shims/d3d12_com.cpp(+13 -2)📝
runtime/shims/d3d12_com.h(+8 -0)📝
runtime/shims/xbox_bvh_builder.cpp(+177 -11)📝
runtime/test/xbox_bvh_builder_test.cpp(+115 -13)➕
tests/test_xbox_bvh_builder_rehydrate.py(+88 -0)📄 Description
Claimed in the coordination issue as: RT-XDXR-BVH-REHYDRATE-BATCHED2X (claim)
What and why
Addresses @timbot103's finding from interactive retail 1.0.2.1 boot past the story-load texture streaming phase (38,333 registered images):
Previously,
XboxBvhBuilder::RehydrateRaytracingAccelerationStructureBatched2X(runtime/shims/xbox_bvh_builder.cpp:231-236) was an unimplemented stub that unconditionally logged and returnedE_NOTIMPL. The title's interactive boot stopped immediately upon receivingE_NOTIMPL.This implements
builder_rehydrate_batched2x:S_OKimmediately ifcount == 0.E_INVALIDARGifdescsorlistis null.ID3D12GraphicsCommandList4*vialist4_of(list), logging and returningE_NOINTERFACEif unavailable.iin0..count-1:SourceAccelerationStructureDatafor fresh rebuilds (unlessPERFORM_UPDATEis set) so the layer does not attempt refits on dehydrated console streams (d3d12_vulkan_device.cpp:2639).NumDescs > 0), rebuilds the acceleration structure on the command list vialist4->BuildRaytracingAccelerationStructure(&build, 0, nullptr).ScratchAccelerationStructureData = 0, the shim allocates/reuses a dedicated scratch buffer viabuilder_ensure_scratchsized throughGetRaytracingAccelerationStructurePrebuildInfo, preventing command list poisoning/rejection.E_NOTIMPL(as offline dehydrated console streams cannot be directly read by PC GPUs without geometry reconstruction in the leaf framecompressionParamsgives;docs/bvh.md§4/§4a).NumDescs == 0without source) are logged once and skipped.docs/xdxr.mddocumenting the rehydration contract, notingsource_dataas a hypothesis for offline console stream buffers and retaining the leaf-frame geometry reconstruction note (compressionParams,docs/bvh.md§4a).runtime/test/xbox_bvh_builder_test.cppto verify:E_INVALIDARG, handlescount == 0withS_OK.E_NOTIMPL.NumDescs == 0) withS_OK.S_OKand valid non-zero total node count header.ScratchAccelerationStructureData == 0.tests/test_xbox_bvh_builder_rehydrate.pyverifying geometry rebuild, source-only refusal, and mangled export registration.Tested
python -I tests/test_xbox_bvh_builder_rehydrate.py: 3/3 tests pass (0.001s).python -I tests/test_docs_links.py: 16/16 pass.python -I tests/test_docs_design_rows.py: 5/5 pass.python -I tests/test_text_write_line_endings.py: 3/3 pass.python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code, Claude Opus 5.5).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.