A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/GPUPipelineError below:

GPUPipelineError - Web APIs | MDN

GPUPipelineError

Limited availability

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

The GPUPipelineError interface of the WebGPU API describes a pipeline failure. This is the value received when a Promise returned by a GPUDevice.createComputePipelineAsync() or GPUDevice.createRenderPipelineAsync() call rejects.

DOMException GPUPipelineError Constructor
GPUPipelineError()

Creates a new GPUPipelineError object instance.

Instance properties

Inherits properties from its parent, DOMException.

reason Read only

An enumerated value that defines the reason the pipeline creation failed in a machine-readable way.

Examples

In the following snippet we are attempting to create a GPUComputePipeline using GPUDevice.createComputePipelineAsync(). However, we have misspelt our compute pipeline entryPoint as "maijn" (it should be "main"), therefore pipeline creation fails, and our catch block prints the resulting reason and error message to the console.

// …

let computePipeline;

try {
  computePipeline = await device.createComputePipelineAsync({
    layout: device.createPipelineLayout({
      bindGroupLayouts: [bindGroupLayout],
    }),
    compute: {
      module: shaderModule,
      entryPoint: "maijn",
    },
  });
} catch (error) {
  // error is a GPUPipelineError object instance
  console.error(error.reason);
  console.error(`Pipeline creation failed: ${error.message}`);
}

// …

In this case, the given reason is "Validation", and the message is "Entry point "maijn" doesn't exist in the shader module [ShaderModule]."

Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4