• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ANGLE + dEQP
2
3drawElements (dEQP) is a very robust and comprehensive set of open-source
4tests for GLES2, GLES3+ and EGL. They provide a huge net of coverage for
5almost every GL API feature. ANGLE by default builds dEQP testing targets for
6testing against GLES 2, GLES 3, EGL, and GLES 3.1 (on supported platforms).
7
8## How to build dEQP
9
10You should have dEQP as a target if you followed the [DevSetup](DevSetup.md)
11instructions. Current targets:
12
13  * `angle_deqp_gles2_tests` for GLES 2.0 tests
14  * `angle_deqp_gles2_no_gtest` for GLES 2.0 tests without google test suite
15  * `angle_deqp_gles3_tests` for GLES 3.0 tests
16  * `angle_deqp_gles3_no_gtest` for GLES 3.0 tests without google test suite
17  * `angle_deqp_egl_tests` for EGL 1.x tests
18  * `angle_deqp_egl_no_gtest` for EGL 1.x tests without google test suite
19  * `angle_deqp_gles31_tests` for GLES 3.1 tests (currently very experimental)
20  * `angle_deqp_gles31_no_gtest` for GLES 3.1 tests (currently very experimental) without google test suite
21
22## How to use dEQP
23
24Note:
25To run an individual test, use the `--deqp-case` flag on any of the `no_gtest` targets.
26It supports simple wildcard support. For example: `--deqp-case=dEQP-
27GLES2.functional.shaders.linkage.*`.
28The `gtest` targets support wildcards via the `--gtest_filter` argument,
29but have different test names.
30
31The tests lists are sourced from the Android CTS masters in
32`third_party/VK-GL-CTS/src/android/cts/master`. See `gles2-master.txt`,
33`gles3-master.txt`, `gles31-master.txt` and `egl-master.txt`.
34
35If you're running a full test suite, it might take very long time. Running in
36Debug is only useful to isolate and fix particular failures, Release will give
37a better sense of total passing rate.
38
39### Choosing a Renderer
40
41By default ANGLE tests with D3D11 on Windows, GLES on mobile and Desktop GL otherwise.
42To specify the exact platform for ANGLE + dEQP, use the arguments:
43
44  * `--deqp-egl-display-type=angle-d3d11` for D3D11 (highest available feature level)
45  * `--deqp-egl-display-type=angle-d3d9` for D3D9
46  * `--deqp-egl-display-type=angle-d3d11-fl93` for D3D11 Feature level 9_3
47  * `--deqp-egl-display-type=angle-gl` for OpenGL Desktop (OSX, Linux and Windows)
48  * `--deqp-egl-display-type=angle-gles` for OpenGL ES (Android/ChromeOS, some Windows platforms)
49  * `--deqp-egl-display-type=angle-metal` for Metal (Mac)
50  * `--deqp-egl-display-type=angle-swiftshader` for Vulkan with SwiftShader as driver (Android, Linux, Mac, Windows)
51  * `--deqp-egl-display-type=angle-vulkan` for Vulkan (Android, Linux, Windows)
52
53The flag `--use-angle=X` has the same effect as `--deqp-egl-display-type=angle-X`.
54
55### Check your results
56
57If run from Visual Studio 2015, dEQP generates a test log to
58`out/sln/obj/src/tests/TestResults.qpa`. To view the test log information, you'll need to
59use the open-source GUI
60[Cherry](https://android.googlesource.com/platform/external/cherry). ANGLE
61checks out a copy of Cherry to `angle/third_party/cherry` when you sync with
62gclient. Note, if you are using ninja or another build system, the qpa file
63will be located in your working directory.
64
65See the [official Cherry README](https://android.googlesource.com/platform/external/cherry/+/master/README)
66for instructions on how to run Cherry on Linux or Windows.
67
68### GoogleTest, ANGLE and dEQP
69
70ANGLE also supports the same set of targets built with GoogleTest, for running
71on the bots. We don't currently recommend using these for local debugging, but
72we do maintain lists of test expectations in `src/tests/deqp_support`. When
73you fix tests, please remove the suppression(s) from the relevant files!
74
75### Running dEQP on Android
76
77Running the tests not using the test runner is tricky, but is necessary in order to get a complete TestResults.qpa from the dEQP tests (since the runner shards the tests, only the results of the last shard will be available when using the test runner). First, use the runner to install the APK, test data and test expectations on the device. After the tests start running, the test runner can be stopped with Ctrl+C. Then, run
78```
79adb shell am start -a android.intent.action.MAIN -n org.chromium.native_test/.NativeUnitTestNativeActivity -e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt
80```
81After the tests finish, get the results with
82```
83adb pull /sdcard/chromium_tests_root/third_party/angle/third_party/deqp/src/data/TestResults.qpa .
84```
85Note: this location might change, one can double-check with `adb logcat -d | grep qpa`.
86