-
Notifications
You must be signed in to change notification settings - Fork 45
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
API to enumerate adapters #233
Comments
Some ideas which could be combined or used separately One-by-one enumerationEnumerateStatus EnumerateAdapters(const wgpu::RequestAdapterOptions& options, uint32_t index, wgpu::Adapter* adapterOut) Returns This lets the application enumerate things one-by-one so it could stop enumerating when it finds an adapter it is happy with. This way you don't need to make ALL the adapters on ALL the GPUs. One interesting bit here is that the implementation needs to maintain some kind of stable ordering of the adapters to use indices in this way. Add some intermediate objectAdd an intermediate object that you get before the adapter. It will only tell you more limited information like vendorId/deviceId. But not things like driver description or name (because we want to avoid loading the driver). Maybe we can expose everything that the Adapter has here, but it would be behind methods like RequestSupportedLimits or RequestSupportedFeatures so it's more clear this could be expensive-ish. The implementation would request lazily. Make all the adapter information a "request"RequestLimits instead of GetLimits, RequestFeatures instead of EnumerateFeatures, RequestProperties instead of GetProperties, etc. |
Removing non-breaking label because some of these things would be breaking changes. |
webgpu.h meeting (nov 2):
|
Raised by @rajveermalviya.
In WASM this can always return 0 or 1 adapters. In native this could return more.
meeting notes:
The text was updated successfully, but these errors were encountered: