xref: /aosp_15_r20/external/angle/doc/dEQP.md (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# ANGLE + dEQP
2*8975f5c5SAndroid Build Coastguard Worker
3*8975f5c5SAndroid Build Coastguard WorkerdrawElements (dEQP) is a very robust and comprehensive set of open-source
4*8975f5c5SAndroid Build Coastguard Workertests for GLES2, GLES3+ and EGL. They provide a huge net of coverage for
5*8975f5c5SAndroid Build Coastguard Workeralmost every GL API feature. ANGLE by default builds dEQP testing targets for
6*8975f5c5SAndroid Build Coastguard Workertesting against GLES 2, GLES 3, EGL, and GLES 3.1 (on supported platforms).
7*8975f5c5SAndroid Build Coastguard Worker
8*8975f5c5SAndroid Build Coastguard Worker## How to build dEQP
9*8975f5c5SAndroid Build Coastguard Worker
10*8975f5c5SAndroid Build Coastguard WorkerYou should have dEQP as a target if you followed the [DevSetup](DevSetup.md)
11*8975f5c5SAndroid Build Coastguard Workerinstructions. Some of the current targets are:
12*8975f5c5SAndroid Build Coastguard Worker
13*8975f5c5SAndroid Build Coastguard Worker  * `angle_deqp_egl_tests` for EGL 1.x tests
14*8975f5c5SAndroid Build Coastguard Worker  * `angle_deqp_gles2_tests` for GLES 2.0 tests
15*8975f5c5SAndroid Build Coastguard Worker  * `angle_deqp_gles3_tests` for GLES 3.0 tests
16*8975f5c5SAndroid Build Coastguard Worker  * `angle_deqp_gles31_tests` for GLES 3.1 tests
17*8975f5c5SAndroid Build Coastguard Worker
18*8975f5c5SAndroid Build Coastguard Worker## How to use dEQP
19*8975f5c5SAndroid Build Coastguard Worker
20*8975f5c5SAndroid Build Coastguard WorkerNote:
21*8975f5c5SAndroid Build Coastguard WorkerTo run an individual test, use the `--gtest_filter` argument.
22*8975f5c5SAndroid Build Coastguard WorkerIt supports simple wildcards. For example: `--gtest_filter=dEQP-GLES2.functional.shaders.linkage.*`.
23*8975f5c5SAndroid Build Coastguard Worker
24*8975f5c5SAndroid Build Coastguard WorkerThe tests lists are sourced from the Android CTS mains in
25*8975f5c5SAndroid Build Coastguard Worker`third_party/VK-GL-CTS/src/android/cts/main`. See `gles2-main.txt`,
26*8975f5c5SAndroid Build Coastguard Worker`gles3-main.txt`, `gles31-main.txt` and `egl-main.txt`.
27*8975f5c5SAndroid Build Coastguard Worker
28*8975f5c5SAndroid Build Coastguard WorkerIf you're running a full test suite, it might take very long time. Running in
29*8975f5c5SAndroid Build Coastguard WorkerDebug is only useful to isolate and fix particular failures, Release will give
30*8975f5c5SAndroid Build Coastguard Workera better sense of total passing rate.
31*8975f5c5SAndroid Build Coastguard Worker
32*8975f5c5SAndroid Build Coastguard Worker### Choosing a Renderer
33*8975f5c5SAndroid Build Coastguard Worker
34*8975f5c5SAndroid Build Coastguard WorkerBy default ANGLE tests with Vulkan, except on Apple platforms where OpenGL is used.
35*8975f5c5SAndroid Build Coastguard WorkerTo specify the exact platform for ANGLE + dEQP, use the arguments:
36*8975f5c5SAndroid Build Coastguard Worker
37*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-d3d11` for D3D11 (highest available feature level)
38*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-d3d9` for D3D9
39*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-d3d11-fl93` for D3D11 Feature level 9_3
40*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-gl` for OpenGL Desktop (OSX, Linux and Windows)
41*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-gles` for OpenGL ES (Android/ChromeOS, some Windows platforms)
42*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-metal` for Metal (Mac)
43*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-swiftshader` for Vulkan with SwiftShader as driver (Android, Linux, Mac, Windows)
44*8975f5c5SAndroid Build Coastguard Worker  * `--deqp-egl-display-type=angle-vulkan` for Vulkan (Android, Linux, Windows)
45*8975f5c5SAndroid Build Coastguard Worker
46*8975f5c5SAndroid Build Coastguard WorkerThe flag `--use-angle=X` has the same effect as `--deqp-egl-display-type=angle-X`.
47*8975f5c5SAndroid Build Coastguard Worker
48*8975f5c5SAndroid Build Coastguard Worker### Check your results
49*8975f5c5SAndroid Build Coastguard Worker
50*8975f5c5SAndroid Build Coastguard WorkerIf run from Visual Studio 2015, dEQP generates a test log to
51*8975f5c5SAndroid Build Coastguard Worker`out/sln/obj/src/tests/TestResults.qpa`. To view the test log information, you'll need to
52*8975f5c5SAndroid Build Coastguard Workeruse the open-source GUI
53*8975f5c5SAndroid Build Coastguard Worker[Cherry](https://android.googlesource.com/platform/external/cherry). ANGLE
54*8975f5c5SAndroid Build Coastguard Workerchecks out a copy of Cherry to `angle/third_party/cherry` when you sync with
55*8975f5c5SAndroid Build Coastguard Workergclient. Note, if you are using ninja or another build system, the qpa file
56*8975f5c5SAndroid Build Coastguard Workerwill be located in your working directory.
57*8975f5c5SAndroid Build Coastguard Worker
58*8975f5c5SAndroid Build Coastguard WorkerSee the [official Cherry README](https://android.googlesource.com/platform/external/cherry/+/master/README)
59*8975f5c5SAndroid Build Coastguard Workerfor instructions on how to run Cherry on Linux or Windows.
60*8975f5c5SAndroid Build Coastguard Worker
61*8975f5c5SAndroid Build Coastguard Worker### GoogleTest, ANGLE and dEQP
62*8975f5c5SAndroid Build Coastguard Worker
63*8975f5c5SAndroid Build Coastguard WorkerANGLE also supports the same set of targets built with GoogleTest, for running
64*8975f5c5SAndroid Build Coastguard Workeron the bots. We don't currently recommend using these for local debugging, but
65*8975f5c5SAndroid Build Coastguard Workerwe do maintain lists of test expectations in `src/tests/deqp_support` (see
66*8975f5c5SAndroid Build Coastguard Worker[Handling Test Failures](TestingAndProcesses.md)). When
67*8975f5c5SAndroid Build Coastguard Workeryou fix tests, please remove the suppression(s) from the relevant files!
68*8975f5c5SAndroid Build Coastguard Worker
69*8975f5c5SAndroid Build Coastguard Worker### Running dEQP on Android
70*8975f5c5SAndroid Build Coastguard Worker
71*8975f5c5SAndroid Build Coastguard WorkerWhen you only need to run a few tests with `--gtest_filter` you can use Android wrappers such as `angle_deqp_egl_tests` directly but beware that Android test runner wipes data by default (try `--skip-clear-data`).
72*8975f5c5SAndroid Build Coastguard Worker
73*8975f5c5SAndroid Build Coastguard WorkerRunning the tests not using the test runner is tricky, but is necessary in order to get a complete TestResults.qpa from the dEQP tests when running many 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
74*8975f5c5SAndroid Build Coastguard Worker```
75*8975f5c5SAndroid Build Coastguard Workeradb 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
76*8975f5c5SAndroid Build Coastguard Worker```
77*8975f5c5SAndroid Build Coastguard WorkerAfter the tests finish, get the results with (requires `adb root`)
78*8975f5c5SAndroid Build Coastguard Worker```
79*8975f5c5SAndroid Build Coastguard Workeradb pull /data/data/com.android.angle.test/TestResults.qpa .
80*8975f5c5SAndroid Build Coastguard Worker```
81*8975f5c5SAndroid Build Coastguard WorkerNote: this location might change, one can double-check with `adb logcat -d | grep qpa`.
82