Intent to prototype: WebGPU

212 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Jim Blandy

ungelesen,
04.01.2023, 12:56:5404.01.23
an dev-pl...@mozilla.org, Bob Hood

Summary: WebGPU is a W3C standards-track specification that brings the common ground of the new generation of platform graphics APIs (Vulkan, Metal, Direct3D 12) to the web. Compared to WebGL, WebGPU gives web developers better control over GPU resources, enabling more predictable performance. WebGPU also has a more flexible compute shader model, useful for machine learning and other compute-intensive tasks.

Bug: 1746245
Specifications:

WebGPU is being standardized by the “GPU for the Web Working Group”, under the auspices of the W3C:

Platform coverage: Firefox should eventually support WebGPU on Windows, macOS, Linux, and Android. Apple is working on an implementation in WebKit for iOS, which we expect to inherit (when it ships in Safari) in Firefox for iOS.

Although the committee has taken care to ensure that WebGPU can be implemented for a wide majority of systems, there are some GPUs and drivers that are not capable enough to run WebGPU. Like WebGL, when a browser cannot find any suitable GPUs, a WebGPU implementation may decline to offer any “adapters” for content to use. GPU-less software implementations might be added in the future.

Standard Compliance: At the moment, Firefox is behind in its implementation of the WebGPU standard specification.

  • GitHub Naga milestone 4 tracks work needed to bring the shading language up to spec. This is where the bulk of the catch-up work is needed.
  • GitHub wgpu milestone 8 tracks such work in wgpu-core and its dependencies.
  • Bug 1710678 tracks such work in Firefox-specific code in Mozilla Central.

Preference: WebGPU is already being implemented in Mozilla Central, but is controlled by the dom.webgpu.enabled pref, which defaults to false. Once we have satisfied ourselves that our implementation is sufficiently secure, we intend to default that preference to true in Nightly builds. The prerequisite work for this is tracked in Bug 1746235.

Developer tools: At the moment, there is no Devtools support for WebGPU, nor are there any concrete plans for such.

Other browsers:

  • Chromium/Chrome/Edge: will ship in 2023H1
  • Safari: implementation has begun

Web Platform Tests (WPT): The community group is developing a Conformance Test Suite, which the group expects to migrate into WPT eventually. Integrating this CTS into Firefox’s CI will be our first priority once WebGPU has been enabled by default in Nightly builds.

Demos: The wgpu.rs site has demos that track Firefox’s current support, like the shadow demo. Be sure to set dom.webgpu.enabled pref to true, as mentioned above.

Reporting bugs: Please file bugs against the “Graphics: WebGPU” component of the “Core” product.

Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten