Skip to content

radv: On GFX11, use box sorting heuristic based on ray flags

Arseny Kapoulkine requested to merge zeux/mesa:rt20-boxsort into main

Use box with largest ray interval for shadow rays (terminate on first hit) as it maximizes the probability of finding some object in that box; for reflection (closest hit) rays, use midpoint instead, which defers processing of larger boxes the ray origin is in in favor of smaller boxes closer to origin.

Performance on RX 7900 GRE on https://github.com/zeux/niagara at 4K resolution (1 ray per pixel) of final shading pass changes as follows:

  • When using terminate on first hit: 5.19ms -> 4.45ms
  • When using closest hit: 7.57ms -> 7.15ms
Edited by Arseny Kapoulkine

Merge request reports

Loading