What's New in WebGPU (Chrome 142)

François Beaufort
François Beaufort

Published: Oct 22, 2025

Texture format support capabilities extended

The new "texture-formats-tier1" GPU feature lets developers port existing content to the web without needing to rewrite it for WebGPU's lower capabilities. It supports new "r16unorm", "r16snorm", "rg16unorm", "rg16snorm", "rgba16unorm", and "rgba16snorm" texture formats with render attachment, blendable, multisampling capabilities and "read-only" or "write-only" storage texture access. It also allows existing "r8snorm", "rg8snorm", "rgba8snorm" texture formats with render attachment, blendable, multisampling and resolve capabilities. More texture formats can also be used with "read-only" or "write-only" storage texture access.

The new "texture-formats-tier2" GPU feature enables "read-write" storage texture access for specific formats, crucial for projects like porting Unreal Engine to the web. Note that enabling "texture-formats-tier2" at device creation automatically enables "texture-formats-tier1".

See the following snippet and chromestatus entry.

const adapter = await navigator.gpu.requestAdapter();

const requiredFeatures = [];
if (adapter.features.has("texture-format-tier1")) {
  requiredFeatures.push("texture-format-tier1");
}
if (adapter.features.has("texture-format-tier2")) {
  requiredFeatures.push("texture-format-tier2");
}
const device = await adapter.requestDevice({ requiredFeatures });

// Later on, when dealing with "r8unorm" texture formats for example...
if (device.features.has("texture-format-tier2")) {
  // Use "read-write" storage texture access...
} else if (device.features.has("texture-format-tier1")) {
  // Use "read-only" or "write-only" storage texture access...
} else {
  // Fallback: Use another texture format...
}

Big thanks to the Intel folks for their work!

Primitive index in WGSL

The primitive_index is a built-in WGSL value that uniquely identifies the current primitive (for example, a point, line, or triangle) being processed by a fragment shader. It begins at 0, increments by 1 after every primitive is processed, and resets to 0 between each instance drawn.

When the "primitive-index" feature is available in a GPUAdapter, request a GPUDevice with this feature to get primitive index support in WGSL, and explicitly enable this extension in your WGSL code with enable primitive_index;. Once enabled, use the primitive_index built-in integer value in your fragment shader to access per-primitive data or perform logic that varies for each distinct geometric shape being rendered for example.

The following code snippet shows a fragment shader that renders the second primitive in red, and all other primitives in blue.

const adapter = await navigator.gpu.requestAdapter();
if (!adapter.features.has("primitive-index")) {
  throw new Error("Primitive index support is not available");
}
// Explicitly request primitive index support.
const device = await adapter.requestDevice({
  requiredFeatures: ["primitive-index"],
});

const fragmentShaderModule = device.createShaderModule({ code: `
  enable primitive_index;

  @fragment
  fn main(@builtin(primitive_index) i : u32) -> @location(0) vec4f {
    if (i == 1) {
      return vec4f(1, 0, 0, 1);
    }
    return vec4f(0, 1, 0, 1);
  }`,
});
// Send the appropriate commands to the GPU...

Explore more by checking out the Primitive Picking sample, and see the chromestatus entry.

The 3D teapot model triangles are colored based on their primitive index values.
The Primitive Picking sample in "primitive indexes" mode.

Dawn updates

The DAWN_BUILD_MONOLITHIC_LIBRARY CMake variable used to handle the type of monolithic library to build has changed its default value from OFF to STATIC such that, by default the libwebgpu* files will be generated.

Dawn now handles properly wgpu::PresentMode::Undefined defaulting when configuring a wgpu::Surface. See issue 441410668.

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 142

Chrome 141

Chrome 140

Chrome 139

Chrome 138

Chrome 137

Chrome 136

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