radv: Convert instance bvh address to node in bvh build.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 13 Nov 2022 02:13:55 +0000 (03:13 +0100)
committerMarge Bot <emma+marge@anholt.net>
Sat, 19 Nov 2022 14:24:36 +0000 (14:24 +0000)
commit1b5dc33caac8c24a8e2a6667bec35cb92acdc065
treee90ad812cc53525a0ae6e3eebc403d23c807d4d5
parentd09ed23b9a319421e6f120b4c942eb7fe3a3c60f
radv: Convert instance bvh address to node in bvh build.

So we don't have to do it in the traversal loop. Should 2 and
instructions and a 64-bit shift, so 4/8 cycles per instance node
visit.

Totals from 7 (0.01% of 134913) affected shaders:

CodeSize: 208460 -> 208292 (-0.08%)
Instrs: 38276 -> 38248 (-0.07%)
Latency: 803181 -> 803142 (-0.00%)
InvThroughput: 165384 -> 165376 (-0.00%)
Copies: 4912 -> 4905 (-0.14%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19706>
src/amd/vulkan/bvh/build_helpers.h
src/amd/vulkan/bvh/bvh.h
src/amd/vulkan/bvh/converter_leaf.comp
src/amd/vulkan/bvh/copy.comp
src/amd/vulkan/radv_rra.c
src/amd/vulkan/radv_rt_common.c