Chrome will already have WebGPU support and will be enabled by default

WebGPU Chrome

After years of development, the Chrome team releases WebGPU

Few days ago Google unveiled through one announced the default support for the WebGPU graphics API and WebGPU Shading Language (WGSL) in Chrome 113 branch, which is scheduled for release on May 2.

For those who are unaware of WebGPU, you should know that provides an API similar to Vulkan, Metal and Direct3D 12 to perform GPU-side operations such as rendering and computation, and also allows using a shader language to write GPU-side programs.

About WebGPU

Conceptually, WebGPU differs from WebGL in the same way that the Vulkan graphics API differs from OpenGL, but WebGPU is not based on a specific graphics API, rather it is a general purpose layer that uses the same low-level primitives found in Vulkan. Metal and Direct3D. WebGPU provides JavaScript applications with low-level control over organization, processing and transmitting commands to the GPU, managing associated resources, memory, buffers, texture objects, and compiled graphics shaders. This approach allows you to achieve higher performance graphics applications by reducing overhead and increasing GPU efficiency.

WebGPU allows you to create complex 3D projects for the web that work just as well as standalone programs that directly use Vulkan, Metal, or Direct3D, but are not tied to specific platforms. The WebGPU also provides additional options for porting native graphics programs to a web-enabled form by compiling in WebAssembly. In addition to 3D graphics, WebGPU also covers the possibilities associated with offloading computations to the GPU side and running shaders.

Of the key features of WebGPU, we can highlight the following:

  • Separate management of resources, preparatory work and transmission of commands to the GPU (in WebGL, one object was responsible for everything at once). Three separate contexts are provided: GPUDevice for creating resources such as textures and buffers; GPUCommandEncoder to encode individual commands, including processing and calculation stages; GPUCommandBuffer to pass to the GPU execution queue.
    The result can be rendered in an area associated with one or more canvas items, or rendered without output (for example, when running computational tasks). Staging makes it easy to separate resource creation and provisioning operations into different controllers that can run on different threads.
  • A different approach to state handling. WebGPU provides two objects, GPURenderPipeline and GPUComputePipeline, that allow you to combine different states predefined by the developer, making it possible for the browser to not waste resources on additional work, such as recompiling shaders. Supported states include: shaders, vertex buffer and attribute layouts, fixed group layouts, blending, depth and patterns, post-render output formats.
  • A binding model, much like Vulkan's resource pooling tools. To group resources into groups, WebGPU provides a GPUBindGroup object that can be bound to other similar objects for use in shaders during command recording.
    Creating such groups allows the controller to perform necessary preparatory actions in advance and allows the browser to switch resource bindings between draw calls much faster. The layout of resource bindings can be predefined using the GPUBindGroupLayout object.

In addition to Chrome, experimental WebGPU support has been tested since April 2020 in Firefox and from November 2021 on Safari. To enable WebGPU in Firefox, you must set the dom.webgpu.enabled and gfx.webgpu.force-enabled flags in about:config.

There are no plans yet to enable WebGPU by default in Firefox and Safari. WebGPU implementations developed for Firefox and Chrome are available as separate libraries: Dawn (C++) and wgpu (Rust) that you can use to integrate WebGPU support into your applications.

Also of note is that work is underway to add WebGPU support to popular JavaScript libraries natively using WebGL. For example, full WebGPU support is already declared in Babylon.js and partial in Three.js , PlayCanvas , and TensorFlow.js.

The implementation of WebGPU will only initially be enabled on builds for ChromeOS, macOS, and Windows, while for Linux and Android, WebGPU support will be activated at a later date.

Finally, if you are interested in knowing more about it, you can consult the details In the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.