beginComputePass method
Opens a compute pass; label names it to a debugger and to
onGpuTimings. timestampWrites (since 1.0) names where the pass
writes its start and end GPU times — DeviceFeature.timestampQuery.
Implementation
@override
ComputeEncoder beginComputePass({
String? label,
PassTimestampWrites? timestampWrites,
}) {
if (timestampWrites != null) {
features.require(DeviceFeature.timestampQuery, backend: _backend);
}
return WebGpuComputeEncoder(
_gpuDevice,
features: features,
samplerFor: _samplerFor,
label: label,
timestampWrites: _timestampWritesOf(timestampWrites),
storageAlignment: limits.minStorageBufferOffsetAlignment,
);
}