Builds one mesh's tree. Throws if the build was refused.
Builds every mesh's tree in one batch and one submit. A refused mesh has problem set; the others are fine.
timestampWrites (optional) times the batch's one compute pass: resolve its query set after this resolves.
OptionaltimestampWrites: GPUComputePassTimestampWritesUploads the inputs and sets up every buffer and bind group of a batch, so
it can be recorded with encode (any number of times: each recording
rebuilds the same trees) and read with finish. Throws if the batch is
too big for the device (see planGpuLbvhBatches).
StaticisThe builder needs subgroups; without them, callers use the declared fallback (tinybvh, B0).
Compiles the kernels (asynchronously, so the main thread doesn't stall).
Copies every usable tree of a batch back into CPU memory (one readback), each exactly as tinybvh's buildLayout returns one.
Compiles the builder's kernels once per device and builds any number of batches with them.