diff options
author | Samson <16504129+sagudev@users.noreply.github.com> | 2023-09-14 15:23:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 13:23:12 +0000 |
commit | d22d97f8c8aef0082bd7508e184fd8a13b00db79 (patch) | |
tree | f30f8c9d229ae7eace66e091920947ac0a37531b /components/webgpu/lib.rs | |
parent | 6ea394a701ebd5985919f6ec6782120eef241661 (diff) | |
download | servo-d22d97f8c8aef0082bd7508e184fd8a13b00db79.tar.gz servo-d22d97f8c8aef0082bd7508e184fd8a13b00db79.zip |
Add GPUSupportedFeatures and update GPUSupportedLimits (#30359)
* GPUSupportedFeatures
* New supported limits
* Update expectations
Diffstat (limited to 'components/webgpu/lib.rs')
-rw-r--r-- | components/webgpu/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/webgpu/lib.rs b/components/webgpu/lib.rs index 443190fced7..3cab267c730 100644 --- a/components/webgpu/lib.rs +++ b/components/webgpu/lib.rs @@ -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()), })) { |