GPUBuffer: unmap() method
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Note: This feature is available inWeb Workers.
Theunmap() method of theGPUBuffer interface unmaps the mapped range of theGPUBuffer, making its contents available for use by the GPU again after it has previously been mapped withGPUBuffer.mapAsync() (the GPU cannot access a mappedGPUBuffer).
Whenunmap() is called, anyArrayBuffers created viaGPUBuffer.getMappedRange() are detached.
In this article
Syntax
js
unmap()Parameters
None.
Return value
None (Undefined).
Examples
See themainGPUBuffer page for an example.
Specifications
| Specification |
|---|
| WebGPU> # dom-gpubuffer-unmap> |
Browser compatibility
See also
- TheWebGPU API