Encodes a single compute pass on a fresh command encoder: sets the pipeline
and bind group, dispatches workgroups, and — with benchmarking on — wraps the
pass in GPU timestamp writes and encodes their resolve. Does not submit: the
caller encodes any readback copy (stageReadback) onto the returned encoder,
then calls submit.
Parameters
device: GPUDevice
pipeline: GPUComputePipeline
bindGroup: GPUBindGroup
workgroups: number|{x:number;y:number;z?:number}
workgroup count;
number for 1D dispatch, {x, y} for 2D, {x, y, z} for 3D (z defaults to 1)
Encodes a single compute pass on a fresh command encoder: sets the pipeline and bind group, dispatches workgroups, and — with benchmarking on — wraps the pass in GPU timestamp writes and encodes their resolve. Does not submit: the caller encodes any readback copy (
stageReadback) onto the returned encoder, then calls submit.