diff options
| author | romainveurrier <romain.veurrier@gmail.com> | 2026-11-22 13:51:21 +0100 |
|---|---|---|
| committer | romainveurrier <romain.veurrier@gmail.com> | 2026-11-22 13:51:21 +0100 |
| commit | 51a028115446da42565fa75d4657e82c214afc2d (patch) | |
| tree | 8d16e070b6ca1ae5527bf866e182df6751d753ee /runtime/shims/d3d12_com.cpp | |
| parent | 83f13ed569af4394786b108b490f61659352c2a5 (diff) | |
xdxr_build: radix sort over the exact element count instead of a bitonic sort
The bitonic sort padded the keys to a power of two and needed O(log^2 n)
dispatches, so one triangle past a power of two doubled its work (2.1 ms ->
5.2 ms at 262,144 -> 262,145 triangles on an RTX 3060, reported on #1572).
It is now a stable LSD radix sort: 8 passes of 4-bit digits over the 30-bit
Morton keys, each a count per 2048-element tile, one exclusive scan and a
scatter; 24 dispatches whatever the count, shared memory only.
- vk_xdxr_build_test: a 5000-triangle case (three sort tiles, the last
partial); stale cases from an earlier run are removed first, so a failed
build cannot be checked against old files.
- tools/xdxr_bvh.py: validate reports a leaf reached twice; a case may ask
check-build for fewer rays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/d3d12_com.cpp')
0 files changed, 0 insertions, 0 deletions