In a major breakthrough for web graphics, Google’s Chrome team has announced the release of WebGPU in Chrome 113. This cutting-edge web graphics API brings high-performance 3D graphics and data-parallel computation capabilities to the web. With WebGPU, JavaScript workloads for graphics are significantly reduced, resulting in more than a threefold improvement in machine learning model inferences. This development is made possible through enhanced GPU programming flexibility and access to advanced features that WebGL cannot provide.

For now, WebGPU is available on ChromeOS, macOS, and Windows, with support for additional platforms expected later this year.

Embracing a New Era in Web Graphics

WebGPU is a pioneering web API that exposes contemporary hardware capabilities, allowing for rendering and computation operations on a GPU, much like Direct3D 12, Metal, and Vulkan. In contrast to the WebGL family of APIs, WebGPU grants access to more sophisticated GPU features and offers first-class support for general computations on the GPU. The API has been thoughtfully designed with the web platform in mind, incorporating an idiomatic JavaScript API, seamless integration with promises, support for importing videos, and a refined developer experience complete with comprehensive error messages.

The initial release of WebGPU lays the groundwork for future updates and enhancements. The API is expected to include more advanced graphics features, and developers are encouraged to submit requests for additional capabilities. The Chrome team also aims to provide deeper access to shader cores for further machine learning optimizations and additional ergonomics in WGSL, the WebGPU Shading Language.

WebGPU is the fruit of a collaborative effort by the W3C’s “GPU for the Web” Community Group, which consists of contributions from major companies such as Mozilla, Apple, Intel, and Microsoft. After six years of development (90 contributors, 2000 commits, 3000 issues) from its initial design in 2017, Chrome now features the first implementation, with Firefox and Safari support in the works.

The Dawn library for Chromium and the wgpu library for Firefox are both available as standalone packages, offering impressive portability and ergonomic layers that abstract OS GPU APIs. Utilizing these libraries in native applications also streamlines porting to WASM via Emscripten and Rust web-sys.

Browser Compatibility

Chrome 113 debuts WebGPU on ChromeOS devices with Vulkan support, Windows devices with Direct3D 12 support, and macOS. Linux, Android, and expanded support for existing platforms are on the horizon.

WebGPU is currently under development for Firefox and Safari, in addition to the initial implementation in Chrome.