xboxbvhbuilder: add XboxBvhBuilder acceleration structure interface shim #357
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/357"
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 omonkeyz/xbox-emulator. Originally posted by FilimonEnc on 2026-11-24T05:43:26Z.
Implements the crates/compat/xboxbvhbuilder crate:
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-25T13:51:43Z.
Thanks. GetPrebuildInfo returns a fixed 64 KiB and the build and copy calls return S_OK without recording anything on the command list, while exports.txt marks them implemented. The project rule is no fake success. Could you map these onto real D3D12 acceleration-structure builds (or return an error and mark the rows not implemented), and say where the export names and interface layout come from?
Imported from omonkeyz/xbox-emulator. Originally posted by FilimonEnc on 2026-11-25T15:41:28Z.
Makes sense — I've updated the crate to follow the no-fake-success rule:
XboxBvhBuilderGetPrebuildInfo, XboxBvhBuilderBuildBottomLevel, XboxBvhBuilderBuildTopLevel, and XboxBvhBuilderCopy now zero the output struct (if non-null) and return E_NOTIMPL instead of returning a fixed 64 KiB or S_OK.
Marked those 4 rows as stub in exports.txt (leaving CreateXboxBvhBuilder, XboxBvhBuilderInitialize, and XboxBvhBuilderDestroy as implemented since they only manage the COM object lifecycle).
Updated src/tests.rs to verify the E_NOTIMPL returns (cargo test -p xboxbvhbuilder and pr_gate.py pass).
Provenance: XboxBvhBuilder.dll is shipped alongside game_scarlett_master.exe (GTA VI Scarlett). The export names come from its export table, and the COM vtable layout was inferred from those exports; real D3D12 ID3D12Device5 / ID3D12GraphicsCommandList4 acceleration-structure mapping will be added once the exact descriptor layouts are verified against the title's callers.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.