Commit 93150a73 authored by oshima@chromium.org's avatar oshima@chromium.org

Revert 289067 "Use RE string pattern matching for blacklist stri..."

Reason for revert: uninitialize memory access

http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Mac%20%28valgrind%29%282%29/builds/29469/steps/memory%20test%3A%20content/logs/stdio

> Use RE string pattern matching for blacklist strings.
> 
> Including cpu_brand, gl_vendor, gl_renderer, gl_extension, driver_vendor,
> and machine_model_name.
> 
> BUG=396578
> TBR=piman@chromium.org
> TEST=gpu_unittests
> 
> Review URL: https://codereview.chromium.org/452293002

TBR=zmo@chromium.org

Review URL: https://codereview.chromium.org/465163002

Cr-Commit-Position: refs/heads/master@{#289154}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289154 0039d316-1c4b-4281-b951-d872f2087c98
parent 017dbda0
......@@ -158,7 +158,10 @@ TEST_F(GpuDataManagerImplPrivateTest, GpuSideBlacklisting) {
},
{
"id": 2,
"gl_renderer": ".*GeForce.*",
"gl_renderer": {
"op": "contains",
"value": "GeForce"
},
"features": [
"accelerated_2d_canvas"
]
......@@ -202,7 +205,10 @@ TEST_F(GpuDataManagerImplPrivateTest, GpuSideExceptions) {
"id": 1,
"exceptions": [
{
"gl_renderer": ".*GeForce.*"
"gl_renderer": {
"op": "contains",
"value": "GeForce"
}
}
],
"features": [
......
......@@ -209,6 +209,7 @@ test("gpu_unittests") {
"config/gpu_control_list_entry_unittest.cc",
"config/gpu_control_list_number_info_unittest.cc",
"config/gpu_control_list_os_info_unittest.cc",
"config/gpu_control_list_string_info_unittest.cc",
"config/gpu_control_list_unittest.cc",
"config/gpu_control_list_version_info_unittest.cc",
"config/gpu_driver_bug_list_unittest.cc",
......
This diff is collapsed.
......@@ -192,6 +192,32 @@ class GPU_EXPORT GpuControlList {
scoped_ptr<VersionInfo> version_info_;
};
class GPU_EXPORT StringInfo {
public:
StringInfo(const std::string& string_op, const std::string& string_value);
// Determines if a given string is included in the StringInfo.
bool Contains(const std::string& value) const;
// Determines if the StringInfo contains valid information.
bool IsValid() const;
private:
enum Op {
kContains,
kBeginWith,
kEndWith,
kEQ, // =
kUnknown // Indicates StringInfo data is invalid.
};
// Maps string to Op; returns kUnknown if it's not a valid Op.
static Op StringToOp(const std::string& string_op);
Op op_;
std::string value_;
};
class GPU_EXPORT FloatInfo {
public:
FloatInfo(const std::string& float_op,
......@@ -344,7 +370,8 @@ class GPU_EXPORT GpuControlList {
bool SetGLType(const std::string& gl_type_string);
bool SetDriverVendorInfo(const std::string& vendor_value);
bool SetDriverVendorInfo(const std::string& vendor_op,
const std::string& vendor_value);
bool SetDriverVersionInfo(const std::string& version_op,
const std::string& version_style,
......@@ -359,17 +386,21 @@ class GPU_EXPORT GpuControlList {
const std::string& version_string,
const std::string& version_string2);
bool SetGLVendorInfo(const std::string& vendor_value);
bool SetGLVendorInfo(const std::string& vendor_op,
const std::string& vendor_value);
bool SetGLRendererInfo(const std::string& renderer_value);
bool SetGLRendererInfo(const std::string& renderer_op,
const std::string& renderer_value);
bool SetGLExtensionsInfo(const std::string& extensions_value);
bool SetGLExtensionsInfo(const std::string& extensions_op,
const std::string& extensions_value);
bool SetGLResetNotificationStrategyInfo(const std::string& op,
const std::string& int_string,
const std::string& int_string2);
bool SetCpuBrand(const std::string& cpu_value);
bool SetCpuBrand(const std::string& cpu_op,
const std::string& cpu_value);
bool SetPerfGraphicsInfo(const std::string& op,
const std::string& float_string,
......@@ -433,15 +464,15 @@ class GPU_EXPORT GpuControlList {
MultiGpuStyle multi_gpu_style_;
MultiGpuCategory multi_gpu_category_;
GLType gl_type_;
std::string driver_vendor_info_;
scoped_ptr<StringInfo> driver_vendor_info_;
scoped_ptr<VersionInfo> driver_version_info_;
scoped_ptr<VersionInfo> driver_date_info_;
scoped_ptr<VersionInfo> gl_version_info_;
std::string gl_vendor_info_;
std::string gl_renderer_info_;
std::string gl_extensions_info_;
scoped_ptr<StringInfo> gl_vendor_info_;
scoped_ptr<StringInfo> gl_renderer_info_;
scoped_ptr<StringInfo> gl_extensions_info_;
scoped_ptr<IntInfo> gl_reset_notification_strategy_info_;
std::string cpu_brand_;
scoped_ptr<StringInfo> cpu_brand_;
scoped_ptr<FloatInfo> perf_graphics_info_;
scoped_ptr<FloatInfo> perf_gaming_info_;
scoped_ptr<FloatInfo> perf_overall_info_;
......
......@@ -470,98 +470,14 @@ TEST_F(GpuControlListEntryTest, GlVersionGLEntry) {
EXPECT_FALSE(entry->Contains(GpuControlList::kOsWin, "6.1", gpu_info));
}
TEST_F(GpuControlListEntryTest, GlVendorEqual) {
TEST_F(GpuControlListEntryTest, GlVendorEntry) {
const std::string json = LONG_STRING_CONST(
{
"id": 1,
"gl_vendor": "NVIDIA",
"features": [
"test_feature_0"
]
}
);
ScopedEntry entry(GetEntryFromString(json));
EXPECT_TRUE(entry.get() != NULL);
GPUInfo gpu_info;
gpu_info.gl_vendor = "NVIDIA";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
// Case sensitive.
gpu_info.gl_vendor = "NVidia";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.gl_vendor = "NVIDIA-x";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
}
TEST_F(GpuControlListEntryTest, GlVendorWithDot) {
const std::string json = LONG_STRING_CONST(
{
"id": 1,
"gl_vendor": "X\\.Org.*",
"features": [
"test_feature_0"
]
}
);
ScopedEntry entry(GetEntryFromString(json));
EXPECT_TRUE(entry.get() != NULL);
GPUInfo gpu_info;
gpu_info.gl_vendor = "X.Org R300 Project";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsLinux, "", gpu_info));
gpu_info.gl_vendor = "X.Org";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsLinux, "", gpu_info));
}
TEST_F(GpuControlListEntryTest, GlRendererContains) {
const std::string json = LONG_STRING_CONST(
{
"id": 1,
"gl_renderer": ".*GeForce.*",
"features": [
"test_feature_0"
]
}
);
ScopedEntry entry(GetEntryFromString(json));
EXPECT_TRUE(entry.get() != NULL);
GPUInfo gpu_info;
gpu_info.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
// Case sensitive.
gpu_info.gl_renderer = "NVIDIA GEFORCE GT 120 OpenGL Engine";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.gl_renderer = "GeForce GT 120 OpenGL Engine";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.gl_renderer = "NVIDIA GeForce";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.gl_renderer = "NVIDIA Ge Force";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
}
TEST_F(GpuControlListEntryTest, GlRendererCaseInsensitive) {
const std::string json = LONG_STRING_CONST(
{
"id": 1,
"gl_renderer": "(?i).*software.*",
"gl_vendor": {
"op": "beginwith",
"value": "NVIDIA"
},
"features": [
"test_feature_0"
]
......@@ -570,21 +486,25 @@ TEST_F(GpuControlListEntryTest, GlRendererCaseInsensitive) {
ScopedEntry entry(GetEntryFromString(json));
EXPECT_TRUE(entry.get() != NULL);
GPUInfo gpu_info;
gpu_info.gl_renderer = "software rasterizer";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.gl_renderer = "Software Rasterizer";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
const GpuControlList::OsType os_type[] = {
GpuControlList::kOsMacosx,
GpuControlList::kOsWin,
GpuControlList::kOsLinux,
GpuControlList::kOsChromeOS,
GpuControlList::kOsAndroid
};
for (size_t i = 0; i < arraysize(os_type); ++i)
EXPECT_TRUE(entry->Contains(os_type[i], "10.6", gpu_info()));
}
TEST_F(GpuControlListEntryTest, GlExtensionsEndWith) {
TEST_F(GpuControlListEntryTest, GlRendererEntry) {
const std::string json = LONG_STRING_CONST(
{
"id": 1,
"gl_extensions": ".*GL_SUN_slice_accum",
"gl_renderer": {
"op": "contains",
"value": "GeForce"
},
"features": [
"test_feature_0"
]
......@@ -593,18 +513,15 @@ TEST_F(GpuControlListEntryTest, GlExtensionsEndWith) {
ScopedEntry entry(GetEntryFromString(json));
EXPECT_TRUE(entry.get() != NULL);
GPUInfo gpu_info;
gpu_info.gl_extensions = "GL_SGIS_generate_mipmap "
"GL_SGIX_shadow "
"GL_SUN_slice_accum";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.gl_extensions = "GL_SGIS_generate_mipmap "
"GL_SUN_slice_accum "
"GL_SGIX_shadow";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
const GpuControlList::OsType os_type[] = {
GpuControlList::kOsMacosx,
GpuControlList::kOsWin,
GpuControlList::kOsLinux,
GpuControlList::kOsChromeOS,
GpuControlList::kOsAndroid
};
for (size_t i = 0; i < arraysize(os_type); ++i)
EXPECT_TRUE(entry->Contains(os_type[i], "10.6", gpu_info()));
}
TEST_F(GpuControlListEntryTest, PerfGraphicsEntry) {
......@@ -723,38 +640,6 @@ TEST_F(GpuControlListEntryTest, AMDSwitchableEntry) {
GpuControlList::kOsMacosx, "10.6", gpu_info));
}
TEST_F(GpuControlListEntryTest, DriverVendorBeginWith) {
const std::string json = LONG_STRING_CONST(
{
"id": 1,
"driver_vendor": "NVIDIA.*",
"features": [
"test_feature_0"
]
}
);
ScopedEntry entry(GetEntryFromString(json));
EXPECT_TRUE(entry.get() != NULL);
GPUInfo gpu_info;
gpu_info.driver_vendor = "NVIDIA Corporation";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
// Case sensitive.
gpu_info.driver_vendor = "NVidia Corporation";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.driver_vendor = "NVIDIA";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
gpu_info.driver_vendor = "USA NVIDIA";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsMacosx, "10.9", gpu_info));
}
TEST_F(GpuControlListEntryTest, LexicalDriverVersionEntry) {
const std::string json = LONG_STRING_CONST(
{
......@@ -825,7 +710,10 @@ TEST_F(GpuControlListEntryTest, NeedsMoreInfoForExceptionsEntry) {
"vendor_id": "0x8086",
"exceptions": [
{
"gl_renderer": ".*mesa.*"
"gl_renderer": {
"op": "contains",
"value": "mesa"
}
}
],
"features": [
......@@ -919,9 +807,7 @@ TEST_F(GpuControlListEntryTest, MachineModelName) {
"os": {
"type": "android"
},
"machine_model_name": [
"Nexus 4", "XT1032", "GT-.*", "SCH-.*"
],
"machine_model_name": ["Nexus 4", "XT1032"],
"features": [
"test_feature_0"
]
......@@ -955,18 +841,6 @@ TEST_F(GpuControlListEntryTest, MachineModelName) {
gpu_info.machine_model_name = "";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsAndroid, "4.1", gpu_info));
gpu_info.machine_model_name = "GT-N7100";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsAndroid, "4.1", gpu_info));
gpu_info.machine_model_name = "GT-I9300";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsAndroid, "4.1", gpu_info));
gpu_info.machine_model_name = "SCH-I545";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsAndroid, "4.1", gpu_info));
}
TEST_F(GpuControlListEntryTest, MachineModelNameException) {
......@@ -978,7 +852,7 @@ TEST_F(GpuControlListEntryTest, MachineModelNameException) {
"os": {
"type": "android"
},
"machine_model_name": ["Nexus.*"]
"machine_model_name": ["Nexus 4"]
}
],
"features": [
......@@ -997,12 +871,6 @@ TEST_F(GpuControlListEntryTest, MachineModelNameException) {
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsLinux, "4.1", gpu_info));
gpu_info.machine_model_name = "Nexus 7";
EXPECT_FALSE(entry->Contains(
GpuControlList::kOsAndroid, "4.1", gpu_info));
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsLinux, "4.1", gpu_info));
gpu_info.machine_model_name = "";
EXPECT_TRUE(entry->Contains(
GpuControlList::kOsAndroid, "4.1", gpu_info));
......
......@@ -32,7 +32,7 @@
// 6. "multi_gpu_category" is a string, valid values include "any", "primary",
// "secondary", and "active". If unspecified, the default value is "primary".
// See gpu_control_list.h for more details on the meanings of the strings.
// 7. "driver_vendor" is a string pattern.
// 7. "driver_vendor" is a STRING structure (defined below).
// 8. "driver_version" is a VERSION structure (defined below).
// 9. "driver_date" is a VERSION structure (defined below).
// The version is interpreted as "year.month.day".
......@@ -41,16 +41,17 @@
// The default value on Android is "gles", on Windows is "angle", on other
// platforms is "gl".
// 11. "gl_version" is a VERSION structure (defined below).
// 12. "gl_vendor" is a string pattern.
// 13. "gl_renderer" is a string pattern.
// 14. "gl_extensions" is a string pattern.
// 12. "gl_vendor" is a STRING structure (defined below).
// 13. "gl_renderer" is a STRING structure (defined below).
// 14. "gl_extensions" is a STRING structure (defined below).
// 15. "perf_graphics" is a FLOAT structure (defined below).
// 16. "perf_gaming" is a FLOAT structure (defined below).
// 17. "perf_overall" is a FLOAT structure (defined below).
// 18. "machine_model_name" is an array of string patterns.
// 18. "machine_model_name" is an array of strings. The strings can contain
// any characters.
// 19. "machine_model_version" is a VERSION structure (defined below).
// 20. "gpu_count" is a INT structure (defined below).
// 21 "cpu_info" is a string pattern.
// 21 "cpu_info" is a STRING structure (defined below).
// 22. "exceptions" is a list of entries.
// 23. "features" is a list of gpu control list options, which can be
// configured by a specific list. See its *_json.cc file for a list of
......@@ -73,11 +74,12 @@
// Only "driver_version" supports lexical style if the format is major.minor;
// in that case, major is still numerical, but minor is lexical.
//
// STRING includes "op" and "value". "op" can be any of the following values:
// "contains", "beginwith", "endwith", "=". "value" is a string.
//
// FLOAT includes "op" "value", and "value2". "op" can be any of the
// following values: "=", "<", "<=", ">", ">=", "any", "between". "value2" is
// only used if "op" is "between". "value" is used for all "op" values except
// "any". "value" and "value2" are valid float numbers.
// INT is very much like FLOAT, except that the values need to be integers.
//
// String pattern syntax can be found at
// https://code.google.com/p/re2/wiki/Syntax.
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "gpu/config/gpu_control_list.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gpu {
class StringInfoTest : public testing::Test {
public:
StringInfoTest() { }
virtual ~StringInfoTest() { }
typedef GpuControlList::StringInfo StringInfo;
};
TEST_F(StringInfoTest, ValidStringInfo) {
const std::string op[] = {
"contains",
"beginwith",
"endwith",
"="
};
for (size_t i = 0; i < arraysize(op); ++i) {
{
StringInfo info(op[i], std::string());
EXPECT_TRUE(info.IsValid());
}
{
StringInfo info(op[i], "hello");
EXPECT_TRUE(info.IsValid());
}
}
}
TEST_F(StringInfoTest, InvalidStringInfo) {
const std::string op[] = {
"Contains",
"BeginWith",
"EndWith",
" =",
"= "
};
for (size_t i = 0; i < arraysize(op); ++i) {
StringInfo info(op[i], "hello");
EXPECT_FALSE(info.IsValid());
}
}
TEST_F(StringInfoTest, StringComparison) {
{
StringInfo info("contains", "happy");
EXPECT_TRUE(info.Contains("unhappy"));
EXPECT_TRUE(info.Contains("happy1"));
EXPECT_TRUE(info.Contains("happy"));
EXPECT_TRUE(info.Contains("a happy dog"));
EXPECT_TRUE(info.Contains("Happy"));
EXPECT_TRUE(info.Contains("HAPPY"));
EXPECT_FALSE(info.Contains("ha-ppy"));
}
{
StringInfo info("beginwith", "happy");
EXPECT_FALSE(info.Contains("unhappy"));
EXPECT_TRUE(info.Contains("happy1"));
EXPECT_TRUE(info.Contains("happy"));
EXPECT_FALSE(info.Contains("a happy dog"));
EXPECT_TRUE(info.Contains("Happy"));
EXPECT_TRUE(info.Contains("HAPPY"));
EXPECT_FALSE(info.Contains("ha-ppy"));
}
{
StringInfo info("endwith", "happy");
EXPECT_TRUE(info.Contains("unhappy"));
EXPECT_FALSE(info.Contains("happy1"));
EXPECT_TRUE(info.Contains("happy"));
EXPECT_FALSE(info.Contains("a happy dog"));
EXPECT_TRUE(info.Contains("Happy"));
EXPECT_TRUE(info.Contains("HAPPY"));
EXPECT_FALSE(info.Contains("ha-ppy"));
}
{
StringInfo info("=", "happy");
EXPECT_FALSE(info.Contains("unhappy"));
EXPECT_FALSE(info.Contains("happy1"));
EXPECT_TRUE(info.Contains("happy"));
EXPECT_FALSE(info.Contains("a happy dog"));
EXPECT_TRUE(info.Contains("Happy"));
EXPECT_TRUE(info.Contains("HAPPY"));
EXPECT_FALSE(info.Contains("ha-ppy"));
EXPECT_FALSE(info.Contains("ha ppy"));
EXPECT_FALSE(info.Contains(" happy"));
EXPECT_FALSE(info.Contains("happy "));
}
}
} // namespace gpu
......@@ -303,7 +303,10 @@ TEST_F(GpuControlListTest, NeedsMoreInfoForExceptions) {
"vendor_id": "0x8086",
"exceptions": [
{
"gl_renderer": ".*mesa.*"
"gl_renderer": {
"op": "contains",
"value": "mesa"
}
}
],
"features": [
......
This diff is collapsed.
......@@ -18,7 +18,7 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
{
"name": "software rendering list",
// Please update the version number whenever you change this file.
"version": "9.0",
"version": "8.10",
"entries": [
{
"id": 1,
......@@ -42,7 +42,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "linux"
},
"gl_renderer": "(?i).*software.*",
"gl_renderer": {
"op": "contains",
"value": "software"
},
"features": [
"all"
]
......@@ -73,7 +76,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"vendor_id": "0x1002",
"exceptions": [
{
"driver_vendor": ".*AMD.*",
"driver_vendor": {
"op": "contains",
"value": "AMD"
},
"driver_version": {
"op": ">=",
"style": "lexical",
......@@ -81,7 +87,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
}
},
{
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": ">=",
"value": "10.0.4"
......@@ -141,7 +150,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
}
},
{
"driver_vendor": "osmesa"
"driver_vendor": {
"op": "=",
"value": "osmesa"
}
},
{
"vendor_id": "0x1414",
......@@ -160,7 +172,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"type": "linux"
},
"vendor_id": "0x8086",
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": "<",
"value": "10.1"
......@@ -225,14 +240,20 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "linux"
},
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": "<",
"value": "7.11"
},
"exceptions": [
{
"driver_vendor": "osmesa"
"driver_vendor": {
"op": "=",
"value": "osmesa"
}
}
],
"features": [
......@@ -256,10 +277,16 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "linux"
},
"gl_vendor": "ATI.*",
"gl_vendor": {
"op": "beginwith",
"value": "ATI"
},
"exceptions": [
{
"driver_vendor": ".*AMD.*",
"driver_vendor": {
"op": "contains",
"value": "AMD"
},
"driver_version": {
"op": ">=",
"style": "lexical",
......@@ -267,7 +294,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
}
},
{
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": ">=",
"value": "10.0.4"
......@@ -285,11 +315,20 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "linux"
},
"gl_vendor": "X\\.Org.*",
"gl_renderer": ".*AMD.*",
"gl_vendor": {
"op": "beginwith",
"value": "X.Org"
},
"gl_renderer": {
"op": "contains",
"value": "AMD"
},
"exceptions": [
{
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": ">=",
"value": "10.0.4"
......@@ -307,11 +346,20 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "linux"
},
"gl_vendor": "X\\.Org.*",
"gl_renderer": ".*ATI.*",
"gl_vendor": {
"op": "beginwith",
"value": "X.Org"
},
"gl_renderer": {
"op": "contains",
"value": "ATI"
},
"exceptions": [
{
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": ">=",
"value": "10.0.4"
......@@ -330,7 +378,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"type": "linux"
},
"vendor_id": "0x10de",
"gl_vendor": "(?i)nouveau.*",
"gl_vendor": {
"op": "beginwith",
"value": "nouveau"
},
"features": [
"all"
]
......@@ -354,7 +405,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
}
},
{
"cpu_info": "(?i).*Atom.*"
"cpu_info": {
"op": "contains",
"value": "Atom"
}
}
],
"features": [
......@@ -395,12 +449,18 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"multi_gpu_style": "optimus",
"exceptions": [
{
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": ">=",
"value": "10.1"
},
"gl_vendor": "Intel.*"
"gl_vendor": {
"op": "beginwith",
"value": "Intel"
}
}
],
"features": [
......@@ -497,7 +557,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"type": "linux"
},
"vendor_id": "0x10de",
"driver_vendor": "NVIDIA",
"driver_vendor": {
"op": "=",
"value": "NVIDIA"
},
"driver_version": {
"op": "<",
"value": "295"
......@@ -558,15 +621,24 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "linux"
},
"gl_vendor": "VMware.*",
"gl_vendor": {
"op": "beginwith",
"value": "VMware"
},
"exceptions": [
{
"driver_vendor": "Mesa",
"driver_vendor": {
"op": "=",
"value": "Mesa"
},
"driver_version": {
"op": ">=",
"value": "9.2.1"
},
"gl_renderer": ".*SVGA3D.*"
"gl_renderer": {
"op": "contains",
"value": "SVGA3D"
}
}
],
"features": [
......@@ -591,7 +663,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"type": "linux"
},
"vendor_id": "0x10de",
"driver_vendor": "NVIDIA",
"driver_vendor": {
"op": "=",
"value": "NVIDIA"
},
"features": [
"accelerated_video_decode",
"flash_3d",
......@@ -641,7 +716,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "android"
},
"gl_renderer": ".*Adreno.*",
"gl_renderer": {
"op": "contains",
"value": "Adreno"
},
"driver_version": {
"op": "<",
"value": "4.1"
......@@ -770,7 +848,10 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
"os": {
"type": "win"
},
"driver_vendor": "Microsoft",
"driver_vendor": {
"op": "=",
"value": "Microsoft"
},
"exceptions": [
{
"vendor_id": "0x1414",
......@@ -1031,7 +1112,10 @@ LONG_STRING_CONST(
"type": "linux"
},
"vendor_id": "0x1002",
"driver_vendor": ".*AMD.*",
"driver_vendor": {
"op": "contains",
"value": "AMD"
},
"driver_version": {
"op": "=",
"value": "13.101"
......
......@@ -276,6 +276,7 @@
'config/gpu_control_list_entry_unittest.cc',
'config/gpu_control_list_number_info_unittest.cc',
'config/gpu_control_list_os_info_unittest.cc',
'config/gpu_control_list_string_info_unittest.cc',
'config/gpu_control_list_unittest.cc',
'config/gpu_control_list_version_info_unittest.cc',
'config/gpu_driver_bug_list_unittest.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment