Mali OpenGL ES Emulator v3.0.2 User Guide For Windows
Mali OpenGL ES Emulator v3.0.2 User Guide For Windows
2
User Guide for Windows
Proprietary Notice
Words and logos marked with ® or ™ are registered trademarks or
trademarks of ARM Limited in the EU and other countries, except as
otherwise stated below in this proprietary notice. Other brands and
names mentioned herein may be the trademarks of their respective
owners. Windows is a registered trademark of Microsoft Corporation
in the United States and other countries.
OpenGL is a registered trademark and the OpenGL ES logo is a
trademark of Silicon Graphics Inc. used by permission by Khronos.
Neither the whole nor any part of the information contained in, or the
product described in, this document may be adapted or reproduced
in any material form except with the prior written permission of the
copyright holder.
The product described in this document is subject to continuous
developments and improvements. All particulars of the product and
its use contained in this document are given by ARM Limited in
good faith. However, all warranties implied or expressed, including
but not limited to implied warranties of merchantability, or fitness for
purpose, are excluded.
This document is intended only to assist the reader in the use of the
product. ARM Limited shall not be liable for any loss for damage
arising from the use of any information in this document, or any
error or omission in such information, or any incorrect use of the
product.
© ARM Limited 2017. All rights reserved.
| Proprietary Notice | 4
| Contents | 5
Contents
Introduction................................................................................................................. 7
Chapter 6: Maintenance........................................................................33
Troubleshooting........................................................................................................................... 34
Uninstalling Using Control Panel................................................................................................ 34
Support........................................................................................................................................ 34
Changes from Previous Versions............................................................................................... 34
| Contents | 6
Introduction
The Mali OpenGL ES Emulator allows you to use the OpenGL ES 2.0, 3.0, 3.1 and 3.2 APIs to render
3D graphics content on a desktop PC.
You can use it to try out ideas and develop content without having access to an embedded or mobile
device, or to allow your cross-platform application to target both mobile and desktop GPUs without
having to modify the graphics layer.
The Mali OpenGL ES Emulator is available for both Windows and Linux, and comes in both 32 and 64
bit variants.
This document describes how to install and use the Mali OpenGL ES Emulator on Windows systems.
| Introduction | 8
Chapter
1
Installation and Configuration
Topics:
The installation package for the Mali OpenGL ES Emulator contains
• Minimum Requirements everything you need to get started building OpenGL ES applications
on a desktop computer. It includes header files and shared libraries
• Installation Using Installer
to which you can link your application in order to render 3D graphics
• Installation from ZIP Package using the OpenGL ES APIs.
• Installation Results
You should have downloaded the installation package for Windows.
• Verifying the Installation
The package should closely resemble your host environment. If you
aren't sure which package to choose, the 32 bit version will work
across the widest variety of platforms.
The installation package contains three main components: the
emulator libraries, the header files and a simple demonstration
program as executable.
Caution: It's possible to install both the 32 and 64 bit
variants of Mali OpenGL ES Emulator on the same system,
but the correct management of paths is left to the user. The
installer will set up the system to use the emulator headers
and libraries that were installed most recently.
| Installation and Configuration | 10
Minimum Requirements
In general, the Mali OpenGL ES Emulator will work on any system that supports at least:
1
• OpenGL 3.2 – when OpenGL ES 2.0 contexts are used
• OpenGL 3.3 – when OpenGL ES 3.0 contexts are used
2
• OpenGL 4.3 – when OpenGL ES 3.1 or 3.2 contexts are used
On all systems, up-to-date operating system components and graphics drivers are recommended.
We recommend using the Mali OpenGL ES Emulator with NVIDIA drivers. At the date of this release
the reference driver version is 344.60 or higher.
We are aware of various issues when running the Emulator with ATI/AMD drivers and are working on
improving the support. Detailed interoperability with other drivers was not tested.
Installation Results
Both the installer and ZIP packages provide the following file structure:
1
ARB_sampler_objects also required, otherwise OpenGL 3.3.
2
To use GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED OpenGL 4.4 is required.
| Installation and Configuration | 11
+-libEGL.lib
+-libMaliEmulator.dll
+-libMaliEmulator.lib
+-log4cplus.dll
+-msvcp110.dll
+-msvcp120.dll
+-msvcr110.dll
+-msvcr120.dll
+-include
| +-EGL
| +-GLES2
| +-GLES3
| +-KHR
+-openglessl
| +-Mali-T600_r7p0-00rel0.dll
+-EULA.txt
+-LICENSES.txt
+-Mali OpenGL ES Emulator v3.0.2 User Guide for Windows.pdf
2
Using with Your Application
Topics:
This chapter describes some basic preparations to have your
• Compiling Your Project OpenGL ES application working with Mali OpenGL ES Emulator.
• Choosing an EGL
Configuration
• Creating an EGL Context
• Tessellation Extension
| Using with Your Application | 14
#include <EGL/egl.h>
#include <GLES3/gl3.h>
Note: libEGL.dll and libGLES.dll libraries use the __stdcall calling convention.
EGLDisplay display;
EGLint attributes[] =
{
// Request OpenGL ES 2.0 configs
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_NONE
};
EGLConfig configs[1];
EGLint num_configs;
eglChooseConfig(display, attributes, configs, 1, &num_configs);
You can also request that both types of configs are returned by bitwise-ORing the values:
EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT_KHR.
It is possible to request EGL config either with no caveats (neither EGL_SLOW_CONFIG or
EGL_NON_CONFORMANT_CONFIG) or regardless of any caveats by passing the EGL_CONFORMANT
attribute to eglChooseConfig:
• To request an OpenGL ES 2.0 config with no caveats, use EGL_OPENGL_ES2_BIT.
• To request an OpenGL ES 3.0, 3.1 or 3.2 config with no caveats, use
EGL_OPENGL_ES3_BIT_KHR.
3
If you are using other compiler, consult its documentation for how to add headers and libraries on your
system.
| Using with Your Application | 15
• To request an OpenGL ES 2.0, 3.0, 3.1 or 3.2 config regardless of any caveats, use 0. You can also
bitwise-OR the values, as described above.
EGLDisplay display;
EGLConfig configs[1];
EGLContext context;
EGLint context_attributes[] = {
EGL_CONTEXT_CLIENT_VERSION, 2, // Select an OpenGL ES 2.0 context
EGL_NONE
};
EGLDisplay display;
EGLConfig configs[1];
EGLContext context;
Tessellation Extension
Because of a small inconsistency in Khronos extension definitions, there is one thing worth to pay
attention to when using GL_EXT_tessellation_shader extensions.
This extension is available with GLES 3.1 and 3.2 version contexts. However specific entry points
and enums are defined in gles2ext.h header file. Therefore when using this extension the include
section in you applications should contain both files:
#include <GLES2/gl2ext.h>
#include <GLES3/gl31.h>
| Using with Your Application | 16
Chapter
3
OpenGL ES Implementation
Topics:
The Mali OpenGL ES Emulator works by transparently converting
• OpenGL ES Extensions all OpenGL ES API calls to appropriate sequences of OpenGL
calls. These OpenGL calls are then handled by the native platform's
• Shading Language Version
graphics driver. OpenGL ES calls are converted to OpenGL calls.
• Compressed Texture Formats
• ASTC Format Support Because of the difference in specifications, OpenGL ES parameters
are not always compatible with OpenGL. The API call conversion
• KHR Debug Extension
checks OpenGL ES parameters, and rejects invalid parameter
• Limitations values. The OpenGL ES Emulator depends on the functionality
of the OpenGL implementation provided by the graphics card
drivers. In some cases, this dependency can lead to limitations in
the OpenGL ES implementation. This occurs when the behaviour of
the graphics card driver differs from:
• OpenGL 3.2 specification plus ARB_sampler_objects extension
or OpenGL 3.3 for OpenGL ES 2.0 contexts
• OpenGL 3.3 specification for OpenGL ES 3.0 contexts
• OpenGL 4.3 specification for OpenGL ES 3.1 contexts
• OpenGL 4.3 specification for OpenGL ES 3.2 contexts
| OpenGL ES Implementation | 18
OpenGL ES Extensions
The table below lists all OpenGL ES extensions supported by the OpenGL ES Emulator in various
context types.
• GL_COMPRESSED_RGBA_ASTC_8x5_KHR
• GL_COMPRESSED_RGBA_ASTC_8x6_KHR
• GL_COMPRESSED_RGBA_ASTC_8x8_KHR
• GL_COMPRESSED_RGBA_ASTC_10x5_KHR
• GL_COMPRESSED_RGBA_ASTC_10x6_KHR
• GL_COMPRESSED_RGBA_ASTC_10x8_KHR
• GL_COMPRESSED_RGBA_ASTC_10x10_KHR
• GL_COMPRESSED_RGBA_ASTC_12x10_KHR
• GL_COMPRESSED_RGBA_ASTC_12x12_KHR
which are stored in GL_RGBA + GL_RGBA + GL_FLOAT internal format, and
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR
• GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
which are stored in GL_RGBA + GL_SRGB_ALPHA + GL_FLOAT internal format. Internally, the textures
are decompressed to unsigned byte format (the number of components depends on the compression
algorithm in question) or floating-point format.
Scope
Debug messages are related with OpenGL ES emulation sub-system. EGL part is not covered by
debug messages reported by implementation of this extension.
Messages
Debug messages are consistent to various error, warning and information messages the Emulator
reports to the user console in the run-time. By using KHR_Debug interface, all internal messages
are reported as GL_DEBUG_TYPE_ERROR_KHR type and as GL_DEBUG_SOURCE_API source. What
differentiates them is their severity so that:
• FATAL ERROR level emulator messages have severity set to GL_DEBUG_SEVERITY_HIGH_KHR
• ERROR level emulator messages have severity set to GL_DEBUG_SEVERITY_MEDIUM_KHR
• WARNING level emulator messages and ERROR messages have severity set to
GL_DEBUG_SEVERITY_LOW_KHR
• INFO level emulator messages and ERROR messages have severity set to
GL_DEBUG_SEVERITY_NOTIFICATION_KHR
Debug Groups
OpenGL ES Emulator doesn’t support more than one default debug message group. Calling
PopDebugGroup() and PushDebugGroup(...) produces GL_STACK_UNDERFLOW and
GL_STACK_OVERFLOW errors respectively.
| OpenGL ES Implementation | 21
Debug Labels
At the moment there is no support for sync object labels. Calling ObjectPtrLabel(...) and
GetObjectPtrLabel(...) generates GL_INVALID_OPERATION error.
Additional Considerations
Implementation dependent constants have values of:
• GL_MAX_DEBUG_MESSAGE_LENGTH is set to 512
• GL_MAX_DEBUG_LOGGED_MESSAGES is set to 2048
• GL_MAX_LABEL_LENGTH value will be arbitrarily set to 256.
Emulator offers KHR_Debug support for any context type - also those context types created
without EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag. glGetInteger(...) called with
GL_CONTEXT_FLAG_DEBUG_BIT_KHR always returns GL_TRUE.
Message Identifiers
All debug messages from the Emulator have values in range 0x2000 to 0x4000.
Limitations
ES 3.1 Support
The following features are known to have limited or non-conformant behaviour:
• There is no exact support for glMemoryBarrierByRegion entrypoint implementation as defined
in OpenGL ES 3.1 specification. The entrypoint function is available in the Emulator but acts exactly
as glMemoryBarrier function.
• Usage of built-in mix function in shaders when uvec4 type values are used as arguments,
• GL_TRANSFORM_FEEDBACK_VARYING passed as programInterface parameter as per specification.
• Using built-in special fragment shader variable gl_HelperInvocation is not supported.
• When extension GL_EXT_shader_io_blocks is enabled and separable programs are used,
precision qualifiers for variables in the interface blocks are omitted from checking input-output
interface matching in program pipelines.
Implementation-specific Behaviour
Where the OpenGL ES specifications permit implementation-specific behaviour, the behaviour is
usually determined by the underlying driver. The behaviour of the graphics card drivers can differ
from the behaviour of Mali drivers and hardware. This includes implementation-dependent limits, for
example:
• texture sizes
| OpenGL ES Implementation | 22
• extensions
• mipmap level calculation
• precision of shaders
• framebuffers.
The following properties are enforced to mimic Mali driver behaviour:
• GL_MAX_RENDERBUFFER_SIZE is 4096 (for OpenGL ES 2.0, 3.0 and 3.1 contexts)
• GL_MAX_UNIFORM_BLOCK_SIZE is 16384 (for OpenGL ES 3.0 and 3.1 contexts only)
glGetShaderPrecisionFormat Values
For OpenGL ES 3.0 and 3.1 applications, glGetShaderPrecisionFormat forwards the call to the
underlying GL implementation if the ARB_ES2_compatibility extension is present. If the extension
is not present, the following range and precision information is reported:
• GL_LOW_FLOAT / GL_MEDIUM_FLOAT / GL_HIGH_FLOAT precision type: Min range: 127, Max
range: 127, Precision: 23
• GL_LOW_INT, GL_MEDIUM_INT, GL_HIGH_INT precision type: Min range: 31, Max range: 30,
Precision: 0
4
EGL Implementation
Topics:
The EGL library is a limited implementation of EGL that suffices
• EGL Extensions to allow the Mali OpenGL ES Emulator to pass the Khronos
Conformance Test Suite. As such, there are some limitations.
• Limitations
Mali OpenGL ES Emulator comes with support for EGL 1.4 API
version plus several EGL extensions as described later in this
chapter.
The EGL implementation supports OpenGL ES API only.
The EGL library does not support OpenVG. Neither graphics
contexts nor surfaces created can be used with OpenVG. No
configurations are returned from eglChooseConfig for values of
EGL_RENDERABLE_TYPE other than EGL_OPENGL_ES2_BIT or
EGL_OPENGL_ES3_BIT_KHR .
Context creation fails unless context version is set to 2,
3, 3.1 or 3.2 using EGL_CONTEXT_CLIENT_VERSION
attribute or EGL_CONTEXT_MAJOR_VERSION /
EGL_CONTEXT_MINOR_VERSION attribute pair respectively.
elgGetProcAddress function returns pointer to any EGL and
GL ES entrypoint provided by the Emulator, not just an extension
functions.
| EGL Implementation | 26
EGL Extensions
The Mali OpenGL ES Emulator supports the following EGL extensions:
• EGL_KHR_create_context
• EGL_KHR_config_attribs
• EGL_KHR_image_base
• EGL_KHR_image
• EGL_KHR_image_pixmap
• EGL_KHR_gl_renderbuffer_image
• EGL_KHR_gl_texture_2D_image
• EGL_KHR_gl_texture_cubemap_image
Limitations
Applications should work as expected even if the chosen EGL config does not match the pixmap format
because rendering is done to an internal buffer and then copied to the pixmap, including any necessary
pixel format conversions. If an eight bit per channel EGL config is desired (to ensure the same colour
precision as the native pixmap), then EGL_RED_SIZE, EGL_GREEN_SIZE and EGL_BLUE_SIZE
should be explicitly passed to eglChooseConfig.
5
Mali Checker Application
Topics:
OpenGL ES Emulator is shipped with diagnostic application mali-
• Performing a Check checker. The tool can be used to diagnose configuration of the OS
installed on user's machine with respect to emulator's requirements.
• Report File
• Command-line Parameters
| Mali Checker Application | 30
Performing a Check
Mali checker can be executed by launching executable:
mali-checker.exe
The application will produce and open HTML report with examination results.
Report File
The report produced by the checking application is made of three main sections:
• Overview
• Examinations
• Features and Extensions
Overview Section
This section contains information that identify the report and the operating system the examinations
has been performed on.
Examinations Section
This section contains list and details of examinations that have been performed by the application.
Command-line Parameters
When launched without parameters, the mali-checker application will create and display HTML
report with all built-in checks performed.
Controlling Checks
It's possible to have a fine-grain control over number of checks the application performs with the
following command-line paramters.
-a, --all
Perform all checks. Default if no individual checks are specified.
-e, --gles-and-egl
Check if libGLESv2 and libEGL are loaded and correct versions.
-E, --environment
Check the enviroment variables.
-g, --gl
Check if libGL is loaded and is suitable.
-H, --header
Check if the default headers are compatible with ours.
-m, --moc
| Mali Checker Application | 31
Miscellaneous
Other parameters:
--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.
--version
Displays version information and exits.
-h, --help
Displays usage information and exits.
| Mali Checker Application | 32
Chapter
6
Maintenance
Topics:
This chapter contains topics related to maintenance, troubleshooting
• Troubleshooting and support for the OpenGL ES Emulator application installed on
the system.
• Uninstalling Using Control
Panel
• Support
• Changes from Previous
Versions
| Maintenance | 34
Troubleshooting
Any erroneous situation leading to improper behaviour of installed OpenGL ES Emulator should leave
error message on the application console window.
Please refer to these messages when obtaining help from technical support.
If ths environment variable is unset, the emulator uses FATAL as the default log verbosity level.
Support
For further support on this product, please visit the ARM Connected Community.
Continued Support
It should be noted that continuing support of the product will only be provided by ARM if such support is
covered by a current contract with the recipient.
• Improved support of existing OpenGL ES extensions under OpenGL ES 2.0 and 3.0 contexts.
• Improved handling of depth textures.
• Various improvements and bug fixes.