createComputePipelineAsync method

JSPromise<GPUComputePipeline> createComputePipelineAsync(
  1. GPUComputePipelineDescriptor descriptor
)

The createComputePipelineAsync() method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.

Note

It is generally preferable to use this method over GPUDevice.createComputePipeline whenever possible, as it prevents blocking of GPU operation execution on pipeline compilation.

Implementation

external JSPromise<GPUComputePipeline> createComputePipelineAsync(
    GPUComputePipelineDescriptor descriptor);