Skip to content

Conversation

@chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Oct 16, 2025

Description

Chrome 142 adds support for the WebGPU texture-formats-tier1 and texture-formats-tier2 features. See https://chromestatus.com/feature/5116926821007360.

This PR adds documentation for the new features and the feature sets behind them. It also adds in an edit suggestion from #41553 that was missed.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner October 16, 2025 11:42
@chrisdavidmills chrisdavidmills requested review from wbamberg and removed request for a team October 16, 2025 11:42
@github-actions github-actions bot added the Content:WebAPI Web API docs label Oct 16, 2025
@chrisdavidmills chrisdavidmills changed the title Document WebGPU Tier 1 and Tier 2 textures Document WebGPU Tier 1 and Tier 2 texture formats Oct 16, 2025
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Oct 16, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

Preview URLs

External URLs (5)

URL: /en-US/docs/Web/API/GPUDevice/createBindGroupLayout
Title: GPUDevice: createBindGroupLayout() method


URL: /en-US/docs/Web/API/GPUSupportedFeatures
Title: GPUSupportedFeatures


URL: /en-US/docs/Web/API/GPUTexture
Title: GPUTexture


URL: /en-US/docs/Web/API/GPUTexture/format
Title: GPUTexture: format property

(comment last updated: 2025-10-21 10:07:39)

@chrisdavidmills chrisdavidmills changed the title Document WebGPU Tier 1 and Tier 2 texture formats Technical review: Document WebGPU Tier 1 and Tier 2 texture formats Oct 16, 2025
@chrisdavidmills
Copy link
Contributor Author

cc @beaufortfrancois

Copy link
Contributor

@beaufortfrancois beaufortfrancois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

@chrisdavidmills chrisdavidmills changed the title Technical review: Document WebGPU Tier 1 and Tier 2 texture formats Editorial review: Document WebGPU Tier 1 and Tier 2 texture formats Oct 17, 2025
@dipikabh dipikabh requested review from dipikabh and removed request for wbamberg October 20, 2025 15:19
Copy link
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some suggestions for you.
Thanks!


The Tier 1 set of texture formats is designed to allow developers to port existing content to the web without needing to rewrite it to use WebGPU's lower capabilities. To use this set, the `texture-formats-tier1` feature needs to be enabled (see {{domxref("GPUSupportedFeatures")}}).

The feature enables:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or..

Suggested change
The feature enables:
Enabling this feature allows:

Also, how about moving the repeated "formats with usages" phrase to the lead-in like:

Suggested change
The feature enables:
Enabling this feature allows using the listed [`format`](#format) values with the specified [`usage`](#usage) values:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used the first suggestion here. I appreciate what you are trying to do here by cleaning up and reducing repetition, but I'm not convinced this will work:

  • Formats and usages don't apply to all the entries in the list. At least one of them doesn't make sense with this lead-in.
  • Your suggestions for the list items aren't as intuitive and exact as my originals were (although they are shorter and reduce repetition). This stuff is quite complex, so I think being exact is a good thing.

I'm going to leave all of these changes, but I do really appreciate your efforts here.


The feature enables:

- Using the following [`formats`](#format) with [`usages`](#usage) of `RENDER_ATTACHMENT` (including blendable and multisampling capabilities) and `STORAGE_BINDING` (with `read-only` and `write-only` [`access`](/en-US/docs/Web/API/GPUDevice/createBindGroupLayout#access)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and so if updating the lead-in, this point could be:

Suggested change
- Using the following [`formats`](#format) with [`usages`](#usage) of `RENDER_ATTACHMENT` (including blendable and multisampling capabilities) and `STORAGE_BINDING` (with `read-only` and `write-only` [`access`](/en-US/docs/Web/API/GPUDevice/createBindGroupLayout#access)):
- Usage `RENDER_ATTACHMENT` (including blendable and multisampling capabilities) and `STORAGE_BINDING` (with `read-only` and `write-only` [`access`](/en-US/docs/Web/API/GPUDevice/createBindGroupLayout#access)):

or

Suggested change
- Using the following [`formats`](#format) with [`usages`](#usage) of `RENDER_ATTACHMENT` (including blendable and multisampling capabilities) and `STORAGE_BINDING` (with `read-only` and `write-only` [`access`](/en-US/docs/Web/API/GPUDevice/createBindGroupLayout#access)):
- For `RENDER_ATTACHMENT` (including blendable and multisampling capabilities) and `STORAGE_BINDING` (with `read-only` and `write-only` [`access`](/en-US/docs/Web/API/GPUDevice/createBindGroupLayout#access)) usages:

- `rg16snorm`
- `rgba16unorm`
- `rgba16snorm`
- Using the following [`formats`](#format) with a [`usage`](#usage) of `RENDER_ATTACHMENT` (including blendable and multisampling capabilities):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Using the following [`formats`](#format) with a [`usage`](#usage) of `RENDER_ATTACHMENT` (including blendable and multisampling capabilities):
- Usage `RENDER_ATTACHMENT` (including blendable and multisampling capabilities):

or

Suggested change
- Using the following [`formats`](#format) with a [`usage`](#usage) of `RENDER_ATTACHMENT` (including blendable and multisampling capabilities):
- For `RENDER_ATTACHMENT` (including blendable and multisampling capabilities) usage:

## Value

An enumerated value. See the [Texture formats](https://gpuweb.github.io/gpuweb/#enumdef-gputextureformat) section of the specification for all the possible values.
An enumerated value. See the specification's [Texture formats](https://gpuweb.github.io/gpuweb/#enumdef-gputextureformat) section for all the possible values. Also see [Tier 1 and Tier 2 texture formats](/en-US/docs/Web/API/GPUDevice/createTexture#tier_1_and_tier_2_texture_formats) for information on the Tier 1 and Tier 2 format sets.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as in files/en-us/web/api/gpudevice/createbindgrouplayout/index.md

Copy link
Contributor Author

@chrisdavidmills chrisdavidmills Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this some more, and ended up changing all instances to just "See also...", removing the "for information on the Tier 1 and Tier 2 format sets".

I didn't think "For additional information" sat quite right, as it's not really giving additional information to the spec link, more a subset.

- : An enumerated value representing the dimension of the set of texels for each `GPUTexture` subresource.
- {{domxref("GPUTexture.format", "format")}} {{ReadOnlyInline}}
- : An enumerated value representing the format of the `GPUTexture`. See the [Texture formats](https://gpuweb.github.io/gpuweb/#enumdef-gputextureformat) section of the specification for all the possible values.
- : An enumerated value representing the format of the `GPUTexture`. See the [Texture formats](https://gpuweb.github.io/gpuweb/#enumdef-gputextureformat) section of the specification for all the possible values. Also see [Tier 1 and Tier 2 texture formats](/en-US/docs/Web/API/GPUDevice/createTexture#tier_1_and_tier_2_texture_formats) for information on the Tier 1 and Tier 2 format sets.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as in files/en-us/web/api/gpudevice/createbindgrouplayout/index.md to avoid repetition

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above comment

| `timestamp-query` | Allows timestamp queries to be run, which measure the time taken to run compute and render passes. If `timestamp-query` is enabled, the `timestamp` value can be set for the [`type`](/en-US/docs/Web/API/GPUDevice/createQuerySet#type) property of the {{domxref("GPUDevice.createQuerySet", "createQuerySet()")}} descriptor when creating a {{domxref("GPUQuerySet")}}. In addition, the `timestampWrites` property can be set on the {{domxref("GPUCommandEncoder.beginComputePass", "beginComputePass()")}} and {{domxref("GPUCommandEncoder.beginRenderPass", "beginRenderPass()")}} descriptor when creating a {{domxref("GPUComputePassEncoder")}} and {{domxref("GPURenderPassEncoder")}}, respectively. `GPUQuerySet` objects are referenced within the objects included in the `timestampWrites` property, to specify where timestamps should be written to. |
| Feature name | Description |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `bgra8unorm-storage` | When enabled, allows `STORAGE_BINDING` [`usage`](/en-US/docs/Web/API/GPUDevice/createTexture#usage) of `bgra8unorm`-[`format`](/en-US/docs/Web/API/GPUDevice/createTexture#format) {{domxref("GPUTexture")}}s. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move out the links for format and usage and also GPUTexture to the common text before the table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is difficult to do in a way that makes sense:

  • The links are currently right there in the context of where they are needed (it would be annoying to have to jump up to the top of the table to find the links to further information each time.)
  • The links would not apply to many of the rows.

@chrisdavidmills chrisdavidmills merged commit 78c41c9 into mdn:main Oct 21, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants