Back to Content

GPUAdapter: isFallbackAdapter property

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

latest956 B
Original Source

{{APIRef("WebGPU API")}}{{SecureContext_Header}}{{AvailableInWorkers}}{{deprecated_header}}{{non-standard_header}}

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

This property has been removed from the web platform. Use {{domxref("GPUAdapterInfo.isFallbackAdapter")}} instead.

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.isFallbackAdapter;
  console.log(isFallback);

  // …
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also