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
- The WebGPU API
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
