anv: reduce working temporary memory for BVH builds
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 5 Oct 2023 14:09:54 +0000 (17:09 +0300)
committerMarge Bot <emma+marge@anholt.net>
Fri, 6 Oct 2023 11:10:11 +0000 (11:10 +0000)
commit787c29f2fc7db86b6dfcabf056b566985c309a3d
treee8f50cdfec68e2652e8b1ff55526ba9cc25f6711
parent2d3ab674ee02cfe8d0cb05814f3156d277f2d660
anv: reduce working temporary memory for BVH builds

Part of the memory allocated (private) is a temporary working buffer
for the GRL kernels. Once the build operation is done, the buffer
becomes unused.

Rather than allocate a new buffer each time, reuse the current last
allocated one if its size fits the next build operation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25570>
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_acceleration_structure.c