W3cubDocs

/Web APIs

GPUCommandBuffer

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The GPUCommandBuffer interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.

A GPUCommandBuffer is created via the GPUCommandEncoder.finish() method; the GPU commands recorded within are submitted for execution by passing the GPUCommandBuffer into the parameter of a GPUQueue.submit() call.

Note: Once a GPUCommandBuffer object has been submitted, it cannot be used again.

Instance properties

label Experimental

A string providing a label that can be used to identify the object, for example in GPUError messages or console warnings.

Examples

js

// ...

const commandBuffer = commandEncoder.finish();
device.queue.submit([commandBuffer]);

Note: Study the WebGPU samples to find complete examples.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
GPUCommandBuffer
113Currently supported on ChromeOS, macOS, and Windows only.
113Currently supported on ChromeOS, macOS, and Windows only.
previewCurrently supported on Linux and Windows only.
No
99Currently supported on ChromeOS, macOS, and Windows only.
No No No No No No No
label
113Currently supported on ChromeOS, macOS, and Windows only.
113Currently supported on ChromeOS, macOS, and Windows only.
previewCurrently supported on Linux and Windows only.
No
99Currently supported on ChromeOS, macOS, and Windows only.
No No No No No No No

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandBuffer