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

Compat: remove GPUAdapter.featureLevel #5037

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

Closed
wants to merge 3 commits into from

Conversation

kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Jan 7, 2025

DRAFT!! - Depends on #5036, skip first two commits, see third: 665cbb8

This is a proposal.

Issue: #4266, #4987, #5012 (comment)
(Together with #5036, subsumes old PR #4898)

@kainino0x
Copy link
Contributor Author

One use of isCompatibilityMode today is in the getDefaultLimitsForAdapter helper function in the CTS. We'll need to figure out if there's a good alternative that doesn't require it.

@greggman
Copy link
Contributor

greggman commented Jan 7, 2025

IIRC the CTS assumes if you pass in the "compatibility" flag to the CTS, then it requests compat adapters and expects it got compat adapters. It doesn't check the adapter itself. It just assumes via globalTestConfig.compatibility

I'm not sure that can really change. The CTS needs to test devices that are actually running in compatibility mode.

@greggman
Copy link
Contributor

greggman commented Jan 7, 2025

ps: if that wasn't clear. I meant to say that getDefaultAdapterLimits is effectively passed globalTestConfig.compatibility, not any info from the adapter.

@greggman
Copy link
Contributor

greggman commented Jan 7, 2025

And, I'm wrong. I guess I don't remember this part of the code 😅

@kainino0x
Copy link
Contributor Author

Np, but maybe we can change it to use that strategy instead. Depends on exactly how we use that helper function.

@kainino0x kainino0x added the compat WebGPU Compatibility Mode label Jan 13, 2025
@kainino0x
Copy link
Contributor Author

For the record, linking related point: #5012 (comment)

I strongly feel that items should only be in GPUAdapterInfo if they also apply to the device, because we expose device.adapterInfo. That's true of vendor/etc., and of isFallbackAdapter (so indeed it probably should be duplicated there), but not features/limits. Similarly it is not necessarily true of featureLevel, because whether the device is "compatibility mode" depends on what features/limits are enabled on it. This is another reason I don't really think we should expose something like adapter.isCompatibilityMode/adapter.featureLevel and should instead expose it via the features system. Example:

@Kangz
Copy link
Contributor

Kangz commented Jan 27, 2025

@kainino0x
Copy link
Contributor Author

I'm going to flatten this into #5036 while updating it, since the WG discussed all together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat WebGPU Compatibility Mode proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants