Commit 519a5be2 by Jamie Madill

Update ANGLE's GPU test expectations code.

Pull over the more recent changes from Chromium which include the graphics API, which we can use for specific API suppressions for the dEQP tests. Also update the docs with detailed steps for updating from Chrome. BUG=None Change-Id: I0cb7d8268fbb2778c0160a58f1a10ef4a92c9c61 Reviewed-on: https://chromium-review.googlesource.com/287810Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent b18609b9
...@@ -3,9 +3,20 @@ directory, we want to keep a patch of the changes added to make it compile with ...@@ -3,9 +3,20 @@ directory, we want to keep a patch of the changes added to make it compile with
will allow us to merge Chromium changes easily in our ```gpu_test_expectations```. will allow us to merge Chromium changes easily in our ```gpu_test_expectations```.
In order to make a change to this directory, do the following: In order to make a change to this directory, do the following:
- copy the directory somewhere like in ```gpu_test_expectations_reverted```
- in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R angle-mods.patch``` * copy the directory somewhere like in ```gpu_test_expectations_reverted```
- do your changes in ```gpu_test_expectations``` * in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R angle-mods.patch```
- delete angle-mods.path in both directories * do your changes in ```gpu_test_expectations```
- run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch``` * delete angle-mods.path in both directories
- copy ```angle-mods.patch``` in ```gpu_test_expectations``` * run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch```
* copy ```angle-mods.patch``` in ```gpu_test_expectations```
How to update from Chromium:
* ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit```
* Copy over Chromium files, ```git add . -u```, ```git commit```
* ```git revert HEAD~2```
* ```rm angle-mods.patch```
* ```git diff HEAD~1 (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend```
* ```git rebase -i``` to squash the three patches into one.
diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectations/angle_config.h diff --git a/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md b/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md
--- gpu_test_expectations_reverted/angle_config.h 1969-12-31 19:00:00.000000000 -0500 new file mode 100644
+++ gpu_test_expectations/angle_config.h 2015-06-30 09:42:29.959897518 -0400 index 0000000..4b5f2ed
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md
@@ -0,0 +1,22 @@
+Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config``
+directory, we want to keep a patch of the changes added to make it compile with ANGLE. This
+will allow us to merge Chromium changes easily in our ```gpu_test_expectations```.
+
+In order to make a change to this directory, do the following:
+
+ * copy the directory somewhere like in ```gpu_test_expectations_reverted```
+ * in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R angle-mods.patch```
+ * do your changes in ```gpu_test_expectations```
+ * delete angle-mods.path in both directories
+ * run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch```
+ * copy ```angle-mods.patch``` in ```gpu_test_expectations```
+
+How to update from Chromium:
+
+ * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit```
+ * Copy over Chromium files, ```git add . -u```, ```git commit```
+ * ```git revert HEAD~2```
+ * ```rm angle-mods.patch```
+ * ```git diff HEAD~1 (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend```
+ * ```git rebase -i``` to squash the three patches into one.
+
diff --git a/src/tests/third_party/gpu_test_expectations/angle_config.h b/src/tests/third_party/gpu_test_expectations/angle_config.h
new file mode 100644
index 0000000..28b023b
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/angle_config.h
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
+// +//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved. +// Copyright 2015 The ANGLE Project Authors. All rights reserved.
...@@ -47,9 +77,10 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation ...@@ -47,9 +77,10 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation
+#endif +#endif
+ +
+#endif +#endif
diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/gpu_info.cc diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.cc b/src/tests/third_party/gpu_test_expectations/gpu_info.cc
--- gpu_test_expectations_reverted/gpu_info.cc 2015-06-30 09:39:44.810612582 -0400 index 85d26fb..c8e2988 100644
+++ gpu_test_expectations/gpu_info.cc 2015-06-30 09:40:06.654788989 -0400 --- a/src/tests/third_party/gpu_test_expectations/gpu_info.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_info.cc
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -59,7 +90,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -59,7 +90,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
namespace { namespace {
@@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUIn @@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUInfo::GPUDevice& device,
enumerator->EndGPUDevice(); enumerator->EndGPUDevice();
} }
...@@ -115,7 +146,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -115,7 +146,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
GPUDevice gpu; GPUDevice gpu;
std::vector<GPUDevice> secondary_gpus; std::vector<GPUDevice> secondary_gpus;
uint64 adapter_luid; uint64 adapter_luid;
@@ -109,14 +77,6 @@ void GPUInfo::EnumerateFields(Enumerator @@ -109,14 +77,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
int process_crash_count; int process_crash_count;
CollectInfoResult basic_info_state; CollectInfoResult basic_info_state;
CollectInfoResult context_info_state; CollectInfoResult context_info_state;
...@@ -130,7 +161,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -130,7 +161,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
}; };
// If this assert fails then most likely something below needs to be updated. // If this assert fails then most likely something below needs to be updated.
@@ -134,15 +94,9 @@ void GPUInfo::EnumerateFields(Enumerator @@ -134,15 +94,9 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
EnumerateGPUDevice(secondary_gpu, enumerator); EnumerateGPUDevice(secondary_gpu, enumerator);
enumerator->BeginAuxAttributes(); enumerator->BeginAuxAttributes();
...@@ -146,7 +177,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -146,7 +177,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
enumerator->AddInt64("adapterLuid", adapter_luid); enumerator->AddInt64("adapterLuid", adapter_luid);
enumerator->AddString("driverVendor", driver_vendor); enumerator->AddString("driverVendor", driver_vendor);
enumerator->AddString("driverVersion", driver_version); enumerator->AddString("driverVersion", driver_version);
@@ -168,14 +122,6 @@ void GPUInfo::EnumerateFields(Enumerator @@ -168,14 +122,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
enumerator->AddInt("processCrashCount", process_crash_count); enumerator->AddInt("processCrashCount", process_crash_count);
enumerator->AddInt("basicInfoState", basic_info_state); enumerator->AddInt("basicInfoState", basic_info_state);
enumerator->AddInt("contextInfoState", context_info_state); enumerator->AddInt("contextInfoState", context_info_state);
...@@ -161,9 +192,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -161,9 +192,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
enumerator->EndAuxAttributes(); enumerator->EndAuxAttributes();
} }
diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gpu_info.h diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.h b/src/tests/third_party/gpu_test_expectations/gpu_info.h
--- gpu_test_expectations_reverted/gpu_info.h 2015-06-30 09:39:44.806612549 -0400 index f377698..35e791e 100644
+++ gpu_test_expectations/gpu_info.h 2015-06-30 09:40:06.654788989 -0400 --- a/src/tests/third_party/gpu_test_expectations/gpu_info.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_info.h
@@ -11,13 +11,7 @@ @@ -11,13 +11,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -233,11 +265,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp ...@@ -233,11 +265,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp
CollectInfoResult context_info_state; CollectInfoResult context_info_state;
-#if defined(OS_WIN) -#if defined(OS_WIN)
- CollectInfoResult dx_diagnostics_info_state; - CollectInfoResult dx_diagnostics_info_state;
-
- // The information returned by the DirectX Diagnostics Tool. - // The information returned by the DirectX Diagnostics Tool.
- DxDiagNode dx_diagnostics; - DxDiagNode dx_diagnostics;
-#endif -#endif
-
- VideoDecodeAcceleratorSupportedProfiles - VideoDecodeAcceleratorSupportedProfiles
- video_decode_accelerator_supported_profiles; - video_decode_accelerator_supported_profiles;
- VideoEncodeAcceleratorSupportedProfiles - VideoEncodeAcceleratorSupportedProfiles
...@@ -254,9 +286,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp ...@@ -254,9 +286,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp
// Markers indicating that a GPUDevice is being described. // Markers indicating that a GPUDevice is being described.
virtual void BeginGPUDevice() = 0; virtual void BeginGPUDevice() = 0;
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectations/gpu_test_config.cc diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc b/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
--- gpu_test_expectations_reverted/gpu_test_config.cc 2015-06-30 09:39:44.810612582 -0400 index 4605f89..1b4b47b 100644
+++ gpu_test_expectations/gpu_test_config.cc 2015-06-30 11:04:05.290002071 -0400 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
@@ -2,20 +2,165 @@ @@ -2,20 +2,165 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -433,7 +466,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta ...@@ -433,7 +466,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta
namespace gpu { namespace gpu {
namespace { namespace {
@@ -282,21 +427,5 @@ bool GPUTestBotConfig::CurrentConfigMatc @@ -292,21 +437,5 @@ bool GPUTestBotConfig::CurrentConfigMatches(
return false; return false;
} }
...@@ -455,9 +488,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta ...@@ -455,9 +488,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta
- -
} // namespace gpu } // namespace gpu
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectations/gpu_test_config.h diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config.h b/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
--- gpu_test_expectations_reverted/gpu_test_config.h 2015-06-30 09:39:44.810612582 -0400 index 10ab9de..588b884 100644
+++ gpu_test_expectations/gpu_test_config.h 2015-06-30 09:40:06.654788989 -0400 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
@@ -8,9 +8,7 @@ @@ -8,9 +8,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -469,7 +503,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat ...@@ -469,7 +503,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat
namespace gpu { namespace gpu {
@@ -118,9 +116,6 @@ class GPU_EXPORT GPUTestBotConfig : publ @@ -132,9 +130,6 @@ class GPU_EXPORT GPUTestBotConfig : public GPUTestConfig {
// Check if this bot's config matches |config_data| or any of the |configs|. // Check if this bot's config matches |config_data| or any of the |configs|.
static bool CurrentConfigMatches(const std::string& config_data); static bool CurrentConfigMatches(const std::string& config_data);
static bool CurrentConfigMatches(const std::vector<std::string>& configs); static bool CurrentConfigMatches(const std::vector<std::string>& configs);
...@@ -479,9 +513,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat ...@@ -479,9 +513,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat
}; };
} // namespace gpu } // namespace gpu
diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu_test_expectations/gpu_test_expectations_parser.cc diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.cc 2015-06-30 09:39:44.810612582 -0400 index d44e5bb..5fe5c15 100644
+++ gpu_test_expectations/gpu_test_expectations_parser.cc 2015-06-30 09:40:06.654788989 -0400 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
@@ -2,14 +2,35 @@ @@ -2,14 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -525,7 +560,19 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -525,7 +560,19 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
namespace gpu { namespace gpu {
@@ -161,10 +182,10 @@ bool NamesMatching(const std::string& re @@ -144,9 +165,9 @@ const char* kErrorMessage[] = {
};
Token ParseToken(const std::string& word) {
- if (base::StartsWith(word, "//", base::CompareCase::INSENSITIVE_ASCII))
+ if (base::StartsWithASCII(word, "//", false))
return kTokenComment;
- if (base::StartsWith(word, "0x", base::CompareCase::INSENSITIVE_ASCII))
+ if (base::StartsWithASCII(word, "0x", false))
return kConfigGPUDeviceID;
for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
@@ -174,10 +195,10 @@ bool NamesMatching(const std::string& ref, const std::string& test_name) {
GPUTestExpectationsParser::GPUTestExpectationsParser() { GPUTestExpectationsParser::GPUTestExpectationsParser() {
// Some sanity check. // Some sanity check.
...@@ -540,7 +587,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -540,7 +587,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
} }
GPUTestExpectationsParser::~GPUTestExpectationsParser() { GPUTestExpectationsParser::~GPUTestExpectationsParser() {
@@ -189,8 +210,8 @@ bool GPUTestExpectationsParser::LoadTest @@ -202,8 +223,8 @@ bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) {
return rt; return rt;
} }
...@@ -551,7 +598,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -551,7 +598,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
entries_.clear(); entries_.clear();
error_messages_.clear(); error_messages_.clear();
@@ -370,7 +391,7 @@ bool GPUTestExpectationsParser::ParseLin @@ -393,7 +414,7 @@ bool GPUTestExpectationsParser::ParseLine(
stage++; stage++;
break; break;
default: default:
...@@ -560,8 +607,8 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -560,8 +607,8 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
break; break;
} }
} }
@@ -446,7 +467,7 @@ bool GPUTestExpectationsParser::UpdateTe @@ -481,7 +502,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
config->build_type() | kTokenData[token].flag); config->set_api(config->api() | kTokenData[token].flag);
break; break;
default: default:
- DCHECK(false); - DCHECK(false);
...@@ -569,9 +616,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -569,9 +616,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
break; break;
} }
return true; return true;
diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_test_expectations/gpu_test_expectations_parser.h diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.h 2015-06-30 09:39:44.810612582 -0400 index a69f7e9..a112700 100644
+++ gpu_test_expectations/gpu_test_expectations_parser.h 2015-06-30 09:40:06.654788989 -0400 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
@@ -8,10 +8,8 @@ @@ -8,10 +8,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -585,7 +633,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_ ...@@ -585,7 +633,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_
namespace gpu { namespace gpu {
@@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsPars @@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsParser {
// save all the entries. Otherwise, generate error messages. // save all the entries. Otherwise, generate error messages.
// Return true if parsing succeeds. // Return true if parsing succeeds.
bool LoadTestExpectations(const std::string& data); bool LoadTestExpectations(const std::string& data);
...@@ -594,18 +642,3 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_ ...@@ -594,18 +642,3 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_
// Query error messages from the last LoadTestExpectations() call. // Query error messages from the last LoadTestExpectations() call.
const std::vector<std::string>& GetErrorMessages() const; const std::vector<std::string>& GetErrorMessages() const;
diff -u -rupN gpu_test_expectations_reverted/HowToMakeChanges.md gpu_test_expectations/HowToMakeChanges.md
--- gpu_test_expectations_reverted/HowToMakeChanges.md 1969-12-31 19:00:00.000000000 -0500
+++ gpu_test_expectations/HowToMakeChanges.md 2015-06-30 11:30:57.871197838 -0400
@@ -0,0 +1,11 @@
+Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config``
+directory, we want to keep a patch of the changes added to make it compile with ANGLE. This
+will allow us to merge Chromium changes easily in our ```gpu_test_expectations```.
+
+In order to make a change to this directory, do the following:
+ - copy the directory somewhere like in ```gpu_test_expectations_reverted```
+ - in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R angle-mods.patch```
+ - do your changes in ```gpu_test_expectations```
+ - delete angle-mods.path in both directories
+ - run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch```
+ - copy ```angle-mods.patch``` in ```gpu_test_expectations```
...@@ -184,6 +184,8 @@ GPUTestConfig::OS GetCurrentOS() { ...@@ -184,6 +184,8 @@ GPUTestConfig::OS GetCurrentOS() {
return GPUTestConfig::kOsWin7; return GPUTestConfig::kOsWin7;
if (major_version == 6 && (minor_version == 2 || minor_version == 3)) if (major_version == 6 && (minor_version == 2 || minor_version == 3))
return GPUTestConfig::kOsWin8; return GPUTestConfig::kOsWin8;
if (major_version == 10)
return GPUTestConfig::kOsWin10;
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
int32 major_version = 0; int32 major_version = 0;
int32 minor_version = 0; int32 minor_version = 0;
...@@ -218,8 +220,8 @@ GPUTestConfig::GPUTestConfig() ...@@ -218,8 +220,8 @@ GPUTestConfig::GPUTestConfig()
: validate_gpu_info_(true), : validate_gpu_info_(true),
os_(kOsUnknown), os_(kOsUnknown),
gpu_device_id_(0), gpu_device_id_(0),
build_type_(kBuildTypeUnknown) { build_type_(kBuildTypeUnknown),
} api_(kAPIUnknown) {}
GPUTestConfig::~GPUTestConfig() { GPUTestConfig::~GPUTestConfig() {
} }
...@@ -245,6 +247,11 @@ void GPUTestConfig::set_build_type(int32 build_type) { ...@@ -245,6 +247,11 @@ void GPUTestConfig::set_build_type(int32 build_type) {
build_type_ = build_type; build_type_ = build_type;
} }
void GPUTestConfig::set_api(int32 api) {
DCHECK_EQ(0, api & ~(kAPID3D9 | kAPID3D11 | kAPIGLDesktop | kAPIGLES));
api_ = api;
}
bool GPUTestConfig::IsValid() const { bool GPUTestConfig::IsValid() const {
if (!validate_gpu_info_) if (!validate_gpu_info_)
return true; return true;
...@@ -314,6 +321,7 @@ bool GPUTestBotConfig::IsValid() const { ...@@ -314,6 +321,7 @@ bool GPUTestBotConfig::IsValid() const {
case kOsWinVista: case kOsWinVista:
case kOsWin7: case kOsWin7:
case kOsWin8: case kOsWin8:
case kOsWin10:
case kOsMacLeopard: case kOsMacLeopard:
case kOsMacSnowLeopard: case kOsMacSnowLeopard:
case kOsMacLion: case kOsMacLion:
...@@ -365,6 +373,8 @@ bool GPUTestBotConfig::Matches(const GPUTestConfig& config) const { ...@@ -365,6 +373,8 @@ bool GPUTestBotConfig::Matches(const GPUTestConfig& config) const {
if (config.build_type() != kBuildTypeUnknown && if (config.build_type() != kBuildTypeUnknown &&
(build_type() & config.build_type()) == 0) (build_type() & config.build_type()) == 0)
return false; return false;
if (config.api() != 0 && (api() & config.api()) == 0)
return false;
return true; return true;
} }
......
...@@ -22,7 +22,6 @@ class GPU_EXPORT GPUTestConfig { ...@@ -22,7 +22,6 @@ class GPU_EXPORT GPUTestConfig {
kOsWinVista = 1 << 1, kOsWinVista = 1 << 1,
kOsWin7 = 1 << 2, kOsWin7 = 1 << 2,
kOsWin8 = 1 << 3, kOsWin8 = 1 << 3,
kOsWin = kOsWinXP | kOsWinVista | kOsWin7 | kOsWin8,
kOsMacLeopard = 1 << 4, kOsMacLeopard = 1 << 4,
kOsMacSnowLeopard = 1 << 5, kOsMacSnowLeopard = 1 << 5,
kOsMacLion = 1 << 6, kOsMacLion = 1 << 6,
...@@ -34,6 +33,8 @@ class GPU_EXPORT GPUTestConfig { ...@@ -34,6 +33,8 @@ class GPU_EXPORT GPUTestConfig {
kOsLinux = 1 << 10, kOsLinux = 1 << 10,
kOsChromeOS = 1 << 11, kOsChromeOS = 1 << 11,
kOsAndroid = 1 << 12, kOsAndroid = 1 << 12,
kOsWin10 = 1 << 13,
kOsWin = kOsWinXP | kOsWinVista | kOsWin7 | kOsWin8 | kOsWin10,
}; };
enum BuildType { enum BuildType {
...@@ -42,12 +43,21 @@ class GPU_EXPORT GPUTestConfig { ...@@ -42,12 +43,21 @@ class GPU_EXPORT GPUTestConfig {
kBuildTypeDebug = 1 << 1, kBuildTypeDebug = 1 << 1,
}; };
enum API {
kAPIUnknown = 0,
kAPID3D9 = 1 << 0,
kAPID3D11 = 1 << 1,
kAPIGLDesktop = 1 << 2,
kAPIGLES = 1 << 3,
};
GPUTestConfig(); GPUTestConfig();
virtual ~GPUTestConfig(); virtual ~GPUTestConfig();
void set_os(int32 os); void set_os(int32 os);
void set_gpu_device_id(uint32 id); void set_gpu_device_id(uint32 id);
void set_build_type(int32 build_type); void set_build_type(int32 build_type);
void set_api(int32 api);
virtual void AddGPUVendor(uint32 gpu_vendor); virtual void AddGPUVendor(uint32 gpu_vendor);
...@@ -55,6 +65,7 @@ class GPU_EXPORT GPUTestConfig { ...@@ -55,6 +65,7 @@ class GPU_EXPORT GPUTestConfig {
const std::vector<uint32>& gpu_vendor() const { return gpu_vendor_; } const std::vector<uint32>& gpu_vendor() const { return gpu_vendor_; }
uint32 gpu_device_id() const { return gpu_device_id_; } uint32 gpu_device_id() const { return gpu_device_id_; }
int32 build_type() const { return build_type_; } int32 build_type() const { return build_type_; }
int32 api() const { return api_; }
// Check if the config is valid. For example, if gpu_device_id_ is set, but // Check if the config is valid. For example, if gpu_device_id_ is set, but
// gpu_vendor_ is unknown, then it's invalid. // gpu_vendor_ is unknown, then it's invalid.
...@@ -86,6 +97,9 @@ class GPU_EXPORT GPUTestConfig { ...@@ -86,6 +97,9 @@ class GPU_EXPORT GPUTestConfig {
// Release or Debug. // Release or Debug.
int32 build_type_; int32 build_type_;
// Back-end rendering APIs.
int32 api_;
}; };
class GPU_EXPORT GPUTestBotConfig : public GPUTestConfig { class GPU_EXPORT GPUTestBotConfig : public GPUTestConfig {
......
...@@ -52,6 +52,7 @@ enum Token { ...@@ -52,6 +52,7 @@ enum Token {
kConfigWinVista, kConfigWinVista,
kConfigWin7, kConfigWin7,
kConfigWin8, kConfigWin8,
kConfigWin10,
kConfigWin, kConfigWin,
kConfigMacLeopard, kConfigMacLeopard,
kConfigMacSnowLeopard, kConfigMacSnowLeopard,
...@@ -71,6 +72,11 @@ enum Token { ...@@ -71,6 +72,11 @@ enum Token {
// build type // build type
kConfigRelease, kConfigRelease,
kConfigDebug, kConfigDebug,
// ANGLE renderer
kConfigD3D9,
kConfigD3D11,
kConfigGLDesktop,
kConfigGLES,
// expectation // expectation
kExpectationPass, kExpectationPass,
kExpectationFail, kExpectationFail,
...@@ -95,34 +101,39 @@ struct TokenInfo { ...@@ -95,34 +101,39 @@ struct TokenInfo {
}; };
const TokenInfo kTokenData[] = { const TokenInfo kTokenData[] = {
{ "xp", GPUTestConfig::kOsWinXP }, {"xp", GPUTestConfig::kOsWinXP},
{ "vista", GPUTestConfig::kOsWinVista }, {"vista", GPUTestConfig::kOsWinVista},
{ "win7", GPUTestConfig::kOsWin7 }, {"win7", GPUTestConfig::kOsWin7},
{ "win8", GPUTestConfig::kOsWin8 }, {"win8", GPUTestConfig::kOsWin8},
{ "win", GPUTestConfig::kOsWin }, {"win10", GPUTestConfig::kOsWin10},
{ "leopard", GPUTestConfig::kOsMacLeopard }, {"win", GPUTestConfig::kOsWin},
{ "snowleopard", GPUTestConfig::kOsMacSnowLeopard }, {"leopard", GPUTestConfig::kOsMacLeopard},
{ "lion", GPUTestConfig::kOsMacLion }, {"snowleopard", GPUTestConfig::kOsMacSnowLeopard},
{ "mountainlion", GPUTestConfig::kOsMacMountainLion }, {"lion", GPUTestConfig::kOsMacLion},
{ "mavericks", GPUTestConfig::kOsMacMavericks }, {"mountainlion", GPUTestConfig::kOsMacMountainLion},
{ "yosemite", GPUTestConfig::kOsMacYosemite }, {"mavericks", GPUTestConfig::kOsMacMavericks},
{ "mac", GPUTestConfig::kOsMac }, {"yosemite", GPUTestConfig::kOsMacYosemite},
{ "linux", GPUTestConfig::kOsLinux }, {"mac", GPUTestConfig::kOsMac},
{ "chromeos", GPUTestConfig::kOsChromeOS }, {"linux", GPUTestConfig::kOsLinux},
{ "android", GPUTestConfig::kOsAndroid }, {"chromeos", GPUTestConfig::kOsChromeOS},
{ "nvidia", 0x10DE }, {"android", GPUTestConfig::kOsAndroid},
{ "amd", 0x1002 }, {"nvidia", 0x10DE},
{ "intel", 0x8086 }, {"amd", 0x1002},
{ "vmware", 0x15ad }, {"intel", 0x8086},
{ "release", GPUTestConfig::kBuildTypeRelease }, {"vmware", 0x15ad},
{ "debug", GPUTestConfig::kBuildTypeDebug }, {"release", GPUTestConfig::kBuildTypeRelease},
{ "pass", GPUTestExpectationsParser::kGpuTestPass }, {"debug", GPUTestConfig::kBuildTypeDebug},
{ "fail", GPUTestExpectationsParser::kGpuTestFail }, {"d3d9", GPUTestConfig::kAPID3D9},
{ "flaky", GPUTestExpectationsParser::kGpuTestFlaky }, {"d3d11", GPUTestConfig::kAPID3D11},
{ "timeout", GPUTestExpectationsParser::kGpuTestTimeout }, {"opengl", GPUTestConfig::kAPIGLDesktop},
{ "skip", GPUTestExpectationsParser::kGpuTestSkip }, {"gles", GPUTestConfig::kAPIGLES},
{ ":", 0 }, {"pass", GPUTestExpectationsParser::kGpuTestPass},
{ "=", 0 }, {"fail", GPUTestExpectationsParser::kGpuTestFail},
{"flaky", GPUTestExpectationsParser::kGpuTestFlaky},
{"timeout", GPUTestExpectationsParser::kGpuTestTimeout},
{"skip", GPUTestExpectationsParser::kGpuTestSkip},
{":", 0},
{"=", 0},
}; };
enum ErrorType { enum ErrorType {
...@@ -132,6 +143,7 @@ enum ErrorType { ...@@ -132,6 +143,7 @@ enum ErrorType {
kErrorEntryWithOsConflicts, kErrorEntryWithOsConflicts,
kErrorEntryWithGpuVendorConflicts, kErrorEntryWithGpuVendorConflicts,
kErrorEntryWithBuildTypeConflicts, kErrorEntryWithBuildTypeConflicts,
kErrorEntryWithAPIConflicts,
kErrorEntryWithGpuDeviceIdConflicts, kErrorEntryWithGpuDeviceIdConflicts,
kErrorEntryWithExpectationConflicts, kErrorEntryWithExpectationConflicts,
kErrorEntriesOverlap, kErrorEntriesOverlap,
...@@ -146,19 +158,20 @@ const char* kErrorMessage[] = { ...@@ -146,19 +158,20 @@ const char* kErrorMessage[] = {
"entry with OS modifier conflicts", "entry with OS modifier conflicts",
"entry with GPU vendor modifier conflicts", "entry with GPU vendor modifier conflicts",
"entry with GPU build type conflicts", "entry with GPU build type conflicts",
"entry with GPU API conflicts",
"entry with GPU device id conflicts or malformat", "entry with GPU device id conflicts or malformat",
"entry with expectation modifier conflicts", "entry with expectation modifier conflicts",
"two entries's configs overlap", "two entries' configs overlap",
}; };
Token ParseToken(const std::string& word) { Token ParseToken(const std::string& word) {
if (StartsWithASCII(word, "//", false)) if (base::StartsWithASCII(word, "//", false))
return kTokenComment; return kTokenComment;
if (StartsWithASCII(word, "0x", false)) if (base::StartsWithASCII(word, "0x", false))
return kConfigGPUDeviceID; return kConfigGPUDeviceID;
for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
if (LowerCaseEqualsASCII(word, kTokenData[i].name)) if (base::LowerCaseEqualsASCII(word, kTokenData[i].name))
return static_cast<Token>(i); return static_cast<Token>(i);
} }
return kTokenWord; return kTokenWord;
...@@ -252,6 +265,7 @@ bool GPUTestExpectationsParser::ParseConfig( ...@@ -252,6 +265,7 @@ bool GPUTestExpectationsParser::ParseConfig(
case kConfigWinVista: case kConfigWinVista:
case kConfigWin7: case kConfigWin7:
case kConfigWin8: case kConfigWin8:
case kConfigWin10:
case kConfigWin: case kConfigWin:
case kConfigMacLeopard: case kConfigMacLeopard:
case kConfigMacSnowLeopard: case kConfigMacSnowLeopard:
...@@ -269,6 +283,10 @@ bool GPUTestExpectationsParser::ParseConfig( ...@@ -269,6 +283,10 @@ bool GPUTestExpectationsParser::ParseConfig(
case kConfigVMWare: case kConfigVMWare:
case kConfigRelease: case kConfigRelease:
case kConfigDebug: case kConfigDebug:
case kConfigD3D9:
case kConfigD3D11:
case kConfigGLDesktop:
case kConfigGLES:
case kConfigGPUDeviceID: case kConfigGPUDeviceID:
if (token == kConfigGPUDeviceID) { if (token == kConfigGPUDeviceID) {
if (!UpdateTestConfig(config, tokens[i], 0)) if (!UpdateTestConfig(config, tokens[i], 0))
...@@ -304,6 +322,7 @@ bool GPUTestExpectationsParser::ParseLine( ...@@ -304,6 +322,7 @@ bool GPUTestExpectationsParser::ParseLine(
case kConfigWinVista: case kConfigWinVista:
case kConfigWin7: case kConfigWin7:
case kConfigWin8: case kConfigWin8:
case kConfigWin10:
case kConfigWin: case kConfigWin:
case kConfigMacLeopard: case kConfigMacLeopard:
case kConfigMacSnowLeopard: case kConfigMacSnowLeopard:
...@@ -321,6 +340,10 @@ bool GPUTestExpectationsParser::ParseLine( ...@@ -321,6 +340,10 @@ bool GPUTestExpectationsParser::ParseLine(
case kConfigVMWare: case kConfigVMWare:
case kConfigRelease: case kConfigRelease:
case kConfigDebug: case kConfigDebug:
case kConfigD3D9:
case kConfigD3D11:
case kConfigGLDesktop:
case kConfigGLES:
case kConfigGPUDeviceID: case kConfigGPUDeviceID:
// MODIFIERS, could be in any order, need at least one. // MODIFIERS, could be in any order, need at least one.
if (stage != kLineParserConfigs && stage != kLineParserBugID) { if (stage != kLineParserConfigs && stage != kLineParserBugID) {
...@@ -419,6 +442,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig( ...@@ -419,6 +442,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
case kConfigWinVista: case kConfigWinVista:
case kConfigWin7: case kConfigWin7:
case kConfigWin8: case kConfigWin8:
case kConfigWin10:
case kConfigWin: case kConfigWin:
case kConfigMacLeopard: case kConfigMacLeopard:
case kConfigMacSnowLeopard: case kConfigMacSnowLeopard:
...@@ -466,6 +490,17 @@ bool GPUTestExpectationsParser::UpdateTestConfig( ...@@ -466,6 +490,17 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
config->set_build_type( config->set_build_type(
config->build_type() | kTokenData[token].flag); config->build_type() | kTokenData[token].flag);
break; break;
case kConfigD3D9:
case kConfigD3D11:
case kConfigGLDesktop:
case kConfigGLES:
if ((config->api() & kTokenData[token].flag) != 0) {
PushErrorMessage(kErrorMessage[kErrorEntryWithAPIConflicts],
line_number);
return false;
}
config->set_api(config->api() | kTokenData[token].flag);
break;
default: default:
UNREACHABLE(); UNREACHABLE();
break; break;
......
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