MDN self-hosted library · e01.org

GPUBuffer: unmap() method

WebGPU API

no runnable cells web-api-instance-method upstream source

WebGPU API

The unmap() method of the GPUBuffer interface unmaps the mapped range of the GPUBuffer, making its contents available for use by the GPU again after it has previously been mapped with GPUBuffer.mapAsync() (the GPU cannot access a mapped GPUBuffer).

When unmap() is called, any ArrayBuffers created via GPUBuffer.getMappedRange() are detached.

Syntax

unmap()

Parameters

None.

Return value

None (undefined).

Examples

See the main GPUBuffer page for an example.

Specifications

Browser compatibility

See also