create static method
Implementation
static GpuComputePipeline create(GpuShader shader,
{String entryPoint = "main"}) {
final wgpu = WebgpuRend.instance.wgpu;
return using((arena) {
final desc = arena<WGPUComputePipelineDescriptor>();
desc.ref.label.data = nullptr;
desc.ref.label.length = 0;
desc.ref.layout = nullptr;
desc.ref.compute.module = shader.handle.cast();
desc.ref.compute.entryPoint = _createStringView(arena, entryPoint);
desc.ref.compute.constantCount = 0;
final handle = wgpu.wgpuDeviceCreateComputePipeline(
WebgpuRend.instance.device, desc);
return GpuComputePipeline._(handle.cast());
});
}