MDN self-hosted library · e01.org

GPUAdapterInfo: isFallbackAdapter property

WebGPU API

Open notebook · 1 cells web-api-instance-property upstream source

WebGPU API

The isFallbackAdapter read-only property of the GPUAdapterInfo interface returns true if the adapter is a fallback adapter, and false if not.

Value

A boolean.

Examples

async function init() {
  if (!navigator.gpu) {
    throw Error("WebGPU not supported.");
  }

  const adapter = await navigator.gpu.requestAdapter();
  if (!adapter) {
    throw Error("Couldn't request WebGPU adapter.");
  }

  const isFallback = adapter.info.isFallbackAdapter;
  console.log(isFallback);

  // …
}

Specifications

Browser compatibility

See also