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>