← Back to release summary
WebGPU Compatibility mode
- Category
- Graphics
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
Adds an opt-in, lightly restricted subset of the WebGPU API capable of running older graphics APIs such as OpenGL and Direct3D11. By opting into this mode and obeying its constraints, developers can extend the reach of their WebGPU applications to many older devices that do not have the modern, explicit graphics APIs that core WebGPU requires. For simple applications, the only required change is to specify the "compatibility" featureLevel when calling requestAdapter. For more advanced applications, some modifications may be necessary to accommodate the mode's restrictions. Since Compatibility mode is a subset, the resulting applications are also valid WebGPU Core applications and will run even on user agents that do not support Compatibility mode.
Motivation
WebGPU is a good match for modern graphics APIs such as Vulkan, Metal and Direct3D 12. However, there are a large number of devices which do not yet support those APIs. In particular, on Chrome on Windows, 31% of Chrome users do not have Direct3D FL 11.1 or higher. On Android, 23% of Android users do not have Vulkan 1.1, including 15% who do not have Vulkan at all (https://developer.android.com/about/dashboards). On ChromeOS, Vulkan penetration is still quite low, while OpenGL ES 3.1 is ubiquitous.
Developers are thus forced to write multiple implementations (e.g., WebGPU and WebGL) for maximum reach, to accept the reduced reach that core WebGPU currently provides, or to write only for WebGL and forgo the advanced features of WebGPU, such as GPU compute. By opting in to Compatibility Mode, developers can target a wider reach of devices with a single implementation.
Standards & signals
- Specification: https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md
- Firefox: Positive — Although there is not currently an entry for Compatibility Mode in the standards positions repos, WebGPU Compatibility Mode was discussed and approved by Google, Apple and Mozilla in the GPU for the Web Working Group, and has the same support as WebGPU Core. Each of the commits to the compatibility-mode propsal above was approved by a working group member from each of those three organizations, and any disagreements were resolved prior to landing in Working Group meetings.
- Safari: Positive — Although there is not currently an entry for Compatibility Mode in the standards positions repos, WebGPU Compatibility Mode was discussed and approved by Google, Apple and Mozilla in the GPU for the Web Working Group, and has the same support as WebGPU Core. Each of the commits to the compatibility-mode propsal above was approved by a working group member from each of those three organizations, and any disagreements were resolved prior to landing in Working Group meetings.
- Web developers: Positive — From Unity:
WebGPU is a critical component of Unity's web strategy moving forward. WebGPU provides a lot of technological advantages over WebGL, and has proven to enable more capabilities for our users, and in many cases increase performance. One important piece of the WebGPU adoption strategy is device reach. WebGPU does not have the device reach that WebGL has, requiring users to include both WebGPU and WebGL drivers in their applications. WebGPU Compatibility Mode will be a vital solution to this issue. Having the ability to significantly increase the device reach of WebGPU by utilizing Compatibility Mode will allow many developers to drop WebGL, simplify their development process and reduce their build sizes. The limitations imposed by Compatibility Mode will be something Unity developers can work with, as they are already accustomed to feature checking capabilities of devices running their applications. We expect enough of Unity will run in Compatibility Mode to minimize development difficulties, and that Compatibility Mode will be an automatic fallback for when Core mode is not available for Unity applications.
- Tracking bug: https://crbug.com/442618060
Samples: https://webgpu.github.io/webgpu-samples/?sample=helloTriangle https://webgpu.github.io/webgpu-samples/?sample=computeBoids https://webgpu.github.io/webgpu-samples/?sample=deferredRendering
Explainers: https://github.com/explainers-by-googlers/webgpu-compatibility-mode/blob/main/README.md
View on chromestatus.com