createStorageBuffer method

  1. @override
StorageBuffer createStorageBuffer(
  1. ByteData bytes, {
  2. bool hostReadable = false,
})

A storage buffer holding bytes. hostReadable allows readBuffer.

Implementation

@override
StorageBuffer createStorageBuffer(
  ByteData bytes, {
  bool hostReadable = false,
}) => guard(
  'a ${bytes.lengthInBytes}-byte storage buffer',
  () =>
      webgpuCreateStorageBuffer(gpuDevice, bytes, hostReadable: hostReadable),
);