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

Open
ryotdev wants to merge 1 commit from upstream-pr/33 into main
ryotdev commented 2026-11-24 20:39:47 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ryotdev on 2026-11-24T20:39:47Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6590970478 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/33). Originally posted by [ryotdev](https://github.com/ryotdev) on 2026-11-24T20:39:47Z. --- 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.
adriaespii commented 2026-11-24 21:30:41 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by adriaespii on 2026-11-24T21:04:09Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7144433192 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/33#issuecomment-7144433192). Originally posted by [adriaespii](https://github.com/adriaespii) on 2026-11-24T21:04:09Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/33:upstream-pr/33'
git switch 'upstream-pr/33'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/33'
git switch 'upstream-pr/33'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/33'
git switch 'upstream-pr/33'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/33'
git switch 'main'
git merge --squash 'upstream-pr/33'
git switch 'main'
git merge --ff-only 'upstream-pr/33'
git switch 'main'
git merge 'upstream-pr/33'
git push origin 'main'
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
fxceless/victory-fork!33
No description provided.