Published: November 21, 2024
The WebGPU specification is always evolving, with major companies like Google, Mozilla, Apple, Intel, and Microsoft meeting weekly to discuss its development. The most recent GPU for the Web working group meeting offered a glimpse into the main objectives and features planned for the next iteration of WebGPU. This blog post explores some of the key takeaways from the meeting.
Reaching candidate recommendation status
A major focus of the meeting was to discuss the progress of Milestone 0 and to finalize the issues that need to be addressed before it can reach candidate recommendation status for the W3C. This is the next step in the standardization process, and it comes with stronger guarantees of stability and intellectual property protection.
There was general agreement among the meeting participants that they are no blockers and that these issues can be resolved in a timely manner, paving the way for the W3C candidate recommendation of WebGPU.
Prioritizing new features
Participants at the meeting also prioritized new features. They started with a list of feature requests compiled from feedback from developers, implementers, and stakeholders.
After discussion, the following key WebGPU features for AI were identified:
Subgroups and subgroup matrices: Let application use fast local communication between GPU threads, and take advantage of fixed-size matrix multiplication hardware next to shader cores. See the subgroups proposal.
Texel buffers: Provide a more efficient way to store and access small data types, like 16-bit or 8-bit values, in a portable way. This is important for some ML image processing algorithms. See the texel buffer slides.
UMA buffer mapping: Improve data upload performance by reducing or eliminating copies and synchronization overhead. See the spec issue 2388.
Also under consideration and prioritization are the following WebGPU features to unlock new kinds of rendering algorithms:
Bindless: This highly anticipated feature proposal is a prerequisite for most leading-edge rendering algorithms because they need scene-wide information. Bindless lets shaders use an unlimited number of resources, including textures, when compared to the relatively strict limits currently.
Multi-draw indirect: Lets previous computations on the GPU created multiple draws instead of just one with
drawIndirect
previously. It is an important capability for GPU-driven rendering like for GPU culling of objects. See the pull request 2315.64-bit atomics: Either in buffers or textures, it is necessary for doing "software rasterization" on the GPU, by bundling the depth-test and writing of a 32-bit payload in a single
atomicMax
operation. See the issue 4329.
To enhance WebGPU's capabilities and integration with the broader web platform, the following WebGPU features have been discussed:
Compatibility mode: This mode aims to enable WebGPU to run on a wider range of devices, including those that only support OpenGL ES 3.1. See the compatibility mode proposal.
WebXR: Allows the existing WebXR Layers module to interface with WebGPU by providing WebGPU swapchains for each layer type. See the WebGPU/WebXR Integration slides.
Canvas2D: Creates better interoperability between Canvas 2D and WebGPU, addressing both performance and ergonomics problems. This WebGPU Transfer proposal would allow having access to text and path drawing in WebGPU, and being able to apply WebGPU rendering to Canvas 2D.
The meeting also featured presentations and discussions on efforts to improve WGSL tooling and libraries. One notable initiative is the development of WESL (WGSL Extended Shading Language) which aims to provide a community-driven set of extensions to WGSL.
You can find more information in the raw meeting notes.
Thoughts
This meeting highlighted the importance of collaboration between the WebGPU working group, developers, and the broader graphics community in shaping the future of WebGPU. The working group is actively seeking feedback on the proposed features and is committed to working with developers to ensure that WebGPU meets their needs.
The next evolutions of WebGPU promise to be a significant step forward, unlocking new possibilities for web graphics and empowering developers to create even more immersive and engaging web experiences for AI.