Commit ca05a081 by Yuly Novikov Committed by Commit Bot

Compile deqp_gles2 on Android

Add some missing functions, modify preprocessor conditions and build files to include some other missing functions when building for Android. BUG=angleproject:1471 Change-Id: Iadc0a0b9fed2444b8bc9a894ee65c8b66ea7f3c9 Reviewed-on: https://chromium-review.googlesource.com/368982 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 91e71ed9
...@@ -172,13 +172,17 @@ if (build_angle_deqp_tests) { ...@@ -172,13 +172,17 @@ if (build_angle_deqp_tests) {
defines = deqp_gypi.deqp_defines defines = deqp_gypi.deqp_defines
defines += [ "_MBCS" ] defines += [ "_MBCS" ]
if (is_linux) {
# Ask the system headers to expose all the regular function otherwise # Ask the system headers to expose all the regular function otherwise
# dEQP doesn't compile and produces warnings about implicitly defined # dEQP doesn't compile and produces warnings about implicitly defined
# functions. # functions.
if (is_linux) {
# This has to be GNU_SOURCE as on Linux dEQP uses syscall() # This has to be GNU_SOURCE as on Linux dEQP uses syscall()
defines += [ "_GNU_SOURCE" ] defines += [ "_GNU_SOURCE" ]
} }
if (is_android) {
# _XOPEN_SOURCE=600 is what is used in deqp/src/Android.mk
defines += [ "_XOPEN_SOURCE=600" ]
}
} }
deqp_undefine_configs = [ deqp_undefine_configs = [
...@@ -194,7 +198,7 @@ if (build_angle_deqp_tests) { ...@@ -194,7 +198,7 @@ if (build_angle_deqp_tests) {
] ]
} }
if (is_linux) { if (is_linux || is_android) {
deqp_undefine_configs += [ "//build/config/gcc:no_exceptions" ] deqp_undefine_configs += [ "//build/config/gcc:no_exceptions" ]
} }
...@@ -230,10 +234,13 @@ if (build_angle_deqp_tests) { ...@@ -230,10 +234,13 @@ if (build_angle_deqp_tests) {
if (is_win) { if (is_win) {
sources += rebase_path(deqp_gypi.deqp_libtester_sources_win, ".", "../..") sources += rebase_path(deqp_gypi.deqp_libtester_sources_win, ".", "../..")
} }
if (is_linux) { if (is_linux || is_android) {
sources += sources +=
rebase_path(deqp_gypi.deqp_libtester_sources_unix, ".", "../..") rebase_path(deqp_gypi.deqp_libtester_sources_unix, ".", "../..")
} }
if (is_android) {
libs = [ "log" ]
}
} }
config("angle_deqp_gtest_support_config") { config("angle_deqp_gtest_support_config") {
...@@ -331,6 +338,10 @@ if (build_angle_deqp_tests) { ...@@ -331,6 +338,10 @@ if (build_angle_deqp_tests) {
# Set rpath to find *.so files even in a non-component build. # Set rpath to find *.so files even in a non-component build.
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
} }
if (is_android) {
use_native_activity = true
}
} }
} }
} }
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <sys/unistd.h> #include <sys/unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#elif (DE_OS == DE_OS_ANDROID)
#include <sys/stat.h>
#endif #endif
tcu::Platform *createPlatform(); tcu::Platform *createPlatform();
...@@ -68,7 +70,7 @@ deBool deIsDir(const char *filename) ...@@ -68,7 +70,7 @@ deBool deIsDir(const char *filename)
return false; return false;
} }
#elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) #elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_ANDROID)
deBool deIsDir(const char *filename) deBool deIsDir(const char *filename)
{ {
struct stat st; struct stat st;
......
...@@ -32,15 +32,17 @@ ...@@ -32,15 +32,17 @@
#include "OSWindow.h" #include "OSWindow.h"
#include "tcuTexture.hpp" #include "tcuTexture.hpp"
// clang-format off
#if (DE_OS == DE_OS_WIN32) #if (DE_OS == DE_OS_WIN32)
#define ANGLE_EGL_LIBRARY_NAME "libEGL.dll" #define ANGLE_EGL_LIBRARY_NAME "libEGL.dll"
#elif (DE_OS == DE_OS_UNIX) #elif (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID)
#define ANGLE_EGL_LIBRARY_NAME "libEGL.so" #define ANGLE_EGL_LIBRARY_NAME "libEGL.so"
#elif (DE_OS == DE_OS_OSX) #elif (DE_OS == DE_OS_OSX)
#define ANGLE_EGL_LIBRARY_NAME "libEGL.dylib" #define ANGLE_EGL_LIBRARY_NAME "libEGL.dylib"
#else #else
#error "Unsupported platform" #error "Unsupported platform"
#endif #endif
// clang-format on
namespace tcu namespace tcu
{ {
......
diff --git a/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md b/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md diff -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectations/angle_config.h
new file mode 100644 --- gpu_test_expectations_reverted/angle_config.h 1969-12-31 19:00:00.000000000 -0500
index 0000000..7817d0a +++ gpu_test_expectations/angle_config.h 2016-08-22 16:13:08.739352282 -0400
--- /dev/null @@ -0,0 +1,66 @@
+++ 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.patch 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~```
+ * ```rm angle-mods.patch```
+ * ```git diff HEAD~ (`)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..3d7b20c
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/angle_config.h
@@ -0,0 +1,62 @@
+// +//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved. +// Copyright 2015 The ANGLE Project Authors. All rights reserved.
+// 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
...@@ -83,8 +53,11 @@ index 0000000..3d7b20c ...@@ -83,8 +53,11 @@ index 0000000..3d7b20c
+} +}
+ +
+// TODO(jmadill): other platforms +// TODO(jmadill): other platforms
+// clang-format off
+#if defined(_WIN32) || defined(_WIN64) +#if defined(_WIN32) || defined(_WIN64)
+# define OS_WIN +# define OS_WIN
+#elif defined(ANDROID)
+# define OS_ANDROID
+#elif defined(__linux__) +#elif defined(__linux__)
+# define OS_LINUX +# define OS_LINUX
+#elif defined(__APPLE__) +#elif defined(__APPLE__)
...@@ -92,12 +65,12 @@ index 0000000..3d7b20c ...@@ -92,12 +65,12 @@ index 0000000..3d7b20c
+#else +#else
+# error "Unsupported platform" +# error "Unsupported platform"
+#endif +#endif
+// clang-format on
+ +
+#endif +#endif
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.cc b/src/tests/third_party/gpu_test_expectations/gpu_info.cc diff -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/gpu_info.cc
index 23d5216..4f279a4 100644 --- gpu_test_expectations_reverted/gpu_info.cc 2016-08-12 21:23:54.884132405 -0400
--- a/src/tests/third_party/gpu_test_expectations/gpu_info.cc +++ gpu_test_expectations/gpu_info.cc 2015-11-30 21:54:30.239267635 -0500
+++ 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.
...@@ -107,7 +80,7 @@ index 23d5216..4f279a4 100644 ...@@ -107,7 +80,7 @@ index 23d5216..4f279a4 100644
namespace { namespace {
@@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUInfo::GPUDevice& device, @@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUIn
enumerator->EndGPUDevice(); enumerator->EndGPUDevice();
} }
...@@ -161,7 +134,7 @@ index 23d5216..4f279a4 100644 ...@@ -161,7 +134,7 @@ index 23d5216..4f279a4 100644
GPUDevice gpu; GPUDevice gpu;
std::vector<GPUDevice> secondary_gpus; std::vector<GPUDevice> secondary_gpus;
uint64 adapter_luid; uint64 adapter_luid;
@@ -110,14 +80,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { @@ -110,14 +80,6 @@ void GPUInfo::EnumerateFields(Enumerator
bool in_process_gpu; bool in_process_gpu;
CollectInfoResult basic_info_state; CollectInfoResult basic_info_state;
CollectInfoResult context_info_state; CollectInfoResult context_info_state;
...@@ -176,7 +149,7 @@ index 23d5216..4f279a4 100644 ...@@ -176,7 +149,7 @@ index 23d5216..4f279a4 100644
bool jpeg_decode_accelerator_supported; bool jpeg_decode_accelerator_supported;
}; };
@@ -136,15 +98,9 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { @@ -136,15 +98,9 @@ void GPUInfo::EnumerateFields(Enumerator
EnumerateGPUDevice(secondary_gpu, enumerator); EnumerateGPUDevice(secondary_gpu, enumerator);
enumerator->BeginAuxAttributes(); enumerator->BeginAuxAttributes();
...@@ -192,7 +165,7 @@ index 23d5216..4f279a4 100644 ...@@ -192,7 +165,7 @@ index 23d5216..4f279a4 100644
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);
@@ -171,14 +127,7 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { @@ -171,14 +127,7 @@ void GPUInfo::EnumerateFields(Enumerator
enumerator->AddBool("inProcessGpu", in_process_gpu); enumerator->AddBool("inProcessGpu", in_process_gpu);
enumerator->AddInt("basicInfoState", basic_info_state); enumerator->AddInt("basicInfoState", basic_info_state);
enumerator->AddInt("contextInfoState", context_info_state); enumerator->AddInt("contextInfoState", context_info_state);
...@@ -207,10 +180,9 @@ index 23d5216..4f279a4 100644 ...@@ -207,10 +180,9 @@ index 23d5216..4f279a4 100644
enumerator->AddBool("jpegDecodeAcceleratorSupported", enumerator->AddBool("jpegDecodeAcceleratorSupported",
jpeg_decode_accelerator_supported); jpeg_decode_accelerator_supported);
enumerator->EndAuxAttributes(); enumerator->EndAuxAttributes();
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.h b/src/tests/third_party/gpu_test_expectations/gpu_info.h diff -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gpu_info.h
index d6f61fd..0a7f9aa 100644 --- gpu_test_expectations_reverted/gpu_info.h 2016-08-12 21:23:54.884132405 -0400
--- a/src/tests/third_party/gpu_test_expectations/gpu_info.h +++ gpu_test_expectations/gpu_info.h 2015-11-30 21:54:30.239267635 -0500
+++ 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>
...@@ -280,11 +252,11 @@ index d6f61fd..0a7f9aa 100644 ...@@ -280,11 +252,11 @@ index d6f61fd..0a7f9aa 100644
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
...@@ -301,11 +273,10 @@ index d6f61fd..0a7f9aa 100644 ...@@ -301,11 +273,10 @@ index d6f61fd..0a7f9aa 100644
// 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 --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 diff -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectations/gpu_test_config.cc
index a7cc4b4..f8571d4 100644 --- gpu_test_expectations_reverted/gpu_test_config.cc 2016-08-12 21:23:54.884132405 -0400
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc +++ gpu_test_expectations/gpu_test_config.cc 2016-08-22 16:09:09.972124940 -0400
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc @@ -2,20 +2,205 @@
@@ -2,18 +2,193 @@
// 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.
...@@ -331,8 +302,8 @@ index a7cc4b4..f8571d4 100644 ...@@ -331,8 +302,8 @@ index a7cc4b4..f8571d4 100644
-#elif defined(OS_WIN) -#elif defined(OS_WIN)
-#include "base/win/windows_version.h" -#include "base/win/windows_version.h"
+#include "gpu_test_config_mac.h" +#include "gpu_test_config_mac.h"
+#endif #endif
+
+using namespace gpu; +using namespace gpu;
+ +
+#if defined(OS_WIN) +#if defined(OS_WIN)
...@@ -505,10 +476,22 @@ index a7cc4b4..f8571d4 100644 ...@@ -505,10 +476,22 @@ index a7cc4b4..f8571d4 100644
+ return kCollectInfoNonFatalFailure; + return kCollectInfoNonFatalFailure;
+} +}
+ +
#endif +#endif
+
+#if defined(OS_ANDROID)
+CollectInfoResult CollectGpuID(uint32 *vendor_id, uint32 *device_id)
+{
+ DCHECK(vendor_id && device_id);
+ *vendor_id = 0;
+ *device_id = 0;
+ return kCollectInfoNonFatalFailure;
+}
+#endif // defined(OS_ANDROID)
+
namespace gpu { namespace gpu {
@@ -295,21 +470,5 @@ bool GPUTestBotConfig::CurrentConfigMatches(
namespace {
@@ -295,21 +480,5 @@ bool GPUTestBotConfig::CurrentConfigMatc
return false; return false;
} }
...@@ -530,10 +513,9 @@ index a7cc4b4..f8571d4 100644 ...@@ -530,10 +513,9 @@ index a7cc4b4..f8571d4 100644
- -
} // namespace gpu } // namespace gpu
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 diff -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectations/gpu_test_config.h
index b5431e6..4cbc2c0 100644 --- gpu_test_expectations_reverted/gpu_test_config.h 2016-08-12 21:23:54.884132405 -0400
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.h +++ gpu_test_expectations/gpu_test_config.h 2015-11-30 21:54:30.239267635 -0500
+++ 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>
...@@ -545,7 +527,7 @@ index b5431e6..4cbc2c0 100644 ...@@ -545,7 +527,7 @@ index b5431e6..4cbc2c0 100644
namespace gpu { namespace gpu {
@@ -134,9 +132,6 @@ class GPU_EXPORT GPUTestBotConfig : public GPUTestConfig { @@ -134,9 +132,6 @@ class GPU_EXPORT GPUTestBotConfig : publ
// 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);
...@@ -555,11 +537,9 @@ index b5431e6..4cbc2c0 100644 ...@@ -555,11 +537,9 @@ index b5431e6..4cbc2c0 100644
}; };
} // namespace gpu } // namespace gpu
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.h b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.h diff -rupN gpu_test_expectations_reverted/gpu_test_config_mac.h gpu_test_expectations/gpu_test_config_mac.h
new file mode 100644 --- gpu_test_expectations_reverted/gpu_test_config_mac.h 1969-12-31 19:00:00.000000000 -0500
index 0000000..da22bd6 +++ gpu_test_expectations/gpu_test_config_mac.h 2015-11-30 21:54:30.239267635 -0500
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.h
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+// +//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved. +// Copyright 2015 The ANGLE Project Authors. All rights reserved.
...@@ -589,11 +569,9 @@ index 0000000..da22bd6 ...@@ -589,11 +569,9 @@ index 0000000..da22bd6
+gpu::GPUInfo::GPUDevice GetActiveGPU(); +gpu::GPUInfo::GPUDevice GetActiveGPU();
+ +
+#endif // GPU_TEST_EXPECTATIONS_GPU_TEST_CONFIG_MAC_H_ +#endif // GPU_TEST_EXPECTATIONS_GPU_TEST_CONFIG_MAC_H_
diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.mm b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.mm diff -rupN gpu_test_expectations_reverted/gpu_test_config_mac.mm gpu_test_expectations/gpu_test_config_mac.mm
new file mode 100644 --- gpu_test_expectations_reverted/gpu_test_config_mac.mm 1969-12-31 19:00:00.000000000 -0500
index 0000000..8cbd498 +++ gpu_test_expectations/gpu_test_config_mac.mm 2015-11-30 21:54:30.239267635 -0500
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.mm
@@ -0,0 +1,67 @@ @@ -0,0 +1,67 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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
...@@ -662,10 +640,9 @@ index 0000000..8cbd498 ...@@ -662,10 +640,9 @@ index 0000000..8cbd498
+ return gpu; + return gpu;
+} +}
+ +
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 diff -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu_test_expectations/gpu_test_expectations_parser.cc
index 6dac74e..23c4d8c 100644 --- gpu_test_expectations_reverted/gpu_test_expectations_parser.cc 2016-08-12 21:23:54.884132405 -0400
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc +++ gpu_test_expectations/gpu_test_expectations_parser.cc 2015-11-30 21:54:30.239267635 -0500
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
@@ -2,14 +2,43 @@ @@ -2,14 +2,43 @@
// 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.
...@@ -729,7 +706,7 @@ index 6dac74e..23c4d8c 100644 ...@@ -729,7 +706,7 @@ index 6dac74e..23c4d8c 100644
return kConfigGPUDeviceID; return kConfigGPUDeviceID;
for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
@@ -176,10 +205,10 @@ bool NamesMatching(const std::string& ref, const std::string& test_name) { @@ -176,10 +205,10 @@ bool NamesMatching(const std::string& re
GPUTestExpectationsParser::GPUTestExpectationsParser() { GPUTestExpectationsParser::GPUTestExpectationsParser() {
// Some sanity check. // Some sanity check.
...@@ -744,7 +721,7 @@ index 6dac74e..23c4d8c 100644 ...@@ -744,7 +721,7 @@ index 6dac74e..23c4d8c 100644
} }
GPUTestExpectationsParser::~GPUTestExpectationsParser() { GPUTestExpectationsParser::~GPUTestExpectationsParser() {
@@ -204,8 +233,8 @@ bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) { @@ -204,8 +233,8 @@ bool GPUTestExpectationsParser::LoadTest
return rt; return rt;
} }
...@@ -755,7 +732,7 @@ index 6dac74e..23c4d8c 100644 ...@@ -755,7 +732,7 @@ index 6dac74e..23c4d8c 100644
entries_.clear(); entries_.clear();
error_messages_.clear(); error_messages_.clear();
@@ -399,7 +428,7 @@ bool GPUTestExpectationsParser::ParseLine( @@ -399,7 +428,7 @@ bool GPUTestExpectationsParser::ParseLin
stage++; stage++;
break; break;
default: default:
...@@ -764,7 +741,7 @@ index 6dac74e..23c4d8c 100644 ...@@ -764,7 +741,7 @@ index 6dac74e..23c4d8c 100644
break; break;
} }
} }
@@ -488,7 +517,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig( @@ -488,7 +517,7 @@ bool GPUTestExpectationsParser::UpdateTe
config->set_api(config->api() | kTokenData[token].flag); config->set_api(config->api() | kTokenData[token].flag);
break; break;
default: default:
...@@ -773,10 +750,9 @@ index 6dac74e..23c4d8c 100644 ...@@ -773,10 +750,9 @@ index 6dac74e..23c4d8c 100644
break; break;
} }
return true; return true;
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 diff -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_test_expectations/gpu_test_expectations_parser.h
index a69f7e9..a112700 100644 --- gpu_test_expectations_reverted/gpu_test_expectations_parser.h 2016-08-12 21:23:54.884132405 -0400
--- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h +++ gpu_test_expectations/gpu_test_expectations_parser.h 2015-11-30 21:54:30.239267635 -0500
+++ 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>
...@@ -790,7 +766,7 @@ index a69f7e9..a112700 100644 ...@@ -790,7 +766,7 @@ index a69f7e9..a112700 100644
namespace gpu { namespace gpu {
@@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsParser { @@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsPars
// 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);
...@@ -799,3 +775,29 @@ index a69f7e9..a112700 100644 ...@@ -799,3 +775,29 @@ index a69f7e9..a112700 100644
// 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 -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 2016-08-22 15:52:38.098728514 -0400
@@ -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.patch 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~```
+ * ```rm angle-mods.patch```
+ * ```git diff HEAD~ (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend```
+ * ```git rebase -i``` to squash the three patches into one.
+
...@@ -49,8 +49,11 @@ namespace base ...@@ -49,8 +49,11 @@ namespace base
} }
// TODO(jmadill): other platforms // TODO(jmadill): other platforms
// clang-format off
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
# define OS_WIN # define OS_WIN
#elif defined(ANDROID)
# define OS_ANDROID
#elif defined(__linux__) #elif defined(__linux__)
# define OS_LINUX # define OS_LINUX
#elif defined(__APPLE__) #elif defined(__APPLE__)
...@@ -58,5 +61,6 @@ namespace base ...@@ -58,5 +61,6 @@ namespace base
#else #else
# error "Unsupported platform" # error "Unsupported platform"
#endif #endif
// clang-format on
#endif #endif
...@@ -191,6 +191,16 @@ CollectInfoResult CollectGpuID(uint32* vendor_id, uint32* device_id) { ...@@ -191,6 +191,16 @@ CollectInfoResult CollectGpuID(uint32* vendor_id, uint32* device_id) {
#endif #endif
#if defined(OS_ANDROID)
CollectInfoResult CollectGpuID(uint32 *vendor_id, uint32 *device_id)
{
DCHECK(vendor_id && device_id);
*vendor_id = 0;
*device_id = 0;
return kCollectInfoNonFatalFailure;
}
#endif // defined(OS_ANDROID)
namespace gpu { namespace gpu {
namespace { namespace {
......
//
// Copyright (c) 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// AndroidPixmap.cpp: Implementation of OSPixmap for Android
#include "OSPixmap.h"
OSPixmap *CreateOSPixmap()
{
return nullptr;
}
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
], ],
'util_android_sources': 'util_android_sources':
[ [
'android/AndroidPixmap.cpp',
'android/AndroidWindow.cpp', 'android/AndroidWindow.cpp',
'android/AndroidWindow.h', 'android/AndroidWindow.h',
'android/third_party/android_native_app_glue.c', 'android/third_party/android_native_app_glue.c',
......
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