v154 · frag_depth modifiers
What this machine can do
"WebGPU is not supported" covers four different situations, and only one of them is about the browser. Each step below is reported separately, so you find out which one you are actually in — and if a device is available, the shaders are compiled for real rather than described.
Four steps to a compiled shader
A headless browser, a virtual machine, or a laptop on integrated graphics with a blocklisted driver will all stop at step two with navigator.gpu present and no adapter. That is not the browser lacking WebGPU — it is the browser declining to use this GPU, and the distinction matters when you are deciding what to tell a user.
code path
if (!("gpu" in navigator)) return "no WebGPU in this browser";
const adapter = await navigator.gpu.requestAdapter();
if (!adapter) return "WebGPU is here, but no usable adapter";
const device = await adapter.requestDevice();
const module = device.createShaderModule({ code: wgsl });
const info = await module.getCompilationInfo();
// info.messages carries the real compiler diagnostics.