-
Notifications
You must be signed in to change notification settings - Fork 353
Add optional feature texture-formats-tier1
#5160
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
Add optional feature texture-formats-tier1
#5160
Conversation
This patch adds the optional feature `storage-texture-format-tier1` that: - Allows the `read-write` storage texture access on below formats: - `rgba32float` - `rgba32uint` - `rgba32sint` - `rgba16float` - `rgba16uint` - `rgba16sint` - `rgba8unorm` - `rgba8uint` - `rgba8sint` - Allows the `STORAGE_BINDING` usage with all storage texture accesses on below formats: - `r16float` - `r16uint` - `r16sint` - `r8unorm` - `r8uint` - `r8sint`
|
Previews, as seen when this build job started (298ad79): |
mwyrzykowski
left a comment
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 it’s covered by existing restrictions, but writable textures are only allowed in compute and fragment stages (not vertex stage), correct?
kainino0x
left a comment
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.
Editorially seems fine, but can you clarify where these lists come from? They don't look the same as Teo's original proposal. (Point to a specific comment on that thread, if there is one?)
Also #3838 tracks other tiers too, so I'm unlinking this so it won't close that bug.
In #3838,
|
Yes. |
I would like to have another investigation into this because that comment was challenged later by @teoxoy and doesn't match the checks that we have in Dawn at the moment. Can we have a report from https://github.com/kainino0x/gpuinfo-vulkan-query that describes the diff between the original tier 2 and 3? What's the require Does the list or formats supported with "tier 1" in this PR match the entirety of |
|
I think we still need 2 tiers that would map to the old tier 2 & 3 in #3838. Tier 2 can even be supported by compat.
IIRC, #3837 covers all formats enabled by |
|
Hi @Kangz, I've updated Myles' comment in #3838:
Note that:
|
kainino0x
left a comment
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.
The table doesn't explain the difference between the formats that gain RW support (rgba*) and the ones that gain basic STORAGE support (r*). Could you clarify where that comes from?
- According to David's comment
shaderStorageImageExtendedFormatsis now required to support WebGPU, so actually the supports of read-only or write-onlySTORAGE_BINDINGof these formats should be in WebGPU core feature.
I don't think this comment was correct. From the following comments it sounds like that wasn't intended, and there was a spec bug we fixed in #4741.
storage-texture-format-tier1storage-texture-format-tier2
Now this PR only includes Tier 2 formats which are less controversial. PTAL. We can talk about Tier 3 formats in another PR. |
|
Thank you for updating this table, it is very useful! Looking at it, IMHO we could merge tier2/3 into a single optional feature (but that doesn't do the same thing on compat vs. not) (it would drop Adreno 500 support but IMHO that's ok). If we want to add support for more formats in the future we can add more tiers. |
Merging tier2+3 into a single tier2 would be nice, it would reduce fragmentation |
LGTM but holding until working group approval
kainino0x
left a comment
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.
Conclusions from the WG meeting:
- We should include the tier3 formats after all; sorry I was confused about what they supported.
- Compat won't allow them, though, so it will add restrictions to this feature (the same way it adds restrictions to core capabilities). We should add this to the Compat proposal doc in the same PR.
- The WG decided it should be called something like
"storage-texture-formats-1"or"rw-storage-texture-formats-1"- editors need to settle on something @jimblandy @toji. I think the criteria are: this one is numbered1, and the feature is named in such a way that any future versionn+1is superset of versionn.
Done @teoxoy |
alan-baker
left a comment
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.
WGSL lgtm
dneto0
left a comment
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.
WGSL change LGTM
kainino0x
left a comment
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.
Apologies for the delay!
GPU Web WG 2025-05-14 Atlantic-time
|
This PR reflects changes from the following spec PRs: * gpuweb/gpuweb#5193 * gpuweb/gpuweb#5160 Please publish new version after it's merged so that we can add tests in the CTS as in gpuweb/cts#4390
This patch adds the optional feature `texture-formats-tier2` with below new features based on [the previous investigation](#5160 (comment)): - Allows the `read-write` storage texture access on below texture formats: - `r8unorm` - `r8uint` - `r8sint` - `rgba8unorm` - `rgba8uint` - `rgba8sint` - `r16uint` - `r16sint` - `r16float` - `rgba16uint` - `rgba16sint` - `rgba16float` - `rgba32uint` - `rgba32sint` - `rgba32float` - Enabling `texture-formats-tier2` will also enable `texture-formats-tier1`. Fixed: #3838
These were added in the upstream WebGPU API and should be reflected here. - gpuweb/gpuweb#5147 Ordered at the top for consistency even though it changes the numbering of everything else. Also fixed the ordering of TimestampQuery to match since the numbering is changing anyway. (Even though the ordering doesn't really matter because it's nonobservable upstream and there isn't really an ordering.) - gpuweb/gpuweb#5160 - gpuweb/gpuweb#5226 The renumbering is technically a breaking change because it changes the ABI (which shouldn't matter right now) and could affect code that depends on comparing enum values or hard-coded integer versions of them.
Tier 1 PRs for WebGPU spec.: [`gpuweb`gfx-rs#5213](gpuweb/gpuweb#5213) and [`gpuweb`gfx-rs#5160](gpuweb/gpuweb#5160). Tier 2 PR for WebGPU spec.: [`gpuweb`gfx-rs#5226](gpuweb/gpuweb#5226)
Tier 1 PRs for WebGPU spec.: [`gpuweb`gfx-rs#5213](gpuweb/gpuweb#5213) and [`gpuweb`gfx-rs#5160](gpuweb/gpuweb#5160). Tier 2 PR for WebGPU spec.: [`gpuweb`gfx-rs#5226](gpuweb/gpuweb#5226)
…ture r=#webgpu-reviewers! Added to spec. with [gpuweb#5160](gpuweb/gpuweb#5160). Differential Revision: https://phabricator.services.mozilla.com/D260594
Tier 1 PRs for WebGPU spec.: [`gpuweb`gfx-rs#5213](gpuweb/gpuweb#5213) and [`gpuweb`gfx-rs#5160](gpuweb/gpuweb#5160). Tier 2 PR for WebGPU spec.: [`gpuweb`gfx-rs#5226](gpuweb/gpuweb#5226)
Supports below new texture formats with the
RENDER_ATTACHMENT,blendable,multisamplingcapabilities and theSTORAGE_BINDINGcapability with
read-onlyandwrite-onlystorage texture accesses:r16unormr16snormrg16unormrg16snormrgba16unormrgba16snormAllows the
RENDER_ATTACHMENT,blendable,multisamplingandresolvecapabilities on below texture formats:
r8snormrg8snormrgba8snormEnables the extension
rg11b10ufloat-renderable.Allows the
read-onlyandwrite-onlystorage texture accesses on below texture formats:r8unormr8snormr8uintr8sintrg8unormrg8snormrg8uintrg8sintr16uintr16sintr16floatrg16uintrg16sintrg16floatrgb10a2uintrgb10a2unormrg11b10ufloatIssue: #3838