Intent to ship: WebGPU: Expose GPUAdapterInfo from GPUDevice

212 views
Skip to first unread message

François Beaufort

unread,
Nov 7, 2024, 12:52:59 AMNov 7
to blink-dev

Contact emails

fbea...@google.com


Explainer

It is important for libraries that take user-provided GPUDevice objects to access information about the physical GPU, as they may need to optimize or implement workarounds based on the GPU architecture. While it is possible to access this information through the GPUAdapter object, there is no direct way to get it from a GPUDevice alone. This can be inconvenient, as it may require users to provide additional information alongside the GPUDevice.
To address this problem, we expose GPUAdapterInfo through the GPUDevice adapterInfo attribute. Those are similar to the existing GPUAdapter info attribute.
https://github.com/gpuweb/gpuweb/pull/4809


Specification

https://www.w3.org/TR/webgpu/#dom-gpudevice-adapterinfo


Summary

Functionality added to the WebGPU spec after its first shipment in a browser.

The GPUDevice adapterInfo attribute exposes the same GPUAdapterInfo as the GPUAdapter object..


Blink component

Blink>WebGPU


TAG review

None


TAG review status

Not applicable


Risks



Interoperability and Compatibility

This feature has not yet been implemented in any browser. It has been approved by the GPU for the Web Community Group, with representatives from Chrome, Firefox, and Safari. See minutes at https://docs.google.com/document/d/1FlVeiqRzx5t-9z03Ocx7_gw-lPpysUaw_83xofJyxQQ/edit and https://github.com/gpuweb/gpuweb/pull/4809


Gecko: No signal (Mozilla members have requested during weekly standardization meetings that we postpone filing standard positions until we reach Candidate Recommendation (CR) status in Q4.)


WebKit: Positive (https://github.com/WebKit/standards-positions/issues/294#issuecomment-1877411933)


Web developers: Positive (https://github.com/gpuweb/gpuweb/issues/4810)


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



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

No

All platforms will eventually have support. Will immediately be available on Android, Android WebView, ChromeOS, Mac, and Windows, since those platforms already support WebGPU. Linux is planned to have WebGPU support in the future, so this feature will become available when WebGPU does.


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

Yes

WebGPU/WGSL have a conformance test suite (https://github.com/gpuweb/cts) that is regularly pulled into Chromium and part of the testing of Dawn/Tint in Chromium. While the CTS can be embedded in WPT, the WebGPU team opted to keep it separate in Chromium testing to use a customized harness for robustness and performance. All the tests about this feature in WebGPU CTS can be found through the below link: https://github.com/gpuweb/cts/pull/4023


Flag name on chrome://flags

chrome://flags/#enable-unsafe-webgpu


Finch feature name

WebGPUDeviceAdapterInfo


Requires code in //chrome?

False


Tracking bug

https://issues.chromium.org/issues/376600838


Estimated milestones

DevTrial on desktop

132


DevTrial  on Android

132





Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6221851301511168?gate=6054578968330240



This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Nov 7, 2024, 10:39:03 AMNov 7
to François Beaufort, blink-dev

LGTM1

On 11/7/24 12:52 AM, 'François Beaufort' via blink-dev wrote:

Contact emails

fbea...@google.com


Explainer

It is important for libraries that take user-provided GPUDevice objects to access information about the physical GPU, as they may need to optimize or implement workarounds based on the GPU architecture. While it is possible to access this information through the GPUAdapter object, there is no direct way to get it from a GPUDevice alone. This can be inconvenient, as it may require users to provide additional information alongside the GPUDevice.
To address this problem, we expose GPUAdapterInfo through the GPUDevice adapterInfo attribute. Those are similar to the existing GPUAdapter info attribute.
https://github.com/gpuweb/gpuweb/pull/4809


Specification

https://www.w3.org/TR/webgpu/#dom-gpudevice-adapterinfo


Summary

Functionality added to the WebGPU spec after its first shipment in a browser.

The GPUDevice adapterInfo attribute exposes the same GPUAdapterInfo as the GPUAdapter object..


Blink component

Blink>WebGPU


TAG review

None


TAG review status

Not applicable

Maybe useful in the future to give a rationale for why this isn't needed. Something like "Small change where we're exposing info that's already available to another interface".
--
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 visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPpwU5LW-1pCayKc9uUfXHRibCfg8LZQ3s8irHxZbwSmAGT6MQ%40mail.gmail.com.

Rick Byers

unread,
Nov 8, 2024, 4:11:47 PMNov 8
to Mike Taylor, François Beaufort, blink-dev

Yoav Weiss (@Shopify)

unread,
Nov 9, 2024, 1:43:14 AMNov 9
to blink-dev, Rick Byers, François Beaufort, blink-dev, Mike Taylor
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@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+unsubscribe@chromium.org.
Reply all
Reply to author
Forward
0 new messages