Diagnostics: VICTORY_RAY_PROBE counts what the ray/node tests of title memory find #1084
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1084
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1084"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@SpaghettiMaster545 on GitHub · 2026-11-25 18:49 UTC · original
SpaghettiMaster545:pr/ray-probe→main· +154 −8 · 6 files · 1 commits · openWhat it adds
A diagnostic for whether the ray walks find anything:
VICTORY_RAY_PROBE=1makes every ray/node test of title memory count what it found.Why
With the structure builder on, rooms can stay black, and the log can't tell an empty structure from a walk that never reaches the triangles. The probe gives the counts.
What changes
RAY_PROBE_DWORDS(8) dwords longer. Once a frame the host reads the words from its mapping, clears them and logs a line: "ray probe: node tests of title memory since the last frame".What it showed us
With the builder on, the walks made tens of millions of node tests a frame. Half the box tests had a child hit, and no node page lacked a copy. But triangle tests were only 1-5 % of box tests, with few hits. That pointed at the box test: empty child slots counted as hits and sorted ahead of the real children. #213 fixes that here.
The probe costs the GPU about 4 s a frame, so it is for single diagnostic runs only.
How it was tested
maind510ee4):cargo test --locked -p victory-shader --lib intersectpasses (7). The newthe_ray_probe_counts_node_tests_and_still_validatestranslates the node test with the probe on and checks that the module still validates.cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warningsreports nothing in the changed files; it stops on lintsmainalready has elsewhere invictory-gpu.With VICTORY_RAY_PROBE=1 (part of the translation), each node test read from title memory adds, per wave, to words after the fault notes: tests, box tests, boxes with a child hit, triangle tests, triangle hits, triangle hits within the ray's extent, and nodes whose first half had no copy. The host reads them from the mapped faults buffer each frame and logs them ("ray probe: ..."). Off, the translation is as before. The faults buffer is RAY_PROBE_DWORDS longer.@FIJI1299 on GitHub · 2026-11-25 19:37 UTC · original
Tested commit
cdcb7c4on Windows:Environment
621.40,wave32)1.8.2502.11(Windows SDK10.0.26100.0)Results
victory-shadertest suite (cargo test -p victory-shader --lib): 216 passed, 0 failed, 3 ignored (103.81s), including the newVICTORY_RAY_PROBEtest inintersect_tests.rs.victory-gpudiagnostics memory tests (cargo test -p victory-gpu --features diagnostics --lib memory): Passed cleanly.victory-gputest suite (cargo test -p victory-gpu --lib -- --skip warp_budget_saturates): 181 passed, 0 failed, 5 ignored, 1 filtered out (0.99s).indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields(pre-existing failure onmain).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.Merge
Merge the changes and update on Forgejo.