blob: c969c1dc7b1c1522e8ef081f7ce1ab5179f952d7 [file] [log] [blame] [view]
Shahbaz Youssefi95440022019-02-01 16:36:09 -05001# Using External Benchmarks with ANGLE
2
3This document contains instructions on how to run external benchmarks on ANGLE as the GLES renderer.
4There is a section for each benchmark with subsections for each platform. The general theme is to
5make the benchmark application pick ANGLE's `libGLESv2.so` and `libEGL.so` files instead of the
6system ones.
7
8On Linux, this is generally achieved with setting `LD_LIBRARY_PATH`. On Windows, ANGLE dlls may
9need to be copied to the benchmark's executable directory.
10
11## glmark2
12
13This benchmark can be found on [github](https://github.com/glmark2/glmark2). It's written against
14GLES 2.0 and supports Linux and Android. It performs tens of tests and reports the framerate for
15each test.
16
17### glmark2 on Linux
18
19To build glmark2 on Linux:
20
21```
22$ git clone https://github.com/glmark2/glmark2.git
23$ cd glmark2
24$ ./waf configure --with-flavors=x11-glesv2 --data-path=$PWD/data/
25$ ./waf
26```
27
28To run glmark2 using the native implementation of GLES:
29
30```
31$ cd build/src
32$ ./glmark2-es2
33```
34
35To run glmark2 using ANGLE, we need to first create a few links in the build directory of ANGLE:
36
37```
38$ cd /path/to/angle/out/release
39$ ln -s libEGL.so libEGL.so.1
40$ ln -s libGLESv2.so libGLESv2.so.2
41```
42
43Back in glmark2, we need to make sure these shared objects are picked up:
44
45```
46$ cd /path/to/glmark2/build/src
47$ LD_LIBRARY_PATH=/path/to/angle/out/release/ ldd ./glmark2-es2
48```
49
50With `ldd`, you can verify that `libEGL.so.1` and `libGLESv2.so.2` are correctly picked up from
51ANGLE's build directory.
52
53To run glmark2 on the default back-end of ANGLE:
54
55```
56$ LD_LIBRARY_PATH=/path/to/angle/out/release/ ./glmark2-es2
57```
58
59To run glmark2 on a specific back-end of ANGLE:
60
61```
62$ ANGLE_DEFAULT_PLATFORM=vulkan LD_LIBRARY_PATH=/path/to/angle/out/release/ ./glmark2-es2
63```