perf(rt,gpu): speed up BVH traversal, add ListSync/quarantine, and fix multi-heap directory ordering #44
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/PastiiJay--klbf-lab!44
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-44"
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?
@Vladimir-Human on GitHub · 2026-11-25 21:06 UTC · original
Vladimir-Human:feat/rt-bvh-quarantine-nvidia→beta· +2542 −338 · 6 files · 1 commits · openAI-assisted clean-room contribution (
victory-shader+victory-gpu, D3D12 hardware/unit tests + synthetic BVH traversal benchmark only — no title files used).Summary
Optimizes GFX10 compute ray/box intersection emission and fixes BVH directory / multi-heap / quarantine / parallel-pipeline soundness issues across 6 files (
victory-shader/src/{bvh.rs, resource.rs, emit/intersect.rs, emit/intersect_tests.rs}andvictory-gpu/src/{memory.rs, pipeline.rs}):bvh.rs,resource.rs,emit/intersect.rs):kind < 6bvh_address& directory lookup with coldcopy == 0fault path skipping page0and sentinelMEMORY_PAGES - 1, unified first 64-byte box fetch, intra-pagebox32single-lookup fast path, wrapping cross-pagebyte2 - 64fix (page2_off = 0x4000&0), partialdmask(1..=0xf) channel packing, pure 32-bit address math, 8/16B aligned raw loads, and dynamic BVH descriptorword1+zero_basetracking.memory.rs):revalidate, migrates sibling pages still pointing at the old slot while skipping active registered buffers (merge_sorted_spans/overlaps_any_buffer).Releasefences: allocates/initializesheap.dynamic(COPIES + 1)->null_raw_uav_atbefore directory/copies/faults mutation, publisheswrite_copy_uavwith aReleasefence beforeassign_page, clears retired quiescent slots (> RETIRE_DELAY_FRAMES), and gates multi-heap slot recycling viaslot_cleared_heaps.ListSyncper-list epoch tracking, 64B-aligned 4 GiB constant address extraction, 64-bit volatile fault scans, andVICTORY_BVH_QUARANTINE=1in-place placement skip (ALLOW_CROSS_ADAPTER, keepingshadow.rsuntouched).pipeline.rs):Pendingbuilder handles across concurrent requests and verifiesverify_builder_batchin parallel outsideBUILDER.lock(), preservingklbf-lab'sskipped_shader/library::crashedprewarm guards.shadow.rs,opt.rs,emit/lower.rs,emit/lds.rs, orindirect.rs(git merge-treeclean againstbetaand sibling PRs#41,#42, and our indirect-gather PR).Verification (
betae328c88, RTX 4070 SUPER / i5-13400F)cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.cargo clippy -p victory-gpu --all-targets: 0 warnings in touched files (memory.rs,pipeline.rs).cargo test -p victory-shader --all-targets: 227 passed, 0 failed (incl. dynamicword1, partialdmask, and real-directory cross-pagebox32hardware GPU tests).cargo test -p victory-gpu -- --test-threads=1: 160 passed, 0 failed.cargo test -p victory-shader bench_bvh_intersect_gpu -- --ignored --nocapture(during parallel build load; uncontested benchmark follow-up planned):box32_memory 243.71 us,box16_memory 187.39 us,divergent_memory 328.70 us,tri_memory 139.26 us,box32_resource 238.59 us,tri_resource 122.88 us(all 6 workloadsparity=OK, spurious_faults=0).@PastiiJay on GitHub · 2026-11-25 21:07 UTC · original
Thanks a lot @Vladimir-Human! We test one change at a time on the RX 9070 XT (same save, same 7-minute run, fps and picture compared with our reference build), so this one goes into that queue on its own. Results will be posted here, then we merge or report back what we saw.
@HandshakeHackin on GitHub · 2026-11-26 04:29 UTC · original
I tested
2e41aafon native Windows WARP. I extended the PR’s 64-bit BVH intersection fixture from two output masks on the first batch to all 15 nonempty masks on all 10 batches. All 4,800 lane results matched the scalar reference, including the registers that each mask leaves untouched. The empty mask was still rejected. The fixture ran 150 dispatches.I also ran the cross-page
box32fixture with WARP explicitly required. Both offsets for the second page (0and0x4000) produced the expected intersections. Only the two expected fault-table entries were written. These checks changed the test fixtures only. In-game performance on the RX 9070 XT remains for the hardware run. Windows test logView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.