← Topic directory

WebGPU

GPU compute and rendering on the web: the WebGPU API, WGSL shading language, and related graphics capabilities.

71 features tagged with this topic.

Cross-browser consensus

Features by stage

Enabled by default (25)

Remove WebGPU limit maxFragmentCombinedOutputResources

Removes the maxFragmentCombinedOutputResources limit from WebGPU, which has been deemed to be unnecessary. This limit applies additional restrictions on use of the WebGPU API, but is being removed from the standard. This removal is a minor breaking change.

The ImageBitmap rendering context for <offscreenCanvas>

We are adding ImageBitmapRendererContext as a valid context for OffscreenCanvas. ImageBitmapRenderingContext allows direct transfer of an ImageBitmap to the canvas surface. This is particularly important as a way to render an ImageBitmap to a Canvas from a Worker (without transferring the ImageBitmap to the main thread). This is also currently the spec-defined way to render WebGPU content to the screen.

Also tagged: Performance & Scheduling

WebGPU

WebGPU is the successor to the WebGL and WebGL 2 graphics APIs for the Web. It provides modern features such as “GPU compute” as well as lower overhead access to GPU hardware and better, more predictable performance. WebGPU is developed by the “GPU for the Web” W3C community group.

Also tagged: Performance & Scheduling

WebGPU default entry points to shader modules

WebGPU now allows developers to omit entry points to shader modules when creating a pipeline, improving ergonomics. If no default entry point is found, a GPUValidationError will be triggered as usual.

WebGPU extended range (HDR) support

Adds tone mapping parameters to the WebGPU canvas configuration, and adds options of "standard" (the current behavior of restricting content to the SDR range of the display) as the default, and "extended" (not imposing this restriction) as a new behavior. This allows WebGPU content to use the full range of a display.

Also tagged: Media & Real-time Communication

WebGPU f16 support

Allows for the use of the half-precision floating-point type f16 in WebGPU shaders (WGSL). Developers can use the 'shader-f16' feature from the WebGPU spec and the 'f16' extension from the WGSL spec to access 16-bit floating point variables and APIs in their shaders.

WebGPU maxBindGroupsPlusVertexBuffers limit

The WebGPU maxBindGroupsPlusVertexBuffers limit is the maximum number of bind group and vertex buffer slots used simultaneously, counting any empty slots below the highest index. It is validated in createRenderPipeline() and in draw calls. This change adds maxBindGroupsPlusVertexBuffers to the GPUSupportedLimits interface, and as an accepted key by the GPUDeviceDescriptor.requiredLimits record.

WebGPU Subgroups

Adds subgroup functionality to WebGPU. Subgroup operations perform SIMT operations to provide efficient communication and data sharing among groups of invocations. These operations can be used to accelerate applications by reducing memory overheads incurred by inter-invocation communication.

Also tagged: Performance & Scheduling

WebGPU timestamp queries

WebGPU timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute, especially at the beginning and end of passes. Timestamp queries are heavily used to gain insights into the performance and behavior of GPU workloads. While the WebGPU specification makes timestamp queries an optional feature due to timing attack concerns, we believe that timestamp queries quantization provides a good middle ground by reducing the precision of timers with a resolution of 100 microseconds.

Also tagged: Performance & Scheduling

WebGPU: 1-component vertex formats (and unorm8x4-bgra)

Adds additional vertex formats not present in the initial release of WebGPU due to lack of support or old macOS versions (which are no longer supported by any browser). The 1-component vertex formats lets applications request only the necessary data when previously they had to request at least 2x more for 8 and 16-bit data types. The unorm8x4-bgra format makes it slightly more convenient to load BGRA-encoded vertex colors while keeping the same shader.

WebGPU: 32-bit float textures blending

Functionality added to the WebGPU spec after its first shipment in a browser. The “float32-blendable” GPU feature makes GPU textures with formats "r32float", "rg32float", and "rgba32float" blendable.

WebGPU: Clip Distances

Adds the optional GPU feature "clip-distances" that allows setting user-defined clip distances in vertex shader outputs. This technique is particularly useful for the applications that need to clip all vertices in a scene that are beyond a user-defined plane, such as many CAD applications.

WebGPU: Dual source blending

Functionality added to the WebGPU spec after its first shipment in a browser. Adds the optional GPU feature "dual-source-blending" that enables combining two fragment shader outputs into a single framebuffer. This technique is particularly useful for applications that require complex blending operations, such as those based on Porter-Duff blend modes. By replacing subsequent render passes with a single render pass, dual source blending can enhance performance and flexibility

Also tagged: Performance & Scheduling

WebGPU: GPUAdapter info attribute

Functionality added to the WebGPU spec after its first shipment in a browser. Adds a synchronous GPUAdapter info attribute to retrieve same information about the physical adapter as with the asynchronous GPUAdapter requestAdapterInfo() method. A separate Intent will be sent to deprecate and remove the asynchronous GPUAdapter requestAdapterInfo() method.

Also tagged: Security & Authentication

WebGPU: GPUCanvasContext getConfiguration()

Functionality added to the WebGPU spec after its first shipment in a browser. Once GPUCanvasContext configure() has been called with a configuration dictionary, the GPUCanvasContext getConfiguration() method lets developers check the canvas context configuration. It includes GPU device, format, usage, viewFormats, colorSpace, toneMapping, and alphaMode members. As discussed in https://github.com/gpuweb/gpuweb/issues/4828, web apps can use it to detect whether HDR canvas is supported in WebGPU.

Also tagged: Progressive Web Apps

WebGPU: read-write storage textures

Functionality added to the WebGPU/WGSL spec after its first shipment in a browser. Adds support for (read-only and) read-write storage textures which allow more general access to texture memory for GPU computation and can unlock more advanced graphical algorithms. This feature has been request by developers very often.

WebGPU: render to slice of 3D texture

Functionality added to the WebGPU/WGSL spec after its first shipment in a browser. Adds support using a render pass to render to slices of 3D textures in addition to rendering to 2D textures. This is used in graphical algorithm to do voxelization between others.

WebGPU: separate Read-only depth-stencil

Functionality added to the WebGPU/WGSL spec after its first shipment in a browser. Loosens a restriction where using readonly depth-stencil attachments in a render pass required both aspects (depth and stencil) to be readonly. This was too strict, and prevent use-cases where for example the depth is used readonly for contact shadow tracing, while the stencil buffer is written to do identify pixels for further processing. (Both Unity and Unreal do things with mixed depth-stencil readonliness).

WebGPU: Texture view usage

Adds an optional field to WebGPU texture view creation to request a subset of the usage flags from the source texture. By default, texture view usage inherits from the source texture but there are view formats which can be incompatible with the full set of inherited usages. Adding a usage field to texture view creation allows the user request a subset of the source texture's usages that are valid with the view format and specific to their intended usage of the texture view. WebGPU implementations can also optimize the creation of low level resources and improve performance when using views with more specialized usage flags.

Also tagged: Performance & Scheduling

WGSL: packed 4x8 integer dot product (DP4)

Functionality added to the WebGPU/WGSL spec after its first shipment in a browser. Adds support new WGSL builtins to work with 4 8-bit numbers packed in a u32. The new dot product functionality is especially useful for executing machine learning models that work on 8-bit weights.

WGSL: pointer composite access

Functionality added to the WebGPU/WGSL spec after its first shipment in a browser. Provides better ergonomics for accessing member of a composite through a pointer. For example `(*ptr).i` can now be written `ptr.i`.

WGSL: unrestricted pointer parameters

Functionality added to the WebGPU/WGSL spec after its first shipment in a browser. Loosens restrictions on which pointers can be passed to WGSL functions such that pointers to storage/uniform/workgroup address spaces are allowed.

Origin trial (2)

Translator API

A JavaScript API to provide language translation capabilities to web pages. Browsers are increasingly offering language translation to their users. Such translation capabilities can also be useful to web developers. This is especially the case when browser's built-in translation abilities cannot help. An enterprise policy (TranslatorAPIAllowed: https://chromeenterprise.google/policies/translator-api-allowed/) is available to disable the underlying model downloading which would render this API unavailable.

Also tagged: JavaScript Language Built-in Web AI WebAssembly

WebGPU WebCodecs integration

WebGPU exposes an API to create opaque "external texture" objects from HTMLVideoElement. These object can be used to sample the video frames efficiently, potentially in a zero-copy way directly from the source YUV data. However the WebGPU specification for the first version of WebGPU does not allow creating GPUExternalTextures from WebCodecs VideoFrame objects. This capability is important for advanced video processing applications that are already using WebCodecs and would like to integrate WebGPU in the video processing pipeline. This feature adds support for using a VideoFrame as the source for a GPUExternalTexture and a copyExternalImageToTexture call.

Also tagged: Media & Real-time Communication

In developer trial (Behind a flag) (8)

Language Detector API

A JavaScript API for detecting the language of text, with confidence levels. An important supplement to translation is language detection. This can be combined with translation, e.g. taking user input in an unknown language and translating it to a specific target language. Browsers today often already have language detection capabilities, and we want to offer them to web developers through a JavaScript API, supplementing the translation API.

Also tagged: JavaScript Language Built-in Web AI

Rewriter API

The Rewriter API transforms and rephrases input text in requested ways, backed by an on-device AI language model. Developers may use this API to remove redundancies within a text in order to fit into a word limit, rephrase messages to suit the intended audience or to be more constructive if a message is found to use toxic language, rephrasing a post or article to use simpler words and concepts and more. An enterprise policy (GenAILocalFoundationalModelSettings) is available to disable the underlying model downloading which would render this API unavailable.

Also tagged: Privacy & Identity Built-in Web AI

Summarizer API

Summarizer API is a JavaScript API for producing summaries of input text, backed by an AI language model. Browsers and operating systems are increasingly expected to gain access to a language model. By exposing this built-in model, we avoid every website needing to download their own multi-gigabyte language model, or send input text to third-party APIs. The summarizer API in particular exposes a high-level API for interfacing with a language model in order to summarize multilingual inputs for a variety of use cases, in a way that does not depend on the specific language model in question. An enterprise policy (GenAILocalFoundationalModelSettings) is available to disable the underlying model downloading which would render this API unavailable. Language support log: - Chrome M139 and earlier only supported 'en' - Chrome M140 added support for 'es' and 'ja'

Also tagged: JavaScript Language Privacy & Identity Built-in Web AI

WebGPU on Android

WebGPU is the successor to the WebGL and WebGL 2 graphics APIs for the Web. It provides modern features such as “GPU compute” as well as lower overhead access to GPU hardware and better, more predictable performance. WebGPU is developed by the “GPU for the Web” W3C community group. WebGPU previously launched on Windows, MacOS, and ChromeOS in M113. See https://chromestatus.com/feature/6213121689518080 for details.

Also tagged: Performance & Scheduling

WebGPU: implement requestAdapter()'s featureLevel placeholder

In preparation for future changes, the WebGPU Working Group has added a `featureLevel` member in `GPURequestAdapterOptions` (the options passed to `navigator.gpu.requestAdapter()`). It must have one of two valid values, but both have no effect.

Writer API

The Writer API can be used for writing new material given a writing task prompt, backed by an on-device AI language model. Developers will be able to use this API to generate textual explanations of structured data, composing a post about a product based on reviews or product description, expanding on pro and con lists into full views and more. An enterprise policy (GenAILocalFoundationalModelSettings) is available to disable the underlying model downloading which would render this API unavailable.

Also tagged: Privacy & Identity Built-in Web AI

Proposed (32)

Canvas Floating Point Color Types

