Simplify BackendBinding following adapters.

It doesn't need to care about device creation anymore, except for the
GLFW window hints and creating a GL context to discover the adapter.

Also remove the non-adapter GetPCIInfo.

BUG=dawn:29

Change-Id: I9bc8232536a55d2f973463ae0f2e0548dfc35456
Reviewed-on: https://dawn-review.googlesource.com/c/4381
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez
2019-02-12 15:48:15 +00:00
committed by Commit Bot service account
parent 5987c4e839
commit bb5696bcd3
14 changed files with 139 additions and 170 deletions

View File

@@ -26,11 +26,6 @@ namespace dawn_native {
return GetProcsAutogen();
}
const PCIInfo& GetPCIInfo(dawnDevice device) {
DeviceBase* deviceBase = reinterpret_cast<DeviceBase*>(device);
return deviceBase->GetPCIInfo();
}
// Adapter
Adapter::Adapter() = default;
@@ -50,6 +45,10 @@ namespace dawn_native {
return mImpl->GetPCIInfo();
}
Adapter::operator bool() const {
return mImpl != nullptr;
}
dawnDevice Adapter::CreateDevice() {
return reinterpret_cast<dawnDevice>(mImpl->CreateDevice());
}