Skip page faults for unread BVH nodes #2108

Manually merged
github merged 1 commit from github-bot/gh-2108 into main 2026-11-30 14:16:51 +00:00 AGit
Owner

@⁠Ondra97 on GitHub · 2026-11-29 09:33 UTC · original
Ondra97:codex/skip-unread-bvh-node-faults → main · +89 −7 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC

What it changes

The ray-tracing node instruction returns four all-ones dwords for instance and procedural node kinds without reading their data. The raw-address lowering still reported absent pages for those lanes. The host could then provision a 64 KiB page for a read that never happened.

Limit missing-page reports to active triangle and box lanes.

How it was tested

  • A synthetic D3D12 dispatch on RTX 4070 Ti SUPER (32-lane waves, driver 621.40) and WARP reads back both the output dwords and the real missing-page buffer. Control 829188e9 reported four pages on RTX. The patch reports the two required pages on both adapters in both the 32-bit and 64-bit instruction forms. The box, triangle, instance, procedural and masked-lane outputs match their expected dwords.
  • All 11 intersection tests and 16 CPU BVH reference tests passed. The targeted regression also passed with VICTORY_MEMORY_NEAR=0. Both Windows release builds, staged asset policy and whitespace checks passed. Local tests ran on stable Rust 1.100.0 because the installed pinned toolchain has no working Cargo.
  • Matched cold-start smoke tests used the same copied save, Series X at 1440p, DLSS Performance and frame generation off. Both remained in scene loading with the RT builder gated on missing D3D12 pipelines and zero builder dispatches. Gameplay image quality and FPS remain unverified.
  • GitHub CI for this patch and current upstream main (55d06914) stops on the existing unwind_copy Clippy error. The CI restoration in #2620 passed both Clippy gates and the full workspace suite and is open for maintainer review. Locally, the three BCPack oracle failures and the full-tree asset-policy failure reproduce on clean 829188e9. The standalone complete shader suite was stopped to free the GPU for the smoke tests after 259 passes and nine skips.
  • Retested this patch on the proposed CI base from #2620 (f06505ea) with Windows Rust 1.98.1. All 11 intersection tests and 16 CPU BVH reference tests passed. RTX and WARP both reported the two required pages in the 32-bit and 64-bit forms. The targeted case also passed with VICTORY_MEMORY_NEAR=0.

Checked for overlap

  • I searched the open pull requests for the behaviour and the changed files. #1440 addressed the all-miss shortcut and is merged. #1575 changes the visibility of bvh_miss in the same file. #2095 changes host-side reclamation after packed structures shrink.
**@⁠Ondra97** on GitHub · 2026-11-29 09:33 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2108) `Ondra97:codex/skip-unread-bvh-node-faults` → `main` · +89 −7 · 2 files · 1 commits · merged 2026-11-30 14:12 UTC ## What it changes The ray-tracing node instruction returns four all-ones dwords for instance and procedural node kinds without reading their data. The raw-address lowering still reported absent pages for those lanes. The host could then provision a 64 KiB page for a read that never happened. Limit missing-page reports to active triangle and box lanes. ## How it was tested - A synthetic D3D12 dispatch on RTX 4070 Ti SUPER (32-lane waves, driver 621.40) and WARP reads back both the output dwords and the real missing-page buffer. Control `829188e9` reported four pages on RTX. The patch reports the two required pages on both adapters in both the 32-bit and 64-bit instruction forms. The box, triangle, instance, procedural and masked-lane outputs match their expected dwords. - All 11 intersection tests and 16 CPU BVH reference tests passed. The targeted regression also passed with `VICTORY_MEMORY_NEAR=0`. Both Windows release builds, staged asset policy and whitespace checks passed. Local tests ran on stable Rust 1.100.0 because the installed pinned toolchain has no working Cargo. - Matched cold-start smoke tests used the same copied save, Series X at 1440p, DLSS Performance and frame generation off. Both remained in scene loading with the RT builder gated on missing D3D12 pipelines and zero builder dispatches. Gameplay image quality and FPS remain unverified. - GitHub CI for this patch and current upstream `main` (`55d06914`) stops on the existing `unwind_copy` Clippy error. The CI restoration in #2620 passed both Clippy gates and the full workspace suite and is open for maintainer review. Locally, the three BCPack oracle failures and the full-tree asset-policy failure reproduce on clean `829188e9`. The standalone complete shader suite was stopped to free the GPU for the smoke tests after 259 passes and nine skips. - Retested this patch on the proposed CI base from #2620 (`f06505ea`) with Windows Rust 1.98.1. All 11 intersection tests and 16 CPU BVH reference tests passed. RTX and WARP both reported the two required pages in the 32-bit and 64-bit forms. The targeted case also passed with `VICTORY_MEMORY_NEAR=0`. ## Checked for overlap - [x] I searched the open pull requests for the behaviour and the changed files. #1440 addressed the all-miss shortcut and is merged. #1575 changes the visibility of `bvh_miss` in the same file. #2095 changes host-side reclamation after packed structures shrink.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 09:34:11 +00:00
Author
Owner

@⁠dyshay on GitHub · 2026-11-29 15:40 UTC · original

Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with --profile diag --features diagnostics, and the CPU tests of the touched crates pass. Runs on an RTX 4090 are queued (Series X 1440p, and Series S with ray tracing, DLSS Quality). Frame times will follow here.

**@⁠dyshay** on GitHub · 2026-11-29 15:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2108#issuecomment-7258271052) Merged into our fork's integration branch for testing ([dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA/tree/janus-prs), branch `janus-prs`). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with `--profile diag --features diagnostics`, and the CPU tests of the touched crates pass. Runs on an RTX 4090 are queued (Series X 1440p, and Series S with ray tracing, DLSS Quality). Frame times will follow here.
github manually merged commit c835a45b18 into main 2026-11-30 14:16:51 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!2108
No description provided.