Documentation
    Preparing search index...

    Function createComputeBuffer

    • Allocates one storage buffer (§82), uploading data when given.

      Throws a FourError carrying INVALID_APPLICATION_STATE for an option record naming both size and data, neither, a size that is not a positive multiple of 4, or contents whose byteLength is not a multiple of 4 — writeBuffer's and the storage-address-space's shared granularity, surfaced at creation rather than as a device-side validation error later.

      Parameters

      Returns WgpuComputeBuffer