GPUComputePassEncoder: pushDebugGroup() 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.
ThepushDebugGroup() method of theGPUComputePassEncoder interface begins a compute pass debug group, which is marked with a specified label, and will contain all subsequent encoded commands up until apopDebugGroup() method is invoked.
This could be used for telemetry, or may be utilized inGPUError messages, browser dev tools, or other services in the future to help with debugging.
In this article
Syntax
js
pushDebugGroup(groupLabel)Parameters
groupLabelA string representing the label for the debug group.
Return value
None (Undefined).
Examples
js
// …const passEncoder = commandEncoder.beginComputePass();passEncoder.pushDebugGroup("my_group_marker"); // Start labeled debug grouppassEncoder.setPipeline(computePipeline);passEncoder.setBindGroup(0, bindGroup);passEncoder.dispatchWorkgroups(Math.ceil(BUFFER_SIZE / 64));passEncoder.popDebugGroup();// …Specifications
| Specification |
|---|
| WebGPU> # dom-gpudebugcommandsmixin-pushdebuggroup> |
Browser compatibility
See also
- TheWebGPU API