It is inefficient to record multiple vkCmdBuildAccelerationStructuresKHR back-to-back - for example, RADV will implicitly barrier between each build. To fix this, record AS build parameters into a temporary batch struct and call vkCmdBuildAccelerationStructuresKHR once for the entire batch.
It is inefficient to record multiple vkCmdBuildAccelerationStructuresKHR back-to-back - for example, RADV will implicitly barrier between each build. To fix this, record AS build parameters into a temporary batch struct and call vkCmdBuildAccelerationStructuresKHR once for the entire batch.