Repository navigation
xbox_bvh_builder: implement RehydrateRaytracingAccelerationStructureBatched2X (RT-XDXR-BVH-REHYDRATE-BATCHED2X) - #1759
Conversation
|
Thanks for picking this up, @abnalstlll-byte. It merges cleanly, and the call is a real gap (a retail run here reaches it), but two things need changing before it can go in:
Smaller points:
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Independent verification of head Windows 11 Pro, RTX 4070 SUPER (NVIDIA 621.01), MSVC 19.52.37029, RelWithDebInfo.
Notes from the diff (not blockers for the build, but worth a look):
No game files used. AI-assisted (Claude Code). |
…ation (RT-XDXR-BVH-REHYDRATE-BATCHED2X) Addresses review feedback on ProjectLeonida#1759 from @aslan2142 and @Tyrannys: - RehydrateRaytracingAccelerationStructureBatched2X now rebuilds structures exclusively from geometry (docs/bvh.md §4a). - Offline console dehydrated streams cannot be directly deserialized by PC D3D12/Vulkan drivers (docs/bvh.md §4/§4a). When source_data is present without geometry descs, the shim logs once and refuses with E_NOTIMPL. - Documented in docs/xdxr.md that the 4th parameter (const UINT64* source_data) is a hypothesis denoting offline console stream pointers. - Empty structures (NumDescs == 0 without source) are logged once and skipped. - Updated runtime/test/xbox_bvh_builder_test.cpp and tests/test_xbox_bvh_builder_rehydrate.py to verify refusal of source-only streams (E_NOTIMPL) and handling of empty structures. AI-assisted (Claude Code, Claude Opus 5.5).
|
Updated in commit
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Thanks, @abnalstlll-byte: the deserialize branch is gone and the 4th parameter is marked as a hypothesis. Re-checked at
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Measured against the retail executable and the shipped DLL (file-only; no game data), for this path:
Suggested: give the rebuild its own scratch (size from |
|
Updated in commit \5208120e9:
AI-assisted (Claude Code, Claude Opus 5.5). |
…atched2X (RT-XDXR-BVH-REHYDRATE-BATCHED2X) Implements XboxBvhBuilder::RehydrateRaytracingAccelerationStructureBatched2X in runtime/shims/xbox_bvh_builder.cpp. The shim now rebuilds or deserializes each acceleration structure on the command list via ID3D12GraphicsCommandList4 rather than stubbing out with E_NOTIMPL, resolving the interactive boot stop reported by timbot103 past story-load texture streaming. Validates count == 0 (S_OK), null list / descs (E_INVALIDARG), and adds unit coverage in tests/test_xbox_bvh_builder_rehydrate.py and runtime/test/xbox_bvh_builder_test.cpp. AI-assisted (Claude Code)
…ation (RT-XDXR-BVH-REHYDRATE-BATCHED2X) Addresses review feedback on ProjectLeonida#1759 from @aslan2142 and @Tyrannys: - RehydrateRaytracingAccelerationStructureBatched2X now rebuilds structures exclusively from geometry (docs/bvh.md §4a). - Offline console dehydrated streams cannot be directly deserialized by PC D3D12/Vulkan drivers (docs/bvh.md §4/§4a). When source_data is present without geometry descs, the shim logs once and refuses with E_NOTIMPL. - Documented in docs/xdxr.md that the 4th parameter (const UINT64* source_data) is a hypothesis denoting offline console stream pointers. - Empty structures (NumDescs == 0 without source) are logged once and skipped. - Updated runtime/test/xbox_bvh_builder_test.cpp and tests/test_xbox_bvh_builder_rehydrate.py to verify refusal of source-only streams (E_NOTIMPL) and handling of empty structures. AI-assisted (Claude Code, Claude Opus 5.5).
…RT-XDXR-BVH-REHYDRATE-BATCHED2X) - Fix log_once call signature at line 268 (passes flag, text without format args). - Do not copy source_data into SourceAccelerationStructureData to avoid unwanted refit on update paths (d3d12_vulkan_device.cpp:2639). - Allocate and supply scratch buffer via builder_ensure_scratch when the title passes ScratchAccelerationStructureData = 0 (docs/xdxr.md §6), avoiding command list poisoning. - Retain the leaf-frame note (compressionParams, docs/bvh.md §4a) in comments and docs. - Remove stale deserialize references in test comments and update test coverage. AI-assisted (Claude Code, Claude Opus 5.5).
…-XDXR-BVH-REHYDRATE-BATCHED2X) AI-assisted (Claude Code, Claude Opus 5.5)
5996f52 to
65235f3
Compare
…EHYDRATE-BATCHED2X) Maintainer fixes on top of the author's rehydration, carried over from the reviewed branch onto the rewritten head: - Scratch: each element of a batch gets a region of its own in one buffer per call, at D3D12's acceleration-structure alignment, and the command list holds that buffer until its next Reset (rt::d3d12::hold_until_reset). Before, every element and every list shared one builder-wide buffer with no barrier between the builds, and growing it released a buffer that builds already recorded could still use. - Fresh builds: a rehydrate always builds from geometry. PERFORM_UPDATE is cleared together with SourceAccelerationStructureData, so the layer never refits from the dehydrated stream's bytes. - The leaf frame compressionParams gives is described as not applied yet, which is what the code does. - The test reads back rehydrated builds made without scratch (ScratchAccelerationStructureData = 0), the shape the title uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged, thanks! Before merging I pushed one maintainer commit on top of your head (
Tested:
AI-assisted (Claude Code, Claude Opus 5.5). |
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).