webgpu-syntax-compute-pipeline
Installation
SKILL.md
WebGPU Compute Pipeline
Create a compute pipeline, encode a compute pass, and dispatch workgroups with correct workgroup-count math. WebGPU 1.0-stable (Chrome 113+, Safari 26+, Firefox 141+).
Quick Reference
GPUComputePipelineDescriptor (device.createComputePipeline(descriptor))
| Field | Type | Required | Notes |
|---|---|---|---|
label |
string | No | ALWAYS set it. Appears in GPUError messages. |
layout |
GPUPipelineLayout or "auto" |
Yes | "auto" layouts bind to this pipeline ONLY. |
compute |
object | Yes | The single @compute stage. |
compute.module |
GPUShaderModule |
Yes | WGSL module with a @compute entry point. |
compute.entryPoint |
string | No | Omit only when the module has exactly one @compute function. |
compute.constants |
record | No | Override values for WGSL override constants, keyed by @id or name. |