GPUBuffer
The GPUBuffer interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. Available only in secure contexts.
Properties
The mapState read-only property of the GPUBuffer interface represents the mapped state of the GPUBuffer.
The size read-only property of the GPUBuffer interface represents the length of the GPUBuffer's memory allocation, in bytes.
The usage read-only property of the GPUBuffer interface contains the bitwise flags representing the allowed usages of the GPUBuffer.
Functions
The getMappedRange() method of the GPUBuffer interface returns an ArrayBuffer containing the mapped contents of the GPUBuffer in the specified range.
The mapAsync() method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands.
The mapAsync() method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands.