Add GPUSupportedFeatures and update GPUSupportedLimits (#30359)

* GPUSupportedFeatures

* New supported limits

* Update expectations
This commit is contained in:
Samson 2023-09-14 15:23:12 +02:00 committed by GitHub
parent 6ea394a701
commit d22d97f8c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 243 additions and 17058 deletions

View file

@ -58,6 +58,7 @@ pub enum WebGPUResponse {
RequestAdapter {
adapter_info: wgt::AdapterInfo,
adapter_id: WebGPUAdapter,
features: wgt::Features,
limits: wgt::Limits,
channel: WebGPU,
},
@ -892,13 +893,17 @@ impl<'a> WGPU<'a> {
let adapter = WebGPUAdapter(adapter_id);
self.adapters.push(adapter);
let global = &self.global;
// TODO: can we do this lazily
let info =
gfx_select!(adapter_id => global.adapter_get_info(adapter_id)).unwrap();
let limits =
gfx_select!(adapter_id => global.adapter_limits(adapter_id)).unwrap();
let features =
gfx_select!(adapter_id => global.adapter_features(adapter_id)).unwrap();
if let Err(e) = sender.send(Ok(WebGPUResponse::RequestAdapter {
adapter_info: info,
adapter_id: adapter,
features,
limits,
channel: WebGPU(self.sender.clone()),
})) {