radv: Add and use AS and scratch layout structs
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Tue, 27 Sep 2022 12:47:00 +0000 (14:47 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 28 Sep 2022 12:28:01 +0000 (12:28 +0000)
commit7c6f407d4c89bc2ac9e13041bc8fd5a12a4692e4
tree2340e82e43943248989328efcc663054a441ef1d
parentbad75ed3f162880270a0593ad8c9b6753a228eb7
radv: Add and use AS and scratch layout structs

The memory layout logic is duplicated between
radv_GetAccelerationStructureBuildSizesKHR and
radv_CmdBuildAccelerationStructuresKHR. This patch adds a helper that
computes the scratch and acceleration structure memory layout for a
given build configuration.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18842>
src/amd/vulkan/radv_acceleration_structure.c