Content
WebGPU Browser-Support
Introduction
WebGPU adoption is growing quickly[1] but it still cannot be assumed to be available on each combination of platform and browser. On some popular platforms, the user still has to manually enable WebGPU support via browser flags. Therefore, checks and optimally a fallback solution should be implemented.
Good practices for a pleasant user experience are:
- Notifying the user that WebGPU is not available on the current browser instead of quietly failing or crashing the browser. Avoid notifications through popups which might be blocked by some browsers or extensions.
- Offering a fallback solution like an image or a video to avoid showing an empty page.
WebGPU Support and Support Checking
The below listing shows basic WebGPU support checking in JavaScript. Multiple checks are required since different browsers on different platforms fail in different places.
let adapter;
try {
adapter = await navigator.gpu?.requestAdapter();
} catch (e) {
throw Error("WebGPU not supported.");
}
if (!adapter) {
throw Error("WebGPU not supported.");
}
Multiple current browsers were tested on current operating systems. Table 1 shows that the same
browser version often shows different behavior on different platforms. This is also the case why there
are two WebGPU checks in above listing: Edge and Chrome under Ubuntu with disabled WebGPU flags don't throw an error
in line 3 but
the adapter
is undefined
(line 7). On the other hand, only for
Firefox under Ubuntu with disabled WebGPU flags navigator.gpu
is undefined
but with
enabled WebGPU flags an error is raised when requesting the adapter (line 3). For more
details check Table 1.
OS | Browser | Note |
---|---|---|
Ubuntu 24.04 | Edge 135 | Disabled by default; enable: edge://flags/#enable-unsafe-webgpu |
Ubuntu 24.04 | Chrome 135 | Disabled by default; enable: chrome://flags/#enable-unsafe-webgpu |
Ubuntu 24.04 | Firefox 136 | Not yet available in Release or Beta builds. |
Windows 11 | Edge 135 | Enabled by default. |
Windows 11 | Chrome 135 | Enabled by default. |
Windows 11 | Firefox 136 | Not yet available in Release or Beta builds. |
Windows 11 | Firefox 139 Nightly | Enabled by default. |
macOS 18.3 | Safari 18.3 | Disabled by default; enable: Develop > Experimental Features > WebGPU. |