-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Editorial review: Document WebGPU Tier 1 and Tier 2 texture formats #41557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial review: Document WebGPU Tier 1 and Tier 2 texture formats #41557
Conversation
|
Preview URLs
External URLs (5)URL:
URL:
URL:
URL:
(comment last updated: 2025-10-21 10:07:39) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nit
There was a problem hiding this 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or..
| The feature enables: | |
| Enabling this feature allows: |
Also, how about moving the repeated "formats with usages" phrase to the lead-in like:
| The feature enables: | |
| Enabling this feature allows using the listed [`format`](#format) values with the specified [`usage`](#usage) values: |
There was a problem hiding this comment.
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)): |
There was a problem hiding this comment.
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:
| - 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
| - 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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - 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
| - 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. | |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
Description
Chrome 142 adds support for the WebGPU
texture-formats-tier1andtexture-formats-tier2features. 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