fix(victory-shader): guard BVH memory lookups and optimize box32 second-half reads #476

Merged
mauroalvare merged 3 commits from upstream-pr/476 into main 2026-11-27 12:55:33 +00:00
mauroalvare commented 2026-11-27 01:31:53 +00:00 (Migrated from github.com)

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


Change

Fixes two real-directory correctness bugs in victory-shader's DXIL lowering of image_bvh_intersect_ray / image_bvh64_intersect_ray (third_party/victory/crates/victory-shader/src/emit/intersect.rs) and reduces redundant node/directory work on 128-byte box32 nodes, verified bit-for-bit against crate::bvh::intersect on an NVIDIA GeForce RTX 5070 Ti (Wave32 hardware, SM 6.6) and WARP using synthetic scenes only:

  1. Gate bvh_address and bvh_memory (SLOT_MEMORY / SLOT_FAULTS) inside begin_guarded(memory_guard) and kind < 6:
    • Previously, bvh_address and bvh_memory ran before begin_guarded(guard) and before checking kind, and Lower::bvh used self.guard(b, i) instead of self.memory_guard(b, i).
    • Masked-out lanes (guard == false) still computed addresses, loaded from the 16 MiB SLOT_MEMORY directory, and created NonUniformResourceIndex heap handles.
    • Active lanes with kind == 6 (instance), kind == 7 (procedural), or bvh::NONE (0xffff_ffff, kind == 7) read SLOT_MEMORY for unread addresses and wrote spurious page faults to host-RAM SLOT_FAULTS over PCIe.
    • Trailing lanes past USER_DISPATCH_THREADS_X in split wave64-on-wave32 partial final groups (partial_active) were not masked out and could read SLOT_MEMORY and record spurious faults.
  2. Optimize box32 second-half reads, box load hoisting, and 32-bit bvh_address:
    • Compute bvh_address in 32-bit halves instead of 64-bit integers, removing flags::INT64 requirement on shaders that do not otherwise use 64-bit ints.
    • Hoist the first 64 bytes (children + bytes 16..64) in bvh_boxes before the box32 (kind == 5) vs box16 (kind == 4) branch so mixed warps never load bytes 16..64 twice.
    • Skip reading the second 64 bytes (and second directory lookup) of box32 nodes when (children[2] & children[3]) == bvh::NONE (2-child nodes).
    • For 128-byte box32 nodes that do have child 2 or 3, reuse the first half's heap handle at byte + 64 unless (low & 0xFFFF) == 0xFFC0 (straddling a 64 KiB page boundary), eliminating the redundant 2nd directory load and 2nd NonUniformResourceIndex handle in 99.9%+ of nodes.
  3. Real-directory & wave64 GPU validation (intersect_tests.rs, test-only host.rs):
    • Existing intersect_tests.rs tests bypassed Lower::memory via TEST_MEMORY. Added real_directory_memory_path_handles_cross_page_unmapped_and_no_spurious_faults (testing multi-arena SLOT_MEMORY + SLOT_FAULTS + USER_MEMORY_BASE, cross-page box32 across arenas, partially-unmapped cross-page box32, cross-page 2-child box32, and zero spurious faults on masked and kind 6/7/NONE lanes), wave64_bvh64_intersect_runs_on_wave32_hardware_and_respects_partial_groups, and an #[ignore] GPU timestamp benchmark (bench_bvh64_intersect_on_gpu).

Verification

Tested on Windows 11 x64 with NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2140 / 621.40, Wave32 SM 6.6) and WARP against base commit 4340aac1a494b9649c00e0e1ad2c6fbe6ea00e80 (main):

cd third_party/victory && cargo xtask policy
-> asset policy: 289 files ok

python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools
-> All checks passed!

cd third_party/victory && VICTORY_D3D12_ADAPTER="RTX 5070 Ti" cargo test --release -p victory-shader --features host -- --test-threads=1
-> test result: ok. 319 passed; 0 failed; 5 ignored; 0 measured; 0 filtered out; finished in 271.37s

