这是indexloc提供的服务,不要输入任何密码
Skip to content

Allow unknown limits to be requested with value undefined #4781

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

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Jul 25, 2024

Proposal. Accepted!

This is useful for application code like this:

{ requiredLimits: { someLimit: adapter.limits.someLimit } }

when adapter.limits.someLimit is undefined due to situations such as:

Copy link
Contributor

github-actions bot commented Jul 25, 2024

Previews, as seen when this build job started (3039572):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@kainino0x kainino0x added this to the Milestone 0 milestone Jul 25, 2024
@kainino0x kainino0x added proposal api WebGPU API labels Jul 25, 2024
This is useful for application code like this:

`{ requiredLimits: { someLimit: adapter.limits.someLimit } }`

in several situations:

- A limit was removed (gpuweb#4688)
- A limit exists in one browser, but another browser doesn't know about it
  (though it provides very limited protection against this)
- Possibly, depending on future designs:
  a limit is part of a feature, and the feature isn't available (gpuweb#4613)
@kainino0x kainino0x marked this pull request as ready for review July 27, 2024 06:44
@kainino0x kainino0x added api resolved Resolved - waiting for a change to the API specification and removed proposal labels Aug 28, 2024
@kainino0x kainino0x requested a review from toji August 28, 2024 20:56
Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

LGTM! I think this is a good move for making the API less brittle as it evolves.

@kainino0x kainino0x merged commit b205c45 into gpuweb:main Aug 28, 2024
4 checks passed
@kainino0x kainino0x deleted the limit-undefined branch August 28, 2024 21:14
juj added a commit to juj/wasm_webgpu that referenced this pull request Sep 6, 2024
copybara-service bot pushed a commit to google/dawn that referenced this pull request Sep 18, 2024
gpuweb/gpuweb@23db3e4...2dc56f2

 * Handle device limits being undefined
   * gpuweb/gpuweb#4781
 * Remove the maxInterStageShaderComponents limit
   * gpuweb/gpuweb#4783

Bug: 368022291
Change-Id: I548a1c2e841aa40feb0234214a9dc75289ffcb13
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/207095
Commit-Queue: Geoff Lang <geofflang@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
@kainino0x kainino0x added the needs-cts-issue This change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet label Sep 24, 2024
kainino0x pushed a commit to gpuweb/cts that referenced this pull request Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api resolved Resolved - waiting for a change to the API specification api WebGPU API needs-cts-issue This change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants