v148 · WebGPU

WebGPU Compatibility Mode

An opt-in, lightly restricted subset of WebGPU that runs on older graphics hardware — OpenGL ES 3.1 and Direct3D 11 — enabling deployment on the billions of devices that cannot support the modern Vulkan/Metal/D3D12 backends.

concepts

  1. Adapter Detection

    Request both a core adapter (featureLevel: "core") and a compatibility adapter (featureLevel: "compatibility") and display which is available on this device. Reveals whether the GPU stack requires the compat fallback.

  2. Feature Limits

    Side-by-side table of key limits: max texture size, max compute workgroup size, supported texture formats, and WGSL feature flags — comparing core WebGPU against compatibility mode values.

  3. Compatibility Rendering

    A simple shader that renders identically in both core and compatibility mode. Shows how to write portable WGSL that avoids features unavailable in compat (fine derivatives, storage buffers in vertex stage, cube array textures).

  4. Compat vs Core Comparison

    Probes the featureLevel field of the adapter info, enumerates adapter features, and renders the same scene through both paths to confirm visual parity — with a diff overlay highlighting any discrepancies.

  5. Texture Format Support

    A grid of every WebGPU texture format colour-coded by availability in compat vs core mode. Click any format card for an explanation of why it is restricted. Includes a live device.features.has() probe to show what is actually present on this device.

  6. Portable WGSL

    Five WGSL restrictions that compat mode imposes — storage writes in vertex shaders, cube-array textures, fine derivatives, storage texture writes, implicit-LOD vertex sampling — each with a before/after code pair. Expand any card to see the core-only pattern and its portable replacement.

why it shipped

WebGPU's core specification requires hardware and driver support for modern APIs: Vulkan on Linux and Android, Metal on Apple platforms, and D3D12 on Windows. Older integrated GPUs, Chromebook GPUs, and many mobile devices ship with only OpenGL ES 3.1 or D3D11, which have been locked out of WebGPU entirely. Compatibility mode adds an opt-in adapter path that the browser translates to those older APIs, accepting a modest set of feature restrictions (lower limits, fewer WGSL features) in exchange for dramatically wider device reach. Apps that care about older hardware request a compat adapter; those that need full modern features request the core adapter. Both can coexist on the same page.

references

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