Skip page faults for unread BVH nodes #2108

Merged
Ondra97 merged 1 commit from upstream-pr/2108 into main 2026-11-30 14:12:03 +00:00
Ondra97 commented 2026-11-29 09:33:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Ondra97 on 2026-11-29T09:33:51Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5549450231 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2108). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-11-29T09:33:51Z. --- ## 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.
dyshay commented 2026-11-29 15:40:07 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T15:40:07Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258271052 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2108#issuecomment-7258271052). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-29T15:40:07Z. --- 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.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!2108
No description provided.