Shahbaz Youssefi | 9544002 | 2019-02-01 16:36:09 -0500 | [diff] [blame^] | 1 | # Using External Benchmarks with ANGLE |
| 2 | |
| 3 | This document contains instructions on how to run external benchmarks on ANGLE as the GLES renderer. |
| 4 | There is a section for each benchmark with subsections for each platform. The general theme is to |
| 5 | make the benchmark application pick ANGLE's `libGLESv2.so` and `libEGL.so` files instead of the |
| 6 | system ones. |
| 7 | |
| 8 | On Linux, this is generally achieved with setting `LD_LIBRARY_PATH`. On Windows, ANGLE dlls may |
| 9 | need to be copied to the benchmark's executable directory. |
| 10 | |
| 11 | ## glmark2 |
| 12 | |
| 13 | This benchmark can be found on [github](https://github.com/glmark2/glmark2). It's written against |
| 14 | GLES 2.0 and supports Linux and Android. It performs tens of tests and reports the framerate for |
| 15 | each test. |
| 16 | |
| 17 | ### glmark2 on Linux |
| 18 | |
| 19 | To 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 | |
| 28 | To run glmark2 using the native implementation of GLES: |
| 29 | |
| 30 | ``` |
| 31 | $ cd build/src |
| 32 | $ ./glmark2-es2 |
| 33 | ``` |
| 34 | |
| 35 | To 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 | |
| 43 | Back 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 | |
| 50 | With `ldd`, you can verify that `libEGL.so.1` and `libGLESv2.so.2` are correctly picked up from |
| 51 | ANGLE's build directory. |
| 52 | |
| 53 | To run glmark2 on the default back-end of ANGLE: |
| 54 | |
| 55 | ``` |
| 56 | $ LD_LIBRARY_PATH=/path/to/angle/out/release/ ./glmark2-es2 |
| 57 | ``` |
| 58 | |
| 59 | To 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 | ``` |