cd third_party/victory && VICTORY_D3D12_ADAPTER="RTX 5070 Ti" cargo test --release -p victory-shader --features host -- bench_bvh64_intersect_on_gpu --ignored --nocapture --test-threads=1
-> test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 323 filtered out; finished in 3.74s

RTX 5070 Ti GPU Timestamp Comparison (same synthetic scenes, 32,768 threads x 64 iterations = 2,097,152 image_bvh64_intersect_ray calls/dispatch, 10 warmups + 40 timed dispatches, bit-exact CPU oracle verified):

Workload Baseline (4340aac) After (f482803) Delta
mixed_pc_faults (host-RAM L0 SLOT_FAULTS, matching memory.rs) 1.062 ms (126 spurious faults) 0.157 ms (0 faults) -85.2% (6.76x faster)
box32_2child (2-child 128B BVH4 nodes) 0.279 ms 0.162 ms -41.9% (1.72x faster)
box32_8arenas (8 divergent arenas/warp) 0.390 ms 0.381 ms -2.3%
box32_only (4-child 128B scattered) 0.279 ms 0.279 ms 0.0%
box16_only (64B scattered) 0.162 ms 0.162 ms 0.0%
box16_l1_coherent 0.030 ms 0.030 ms 0.0%
mixed_box16_box32 0.221 ms 0.223 ms +0.9%
triangle_only 0.055 ms 0.054 ms -1.8%
tri_l1_coherent 0.027 ms 0.027 ms 0.0%
mixed_traversal (VRAM SLOT_FAULTS) 0.157 ms (126 spurious faults) 0.157 ms (0 faults) 0 spurious faults
box32_l1_coherent (coherent 4-child L1-hot) 0.032 ms 0.037 ms +0.005 ms

(Python pytest was not run because no files outside third_party/victory/crates/victory-shader/ were modified.)

Oracle and test data

  • Oracle: third_party/victory/crates/victory-shader/src/bvh.rs (bvh::intersect), compared dword-for-dword on both RTX 5070 Ti hardware and WARP, plus dxil.dll validation.
  • Test data: 100% synthetic BVH nodes, directories, and rays built in intersect_tests.rs (no game, console, or SDK files).
  • Failure cases without this change (both confirmed failing on RTX 5070 Ti on 4340aac):
    • real_directory_memory_path_handles_cross_page_unmapped_and_no_spurious_faults fails on 4340aac with spurious faults [0x41, 0x42, 0x7ffff] from kind == 6, kind == 7, and bvh::NONE (0xffff_ffff).
    • wave64_bvh64_intersect_runs_on_wave32_hardware_and_respects_partial_groups fails on 4340aac with spurious fault [0x60] from trailing lanes 45..63 of a split wave64 partial group.

Checklist

  • The PR covers a single reviewable behaviour.
  • A test fails without this change and passes with it.
  • The commands and results of each check are given above.
  • An unimplemented function returns an error (E_NOTIMPL), never a fake success.
  • README: no Python test count hundred crossed; no README changes needed.
  • No game, console or SDK file, no key, no dump, no download link.
  • Findings drawn from a title: none (synthetic scenes and public ISA/repo code only).
  • Code taken from another project: none.

AI assistance disclosure: This change, its synthetic tests, and GPU measurements were prepared with AI coding assistance (Gemini).

Review follow-up on current main

The GPU boundary test covers both image_bvh_intersect_ray encodings through the real SLOT_MEMORY directory. With descriptor word 0 set to 0x00ffffff, pointer 0x25 resolves to 0x100000000, and the wide pointer with high word 1 resolves to 0x900000000. The test maps four synthetic pages, compares ordered child pointers and triangle hit/miss words with bvh::intersect, and checks that mapped rays produce zero faults. The triangle hit returns [80, 16, 4, 4], representing a distance of 5 and barycentric weights of 0.25 and 0.25. The boundary and directory tests passed on the RTX 5070 Ti and WARP. The wave64 partial-group test passed on the RTX.

With the same test harness on main at b62053fe70078deac140ec43039d7ce0af3c6b17, the directory test reproduced false faults for pages 0x27, 0x41, 0x42, and 0x7ffff. Lanes 45–63 of the partial wave64 group also incorrectly faulted page 0x60. Both tests passed on e4ed303d9a527764d54653bb0ad93f59ed6879bd.

On the RTX 5070 Ti with driver 621.40, I ran the same 11 workloads in base/head/head/base order. Each workload ran 2,097,152 node tests per dispatch, with 10 warmups and 40 timed dispatches. CPU oracle samples passed and the BLAKE3 hash of every lane's four-word output matched between builds on all 11 workloads. The table shows the first pair in milliseconds.

Workload main p50 / p95 PR p50 / p95
mixed_pc_faults 1.0309 / 1.0680 0.1571 / 0.1577
box32_2child 0.2791 / 0.2793 0.1618 / 0.1623
box32_8arenas 0.3846 / 0.3939 0.3817 / 0.3888
box32_l1_coherent 0.0322 / 0.0332 0.0366 / 0.0373

mixed_pc_faults recorded 126 false faults on main and zero on the PR. The coherent four-child case took roughly 4.4 µs longer in both pairs.

A separate control used the same shader, virtual pointers, ray records and output on the RTX. Eight distinct arena buffers took 0.3810 ms at the median. Eight descriptors pointing at a single backing buffer took 0.2862 ms. A single descriptor pointing at that buffer took 0.2793 ms. This isolates most of the eight-arena surcharge to the physical working set in this fixture. The local RT registry contains the reproducible control for the BVH and memory front.

$env:VICTORY_D3D12_ADAPTER = 'RTX 5070 Ti'
$env:VICTORY_WARP = '0'
cargo test --manifest-path third_party/victory/Cargo.toml --offline --locked --release -p victory-shader --features host --lib emit::intersect_tests -- --nocapture --test-threads=1
cargo test --manifest-path third_party/victory/Cargo.toml --offline --locked --release -p victory-shader --features host --lib emit::intersect_tests::bench_bvh64_intersect_on_gpu -- --exact --ignored --nocapture --test-threads=1

The published head passed 11 filtered intersection tests, 16 CPU BVH tests, the timestamp benchmark, the asset policy check, and Ruff.

