Intent to Prototype: WGSLLanguageFeatures for WebGPU

235 views
Skip to first unread message

Loko Kung

unread,
Apr 26, 2023, 12:32:32 PM4/26/23
to blin...@chromium.org, Austin Eng, Kai Ninomiya

Contact emails

loko...@google.com

Explainer

None

Specification

https://www.w3.org/TR/webgpu/#gpuwgsllanguagefeatures

Summary

Adds the `wgslLanguageFeatures` getter on the GPU object for WebGPU, and its corresponding `WGSLLanguageFeatures` type.



Blink component

Blink>WebGPU

Motivation

None



Initial public proposal

None

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No

Flag name

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5149681044160512

Links to previous Intent discussions



This intent message was generated by Chrome Platform Status.

Loko Kung

unread,
Apr 26, 2023, 2:42:53 PM4/26/23
to blin...@chromium.org, Austin Eng, Kai Ninomiya
Ah, sorry for the misleading title. This is actually an Intent to Ship! Let me know if I should resend with the Intent to Ship template!

Mike Taylor

unread,
Apr 26, 2023, 3:36:27 PM4/26/23
to Loko Kung, blin...@chromium.org, Austin Eng, Kai Ninomiya

All good - I've flagged it in our chromestatus tool so it doesn't fall off our radar.

(and updating the email title just in case)

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFAqEFgYDScKjvWYshaEDHKUhu_nRQg2EZsBQbAz94mLvUVxVg%40mail.gmail.com.

Caleb Raitto

unread,
May 2, 2023, 11:33:16 AM5/2/23
to blink-dev, Mike Taylor, Austin Eng, kai...@google.com, Loko Kung
Are these language extensions specific to certain GPUs (could this be used to fingerprint the GPU)? Or are the language extensions something that some browsers will implement, but others won't?

Thanks, 
-Caleb

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Ken Russell

unread,
May 2, 2023, 12:55:01 PM5/2/23
to Caleb Raitto, blink-dev, Mike Taylor, Austin Eng, kai...@google.com, Loko Kung
These are essentially GPU-independent, syntactic-sugar-like, language extensions that it's expected all browsers will eventually implement. Since browser updates roll out at different times, it's important that the application be able to query their support status so they can know which versions of shaders to serve up to clients - or to generate at run time.

-Ken



To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e796dd7e-4df4-4351-96f7-63db70b2aa6en%40chromium.org.

Caleb Raitto

unread,
May 2, 2023, 12:56:43 PM5/2/23
to Ken Russell, blink-dev, Mike Taylor, Austin Eng, kai...@google.com, Loko Kung
Thanks, I thought so, but wanted to confirm :)

-Caleb

Ken Russell

unread,
May 2, 2023, 6:04:53 PM5/2/23
to Caleb Raitto, blink-dev, Mike Taylor, Austin Eng, kai...@google.com, Loko Kung
Could more Blink owners please provide their input? This is a feature the WebGPU CG has standardized, and we would like to get it in our implementation ASAP so the associated tests can start running correctly in Chrome.

Thanks,

-Ken


Yoav Weiss

unread,
May 3, 2023, 1:42:12 AM5/3/23
to Ken Russell, Caleb Raitto, blink-dev, Mike Taylor, Austin Eng, kai...@google.com, Loko Kung
On Wed, May 3, 2023 at 12:04 AM Ken Russell <k...@chromium.org> wrote:
Could more Blink owners please provide their input? This is a feature the WebGPU CG has standardized, and we would like to get it in our implementation ASAP so the associated tests can start running correctly in Chrome.

Thanks,

-Ken



On Tue, May 2, 2023 at 9:56 AM Caleb Raitto <cara...@chromium.org> wrote:
Thanks, I thought so, but wanted to confirm :)

-Caleb

On Tue, May 2, 2023 at 12:54 PM Ken Russell <k...@chromium.org> wrote:
These are essentially GPU-independent, syntactic-sugar-like, language extensions that it's expected all browsers will eventually implement. Since browser updates roll out at different times, it's important that the application be able to query their support status so they can know which versions of shaders to serve up to clients - or to generate at run time.

-Ken



On Tue, May 2, 2023 at 8:33 AM Caleb Raitto <cara...@chromium.org> wrote:
Are these language extensions specific to certain GPUs (could this be used to fingerprint the GPU)? Or are the language extensions something that some browsers will implement, but others won't?

Thanks, 
-Caleb

On Wednesday, April 26, 2023 at 3:36:27 PM UTC-4 Mike Taylor wrote:

All good - I've flagged it in our chromestatus tool so it doesn't fall off our radar.

(and updating the email title just in case)

On 4/26/23 2:42 PM, 'Loko Kung' via blink-dev wrote:
Ah, sorry for the misleading title. This is actually an Intent to Ship! Let me know if I should resend with the Intent to Ship template!

On Tue, Apr 25, 2023 at 8:07 PM Loko Kung <loko...@google.com> wrote:

Contact emails

loko...@google.com

Explainer

None

An explainer (even a short, inline one) would be extremely helpful when reviewing this. As is, it's not immediately clear to me what are we adding here, what are the use cases this addresses and how are developers supposed to use it?


Specification

https://www.w3.org/TR/webgpu/#gpuwgsllanguagefeatures

Summary

Adds the `wgslLanguageFeatures` getter on the GPU object for WebGPU, and its corresponding `WGSLLanguageFeatures` type.



Blink component

Blink>WebGPU

Motivation

None



Initial public proposal

None

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Can y'all ask for a signal? https://bit.ly/blink-signals 

Web developers: No signals

Is there developer demand for this? I see a lot of excitement about WebGPU in general on the internets. Would it be hard to gauge excitement for this in particular?


Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No
Would it be? If not, why not? 


