GPUCommandBuffer
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.
TheGPUCommandBuffer
interface of theWebGPU API represents a pre-recorded list of GPU commands that can be submitted to aGPUQueue
for execution.
AGPUCommandBuffer
is created via theGPUCommandEncoder.finish()
method; the GPU commands recorded within are submitted for execution by passing theGPUCommandBuffer
into the parameter of aGPUQueue.submit()
call.
Note:Once aGPUCommandBuffer
object has been submitted, it cannot be used again.
In this article
Instance properties
Examples
js
// …const commandBuffer = commandEncoder.finish();device.queue.submit([commandBuffer]);
Note:Study theWebGPU samples to find complete examples.
Specifications
Specification |
---|
WebGPU> # gpucommandbuffer> |
Browser compatibility
Loading…
See also
- TheWebGPU API