gpu: add native DXR 1.1 acceleration structure backend and OPTIONS5 query #702
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/702"
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 wbkepler on 2026-11-24T07:06:33Z.
Summary
Adds native DXR 1.1 acceleration structure support in
victory-gpu:host.rs&device.rs:Host::options5(),Host::raytracing_tier(),Host::device5()(gated onRaytracingTier >= TIER_1_0for clean WARP/non-RT fallback), andHost::default_uav_buffer().D3D12_FEATURE_D3D12_OPTIONS5(feature 27) indevice::check_feature_support.raytracing.rs&descriptor/host.rs:GetRaytracingAccelerationStructurePrebuildInfo,BuildRaytracingAccelerationStructure(single and batched, BLAS triangle/AABBShadowtranslation + TLAS submission-time instance VA rewriting + postbuild info copy-back + UAV barriers),CopyRaytracingAccelerationStructure, and title-VA-to-host-AS tracking evicted onwatch::title_memory_remapped.D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURESRVs indescriptor/host.rs.Verification
cargo clippy --workspace --all-targets— passed (zero new warnings)cargo clippy -p victory --features diagnostics --all-targets— passedcargo test --workspace— passed (live DXR 1.1 BLAS/postbuild/CLONE/TLAS/eviction tests pass on hardware GPU)VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib raytracing— passed (3/3, clean fallback)VICTORY_D3D12_DEBUG=1clean on both hardware GPU and WARPcargo xtask policy— passed (152 files ok)Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T07:10:35Z.
Review: APPROVED
Tested on Windows 11 MSVC (rustc 1.98.1):
All safety comments present on new unsafe blocks, clean tier query fallback when raytracing is unsupported, and correct descriptor translation for raytracing acceleration structures.
Imported from Marvisak/VIctory. Originally posted by Altorru on 2026-11-24T10:17:07Z.
Security/robustness note before
build_on_listis wired to the title API:read_geometriestrustsinputs.NumDescsand thepGeometryDescs/ppGeometryDescspointer.NumDescsis au32from the caller, andstd::slice::from_raw_parts(ptr, count)/Vec::with_capacity(count)run before any host D3D12 validation. A corrupt count can read far outside the allocation and, forARRAY_OF_POINTERS, reserve hundreds of GiB; a bad pointer is UB/crash.translate_tlas_instancesalready uses checked multiplication andcopy_mapped, so the BLAS geometry path is the odd one out.Please bound
countagainst the committed/mapped title range (or copy throughcopy_mappedinto a checked buffer), reject null/uncommitted pointers, and add a negative case for an oversized or uncommitted geometry array. The synthetic DXR tests only exercise valid inputs; this is not a failure of the current tests.Imported from Marvisak/VIctory. Originally posted by konradbeck on 2026-11-24T14:03:55Z.
Independent inline ray-query readback on an NVIDIA RTX A4500 (driver
32.0.16.2124, Windows 11 build26300.9974).mainatffe310eb2098e52169f4c44db5ffdabf43a726220237ecadb7791eb62a061206f54fb02143578f6bI built a synthetic triangle BLAS and a TLAS with two translated, differently masked instances. A compute shader used
TraceRayInlinethrough the VIctory-created SRV and copied eight ray results back to the CPU.ARRAY)ARRAY_OF_POINTERS)Both layouts matched the native Direct3D control exactly. The four hits matched instance IDs, indices, and distances. The four expected misses covered mask rejection, a spatial miss, and a distance cutoff. The native control also passed 8/8 on
main, where the VIctoryOPTIONS5query returnedE_NOTIMPLand the guest path did not create a TLAS view.The D3D12 debug layer was unavailable. I tested the two revisions separately because the local merge reported a conflict in
watch.rs.AI-assisted test fixture and write-up.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:27:45Z.
Automated triage for the maintainers. Closing because it breaks a repository rule (see
docs/asset-policy.mdand the project rules): nothing taken from the console SDK or the game, no weakening of the asset policy, and the title stays offline.If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed