radv: dont call calloc when BVH is empty
authorFilip Gawin <filip.gawin@zoho.com>
Sat, 23 Oct 2021 14:59:13 +0000 (16:59 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 29 Nov 2021 13:38:37 +0000 (13:38 +0000)
commit57969c6dad21bc0dc1dc1fe2ac834d4f8c086cbd
tree1586282bf02ffb8804d51daf858fbe58711864c5
parent8eae431720f868bba235ab18effa3ad59fe88818
radv: dont call calloc when BVH is empty

Usage of pointer returned by calloc(0) is UB.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13503>
src/amd/vulkan/radv_acceleration_structure.c