v148 · WebGPU
Compat vs Core
The recommended pattern: try core first, then compatibility, then fall back gracefully. This page probes both adapter types on your device and shows which path would be taken by a real-world WebGPU app.
Feature detection: checking…
This device — live probe results
WebGPU available—
Core adapter—
Compat adapter (featureLevel: "compatibility")—
Recommended path—
maxTextureDimension2D (adapter in use)—
1
Try core adapter
requestAdapter() or requestAdapter({ featureLevel: "core" })
checking…2
If null, try compatibility adapter
requestAdapter({ featureLevel: "compatibility" }) — runs on OpenGL ES 3.1 / D3D11
checking…3
If both null, use Canvas 2D or WebGL
WebGPU is unavailable on this device entirely — degrade to WebGL2 or canvas
checking…// Robust adapter detection: core → compat → fail
async function getBestAdapter() {
if (!navigator.gpu) return { adapter: null, level: "none" };
// 1. Try core (modern GPU)
const core = await navigator.gpu.requestAdapter();
if (core) return { adapter: core, level: "core" };
// 2. Try compatibility (older GPU, Chrome 148+ origin trial)
try {
const compat = await navigator.gpu.requestAdapter({
featureLevel: "compatibility"
});
if (compat) return { adapter: compat, level: "compatibility" };
} catch {}
// 3. No WebGPU at all
return { adapter: null, level: "none" };
}
const { adapter, level } = await getBestAdapter();
if (level === "compat") {
// Avoid: fine derivatives, storage buffers in vertex stage,
// cube arrays, per-attachment blend, linear interpolation
}
see also
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