createRenderPipelineAsync method

JSPromise<GPURenderPipeline> createRenderPipelineAsync(
  1. GPURenderPipelineDescriptor descriptor
)

The createRenderPipelineAsync() method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.

Note

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

Implementation

external JSPromise<GPURenderPipeline> createRenderPipelineAsync(
    GPURenderPipelineDescriptor descriptor);