Back to Content

GPUAdapterInfo: isFallbackAdapter property

files/en-us/web/api/gpuadapterinfo/isfallbackadapter/index.md

latest805 B
Original Source

{{APIRef("WebGPU API")}}{{SecureContext_Header}}{{AvailableInWorkers}}

The isFallbackAdapter read-only property of the {{domxref("GPUAdapterInfo")}} interface returns true if the adapter is a fallback adapter, and false if not.

Value

A boolean.

Examples

js
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

{{Specifications}}

Browser compatibility

{{Compat}}

See also