Updating a TLAS using a GPU matrix buffer


In ray-tracing creating or updating a Top-Level AS is done using the VkAccelerationStructureInstanceKHR structure. In there there’s a dedicated data member for the instance’s matrix (VkTransformMatrixKHR transform).

What if someone has already a big array of matrices available on the GPU?

Copying each matrix from the original buffer to the correspoding VkAccelerationStructureInstanceKHR::transform variable looks inefficient.

Is there an alternative way to update a TLAS where each instance’s matrix is specified by a device buffer address + offset?


I see that something similar is available for a BLAS with:
VkAccelerationStructureGeometryTrianglesDataKHR::transformData, and:
VkAccelerationStructureBuildRangeInfoKHR::transformOffset, but I can’t find anything like this for TLAS’es.