What's New in WebGPU (Chrome 135)

François Beaufort
François Beaufort

Published: March 26, 2025

Allow creating pipeline layout with null bind group layout

Previously, creating an empty bind group layout required adding a bind group with zero bindings, which was inconvenient. This is no longer necessary as null bind group layouts are now allowed and ignored when creating a pipeline layout. This should make development easier.

For example, you might want to create a pipeline that uses only bind group layouts 0 and 2. You could assign bind group layout 1 to fragment data and bind group layout 2 to vertex data, and then render without a fragment shader. See issue 377836524.

const bgl0 = myDevice.createBindGroupLayout({ entries: myGlobalEntries });
const bgl1 = myDevice.createBindGroupLayout({ entries: myFragmentEntries });
const bgl2 = myDevice.createBindGroupLayout({ entries: myVertexEntries });

// Create a pipeline layout that will be used to render without a fragment shader.
const myPipelineLayout = myDevice.createPipelineLayout({
  bindGroupLayouts: [bgl0, null, bgl2],
});

Allow viewports to extend past the render targets bounds

The requirements for viewport validation have been relaxed to allow viewports to go beyond the render target boundaries. This is especially useful for drawing 2D elements such as UI that may extend outside the current viewport. See issue 390162929.

const passEncoder = myCommandEncoder.beginRenderPass({
  colorAttachments: [
    {
      view: myColorTexture.createView(),
      loadOp: "clear",
      storeOp: "store",
    },
  ],
});

// Set a viewport that extends past the render target's bounds by 8 pixels
// in all directions.
passEncoder.setViewport(
  /*x=*/ -8,
  /*y=*/ -8,
  /*width=*/ myColorTexture.width + 16,
  /*height=*/ myColorTexture.height + 16,
  /*minDepth=*/ 0,
  /*maxDepth=*/ 1,
);

// Draw geometry and complete the render pass as usual.

Easier access to the experimental compatibility mode on Android

The chrome://flags/#enable-unsafe-webgpu flag alone now enables all capabilities required for the experimental WebGPU compatibility mode on Android. With that, you can request a GPUAdapter in compatibility mode with the featureLevel: "compatibility" option and even get access to the OpenGL ES backend on devices lacking support for Vulkan. See the following example and issue dawn:389876644.

// Request a GPUAdapter in compatibility mode.
const adapter = await navigator.gpu.requestAdapter({ featureLevel: "compatibility" });
WebGPU report page shows a GPUAdapter in compatibility mode on Android device.
Compatibility mode adapter info in webgpureport.org.

Remove maxInterStageShaderComponents limit

As previously announced, the maxInterStageShaderComponents limit is removed due to a combination of factors:

  • Redundancy with maxInterStageShaderVariables: This limit already serves a similar purpose, controlling the amount of data passed between shader stages.
  • Minor discrepancies: While there are slight differences in how the two limits are calculated, these differences are minor and can be effectively managed within the maxInterStageShaderVariables limit.
  • Simplification: Removing maxInterStageShaderComponents streamlines the shader interface and reduces complexity for developers. Instead of managing two separate limits with subtle differences, they can focus on the more appropriately named and comprehensive maxInterStageShaderVariables.

See intent to remove and issue 364338810.

Dawn updates

It's no longer possible to use a filtering sampler to sample a depth texture. As a reminder, a depth texture can only be used with a non filtering or a comparison sampler. See issue 379788112.

The WGPURequiredLimits and WGPUSupportedLimits structures have been flattened into WGPULimits. See issue 374263404.

The following structs have been renamed. See issue 42240793.

  • WGPUImageCopyBuffer is now WGPUTexelCopyBufferInfo
  • WGPUImageCopyTexture is now WGPUTexelCopyTextureInfo
  • WGPUTextureDataLayout is now WGPUTexelCopyBufferLayout

The subgroupMinSize and subgroupMaxSize members have been added to the WGPUAdapterInfo struct. See webgpu-headers PR.

Tracing Dawn API usage in Metal is now possible when running your program with the DAWN_TRACE_FILE_BASE environment variable which saves a .gputrace file that can be loaded later into XCode's Metal Debugger. See the Debugging Dawn documentation.

This covers only some of the key highlights. Check out the exhaustive list of commits.

What's New in WebGPU

A list of everything that has been covered in the What's New in WebGPU series.

Chrome 135

Chrome 134

Chrome 133

Chrome 132

Chrome 131

Chrome 130

Chrome 129

Chrome 128

Chrome 127

Chrome 126

Chrome 125

Chrome 124

Chrome 123

Chrome 122

Chrome 121

Chrome 120

Chrome 119

Chrome 118

Chrome 117

Chrome 116

Chrome 115

Chrome 114

Chrome 113