Repository navigation
Conversation
…GPU views Add outer XboxBvhBuilder.dll HLE hooks (BuildRaytracingAccelerationStructureBatched2X and RehydrateRaytracingAccelerationStructureBatched2X, extern "system-unwind") that ask view_want (Path::BvhBuild) for every range a build or rehydrate names whole before forwarding to the DLL. The builder's compute programs reach vertex and index buffers through addresses inside uploaded geometry descriptions and reach destination, source, and scratch through root views, which view_want only asks for 64 KiB from their base address. On the 16-window GPU-view layout, tiles past that first 64 KiB stay unmapped until requested. Asking for each item's result, source, scratch, instance descriptions, per-geometry vertices/indices/transforms/AABBs (handling R16_TYPELESS=53 as 2 bytes), and postbuild destinations sized via GetRaytracingAccelerationStructurePrebuildInfo closes that gap: - Resolve GetRaytracingAccelerationStructurePrebuildInfo directly from the mapped XboxBvhBuilder.dll module when wrapping any export (including ordinal imports) instead of waiting for the title to import it. - Cache UpdateScratchDataSizeInBytes on ALLOW_UPDATE builds so a later PERFORM_UPDATE whose prebuild query returns 0 reuses the cached size (or falls back to scratch_size.max(update_scratch_size).max(SCRATCH_GUESS)) instead of dropping the scratch range. - For ARRAY_OF_POINTERS TLAS builds, translate the GPU-VA pointer table via list_x::cpu_at, read it under shader::readable, and request coalesced 64-byte D3D12_RAYTRACING_INSTANCE_DESC target ranges alongside the pointer array. Wrapping is gated on Uma view windows existing, so default 4-window runs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Antigravity (Gemini 4 Neon)
Add the pure acceleration-structure shadow registry and DXR 1.1 triangle geometry and TLAS instance translation helpers in hle::d3d12x::hw_rt. Nothing calls this module yet; the shadow command-list builder and XboxBvhBuilder hooks follow in a stacked PR. Tracks native BLAS/TLAS entries keyed by console GPU VA, validates DXR 1.1 PERFORM_UPDATE refits against build flags and per-geometry signatures, marks referencing TLASes stale whenever a BLAS GPU VA relocates or is invalidated, canonicalizes console typeless index formats (R16_TYPELESS / R32_TYPELESS) to PC typed uint formats, and gates opt-in XCL_HW_RT=1 against XCL_RAYTRACING=0. Part of xcl-dev#1751. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Antigravity (Gemini 4 Neon)
|
merge-check claim |
|
merge-check |
1 similar comment
|
merge-check |
Add the pure acceleration-structure shadow registry and DXR 1.1 triangle geometry / TLAS instance translation helpers in
hle::d3d12x::hw_rt. Nothing calls this module yet, so default runtime behavior is unchanged; Caller: #3700 (the opt-inXCL_HW_RT=1shadow command-list builder andXboxBvhBuilderhooks). Part of #1751.Stacked on #3662 (includes its commit
a65c38b16onmain5eaadb54c; the new diff on top of#3662is commitb1bd0a442).Related: #2184/#2185 implement an earlier shadow-builder design; this PR isolates the pure registry and translation layer with DXR 1.1
PERFORM_UPDATEgeometry-signature validation, referencing-TLAS staleness tracking when a BLAS GPU VA relocates or is invalidated, console typeless index format canonicalization (R16_TYPELESS/R32_TYPELESS->R16_UINT/R32_UINT), and dynamicXCL_RAYTRACING=0gating.(Why this is 970 lines and not split further: ~640 lines are the pure registry and DXR 1.1 geometry/instance translation helpers, and ~330 lines are their unit tests, kept together because
CONTRIBUTING.mdrequires new code to ship with its tests. The D3D12 command-list shadow builder, buffer pools, retirement plumbing, andXboxBvhBuilderhooks are split into the stacked follow-up PR.)What is in it
crates/xcl/src/hle/d3d12x/hw_rt.rs&crates/xcl/src/hle/d3d12x/mod.rs:Registrykeyed by console AS GPU VA (NativeAs,NativeAsSnapshot,RewriteReport,CopySource,HwRtStats), tracking live BLAS/TLAS entries and rehydrated-only VAs.mark_referencing_tlases_stale: tracks sorted, deduplicated native BLAS GPU VAs baked into each TLAS so relocating, rehydrating, or invalidating a BLAS immediately removes referencing TLASes fromcomplete_tlases().GeomSigandRegistry::can_update: verifiesALLOW_UPDATE, matching sanitized non-update build flags, matching desc count, and matching per-geometry flags, vertex/index formats & counts, and transform presence before permitting aPERFORM_UPDATErefit.translate_triangle_geometry/translate_blas_geometries,canonical_dxr_index_format,sanitize_build_flags, andRegistry::rewrite_instance_descs_with_refs(masking unresolved/rehydrated instances cleanly withAccelerationStructure = 0,InstanceMask = 0).parse_enabled/enabled_with/enabledcombining opt-inXCL_HW_RT=1withconfig().raytracing_tier_override() != Some(0).can_updaterejection cases, BLAS relocation/invalidation staleness, hybrid TLAS rewriting, and flag sanitization.Tested
rustc 1.99.0 (b940084d7 2026-09-28), DXC1.9.2609.5 (01b62ad47).cargo build --release -p xcl(commitb1bd0a4426bd3906ef38eb1ec4718ef11b1965d4): succeeded, 39 warnings (0 new vsmain)..\scripts\test.ps1(debug build + benches + workspace tests--test-threads=4, commitb1bd0a4426bd3906ef38eb1ec4718ef11b1965d4): 2991 passed, 0 failed, 52 ignored across 43 test binaries (including all 6hle::d3d12x::hw_rttests).no wave64(RTX 5070 Ti is wave32-only), 2no heap windows(XCL_HEAP_WINDOWSopt-in off by default).Regression run
Not tested
hw_rt(nothing calls this module yet; the shadow builder, WARP DXR 1.1 tests, and liveXCL_HW_RT=1title run are in the stacked follow-up PR).AI use
Claude Opus 5.5): audited the registry invariants (referencing-TLAS staleness,GeomSigrefit rules, dead-code trims, and PR split) and reviewed the final diff and PR description.Gemini 4 Neon): split and implemented the registry and translation module with its unit tests, ran the build, test suite, and regression smoke, and drafted the PR description.