wgblas
    Preparing search index...
    • Maps readBuffer for CPU access, copies its contents into a new typed array, then unmaps. The .slice() is required — getMappedRange() returns a view into the mapped GPU memory which becomes invalid after unmap(), so we copy it out before unmapping.

      Parameters

      • readBuffer: GPUBuffer

        a MAP_READ buffer produced by stageReadback

      • OptionalreadbackType: Float32ArrayConstructor | Uint32ArrayConstructor = Float32Array

        typed array constructor for the result

      Returns Promise<Float32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>>