Introduce the the ability to use floating point pixel formats (as opposed to 8-bit fixed point) with CanvasRenderingContext2D, OffscreenCanvasRenderingContext2D, and ImageData. This is necessary for high precision applications (e.g, medical visualization), high dynamic range content, and linear working color spaces.

Canvas2D tone mapping

Adds a toneMapping option to CanvasRenderingContext2DSettings, allowing a 2D canvas context to specify 'standard' or 'extended' tone mapping behavior when displaying HDR content, unifying the tone mapping API across 2D canvas and WebGPU.

Decisions API

Provides high-speed, deterministic semantic decision-making directly on the user's device as a built-in AI capability. Unlike open-ended generative language models (such as the Prompt API) that decode text token-by-token over hundreds or thousands of milliseconds, the Decisions API (window.DecisionModel) evaluates natural language input text against a structured set of questions and candidate options in a single forward pass using logit scoring. This delivers micro-latency evaluations (tens or low hundreds of milliseconds on typical consumer laptop CPUs and GPUs) while outputting calibrated confidence values. This brings non-autoregressive "System 1" decision models (e.g. Jev, Laya, Kev, Open-Jev) natively into the web platform, providing developers with a pragmatic, zero-marginal-cost "Semantic If" primitive for real-time client-side routing, interactive input guardrails, and adaptive user interfaces.

Also tagged: Privacy & Identity Progressive Web Apps Built-in Web AI

Embedding API

The Embedding API is a proposed Web Platform API that allows developers to generate high-dimensional vector representations (embeddings) of content directly on the user's device. By leveraging Chrome's on-device AI infrastructure and a shared on-device model, this API enables powerful semantic understanding features—such as semantic search, Retrieval-Augmented Generation (RAG), and content clustering. It eliminates the latency, cost, and privacy trade-offs of cloud services. Furthermore, compared to DIY client-side approaches, it provides significant user benefits (saving bandwidth and local storage by preventing each site from downloading its own massive model) and developer benefits (abstracting away complex model delivery and keeping WebAssembly/WebGPU frameworks up-to-date).

Also tagged: JavaScript Language Performance & Scheduling Privacy & Identity Storage & Files Built-in Web AI WebAssembly

HDR headroom query

Adds HDR headroom to the attributes of a display that may be queried in ScreenDetailed. The HDR headroom of a screen is the parameter that is used for many HDR tone mapping algorithms. Custom tone mapping (e.g, in WebGPU) requires knowing this parameter.

Prompt API

