test: benchmark synthetic ray tracing on Windows #473

Merged
mauroalvare merged 2 commits from upstream-pr/473 into main 2026-11-27 19:38:44 +00:00
mauroalvare commented 2026-11-27 01:13:12 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-27T01:13:12Z.


Change

Add a release benchmark for the translated 64-bit BVH node test. It reuses the shader encoder and Rust oracle from intersect_tests.rs. Static, moving-geometry and large scattered-node fixtures use 262,144 rays on a 512 × 512 grid. Each run warms up both RT modes, captures 120 samples per mode and verifies every output dword. The Windows runner records the exact binary, adapter, build revision and samples in the shared GPU registry.

Verification

Production base 4340aac1a494b9649c00e0e1ad2c6fbe6ea00e80, benchmark head 542a540c65e7bad5dc11a01918bd91f1ddfd4431, Rust 1.98.1 release. Both NVIDIA runs used an RTX 5070 Ti with driver 621.40. WARP reported Microsoft Basic Render Driver. All input and output BLAKE3 hashes matched across the three runs.

.\tools\bench_victory_rt.ps1 -Adapter 'RTX 5070 Ti' -Label baseline-a -Offline
.\tools\bench_victory_rt.ps1 -Adapter 'RTX 5070 Ti' -Label baseline-b -Offline
.\tools\bench_victory_rt.ps1 -Warp -Label warp -Offline
python -m pytest -q
python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools
Fixture RTX run B RT off p50 / p95 (ms) RTX run B RT on p50 / p95 (ms) WARP RT off p50 / p95 (ms) WARP RT on p50 / p95 (ms)
Static 0.069 / 0.210 0.072 / 0.172 0.853 / 1.351 1.915 / 2.434
Moving 0.068 / 0.267 0.073 / 0.196 0.746 / 0.949 1.659 / 1.937
Heavy 0.070 / 0.168 0.084 / 0.253 0.843 / 1.156 4.750 / 5.778

On the RTX, the median dispatch delta for RT on versus off was +0.0044, +0.0045 and +0.0124 ms in run B. Run A gave +0.0044, +0.0046 and +0.0124 ms. The heavy RTX frame median rose by 0.0128–0.0141 ms across both runs. Frame p95 varied more with CPU fence wait. The moving-node copy and barrier took 0.00083 ms at the RTX median. The heavy fixture peaked at 55.1 MiB in sampled process-local DXGI usage, with a process working-set peak of 139.8 MiB in RTX run A.

All three measurement runs passed. Local pytest gave 1416 passed, 491 skipped in the isolated worktree without the optional runtime builds. Ruff gave All checks passed!. cargo xtask policy from third_party/victory gave asset policy: 292 files ok.

Oracle and test data

The non-ignored tests check known hits before and after movement, p95 calculation, distinct thread groups, and the RT switch. Measured scenes use generated 16-bit and 32-bit box and triangle data. Each geometry phase and mode is verified in its own readback. The benchmark covers descriptor-backed node tests. Title BVH build/refit, traversal, lighting resolve and end-to-end frame costs require their own workloads.

Checklist

  • One reviewable change with deterministic correctness checks.
  • Exact commands and results are given above.
  • README synchronization checks passed as part of pytest.
  • The fixtures are generated from original source and contain only synthetic data.

Made with AI assistance (Codex).

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:5519470443 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/473). Originally posted by [mauroalvare](https://github.com/mauroalvare) on 2026-11-27T01:13:12Z. --- ## Change Add a release benchmark for the translated 64-bit BVH node test. It reuses the shader encoder and Rust oracle from `intersect_tests.rs`. Static, moving-geometry and large scattered-node fixtures use 262,144 rays on a 512 × 512 grid. Each run warms up both RT modes, captures 120 samples per mode and verifies every output dword. The Windows runner records the exact binary, adapter, build revision and samples in the shared GPU registry. ## Verification Production base `4340aac1a494b9649c00e0e1ad2c6fbe6ea00e80`, benchmark head `542a540c65e7bad5dc11a01918bd91f1ddfd4431`, Rust 1.98.1 release. Both NVIDIA runs used an RTX 5070 Ti with driver 621.40. WARP reported Microsoft Basic Render Driver. All input and output BLAKE3 hashes matched across the three runs. ```powershell .\tools\bench_victory_rt.ps1 -Adapter 'RTX 5070 Ti' -Label baseline-a -Offline .\tools\bench_victory_rt.ps1 -Adapter 'RTX 5070 Ti' -Label baseline-b -Offline .\tools\bench_victory_rt.ps1 -Warp -Label warp -Offline python -m pytest -q python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools ``` | Fixture | RTX run B RT off p50 / p95 (ms) | RTX run B RT on p50 / p95 (ms) | WARP RT off p50 / p95 (ms) | WARP RT on p50 / p95 (ms) | | --- | ---: | ---: | ---: | ---: | | Static | 0.069 / 0.210 | 0.072 / 0.172 | 0.853 / 1.351 | 1.915 / 2.434 | | Moving | 0.068 / 0.267 | 0.073 / 0.196 | 0.746 / 0.949 | 1.659 / 1.937 | | Heavy | 0.070 / 0.168 | 0.084 / 0.253 | 0.843 / 1.156 | 4.750 / 5.778 | On the RTX, the median dispatch delta for RT on versus off was +0.0044, +0.0045 and +0.0124 ms in run B. Run A gave +0.0044, +0.0046 and +0.0124 ms. The heavy RTX frame median rose by 0.0128–0.0141 ms across both runs. Frame p95 varied more with CPU fence wait. The moving-node copy and barrier took 0.00083 ms at the RTX median. The heavy fixture peaked at 55.1 MiB in sampled process-local DXGI usage, with a process working-set peak of 139.8 MiB in RTX run A. All three measurement runs passed. Local pytest gave `1416 passed, 491 skipped` in the isolated worktree without the optional runtime builds. Ruff gave `All checks passed!`. `cargo xtask policy` from `third_party/victory` gave `asset policy: 292 files ok`. ## Oracle and test data The non-ignored tests check known hits before and after movement, p95 calculation, distinct thread groups, and the RT switch. Measured scenes use generated 16-bit and 32-bit box and triangle data. Each geometry phase and mode is verified in its own readback. The benchmark covers descriptor-backed node tests. Title BVH build/refit, traversal, lighting resolve and end-to-end frame costs require their own workloads. ## Checklist - [x] One reviewable change with deterministic correctness checks. - [x] Exact commands and results are given above. - [x] README synchronization checks passed as part of pytest. - [x] The fixtures are generated from original source and contain only synthetic data. Made with AI assistance (Codex).
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
LooperSalty/AnyXboxX!473
No description provided.