Use wgpu::Adapter methods to get info in gpu info collector
This CL uses wgpu::Adapter methods instead of dawn::native::Adapter methods to get info. Bug: 347047627 Change-Id: Ia7c4a4b15466df013332e09882a62c43d15d7d5a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5952855 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1373040}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
81c84c0838
commit
3153f4d727
@ -313,9 +313,10 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance* instance) {
|
||||
#endif
|
||||
|
||||
bool supports_shader_f16 = false;
|
||||
for (dawn::native::Adapter& adapter :
|
||||
for (dawn::native::Adapter& nativeAdapter :
|
||||
instance->EnumerateAdapters(&adapter_options)) {
|
||||
adapter.SetUseTieredLimits(false);
|
||||
nativeAdapter.SetUseTieredLimits(false);
|
||||
wgpu::Adapter adapter = wgpu::Adapter(nativeAdapter.Get());
|
||||
wgpu::AdapterInfo info;
|
||||
adapter.GetInfo(&info);
|
||||
if (info.adapterType != wgpu::AdapterType::DiscreteGPU &&
|
||||
@ -324,7 +325,7 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance* instance) {
|
||||
continue;
|
||||
}
|
||||
|
||||
WGPUSupportedLimits limits;
|
||||
wgpu::SupportedLimits limits;
|
||||
limits.nextInChain = nullptr;
|
||||
if (adapter.GetLimits(&limits) != wgpu::Status::Success) {
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user