Jump to content

WebGPU

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Cerebral726 (talk | contribs) at 13:28, 10 April 2023 (Remove unreliable sources, add some tags). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WebGPU
StatusWorking Draft (WD)
Year started18 May 2021 (2021-05-18)
First published18 May 2021 (2021-05-18)
Latest versionW3C Working Draft
Error: All values must be integers (help)
OrganizationW3C
Committee
  • GPU for the Web WG
  • GPU for the Web CG
Editors
  • Justin Fan
  • Brandon Jones
  • Dzmitry Malyshau
  • Myles C. Maxfield
  • Kai Ninomiya
Related standards
Domain
Websitewww.w3.org/TR/webgpu/

WebGPU is the working name for a potential web standard and JavaScript API for accelerated graphics and compute, aiming to provide "modern 3D graphics and computation capabilities". It is developed by the W3C GPU for the Web Community Group with engineers from Apple, Mozilla, Microsoft, Google, and others.[1]

Unlike WebGL, WebGPU is not a direct port of any existing native API. It is based on APIs provided by Vulkan, Metal, and Direct3D 12 and is intended to provide high performance across mobile and desktop platforms.[2] Mobile platforms will be limited in creation of WebGPUDevice objects that will require modern graphics APIs (mentioned above).[note 1]

The first conceptual prototype called NXT was showcased in early 2017 by the Chromium team.[3] The Google Chrome Development Team has named it as a "successor" to the WebGL/2 JavaScript APIs.[4][5] On April 6, 2023 Google announced that Chromium web browser will ship with WebGPU supported enabled on ChromeOS, macOS, and Microsoft Windows.[6]

History

On June 8, 2016, Google showed "Explicit web graphics API" presentation to the WebGL working group (during the bi-annual face to face meeting).[7] The presentation explored the basic ideas and principles of building a new API to eventually replace WebGL, aka "WebGL Next".

On January 24, 2017, Khronos hosted an IP-free meeting dedicated to discussion of "WebGL Next" ideas, collided with WebGL working group meeting in Vancouver.[8] Google team presented the NXT prototype implementing a new API that could run in Chromium with OpenGL, or standalone with OpenGL and Metal. NXT borrowed concepts from all of Vulkan, Direct3D 12, and Metal native APIs. Apple and Mozilla representatives also showed their prototypes built on Safari and Servo correspondingly, both of which closely replicated the Metal API.

W3C Working Group

On February 7, 2017, Apple's WebKit team proposed the creation of the W3C community group to design the API. At the same time they announced a technical proof of concept and proposal under the name "WebGPU", based on concepts in Apple's Metal.[9][10][11] The WebGPU name was later adopted by the community group as a working name for the future standard rather than just Apple's initial proposal.[2] The initial proposal has been renamed to "WebMetal" to avoid further confusion.[12]

The W3C "GPU for the Web" Community Group was launched on February 16, 2017. At this time, all of Apple, Google, and Mozilla had experiments in the area, but only Apple's proposal was officially submitted to the "gpuweb-proposals" repository.[13]

On June 1, 2018, citing "resolution on most-high level issues" in the cross-browser standardization effort, Google's Chrome team announced intent to implement the future WebGPU standard.[2]

Technology

WebGPU uses its own shading language called WGSL that was designed to be trivially translatable to SPIR-V, until complaints caused redirection into a more traditional design, similar to other shading languages. The syntax is similar to Rust.[citation needed] Tint is a Google-made compiler for WGSL.[14][better source needed] Naga is a similar project developed for the needs of wgpu-rs.[15][better source needed]

Implementation

Both Chrome and Firefox support WebGPU with SPIR-V, with work ongoing for the WGSL front-end. Safari used to support a prototype of WebGPU with WSL, but it is now obsolete and removed in anticipation of progress in WebKit implementation that follows upstream specifications of both WebGPU and WGSL.[16][better source needed]

On April 6, 2023 Google announced Chromium support for WebGPU on the ChromeOS, macOS, and Windows.[6]

See also

Notes

  1. ^ "[...] WebGPUDevice will require the native platform to expose a modern graphics API: [...]"[2]

References

  1. ^ "GPU for the Web Community Group". w3.org. Retrieved 2018-09-11.
  2. ^ Google (2019-08-01). "googlearchive/nxt-standalone: DO NOT USE, UPSTREAM REPO IS https://dawn.googlesource.com/dawn". GitHub. Retrieved 2021-12-25.
  3. ^ "Origin Trials". developer.chrome.com. Retrieved 2021-09-26.
  4. ^ "WebGPU - Chrome Platform Status". chromestatus.com. Retrieved 2022-05-05.
  5. ^ a b "Chrome ships WebGPU". Chrome Developers. Retrieved 2023-04-08.
  6. ^ Wallez, Corentin. "Explicit web graphics API". Retrieved 2019-06-25.
  7. ^ Wallez, Corentin; Ninomiya, Kai. "WebGL Next investigations". Retrieved 2019-06-25.
  8. ^ "Next-generation 3D Graphics on the Web". WebKit. 2017-02-07. Retrieved 2018-08-13.
  9. ^ "Apple seeks to position Metal as part of new 3D graphics standard for web". AppleInsider. Retrieved 2018-08-13.
  10. ^ Claburn, Thomas (2017-02-08). "Web-standards-allergic Apple unveils WebGPU, a web graphics standard". The Register. Retrieved 2017-08-14.
  11. ^ "WebGPU Prototype and Demos". WebKit. 2017-04-05. Retrieved 2019-01-10.
  12. ^ Jackson, Dean (2017-02-16). "Welcome and Getting Started". public-gpu (Mailing list). Retrieved 2018-09-11.
  13. ^ Tint source code
  14. ^ Naga source code
  15. ^ "Implementation Status". GitHub. gpuweb.