Skip to content
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 information about undefined WebGPU limit values #38658

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Mar 15, 2025

Description

Chrome 133 supports requesting WebGPU devices with unknown requiredLimits. See https://developer.chrome.com/blog/new-in-webgpu-133#allow_unknown_limits_to_be_requested_with_undefined_value for details.

This PR adds information about this.

Motivation

Additional details

Related issues and pull requests

Fixes #38366

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner March 15, 2025 16:11
@chrisdavidmills chrisdavidmills requested review from sideshowbarker and removed request for a team March 15, 2025 16:11
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Mar 15, 2025
Copy link
Contributor

github-actions bot commented Mar 15, 2025

Preview URLs

(comment last updated: 2025-03-17 10:19:46)

@@ -31,7 +31,7 @@ requestDevice(descriptor)
- `requiredFeatures` {{optional_inline}}
- : An array of strings representing additional functionality that you want supported by the returned {{domxref("GPUDevice")}}. The `requestDevice()` call will fail if the `GPUAdapter` cannot provide these features. See {{domxref("GPUSupportedFeatures")}} for a full list of possible features. This defaults to an empty array if no value is provided.
- `requiredLimits` {{optional_inline}}
- : An object containing properties representing the limits that you want supported by the returned {{domxref("GPUDevice")}}. The `requestDevice()` call will fail if the `GPUAdapter` cannot provide these limits. Each key must be the name of a member of {{domxref("GPUSupportedLimits")}}. This defaults to an empty object if no value is provided.
- : An object containing properties representing the limits that you want supported by the returned {{domxref("GPUDevice")}}. The `requestDevice()` call will fail if the `GPUAdapter` cannot provide these limits. Each key must be the name of a member of {{domxref("GPUSupportedLimits")}}; if the limit is unknown, a value of `undefined` is returned. The `requiredLimits` property returns an empty object if no value is provided.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Replace "Each key must be the name of a member of {{domxref("GPUSupportedLimits")}}; if the limit is unknown, a value of undefined is returned. The requiredLimits property returns an empty object if no value is provided." with the following:

Each key with a non-undefined value must be the name of a member of {{domxref("GPUSupportedLimits")}};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, done.

@@ -17,6 +17,8 @@ You should note that, rather than reporting the exact limits of each GPU, browse

Given that different browsers will handle this differently and the tier values may change over time, it is hard to provide an accurate account of what limit values to expect — thorough testing is advised.

If a limit is unknown, it will return a value of `undefined`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nope. GPUSupportedLimits won't return unknown limits.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, removed.

@chrisdavidmills
Copy link
Contributor Author

@beaufortfrancois I've made the change you suggested, but after doing that it feels to me like it doesn't really explain the point of the change. I've tried adding a note to explain the undefined thing, as I understand it. Does it make sense, or no?

@beaufortfrancois
Copy link
Contributor

@chrisdavidmills I don't see suggested changes in https://github.com/mdn/content/pull/38658/commits

@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Mar 17, 2025
@chrisdavidmills
Copy link
Contributor Author

@chrisdavidmills I don't see suggested changes in https://github.com/mdn/content/pull/38658/commits

@beaufortfrancois apologies. I forgot to push it. Fixed now.

@sideshowbarker sideshowbarker merged commit 1d6734e into mdn:main Mar 18, 2025
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/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WebGPU] Document Chrome 133 supported for undefined value for unknown limits
3 participants