radv: Do an early check of distance in triangle culling.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 26 Sep 2022 23:47:20 +0000 (01:47 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 28 Sep 2022 11:08:28 +0000 (11:08 +0000)
commit1dd5d94f65df53f67f01a013486653ec4de061c0
treeb71f2a86d8459c15692073e64144c0aeeaed5128
parente06c332bf77ed7ec0b37a58f644e0f4e0c06fbee
radv: Do an early check of distance in triangle culling.

Culls like 99% of the triangles that are culled at all.

Reduces VALU usage in Q2RTX traversal by ~8%, though doesn't look
like VALU is a bottleneck at this point ...

For Control we get a ~5% reduction in VALU usage, but similarly it
doesn't look like a bottleneck.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18830>
src/amd/vulkan/radv_rt_common.c