Contact emails
cwa...@google.com, k...@google.com
Spec:
Work-in-progress IDL: https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl
The “GPU for the Web” community group is approaching resolution on most-high level issues, but hasn’t looked at the detail or user-experience of the API yet.
Summary
The WebGPU API is the successor to the WebGL and WebGL 2 graphics APIs for the Web. It will provide modern features such as “GPU compute” as well as lower overhead access to GPU hardware and better, more predictable performance. WebGPU is being developed by the “GPU for the Web” W3C community group.
Motivation
Applications on the Web are becoming ever more interactive, which increases the demand for programmable 3D graphics, image processing, and GPU access in general. WebGL and WebGL 2 fulfill some of this demand, but do not match the features or performance of modern native graphics APIs.
WebGPU will close the gap in terms of performance, and introduce “GPU compute” functionality to the Web. This will help porting native applications to WASM that require native features, and will unlock the performance of GPU-accelerated scientific computing on the Web (including machine learning).
In addition WebGPU will give developers more predictable performance by being in the style of “explicit GPU APIs” and by being designed to map efficiently on all modern native graphics APIs.
Risks
Interoperability and Compatibility
WebGPU has public support from Edge, Firefox and Safari with representatives from each of them in all of the group’s weekly meetings (notes). There already are customers interested in using WebGPU when it is available, such as TensorFlow.js, Yandex Maps, as well as game engines Unreal Engine and Unity3D.
An interoperability risk is the size of the API and the fact that it includes a GPU language, however the members of the community group have experience testing such a large surface area with WebGL.
Ergonomics
WebGPU will be used in conjunction with Canvas APIs and will interact closely with WebAssembly to have fast bindings to Blink. There will be other interactions with WebVR/WebXR and HTML’s <img> and <video> elements. WebGPU is designed to be non-blocking and to be usable across workers.
Activation
WebGPU is targeting developers already familiar with graphics APIs, and it won’t be possible to mix it with WebGL code easily. However, like WebGL, we expect most usage of WebGPU to come through frameworks like three.js or game engines like Unity3D, so developers using these will get the WebGPU wins for free. We intend to create significant amounts of beginner and intermediate documentation in addition to the spec.
Debuggability
No particular support for this feature. Debuggability could be provided as an extension or JS module like SpectorJS for WebGL.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
The WebGPU API will be present on all six platforms, but creating WebGPUDevice will require the native platform to expose a modern graphics API:
Vulkan on Windows 7/8, Linux, Chrome OS, Android and Android WebView
Metal on Mac
Direct3D 12 on Windows 10
Is this feature fully tested by web-platform-tests?
Not yet. There will be a shared test suite but it isn’t clear yet if it will be part of web-platform-tests or a standalone test suite.
Requesting approval to ship?
No.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM4LO64JVWrop%2BfUc-tnWZ4iB4GMGrvyKkRB4Qnpk7wzGiN_Eg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJL3UpQAmG%3DgG6uOQZOTnE2uY3847GLuDdRtMBza7gNJxcCX_g%40mail.gmail.com.