Remove support for snake_case wgpu::Features.
Chromium has been updated so the fallback is no longer needed. Bug: dawn:550 Change-Id: I25b054617fc054926e0eb850229f244ddc51bb61 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100470 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
5fee3f93aa
commit
7143450998
|
@ -233,23 +233,6 @@ Feature FeaturesInfo::FeatureNameToEnum(const char* featureName) const {
|
||||||
if (iter != mFeatureNameToEnumMap.cend()) {
|
if (iter != mFeatureNameToEnumMap.cend()) {
|
||||||
return kFeatureNameAndInfoList[static_cast<size_t>(iter->second)].feature;
|
return kFeatureNameAndInfoList[static_cast<size_t>(iter->second)].feature;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(dawn:550): Remove this fallback logic when Chromium is updated.
|
|
||||||
constexpr std::array<std::pair<const char*, const char*>, 6> kReplacementsForDeprecatedNames = {
|
|
||||||
{
|
|
||||||
{"texture_compression_bc", "texture-compression-bc"},
|
|
||||||
{"depth_clamping", "depth-clamping"},
|
|
||||||
{"pipeline_statistics_query", "pipeline-statistics-query"},
|
|
||||||
{"shader_float16", "shader-float16"},
|
|
||||||
{"timestamp_query", "timestamp-query"},
|
|
||||||
{"multiplanar_formats", "multiplanar-formats"},
|
|
||||||
}};
|
|
||||||
for (const auto& [name, replacement] : kReplacementsForDeprecatedNames) {
|
|
||||||
if (strcmp(featureName, name) == 0) {
|
|
||||||
return FeatureNameToEnum(replacement);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Feature::InvalidEnum;
|
return Feature::InvalidEnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue