Experimental native ray tracing, BVH compaction and Ray Regeneration research #8

Open
opened 2026-12-06 00:19:58 +00:00 by github-bot · 0 comments
Owner

@⁠VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original

Problem

Native ray tracing (VICTORY_BVH_BUILDER=1) and AMD FidelityFX Ray Regeneration (VICTORY_FSR_RR) are experimental, off by default and excluded from the current performance baseline. Several correctness, scheduling and memory-efficiency challenges remain before ray tracing can be considered stable.

Known Evidence

  • Experimental / Internal diagnostic observations (off by default):
    • VICTORY_ARENA_ONE_SIDE=1 removes duplicate CPU backing for 64 MiB ray-tracing arenas (previously ~1,472 MB of arena backing duplicated alongside ~1,425 MB of RT structures in an internal diagnostic run).
    • VICTORY_SIZE_COPY_LATE=1 defers CPU copies out of BVH compacted-size slots until GPU completion, reducing early slot reads (9,646 → 0) and undersized compaction copies (148 → 0) in an internal RT diagnostic session; kept off by default pending visual verification of reflections.
    • VICTORY_FSR_RR=1 currently keeps the title's own denoiser active because depth/stencil input bindings require verification (VICTORY_FSR_RR=unverified allows testing the denoiser path alongside VICTORY_BVH_BUILDER=1 and VICTORY_FSR).
  • Synthetic hardware checks: victory.exe dxr-capabilities, victory.exe dxr-smoke, and victory.exe dxr-smoke --compact (wired into scripts/run-regression.ps1 -NativeDxr).
  • Engineering target: Stable, accurate experimental native ray tracing and verified denoiser integration without regressing the non-RT baseline.

Approaches That Did Not Work

  • Blocking the first BVH dispatch without a pipeline pre-build wait: Previously left the BVH builder permanently disabled for the entire session when pipelines were still loading (mitigated by VICTORY_BVH_WAIT_MS, default 10000).
  • Reading compacted-size slots on the CPU at submission time: Observed pre-landing values and caused undersized compaction copies (investigated via VICTORY_BVH_TRACE and VICTORY_BVH_CALL_CAPTURE=2).

Relevant Source Modules

  • runtime/crates/victory-gpu/src/raygen.rs
  • runtime/crates/victory-gpu/src/memory.rs
  • runtime/crates/victory-gpu/src/rr_observe.rs
  • runtime/crates/victory-gpu/src/ambient.rs
  • runtime/crates/victory-hle/src/bvh_capture.rs
  • runtime/crates/victory-shader/src/emit/mod.rs

Expected Contribution

  • Verify reflection correctness and zero BVH anomalies (VICTORY_BVH_TRACE=1, VICTORY_BVH_CALL_CAPTURE=2) with VICTORY_SIZE_COPY_LATE=1 and VICTORY_ARENA_ONE_SIDE=1.
  • Verify Ray Regeneration depth/motion/normal bindings (VICTORY_RR_TRACE=1, VICTORY_AMBIENT_DEPTH_PLANE=1, VICTORY_FSR_RR=unverified) and expand synthetic DXR compaction/denoiser tests.
  • Measure RT overhead separately from the non-RT baseline.

Acceptance Criteria

  • scripts/run-regression.ps1 -NativeDxr passes cleanly on DXR-capable hardware.
  • Zero ROOM or SLOT READ EARLY anomalies under VICTORY_BVH_TRACE=1 in synthetic and gameplay RT tests.
  • All RT changes remain strictly zero-cost when VICTORY_BVH_BUILDER is off.
**@⁠VictoryX-dev** on GitHub · 2026-12-03 02:57 UTC · [original](https://github.com/VictoryX-dev/VictoryX/issues/8) ## Problem Native ray tracing (`VICTORY_BVH_BUILDER=1`) and AMD FidelityFX Ray Regeneration (`VICTORY_FSR_RR`) are experimental, off by default and excluded from the current performance baseline. Several correctness, scheduling and memory-efficiency challenges remain before ray tracing can be considered stable. ## Known Evidence - **Experimental / Internal diagnostic observations (off by default):** - `VICTORY_ARENA_ONE_SIDE=1` removes duplicate CPU backing for 64 MiB ray-tracing arenas (previously ~1,472 MB of arena backing duplicated alongside ~1,425 MB of RT structures in an internal diagnostic run). - `VICTORY_SIZE_COPY_LATE=1` defers CPU copies out of BVH compacted-size slots until GPU completion, reducing early slot reads (`9,646 → 0`) and undersized compaction copies (`148 → 0`) in an internal RT diagnostic session; kept off by default pending visual verification of reflections. - `VICTORY_FSR_RR=1` currently keeps the title's own denoiser active because depth/stencil input bindings require verification (`VICTORY_FSR_RR=unverified` allows testing the denoiser path alongside `VICTORY_BVH_BUILDER=1` and `VICTORY_FSR`). - **Synthetic hardware checks:** `victory.exe dxr-capabilities`, `victory.exe dxr-smoke`, and `victory.exe dxr-smoke --compact` (wired into `scripts/run-regression.ps1 -NativeDxr`). - **Engineering target:** Stable, accurate experimental native ray tracing and verified denoiser integration without regressing the non-RT baseline. ## Approaches That Did Not Work - **Blocking the first BVH dispatch without a pipeline pre-build wait:** Previously left the BVH builder permanently disabled for the entire session when pipelines were still loading (mitigated by `VICTORY_BVH_WAIT_MS`, default `10000`). - **Reading compacted-size slots on the CPU at submission time:** Observed pre-landing values and caused undersized compaction copies (investigated via `VICTORY_BVH_TRACE` and `VICTORY_BVH_CALL_CAPTURE=2`). ## Relevant Source Modules - `runtime/crates/victory-gpu/src/raygen.rs` - `runtime/crates/victory-gpu/src/memory.rs` - `runtime/crates/victory-gpu/src/rr_observe.rs` - `runtime/crates/victory-gpu/src/ambient.rs` - `runtime/crates/victory-hle/src/bvh_capture.rs` - `runtime/crates/victory-shader/src/emit/mod.rs` ## Expected Contribution - Verify reflection correctness and zero BVH anomalies (`VICTORY_BVH_TRACE=1`, `VICTORY_BVH_CALL_CAPTURE=2`) with `VICTORY_SIZE_COPY_LATE=1` and `VICTORY_ARENA_ONE_SIDE=1`. - Verify Ray Regeneration depth/motion/normal bindings (`VICTORY_RR_TRACE=1`, `VICTORY_AMBIENT_DEPTH_PLANE=1`, `VICTORY_FSR_RR=unverified`) and expand synthetic DXR compaction/denoiser tests. - Measure RT overhead separately from the non-RT baseline. ## Acceptance Criteria - [ ] `scripts/run-regression.ps1 -NativeDxr` passes cleanly on DXR-capable hardware. - [ ] Zero `ROOM` or `SLOT READ EARLY` anomalies under `VICTORY_BVH_TRACE=1` in synthetic and gameplay RT tests. - [ ] All RT changes remain strictly zero-cost when `VICTORY_BVH_BUILDER` is off.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:19:59 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/VictoryX-dev--VictoryX#8
No description provided.