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

Conversation

@kainino0x
Copy link
Contributor

This provides a dictionary member that can be used for feature level requests in the future. It currently does not accept any value; the only thing it does is make sure that if anything is passed to featureLevel, we know not to ignore it. This is the appropriate behavior for a browser to have before it adds support for any other feature levels.

Proposing this for M0 to set up the API surface.

It has type any so that it requestAdapter() can return null (rather than rejecting) regardless of what types we end up using to describe feature levels in the future. This is to make it consistent with the future case where the browser does understand the feature level but the hardware doesn't support it (which probably should return null - the request was OK but there was no adapter to return).

This is planned to be used for Compat mode, likely simply by accepting a string value, e.g. "compat" (% bikeshedding).

Issue: #4656

This provides a dictionary member that can be used for feature level
requests in the future. It currently does not accept any value; the only
thing it does is make sure that _if_ a feature level is requested, it
can be rejected. This is the appropriate behavior for a browser to have
before it adds support for any other feature levels.

It has type `any` so that it `requestAdapter()` can return `null`
(rather than rejecting) regardless of how we end up phrasing feature
levels in the future.

This is planned to be used for Compat mode, likely simply by accepting a
string value of `"compat"`.

Issue: 4656
@kainino0x kainino0x added proposal api WebGPU API labels Sep 10, 2024
@kainino0x kainino0x added this to the Milestone 0 milestone Sep 10, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Sep 10, 2024

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

@beaufortfrancois
Copy link
Contributor

I might be overthinking this, but using the word "feature" for featureLevel could potentially cause confusion with adapter.features. Would it be better to use a different term like tierLevel or capabilityLevel?

@kainino0x
Copy link
Contributor Author

You're right, I even made that comment myself on the last PR and totally forgot about it.

@kainino0x kainino0x marked this pull request as ready for review September 11, 2024 19:59
@kainino0x kainino0x added the api resolved Resolved - waiting for a change to the API specification label Sep 11, 2024
@kainino0x
Copy link
Contributor Author

Reverted to featureLevel per preferences in the WG meeting.

@kainino0x kainino0x requested a review from toji September 11, 2024 20:03
@kainino0x
Copy link
Contributor Author

Oh, I should update the compat proposal doc too.

@kainino0x kainino0x marked this pull request as draft September 11, 2024 20:03
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 as a first step.

@mwyrzykowski mwyrzykowski self-requested a review September 11, 2024 20:16
@kainino0x kainino0x marked this pull request as ready for review September 11, 2024 21:12
@kainino0x
Copy link
Contributor Author

Actually I'm going to update the compat proposal separately because the change is nontrivial.

@kainino0x kainino0x merged commit 4028098 into gpuweb:main Sep 11, 2024
@kainino0x kainino0x deleted the feature-levels-minimal branch September 11, 2024 22:12
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 proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants