Test ray-box intersections across two backing pages on WARP #33

Open
github-bot wants to merge 1 commit from github-bot/gh-33 into main AGit
Owner

@⁠ryotdev on GitHub · 2026-11-24 20:39 UTC · original
ryotdev:codex/bvh-cross-page-warp → main · +102 −2 · 2 files · 1 commits · open

A double-width FP32 box node can straddle two 64 KiB game-memory pages. The existing emitted-shader tests keep the node in a single backing buffer, so they can pass if the second lookup accidentally reuses the first page.

This test binds two separate backing resources through the production page directory. Child 3 has its ID on the first page and its bounds on the second. It checks a hit, moves just the second-page bounds off the ray, and checks a miss against the CPU reference. The test harness gains initialized raw UAVs and a root UAV binding for the fault buffer.

Verified on Windows with the Microsoft WARP software adapter, shader model 6.6. Forcing both reads to use the first backing resource made the hit case fail. Restoring the second lookup passed. The targeted suites passed 15 CPU reference tests and 7 emitted-shader tests. The asset-policy check passed. This is synthetic coverage for address translation. In-game lighting remains unverified.

To run the new opt-in case:

cargo test --locked --profile diag -p victory-shader --features host --lib emit::intersect_tests::a_wide_box_crossing_two_title_pages_reads_both_host_copies -- --exact --ignored --nocapture

AI-assisted.

**@⁠ryotdev** on GitHub · 2026-11-24 20:39 UTC · [original](https://github.com/fxceless/victory-fork/pull/33) `ryotdev:codex/bvh-cross-page-warp` → `main` · +102 −2 · 2 files · 1 commits · open A double-width FP32 box node can straddle two 64 KiB game-memory pages. The existing emitted-shader tests keep the node in a single backing buffer, so they can pass if the second lookup accidentally reuses the first page. This test binds two separate backing resources through the production page directory. Child 3 has its ID on the first page and its bounds on the second. It checks a hit, moves just the second-page bounds off the ray, and checks a miss against the CPU reference. The test harness gains initialized raw UAVs and a root UAV binding for the fault buffer. Verified on Windows with the Microsoft WARP software adapter, shader model 6.6. Forcing both reads to use the first backing resource made the hit case fail. Restoring the second lookup passed. The targeted suites passed 15 CPU reference tests and 7 emitted-shader tests. The asset-policy check passed. This is synthetic coverage for address translation. In-game lighting remains unverified. To run the new opt-in case: ```powershell cargo test --locked --profile diag -p victory-shader --features host --lib emit::intersect_tests::a_wide_box_crossing_two_title_pages_reads_both_host_copies -- --exact --ignored --nocapture ``` AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:34:56 +00:00
Author
Owner

@⁠adriaespii on GitHub · 2026-11-24 21:04 UTC · original

Independent test run on commit 82c00f9 (AMD RDNA4):

  • Hardware: AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (x86_64-pc-windows-msvc)
  • cargo clippy --workspace --all-targets -- -D warnings: 0 warnings
  • cargo test --workspace: 496 passed, 0 failed, 8 ignored (victory-shader: 210 passed, 0 failed, 3 ignored; victory-gpu: 110 passed, 0 failed, 1 ignored)
  • Not tested: --ignored tests and live game run (no game files on this machine)

AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.

**@⁠adriaespii** on GitHub · 2026-11-24 21:04 UTC · [original](https://github.com/fxceless/victory-fork/pull/33#issuecomment-7144433192) Independent test run on commit `82c00f9` (AMD RDNA4): - **Hardware:** AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (`x86_64-pc-windows-msvc`) - `cargo clippy --workspace --all-targets -- -D warnings`: 0 warnings - `cargo test --workspace`: 496 passed, 0 failed, 8 ignored (`victory-shader`: 210 passed, 0 failed, 3 ignored; `victory-gpu`: 110 passed, 0 failed, 1 ignored) - **Not tested:** `--ignored` tests and live game run (no game files on this machine) *AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.*
This pull request has changes conflicting with the target branch.
  • crates/victory-shader/src/emit/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/33/head:github-bot/gh-33'
git switch 'github-bot/gh-33'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-33'
git switch 'github-bot/gh-33'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-33'
git switch 'github-bot/gh-33'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-33'
git switch 'main'
git merge --squash 'github-bot/gh-33'
git switch 'main'
git merge --ff-only 'github-bot/gh-33'
git switch 'main'
git merge 'github-bot/gh-33'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.