Remove "extension"

Now that Chrome uses [1] "feature" instead of "extension", this CL
removes all occurrences of "extension".

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3205514

Change-Id: Ibbaaf5d6e99be62453604c71d8110eea9820c803
Bug: dawn:1149
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65900
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
François Beaufort 2021-10-12 13:21:56 +00:00 committed by Dawn LUCI CQ
parent 6fd28ba4cb
commit a4c8c8d5bf
6 changed files with 1 additions and 25 deletions

View File

@ -1021,7 +1021,6 @@
"category": "structure", "category": "structure",
"extensible": false, "extensible": false,
"tags": ["dawn"], "tags": ["dawn"],
"_comment": "TODO(dawn:1149): remove 'invalid extension' once it's no longer used.",
"members": [ "members": [
{"name": "device ID", "type": "uint32_t"}, {"name": "device ID", "type": "uint32_t"},
{"name": "vendor ID", "type": "uint32_t"}, {"name": "vendor ID", "type": "uint32_t"},
@ -1033,7 +1032,6 @@
{"name": "timestamp query", "type": "bool", "default": "false"}, {"name": "timestamp query", "type": "bool", "default": "false"},
{"name": "multi planar formats", "type": "bool", "default": "false"}, {"name": "multi planar formats", "type": "bool", "default": "false"},
{"name": "depth clamping", "type": "bool", "default": "false"}, {"name": "depth clamping", "type": "bool", "default": "false"},
{"name": "invalid extension", "type": "bool", "default": "false"},
{"name": "invalid feature", "type": "bool", "default": "false"}, {"name": "invalid feature", "type": "bool", "default": "false"},
{"name": "dawn internal usages", "type": "bool", "default": "false"}, {"name": "dawn internal usages", "type": "bool", "default": "false"},
{"name": "limits", "type": "supported limits"} {"name": "limits", "type": "supported limits"}

View File

@ -121,14 +121,6 @@ namespace dawn_native {
MaybeError AdapterBase::CreateDeviceInternal(DeviceBase** result, MaybeError AdapterBase::CreateDeviceInternal(DeviceBase** result,
const DeviceDescriptor* descriptor) { const DeviceDescriptor* descriptor) {
if (descriptor != nullptr) { if (descriptor != nullptr) {
// TODO(dawn:1149): remove once requiredExtensions is no longer used.
for (const char* extensionStr : descriptor->requiredExtensions) {
Feature extensionEnum = mInstance->FeatureNameToEnum(extensionStr);
DAWN_INVALID_IF(extensionEnum == Feature::InvalidEnum,
"Requested feature %s is unknown.", extensionStr);
DAWN_INVALID_IF(!mSupportedFeatures.IsEnabled(extensionEnum),
"Requested feature %s is disabled.", extensionStr);
}
for (const char* featureStr : descriptor->requiredFeatures) { for (const char* featureStr : descriptor->requiredFeatures) {
Feature featureEnum = mInstance->FeatureNameToEnum(featureStr); Feature featureEnum = mInstance->FeatureNameToEnum(featureStr);
DAWN_INVALID_IF(featureEnum == Feature::InvalidEnum, DAWN_INVALID_IF(featureEnum == Feature::InvalidEnum,

View File

@ -100,11 +100,6 @@ namespace dawn_native {
return mImpl->GetPCIInfo(); return mImpl->GetPCIInfo();
} }
// TODO(dawn:1149): remove once GetSupportedExtensions() is no longer used.
std::vector<const char*> Adapter::GetSupportedExtensions() const {
return GetSupportedFeatures();
}
std::vector<const char*> Adapter::GetSupportedFeatures() const { std::vector<const char*> Adapter::GetSupportedFeatures() const {
FeaturesSet supportedFeaturesSet = mImpl->GetSupportedFeatures(); FeaturesSet supportedFeaturesSet = mImpl->GetSupportedFeatures();
return supportedFeaturesSet.GetEnabledFeatureNames(); return supportedFeaturesSet.GetEnabledFeatureNames();

View File

@ -1051,13 +1051,8 @@ namespace dawn_native {
void DeviceBase::ApplyFeatures(const DeviceDescriptor* deviceDescriptor) { void DeviceBase::ApplyFeatures(const DeviceDescriptor* deviceDescriptor) {
ASSERT(deviceDescriptor); ASSERT(deviceDescriptor);
// TODO(dawn:1149): remove once requiredExtensions is no longer used.
ASSERT(GetAdapter()->SupportsAllRequestedFeatures(deviceDescriptor->requiredExtensions));
ASSERT(GetAdapter()->SupportsAllRequestedFeatures(deviceDescriptor->requiredFeatures)); ASSERT(GetAdapter()->SupportsAllRequestedFeatures(deviceDescriptor->requiredFeatures));
// TODO(dawn:1149): remove once requiredExtensions is no longer used.
mEnabledExtensions = GetAdapter()->GetInstance()->FeatureNamesToFeaturesSet(
deviceDescriptor->requiredExtensions);
mEnabledFeatures = GetAdapter()->GetInstance()->FeatureNamesToFeaturesSet( mEnabledFeatures = GetAdapter()->GetInstance()->FeatureNamesToFeaturesSet(
deviceDescriptor->requiredFeatures); deviceDescriptor->requiredFeatures);
} }
@ -1067,8 +1062,7 @@ namespace dawn_native {
} }
bool DeviceBase::IsFeatureEnabled(Feature feature) const { bool DeviceBase::IsFeatureEnabled(Feature feature) const {
// TODO(dawn:1149): remove mEnabledExtensions once it is no longer used. return mEnabledFeatures.IsEnabled(feature);
return mEnabledFeatures.IsEnabled(feature) || mEnabledExtensions.IsEnabled(feature);
} }
bool DeviceBase::IsValidationEnabled() const { bool DeviceBase::IsValidationEnabled() const {

View File

@ -510,7 +510,6 @@ namespace dawn_native {
std::atomic_uint64_t mNextPipelineCompatibilityToken; std::atomic_uint64_t mNextPipelineCompatibilityToken;
CombinedLimits mLimits; CombinedLimits mLimits;
FeaturesSet mEnabledExtensions;
FeaturesSet mEnabledFeatures; FeaturesSet mEnabledFeatures;
std::unique_ptr<InternalPipelineStore> mInternalPipelineStore; std::unique_ptr<InternalPipelineStore> mInternalPipelineStore;

View File

@ -63,8 +63,6 @@ namespace dawn_native {
// An optional parameter of Adapter::CreateDevice() to send additional information when creating // An optional parameter of Adapter::CreateDevice() to send additional information when creating
// a Device. For example, we can use it to enable a workaround, optimization or feature. // a Device. For example, we can use it to enable a workaround, optimization or feature.
struct DAWN_NATIVE_EXPORT DeviceDescriptor { struct DAWN_NATIVE_EXPORT DeviceDescriptor {
// TODO(dawn:1149): remove once requiredExtensions is no longer used.
std::vector<const char*> requiredExtensions;
std::vector<const char*> requiredFeatures; std::vector<const char*> requiredFeatures;
std::vector<const char*> forceEnabledToggles; std::vector<const char*> forceEnabledToggles;
std::vector<const char*> forceDisabledToggles; std::vector<const char*> forceDisabledToggles;