Commit Graph

2 Commits

Author SHA1 Message Date
dc6068cc68 rdna2spirv: BVH box test as measured on RDNA2: NaN planes skipped, near/far by direction sign (SHADER-650)
Native image_bvh_intersect_ray on an RX 6900 XT (gfx1030, tools/hw_oracle, 338 cases) picks each axis's near
and far plane by the sign of the inverse direction, takes the inverse direction as given (0 x inf is NaN),
reduces the three near and the three far t with NaN skipped (all-NaN is a miss), and sorts by max(tnear, 0)
through the network (0,2) (1,3) (0,1) (2,3) (1,2). A lone NaN bound leaves its plane open and an empty box
misses without a separate check, so #3373's empty-box test is folded into this rule.

The translator now matches all 338 measured cases (main 43). cs_bvh/cs_bvh32 and vk_compute_test expect the
scene's NaN box at t = 0, as native gfx1030 returns. tests/semantic/test_image_bvh_box_hw.py holds 241 of the
measured cases. docs/design.md Ray tracing row updated; the descriptor base is measured too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:54:38 +01:00
cef55f04ae Translator: ray tracing (image_bvh(64)_intersect_ray emulated per RADV's software path), backward far branches
The BVH step is emulated over buffer reads in AMD's node format (box16/box32/triangle), with RADV's
watertight triangle test and sorted box children. GPU-checked with a synthetic BVH (vk_compute_test bvh).
All 64 ray-tracing compute shaders translate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:18:47 -05:00