-
Notifications
You must be signed in to change notification settings - Fork 22.7k
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
Add information about undefined WebGPU limit values #38658
Conversation
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. |
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.
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")}};
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.
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`. |
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.
Nope. GPUSupportedLimits won't return unknown limits.
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.
OK, removed.
@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? |
@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. |
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