Skip ray-box children whose title-memory pages are missing #1165
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!1165
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1165"
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?
@BradRoland on GitHub · 2026-11-25 22:17 UTC · original
BradRoland:codex/bvh-unmapped-nodes→main· +258 −59 · 4 files · 1 commits · openA missing title-memory page is read through a null UAV, which returns zeros. For a ray through the origin those zeros describe a box the ray can hit. On
9c184b3, an absent Box32 returned four child pointers of zero. With its first page present and its second missing, the same instruction returned all four IDs even though only the first two children had bounds.The shader now uses the missing-page bit already computed by the directory lookup when deciding which box children to return. The first 64 bytes hold all child pointers. For a 128-byte Box32, bounds for children 2 and 3 are in the second half, which can be on another page. Children 0 and 1 remain usable when only that second page is missing. The existing fault reporting still requests the absent pages.
The synthetic compute test uses the production directory lookup, a real D3D12 null UAV, and a ray aimed through the origin. It exercises both box formats, all four combinations of first/second-page residency, and a masked-off lane. A resident all-zero box still returns four zero child IDs. That control is important because a zero child ID is valid.
[0, 16, 32, 48]. With the patch it returned[0, 16, 0xffffffff, 0xffffffff].cargo test --locked -p victory-shader --lib boxes_with_missing_title_pages_only_return_resident_children -- --nocapture. SetVICTORY_WARP=1to run on the software adapter.--all-targets -- -D warnings.The renderer can retry the missing pages on a later frame. The impact on lighting and frame time still needs an in-game run.
For testers running the structure builder, the fix is also available on the current #994 stack at
1ffff57with the builder-off lookup correction. All nine intersection tests passed there on hardware and WARP. Combined branchFor comparison with #1166, the two regressions exercise different behavior on a split Box32. When only the first 64 bytes are resident, this PR returns the two children with complete pointers and bounds. The test at
77cbca8in #1166 expects four misses on that input. #1166 also avoids a second directory lookup for a box that fits on one page.@HAL9000RELOADED on GitHub · 2026-11-25 23:25 UTC · original
First Radeon run of
a3261ca: RX 7900 XTX (RDNA3), driver 32.0.32015.7029, Windows 10 22H2 (19045), Agility SDK 1.620 (#402). Base:3151ccf(maind827419+ #402).victory-shader: 217 passed, 0 failed. The newboxes_with_missing_title_pages_only_return_resident_childrenpasses on the card.Only the RTX 4080 and WARP were listed so far; RDNA3 agrees.
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.