mapBuffer method
Future<MappedBuffer>
mapBuffer(
- StorageBuffer buffer,
- MapMode mode, {
- int offsetInBytes = 0,
- int? sizeInBytes,
inherited
Maps sizeInBytes bytes (to the end by default) of buffer from
offsetInBytes into host memory, once every pass submitted before this
call is done with it — DeviceFeature.mappedBuffers.
The staging-buffer path, both ways: MapMode.read on a BufferUsage.hostReadable buffer that a transfer pass copied results into, MapMode.write on a BufferUsage.hostWritable one the host fills and a transfer pass copies onward. See MappedBuffer for how long the bytes are valid. readBuffer is this, copied out and unmapped, for a whole buffer.
Implementation
Future<MappedBuffer> mapBuffer(
StorageBuffer buffer,
MapMode mode, {
int offsetInBytes = 0,
int? sizeInBytes,
}) => Future<MappedBuffer>.error(refuse(DeviceFeature.mappedBuffers));