Flag name

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5149681044160512

Links to previous Intent discussions



This intent message was generated by Chrome Platform Status.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFAqEFgYDScKjvWYshaEDHKUhu_nRQg2EZsBQbAz94mLvUVxVg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e796dd7e-4df4-4351-96f7-63db70b2aa6en%40chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Kai Ninomiya

unread,
May 3, 2023, 3:22:49 PM5/3/23
to Yoav Weiss, Ken Russell, Caleb Raitto, blink-dev, Mike Taylor, Austin Eng, Loko Kung
Thank you for the questions, replies inline!

I actually ran into the same problem when I filed an I2S recently with a lot of gaps in the generated email. The chromestatus tool hides most of the fields used to generate emails behind various stages of shipment, which makes it hard to set them correctly for I2E/I2S (I had to use "edit all fields" to find them). It also defaults to rarely-correct values like "no signals" and "no tests".

We're adding a mechanism for feature detection of new language features added to WGSL (WebGPU Shading Language). Since that's a language and not a JS API, we needed a feature detection mechanism better than "try to compile a shader and (asynchronously) find out if it failed".

At this time no such language features have been added yet (but we know they will be). 


Specification

https://www.w3.org/TR/webgpu/#gpuwgsllanguagefeatures

Summary

Adds the `wgslLanguageFeatures` getter on the GPU object for WebGPU, and its corresponding `WGSLLanguageFeatures` type.



Blink component

Blink>WebGPU

Motivation

None



Initial public proposal

None

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Can y'all ask for a signal? https://bit.ly/blink-signals 


Web developers: No signals

Is there developer demand for this? I see a lot of excitement about WebGPU in general on the internets. Would it be hard to gauge excitement for this in particular?

There is no developer demand yet because we have not added any language features yet. Once we start adding them, it'll be necessary for feature detection. 

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Is this feature fully tested by web-platform-tests?

No
Would it be? If not, why not? 
It will be tested by the WebGPU conformance test suite which is developed separately from WPT. https://github.com/gpuweb/cts


Flag name

None

Requires code in //chrome?

False

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5149681044160512

Links to previous Intent discussions



This intent message was generated by Chrome Platform Status.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFAqEFgYDScKjvWYshaEDHKUhu_nRQg2EZsBQbAz94mLvUVxVg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e796dd7e-4df4-4351-96f7-63db70b2aa6en%40chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAMYvS2d9meRdbmiHTorZ1ksWPqjsyrVe3ZcopzKTs98n%2Bv7Q_Q%40mail.gmail.com.

-Kai (he/they)

Loko Kung

unread,
May 3, 2023, 3:52:17 PM5/3/23
to Kai Ninomiya, Yoav Weiss, Ken Russell, Caleb Raitto, blink-dev, Mike Taylor, Austin Eng
Thanks Kai for replying! To add on top of that:

For the signals: Positive

For the web-platform-tests, on top of the CTS Kai mentioned, the change in https://chromium-review.googlesource.com/c/chromium/src/+/4471680 already adds the bare-bones testing for the new field.

Yoav Weiss

unread,
May 9, 2023, 10:31:33 AM5/9/23
to Loko Kung, Jason Robbins, Kai Ninomiya, Ken Russell, Caleb Raitto, blink-dev, Mike Taylor, Austin Eng
LGTM1

On Wed, May 3, 2023 at 9:52 PM Loko Kung <loko...@google.com> wrote:

\o/
 


For the web-platform-tests, on top of the CTS Kai mentioned, the change in https://chromium-review.googlesource.com/c/chromium/src/+/4471680 already adds the bare-bones testing for the new field.

On Wed, May 3, 2023 at 12:22 PM Kai Ninomiya <kai...@chromium.org> wrote:
Thank you for the questions, replies inline!

I actually ran into the same problem when I filed an I2S recently with a lot of gaps in the generated email. The chromestatus tool hides most of the fields used to generate emails behind various stages of shipment, which makes it hard to set them correctly for I2E/I2S (I had to use "edit all fields" to find them). It also defaults to rarely-correct values like "no signals" and "no tests".

Thanks! That helps significantly :) 


Specification

https://www.w3.org/TR/webgpu/#gpuwgsllanguagefeatures

Summary

Adds the `wgslLanguageFeatures` getter on the GPU object for WebGPU, and its corresponding `WGSLLanguageFeatures` type.



Blink component

Blink>WebGPU

Motivation

None



Initial public proposal

None

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

None



Gecko: No signal

WebKit: No signal

Can y'all ask for a signal? https://bit.ly/blink-signals 

The API was collaboratively designed and approved by the W3C community group with approval from Mozilla/Apple. Is that sufficient?

Official position requests (provided above) are better! :) But great to see everyone's positive on this!!

Loko Kung

unread,
May 9, 2023, 7:10:45 PM5/9/23
to blink-dev, Yoav Weiss, Kai Ninomiya, Ken Russell, Caleb Raitto, blink-dev, Mike Taylor, Austin Eng, Loko Kung, Jason Robbins
Thanks Yoav for taking a look! Bumping this again since M115 branch point is coming soon (May 23) and we still need 2 more LGTMs before I can land the changes!

Mike West

unread,
May 10, 2023, 5:39:38 AM5/10/23
to Loko Kung, blink-dev, Yoav Weiss, Kai Ninomiya, Ken Russell, Caleb Raitto, Mike Taylor, Austin Eng, Jason Robbins

Daniel Bratell

unread,
May 10, 2023, 11:12:31 AM5/10/23
to Mike West, Loko Kung, blink-dev, Yoav Weiss, Kai Ninomiya, Ken Russell, Caleb Raitto, Mike Taylor, Austin Eng, Jason Robbins
Reply all
Reply to author
Forward
0 new messages