GPUAdapterInfo: isFallbackAdapter property
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 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
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
| Specification |
|---|
| WebGPU> # dom-gpuadapterinfo-isfallbackadapter> |
Browser compatibility
Loading…
See also
- The WebGPU API