AI assistance (Codex) helped write the boundary test, run the measurements, and prepare this report.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:5519621343 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/476). Originally posted by [mauroalvare](https://github.com/mauroalvare) on 2026-11-27T01:31:53Z. --- ## Change Fixes two real-directory correctness bugs in `victory-shader`'s DXIL lowering of `image_bvh_intersect_ray` / `image_bvh64_intersect_ray` (`third_party/victory/crates/victory-shader/src/emit/intersect.rs`) and reduces redundant node/directory work on 128-byte `box32` nodes, verified bit-for-bit against `crate::bvh::intersect` on an **NVIDIA GeForce RTX 5070 Ti** (Wave32 hardware, SM 6.6) and WARP using synthetic scenes only: 1. **Gate `bvh_address` and `bvh_memory` (`SLOT_MEMORY` / `SLOT_FAULTS`) inside `begin_guarded(memory_guard)` and `kind < 6`**: - Previously, `bvh_address` and `bvh_memory` ran *before* `begin_guarded(guard)` and *before* checking `kind`, and `Lower::bvh` used `self.guard(b, i)` instead of `self.memory_guard(b, i)`. - Masked-out lanes (`guard == false`) still computed addresses, loaded from the 16 MiB `SLOT_MEMORY` directory, and created `NonUniformResourceIndex` heap handles. - Active lanes with `kind == 6` (instance), `kind == 7` (procedural), or `bvh::NONE` (`0xffff_ffff`, `kind == 7`) read `SLOT_MEMORY` for unread addresses and wrote **spurious page faults** to host-RAM `SLOT_FAULTS` over PCIe. - Trailing lanes past `USER_DISPATCH_THREADS_X` in split wave64-on-wave32 partial final groups (`partial_active`) were not masked out and could read `SLOT_MEMORY` and record spurious faults. 2. **Optimize `box32` second-half reads, box load hoisting, and 32-bit `bvh_address`**: - Compute `bvh_address` in 32-bit halves instead of 64-bit integers, removing `flags::INT64` requirement on shaders that do not otherwise use 64-bit ints. - Hoist the first 64 bytes (`children` + bytes `16..64`) in `bvh_boxes` before the `box32` (`kind == 5`) vs `box16` (`kind == 4`) branch so mixed warps never load bytes `16..64` twice. - Skip reading the second 64 bytes (and second directory lookup) of `box32` nodes when `(children[2] & children[3]) == bvh::NONE` (2-child nodes). - For 128-byte `box32` nodes that do have child 2 or 3, reuse the first half's heap handle at `byte + 64` unless `(low & 0xFFFF) == 0xFFC0` (straddling a 64 KiB page boundary), eliminating the redundant 2nd directory load and 2nd `NonUniformResourceIndex` handle in 99.9%+ of nodes. 3. **Real-directory & wave64 GPU validation (`intersect_tests.rs`, test-only `host.rs`)**: - Existing `intersect_tests.rs` tests bypassed `Lower::memory` via `TEST_MEMORY`. Added `real_directory_memory_path_handles_cross_page_unmapped_and_no_spurious_faults` (testing multi-arena `SLOT_MEMORY` + `SLOT_FAULTS` + `USER_MEMORY_BASE`, cross-page `box32` across arenas, partially-unmapped cross-page `box32`, cross-page 2-child `box32`, and zero spurious faults on masked and `kind 6/7`/`NONE` lanes), `wave64_bvh64_intersect_runs_on_wave32_hardware_and_respects_partial_groups`, and an `#[ignore]` GPU timestamp benchmark (`bench_bvh64_intersect_on_gpu`). ## Verification Tested on Windows 11 x64 with **NVIDIA GeForce RTX 5070 Ti** (driver `32.0.16.2140` / `621.40`, Wave32 SM 6.6) and WARP against base commit `4340aac1a494b9649c00e0e1ad2c6fbe6ea00e80` (`main`): ``` cd third_party/victory && cargo xtask policy -> asset policy: 289 files ok python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools -> All checks passed! cd third_party/victory && VICTORY_D3D12_ADAPTER="RTX 5070 Ti" cargo test --release -p victory-shader --features host -- --test-threads=1 -> test result: ok. 319 passed; 0 failed; 5 ignored; 0 measured; 0 filtered out; finished in 271.37s cd third_party/victory && VICTORY_D3D12_ADAPTER="RTX 5070 Ti" cargo test --release -p victory-shader --features host -- bench_bvh64_intersect_on_gpu --ignored --nocapture --test-threads=1 -> test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 323 filtered out; finished in 3.74s ``` ### RTX 5070 Ti GPU Timestamp Comparison (same synthetic scenes, 32,768 threads x 64 iterations = 2,097,152 `image_bvh64_intersect_ray` calls/dispatch, 10 warmups + 40 timed dispatches, bit-exact CPU oracle verified): | Workload | Baseline (`4340aac`) | After (`f482803`) | Delta | | --- | --- | --- | --- | | `mixed_pc_faults` (host-RAM L0 `SLOT_FAULTS`, matching `memory.rs`) | `1.062 ms` (126 spurious faults) | `0.157 ms` (0 faults) | **-85.2% (6.76x faster)** | | `box32_2child` (2-child 128B BVH4 nodes) | `0.279 ms` | `0.162 ms` | **-41.9% (1.72x faster)** | | `box32_8arenas` (8 divergent arenas/warp) | `0.390 ms` | `0.381 ms` | **-2.3%** | | `box32_only` (4-child 128B scattered) | `0.279 ms` | `0.279 ms` | 0.0% | | `box16_only` (64B scattered) | `0.162 ms` | `0.162 ms` | 0.0% | | `box16_l1_coherent` | `0.030 ms` | `0.030 ms` | 0.0% | | `mixed_box16_box32` | `0.221 ms` | `0.223 ms` | +0.9% | | `triangle_only` | `0.055 ms` | `0.054 ms` | -1.8% | | `tri_l1_coherent` | `0.027 ms` | `0.027 ms` | 0.0% | | `mixed_traversal` (VRAM `SLOT_FAULTS`) | `0.157 ms` (126 spurious faults) | `0.157 ms` (0 faults) | 0 spurious faults | | `box32_l1_coherent` (coherent 4-child L1-hot) | `0.032 ms` | `0.037 ms` | +0.005 ms | (Python `pytest` was not run because no files outside `third_party/victory/crates/victory-shader/` were modified.) ## Oracle and test data - **Oracle**: `third_party/victory/crates/victory-shader/src/bvh.rs` (`bvh::intersect`), compared dword-for-dword on both RTX 5070 Ti hardware and WARP, plus `dxil.dll` validation. - **Test data**: 100% synthetic BVH nodes, directories, and rays built in `intersect_tests.rs` (no game, console, or SDK files). - **Failure cases without this change (both confirmed failing on RTX 5070 Ti on `4340aac`)**: - `real_directory_memory_path_handles_cross_page_unmapped_and_no_spurious_faults` fails on `4340aac` with spurious faults `[0x41, 0x42, 0x7ffff]` from `kind == 6`, `kind == 7`, and `bvh::NONE` (`0xffff_ffff`). - `wave64_bvh64_intersect_runs_on_wave32_hardware_and_respects_partial_groups` fails on `4340aac` with spurious fault `[0x60]` from trailing lanes `45..63` of a split wave64 partial group. ## Checklist - [x] The PR covers a single reviewable behaviour. - [x] A test fails without this change and passes with it. - [x] The commands and results of each check are given above. - [x] An unimplemented function returns an error (`E_NOTIMPL`), never a fake success. - [x] README: no Python test count hundred crossed; no README changes needed. - [x] No game, console or SDK file, no key, no dump, no download link. - [x] Findings drawn from a title: none (synthetic scenes and public ISA/repo code only). - [x] Code taken from another project: none. *AI assistance disclosure: This change, its synthetic tests, and GPU measurements were prepared with AI coding assistance (Gemini).* ## Review follow-up on current `main` The GPU boundary test covers both `image_bvh_intersect_ray` encodings through the real `SLOT_MEMORY` directory. With descriptor word 0 set to `0x00ffffff`, pointer `0x25` resolves to `0x100000000`, and the wide pointer with high word `1` resolves to `0x900000000`. The test maps four synthetic pages, compares ordered child pointers and triangle hit/miss words with `bvh::intersect`, and checks that mapped rays produce zero faults. The triangle hit returns `[80, 16, 4, 4]`, representing a distance of 5 and barycentric weights of 0.25 and 0.25. The boundary and directory tests passed on the RTX 5070 Ti and WARP. The wave64 partial-group test passed on the RTX. With the same test harness on `main` at `b62053fe70078deac140ec43039d7ce0af3c6b17`, the directory test reproduced false faults for pages `0x27`, `0x41`, `0x42`, and `0x7ffff`. Lanes 45–63 of the partial wave64 group also incorrectly faulted page `0x60`. Both tests passed on `e4ed303d9a527764d54653bb0ad93f59ed6879bd`. On the RTX 5070 Ti with driver 621.40, I ran the same 11 workloads in base/head/head/base order. Each workload ran 2,097,152 node tests per dispatch, with 10 warmups and 40 timed dispatches. CPU oracle samples passed and the BLAKE3 hash of every lane's four-word output matched between builds on all 11 workloads. The table shows the first pair in milliseconds. | Workload | `main` p50 / p95 | PR p50 / p95 | | --- | ---: | ---: | | `mixed_pc_faults` | 1.0309 / 1.0680 | 0.1571 / 0.1577 | | `box32_2child` | 0.2791 / 0.2793 | 0.1618 / 0.1623 | | `box32_8arenas` | 0.3846 / 0.3939 | 0.3817 / 0.3888 | | `box32_l1_coherent` | 0.0322 / 0.0332 | 0.0366 / 0.0373 | `mixed_pc_faults` recorded 126 false faults on `main` and zero on the PR. The coherent four-child case took roughly 4.4 µs longer in both pairs. A separate control used the same shader, virtual pointers, ray records and output on the RTX. Eight distinct arena buffers took 0.3810 ms at the median. Eight descriptors pointing at a single backing buffer took 0.2862 ms. A single descriptor pointing at that buffer took 0.2793 ms. This isolates most of the eight-arena surcharge to the physical working set in this fixture. The local RT registry contains the reproducible control for the BVH and memory front. ```powershell $env:VICTORY_D3D12_ADAPTER = 'RTX 5070 Ti' $env:VICTORY_WARP = '0' cargo test --manifest-path third_party/victory/Cargo.toml --offline --locked --release -p victory-shader --features host --lib emit::intersect_tests -- --nocapture --test-threads=1 cargo test --manifest-path third_party/victory/Cargo.toml --offline --locked --release -p victory-shader --features host --lib emit::intersect_tests::bench_bvh64_intersect_on_gpu -- --exact --ignored --nocapture --test-threads=1 ``` The published head passed 11 filtered intersection tests, 16 CPU BVH tests, the timestamp benchmark, the asset policy check, and Ruff. *AI assistance (Codex) helped write the boundary test, run the measurements, and prepare this report.*
akimfomin commented 2026-11-27 01:39:51 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by akimfomin on 2026-11-27T01:39:51Z.


PortBridge's merge check found f4828034 clean against current receiving b62053fe. I also extracted the arithmetic from bvh_address into a CPU model and compared the two-word result against the original u64 expression. Two boundary inputs and 100,000 deterministic 32/64-bit inputs matched. This checks the address formula only.

A small additional control for the actual shader would keep the existing 64 KiB-page fixture and add the 4 GiB carry case: descriptor low word 0x00ffffff, descriptor high byte 0, pointer low word 0x25. The old u64 expression and the split calculation both give 0x100000000; with pointer high word 1 they both give 0x900000000. A CPU/address-output fixture can cover that without allocating 4 GiB. This is separate from the existing mixed-arena and partial-group oracle, which would be the first two GPU checks for someone with another adapter. AI-assisted source review and isolated CPU model.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7207477061 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/476#issuecomment-7207477061). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-27T01:39:51Z. --- PortBridge's [merge check](https://github.com/akimfomin/PortBridge/issues/98) found `f4828034` clean against [current receiving `b62053fe`](https://github.com/LooperSalty/AnyXboxX/commit/b62053fe70078deac140ec43039d7ce0af3c6b17). I also extracted the arithmetic from `bvh_address` into a CPU model and compared the two-word result against the original u64 expression. Two boundary inputs and 100,000 deterministic 32/64-bit inputs matched. This checks the address formula only. A small additional control for the actual shader would keep the existing 64 KiB-page fixture and add the **4 GiB carry** case: descriptor low word `0x00ffffff`, descriptor high byte 0, pointer low word `0x25`. The old u64 expression and the split calculation both give `0x100000000`; with pointer high word 1 they both give `0x900000000`. A CPU/address-output fixture can cover that without allocating 4 GiB. This is separate from the existing mixed-arena and partial-group oracle, which would be the first two GPU checks for someone with another adapter. AI-assisted source review and isolated CPU model.
mauroalvare commented 2026-11-27 01:40:01 +00:00 (Migrated from github.com)

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


Independent check on release RTX 5070 Ti, driver 621.40, at f482803499f4f10f356922686643cf2f042e6fec. I ran the candidate’s test harness against a40ed684341fbd2cc6d27c171af9ae27bbc56018, whose victory-shader sources match parent 4340aac1a494b9649c00e0e1ad2c6fbe6ea00e80.

  • The real-directory test failed on the base with pages 0x27, 0x41, 0x42, and 0x7ffff. The partial wave64 group failed with page 0x60. Both tests passed on the head on the RTX.
  • The real-directory test also passed on the head with VICTORY_WARP=1 and the printed adapter Microsoft Basic Render Driver. The wave64 partial-group result above is from the RTX.

I ran the same synthetic directory workload twice per build in base/head/head/base order, 2,097,152 node tests per dispatch, 10 warmups and 40 measured dispatches per case. The CPU oracle passed in all runs. I added nearest-rank p95 reporting to the copied test harness.

RTX run A Base p50 / p95 (ms) Head p50 / p95 (ms)
mixed_pc_faults 1.044 / 1.123 0.158 / 0.159
box32_2child 0.280 / 0.281 0.162 / 0.163
box32_l1_coherent 0.032 / 0.033 0.037 / 0.038
box32_only 0.280 / 0.284 0.280 / 0.281

mixed_pc_faults dropped from 126 recorded faults to zero. The coherent four-child case was 0.005 ms slower at the median in both pairs; the scattered four-child case was stable. Keep the coherent case in regression coverage.

$env:VICTORY_D3D12_ADAPTER = 'RTX 5070 Ti'
cargo test --manifest-path third_party/victory/Cargo.toml --offline --locked --release -p victory-shader --features host --lib emit::intersect_tests::bench_bvh64_intersect_on_gpu -- --exact --ignored --nocapture --test-threads=1

The local registry contains the two pr476-*-fixture.rs files with the matching test harness and the pr476-trace-{base,head}-{a,b} logs with all eleven workload summaries.

<!-- greyfinch-sync:LooperSalty/AnyXboxX:comment:7207479425 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/476#issuecomment-7207479425). Originally posted by [mauroalvare](https://github.com/mauroalvare) on 2026-11-27T01:40:01Z. --- Independent check on release RTX 5070 Ti, driver 621.40, at `f482803499f4f10f356922686643cf2f042e6fec`. I ran the candidate’s test harness against `a40ed684341fbd2cc6d27c171af9ae27bbc56018`, whose `victory-shader` sources match parent `4340aac1a494b9649c00e0e1ad2c6fbe6ea00e80`. - The real-directory test failed on the base with pages `0x27`, `0x41`, `0x42`, and `0x7ffff`. The partial wave64 group failed with page `0x60`. Both tests passed on the head on the RTX. - The real-directory test also passed on the head with `VICTORY_WARP=1` and the printed adapter `Microsoft Basic Render Driver`. The wave64 partial-group result above is from the RTX. I ran the same synthetic directory workload twice per build in base/head/head/base order, 2,097,152 node tests per dispatch, 10 warmups and 40 measured dispatches per case. The CPU oracle passed in all runs. I added nearest-rank p95 reporting to the copied test harness. | RTX run A | Base p50 / p95 (ms) | Head p50 / p95 (ms) | | --- | ---: | ---: | | `mixed_pc_faults` | 1.044 / 1.123 | 0.158 / 0.159 | | `box32_2child` | 0.280 / 0.281 | 0.162 / 0.163 | | `box32_l1_coherent` | 0.032 / 0.033 | 0.037 / 0.038 | | `box32_only` | 0.280 / 0.284 | 0.280 / 0.281 | `mixed_pc_faults` dropped from 126 recorded faults to zero. The coherent four-child case was 0.005 ms slower at the median in both pairs; the scattered four-child case was stable. Keep the coherent case in regression coverage. ```powershell $env:VICTORY_D3D12_ADAPTER = 'RTX 5070 Ti' cargo test --manifest-path third_party/victory/Cargo.toml --offline --locked --release -p victory-shader --features host --lib emit::intersect_tests::bench_bvh64_intersect_on_gpu -- --exact --ignored --nocapture --test-threads=1 ``` The local registry contains the two `pr476-*-fixture.rs` files with the matching test harness and the `pr476-trace-{base,head}-{a,b}` logs with all eleven workload summaries.
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!476
No description provided.