gpu: add native DXR 1.1 acceleration structure backend and OPTIONS5 query #702
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!702
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/702/head"
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?
@wbkepler on GitHub · 2026-11-24 07:06 UTC · original
wbkepler:gpu/dxr-bvh-builder→main· +1088 −10 · 6 files · 2 commits · closed without mergingSummary
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)@Altorru on GitHub · 2026-11-24 10:17 UTC · original
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.@konradbeck on GitHub · 2026-11-24 14:03 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 00:27 UTC · original
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