Support BC formats as the first extension in Dawn

This patch refactors the current implementation of BC formats to treat
it as the first extension in Dawn and adds all the related tests.

Note that in Dawn all the extensions are disabled unless we enable them
when we create the device, which means the BC formats can only be used
when we enable the related extension on the creation of the device, and
the creation of the device will fail if the adapter does not support the
extension

BUG=dawn:42
TEST=dawn_end2end_tests
TEST=dawn_unittests

Change-Id: I04d818b0218ebb3b1b7a70a4fea71779f308f85f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9520
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Jiawei Shao
2019-08-02 00:06:38 +00:00
committed by Commit Bot service account
parent 56f3a7b90d
commit 574b951188
28 changed files with 566 additions and 43 deletions

View File

@@ -86,6 +86,19 @@ namespace dawn_native {
return mTogglesInfo.ToggleNameToEnum(toggleName);
}
const ExtensionInfo* InstanceBase::GetExtensionInfo(const char* extensionName) {
return mExtensionsInfo.GetExtensionInfo(extensionName);
}
Extension InstanceBase::ExtensionNameToEnum(const char* extensionName) {
return mExtensionsInfo.ExtensionNameToEnum(extensionName);
}
ExtensionsSet InstanceBase::ExtensionNamesToExtensionsSet(
const std::vector<const char*>& requiredExtensions) {
return mExtensionsInfo.ExtensionNamesToExtensionsSet(requiredExtensions);
}
const std::vector<std::unique_ptr<AdapterBase>>& InstanceBase::GetAdapters() const {
return mAdapters;
}