Prompt API gives web developers direct access to a browser-provided on-device AI language model. The API design offers fine-grained control, aligned with cloud API shapes, for progressively enhancing sites with model interactions tailored to individualized use cases. This complements task-based language model APIs, for example, Summarizer API, as well as a variety of APIs and frameworks for generalized on-device inference with developer-supplied ML models. The initial implementation supports text, image, and audio inputs. In addition, response constraints ensure that generated text conforms with predefined regex and JSON schema formats. This supports a variety of use cases, from generating image captions and performing visual searches to transcribing audio, classifying sound events, generating text following specific instructions, and extracting information or insights from multi-modal source material. This API has been shipped in [Chrome Extensions](https://chromewebstore.google.com/category/extensions). An enterprise policy [GenAILocalFoundationalModelSettings](https://chromeenterprise.google/policies/#GenAILocalFoundationalModelSettings) is available to disable the underlying model downloading, which would render this API unavailable. Enterprise admins can also set the [BuiltInAIAPIsEnabled](https://chromeenterprise.google/policies/#BuiltInAIAPIsEnabled) policy to block Built-In AI API usage, while still permitting other on-device GenAI features. Language support log: - Chrome M139 and earlier only supported English ('en') - Chrome M140 added support for Spanish and Japanese ('es' and 'ja')

Also tagged: Media & Real-time Communication Built-in Web AI WebAssembly

WebGL drawingBufferToneMapping

Adds the WebGL drawingBufferToneMapping API, which allows a WebGL rendering context to specify how to tone map content that is outside the standard dynamic range, using the CanvasToneMapping structure, which is shared with 2D canvas and WebGPU.

WebGPU 'core-features-and-limits'

The 'core-features-and-limits' feature signifies a WebGPU adapter and device support the core features and limits of the spec. Explainer: https://gist.github.com/greggman/0dea9995e33393c546a4c2bd2a12e50e

WebGPU Compatibility mode

Adds an opt-in, lightly restricted subset of the WebGPU API capable of running older graphics APIs such as OpenGL and Direct3D11. By opting into this mode and obeying its constraints, developers can extend the reach of their WebGPU applications to many older devices that do not have the modern, explicit graphics APIs that core WebGPU requires. For simple applications, the only required change is to specify the "compatibility" featureLevel when calling requestAdapter. For more advanced applications, some modifications may be necessary to accommodate the mode's restrictions. Since Compatibility mode is a subset, the resulting applications are also valid WebGPU Core applications and will run even on user agents that do not support Compatibility mode.

WebGPU HDR texture import

Adds an HDR headroom parameter to WebGPU external image copying and sampling parameters, allowing resources to be imported as SDR or HDR.

WebGPU: 'primitive_index' feature

This feature adds a new optional capability to WebGPU that exposes a new WGSL shader builtin, 'primitive_index'. This builtin provides a per-primitive index to fragment shaders on supported hardware, similar to the existing vertex_index and instance_index builtins. The primitive index is useful for advanced graphical techniques, such as virtualized geometry.

WebGPU: `buffer_view` feature

WGSL language feature for reinterpreting data in variables. The feature allows developers to divide a single uniform, storage, or workgroup variable into multiple logical variables. It also allows the type of the data in the variable to be interpreted as multiple types within the program.

WebGPU: `linear_indexing` feature

Functionality added to the WebGPU spec after its first shipment in a browser. Adds two new compute shader built-in values for user quality of life. These are implemented for all backends (as polyfills of existing built-in values).

WebGPU: `subgroup_uniformity` feature

Functionality added to the WebGPU spec after its first shipment in a browser. Adds a new scope to the uniformity analysis and changes which parts of the language are checked in each to allow subgroup functionality to be considered uniform in more cases.

WebGPU: 3D texture support for BC and ASTC compressed formats

Functionality added to the WebGPU spec after its first shipment in a browser. The “texture-compression-bc-sliced-3d” and “texture-compression-astc-sliced-3d” WebGPU features add respectively 3D texture support for BC and ASTC compressed formats.

WebGPU: atomic-vec2u-min-max

Allows the use of 64-bit atomic minimum and maximum operations on `atomic<vec2u>` in WGSL. This provides WebGPU shader authors with a way to implement certain algorithms that use 64-bit atomics without requiring full support for 64-bit integers.

WebGPU: copyBufferToBuffer overload

Functionality added to the WebGPU spec after its first shipment in a browser. The GPUCommandEncoder copyBufferToBuffer() method now includes a simpler way to copy entire buffers using a new overload with optional offsets and size parameters.

WebGPU: Deprecate GPUAdapter isFallbackAdapter attribute

Deprecates the GPUAdapter isFallbackAdapter boolean attribute from WebGPU, which is redundant with the GPUAdapterInfo isFallbackAdapter boolean attribute. This upcoming removal is a minor breaking change as support for fallback adapters has not yet been implemented in any browser, thereby resulting in both isFallbackAdapter attributes consistently returning a falsy value.

WebGPU: Immediates

Functionality added to the WebGPU spec after its first shipment in a browser. Adds a new immediate address space in WGSL and a setImmediateData() method on render pass, compute pass, and render bundle encoders that allows passing small amounts of frequently-updated data directly to shaders without creating GPU buffer objects or bind groups. This is particularly useful for applications that need to update per-draw parameters such as object indices, material indices, or transformation matrices every draw call, enabling significant performance improvements by avoiding buffer and bind group management overhead.

Also tagged: Media & Real-time Communication Performance & Scheduling

WebGPU: Subgroup Size Control

Adds the optional GPU feature "subgroup-size-control" that allows explicitly setting the subgroup size in a compute shader. This technique is particularly useful for the applications that need to optimize the performance of the compute shader using subgroup operations with specifc subgroup size on certain platforms, such as the AI workloads.

Also tagged: Performance & Scheduling

WebGPU: Texture and Sampler Lets

Add a language feature to WGSL, `texture_and_sampler_let` that adds the ability to store texture and sampler objects into a let declaration in WGSL.

WebGPU: Texture component swizzle

Functionality added to the WebGPU spec after its first shipment in a browser. Allows GPUTextureViews to rearrange or replace the color components from texture's red/green/blue/alpha channels when accessed by a shader.

Also tagged: Performance & Scheduling

WebGPU: Texture Compression Unaligned

Compressed texture (using the BC, ETC or ASTC formats) in unextended WebGPU must have a size that's a multiple of the block size (4x4 or up to 12x12). This is very constraining when compressing arbitrary images as a resizing step must happen which looses high-frequency information. Most hardware supports compressed textures with partial blocks at the border such that the textures can have any size, removing this issue.

WebGPU: Transient attachments

Functionality added to the WebGPU spec after its first shipment in a browser. A new TRANSIENT_ATTACHMENT GPUTextureUsage lets developers create attachments that allow render pass operations to stay in tile memory, avoiding VRAM traffic and potentially avoiding VRAM allocation for the textures.

WebGPU: Uniform buffer standard layout

Functionality added to the WebGPU spec after its first shipment in a browser. Uniform buffers declared in WGSL shaders are no longer required to have 16-byte alignment on array elements, or to pad nested structure offsets to a multiple of 16 bytes.

WebGPU: WGSL Fragment Depth

Adds the ability to provide a `less` or `greater` modifier to the `@builtin(frag_depth)` in WGSL. The current `@builtin(frag_depth)` can potentially introduce a performance penalty due to disabling the early-Z optimizations on a draw call. The new modifiers allow the explicit setting of the buffer mode and allow the early-Z optimizations to be applied.

Also tagged: Performance & Scheduling

WebGPU: WGSL Swizzle Assignment

Allows a single assignment statement to update multiple components of a vector in the WebGPU Shading Language (WGSL). Developers can use swizzle syntax on the left-hand side of an assignment rather than reconstruct entire vectors or assign components individually. This reduces boilerplate, improves shader readability, and aligns WGSL with other common shading languages.

WebNN

WebNN seeks to enable web applications and frameworks to take advantage of native operating system services for machine learning and the underlying hardware capabilities available on a user's computer to implement consistent, efficient, and reliable ML experiences on the web.

Also tagged: Progressive Web Apps

Removed (2)

Remove non-standard GPUAdapter requestAdapterInfo() method

The WebGPU WG decided it was impractical for requestAdapterInfo() to trigger a permission prompt so they’ve removed that option and replaced it with the GPUAdapter info attribute so that web developers can get the same GPUAdapterInfo value synchronously this time. See the previous Intent to Ship: WebGPU: GPUAdapter info attribute at https://groups.google.com/a/chromium.org/g/blink-dev/c/eZqMmX7q_bA/m/euMLVMpxAgAJ

Also tagged: Security & Authentication

Remove WebGPU limit maxInterStageShaderComponents

The maxInterStageShaderComponents limit is being 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 (that both apply simultaneously but with subtle differences), they can focus on the more appropriately named and comprehensive maxInterStageShaderVariables. https://github.com/gpuweb/gpuweb/pull/4783

No active development (2)

Canvas2D: WebGPU access

Allows a Canvas2D to temporarily share its pixels with WebGPU, exposing the canvas surface as a GPUTexture. WebGPU can use the GPUTexture as a source texture, or use it as a color attachment and render into it.

WebXR/WebGPU integration

Provides a mechanism to display content rendered with WebGPU in WebXR sessions, enabling higher fidelity VR and AR content.

Timeline