Implement querying WGPUDeviceProperties from dawn_native::Adapter

This patch adds an interface GetAdapterProperties() on Adapter which can
directly return a WGPUDeviceProperties object that includes the
information of the adapter.

BUG=chromium:996713

Change-Id: I9a7b1512d259761e198dfac3eafa718171d47241
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13340
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Jiawei Shao
2019-11-13 01:53:25 +00:00
committed by Commit Bot service account
parent 604072bc2e
commit cfdbaaa376
6 changed files with 25 additions and 1 deletions

View File

@@ -61,6 +61,10 @@ namespace dawn_native {
return supportedExtensionsSet.GetEnabledExtensionNames();
}
WGPUDeviceProperties Adapter::GetAdapterProperties() const {
return mImpl->GetAdapterProperties();
}
Adapter::operator bool() const {
return mImpl != nullptr;
}