Using External Benchmarks with ANGLE
This document contains instructions on how to run external benchmarks on ANGLE as the GLES renderer. There is a section for each benchmark with subsections for each platform. The general theme is to make the benchmark application pick ANGLE's libGLESv2.so
and libEGL.so
files instead of the system ones.
On Linux, this is generally achieved with setting LD_LIBRARY_PATH
. On Windows, ANGLE dlls may need to be copied to the benchmark's executable directory.
glmark2
This benchmark can be found on github. It's written against GLES 2.0 and supports Linux and Android. It performs tens of tests and reports the framerate for each test.
glmark2 on Linux
To build glmark2 on Linux:
To run glmark2 using the native implementation of GLES:
To run glmark2 using ANGLE, we need to first create a few links in the build directory of ANGLE:
Back in glmark2, we need to make sure these shared objects are picked up:
With ldd
, you can verify that libEGL.so.1
and libGLESv2.so.2
are correctly picked up from ANGLE's build directory.
To run glmark2 on the default back-end of ANGLE:
To run glmark2 on a specific back-end of ANGLE:
glmark2 on Linux for Android
Prerequisites
Below steps are set up to use version 26.0.1 of build-tools, which can be downloaded here:
https://dl.google.com/android/repository/build-tools_r26.0.1-linux.zip
Tested with r19 of NDK, which can be downloaded here:
https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip
Tested with OpenJDK 8:
Note: This is built from a branch that has fixes for Android. It only supports 32-bit ARM (armeabi-v7a). Supporting other ABIs requires more work, possibly including a move to cmake instead of ndk-build.
Setup
Build
Install
Run
To select ANGLE as the driver on Android (requires Android Q):
To switch back to native GLES driver: