Commit 175d918a by Yuly Novikov Committed by Commit Bot

Revert "Load correct libGLESv2 on Linux and Mac."

This reverts commit dd815b62. Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006 Original change's description: > Load correct libGLESv2 on Linux and Mac. > > libEGL was implicitly loading libGLESv2 on startup. This is bad > because on platforms like Linux and Mac we could sometimes use the > incorrect rpath. This in turn meant we needed workarounds like using > "_angle" extensions to our shared objects to get the correct loading > behaviour. > > Fix this by loading libGLESv2 dynamically in libEGL. We build the > loader automatically from egl.xml. The loader itself is lazily > initialized on every EGL entry point call. This is necessary because > on Linux, etc, there is no equivalent to Windows' DLLMain. > > We also use an EGL.h with different generation options so we have the > proper function pointer types. A README is included for instructions > on how to regenerate EGL.h. > > The entry point generation script is refactored into a helper class > that is used in the loader generator. Also adds the libGLESv2 versions > of the EGL entry points in the DEF file on Windows. This allows them to > be imported properly in 32-bit configurations. > > Also fixes up some errors in ANGLE's entry point definitions. Also > includes a clang-format disable rule for the Khronos headers. > > This CL will help us to run ANGLE tests against native drivers. > > Bug: angleproject:2871 > Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572 > Reviewed-on: https://chromium-review.googlesource.com/c/1370725 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2871 Reviewed-on: https://chromium-review.googlesource.com/c/1378887Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
parent dd815b62
...@@ -59,23 +59,6 @@ config("external_config") { ...@@ -59,23 +59,6 @@ config("external_config") {
include_dirs = [ "include" ] include_dirs = [ "include" ]
} }
# Prevent the GL headers from redeclaring ANGLE entry points.
config("no_gl_prototypes") {
defines = [
"GL_GLES_PROTOTYPES=0",
"EGL_EGL_PROTOTYPES=0",
]
}
config("gl_prototypes") {
defines = [
"GL_GLES_PROTOTYPES=1",
"EGL_EGL_PROTOTYPES=1",
"GL_GLEXT_PROTOTYPES",
"EGL_EGLEXT_PROTOTYPES",
]
}
# This config is applied to internal Angle targets (not pushed to dependents). # This config is applied to internal Angle targets (not pushed to dependents).
config("internal_config") { config("internal_config") {
include_dirs = [ include_dirs = [
...@@ -83,7 +66,11 @@ config("internal_config") { ...@@ -83,7 +66,11 @@ config("internal_config") {
"src", "src",
] ]
defines = [] # Prevent the GL headers from redeclaring ANGLE entry points.
defines = [
"GL_GLEXT_PROTOTYPES",
"EGL_EGLEXT_PROTOTYPES",
]
if (angle_64bit_current_cpu) { if (angle_64bit_current_cpu) {
defines += [ "ANGLE_IS_64_BIT_CPU" ] defines += [ "ANGLE_IS_64_BIT_CPU" ]
...@@ -195,19 +182,21 @@ config("angle_common_config") { ...@@ -195,19 +182,21 @@ config("angle_common_config") {
} }
} }
source_set("angle_system_utils") {
sources = angle_system_utils_sources
configs -= angle_undefine_configs
configs += [
":extra_warnings",
":internal_config",
]
}
static_library("angle_common") { static_library("angle_common") {
sources = libangle_common_sources sources = libangle_common_sources
if (is_linux || is_android || is_fuchsia) {
sources += libangle_common_linux_sources
}
if (is_mac) {
sources += libangle_common_mac_sources
}
if (is_win) {
sources += libangle_common_win_sources
}
configs -= angle_undefine_configs configs -= angle_undefine_configs
configs += [ configs += [
":angle_common_config", ":angle_common_config",
...@@ -217,7 +206,6 @@ static_library("angle_common") { ...@@ -217,7 +206,6 @@ static_library("angle_common") {
] ]
public_deps = [ public_deps = [
":angle_system_utils",
":commit_id", ":commit_id",
":includes", ":includes",
] ]
...@@ -643,13 +631,6 @@ config("shared_library_public_config") { ...@@ -643,13 +631,6 @@ config("shared_library_public_config") {
} }
} }
config("library_name_config") {
defines = [
"ANGLE_EGL_LIBRARY_NAME=\"libEGL${angle_libs_suffix}\"",
"ANGLE_GLESV2_LIBRARY_NAME=\"libGLESv2${angle_libs_suffix}\"",
]
}
# This config controls export definitions on ANGLE API calls. # This config controls export definitions on ANGLE API calls.
config("angle_static") { config("angle_static") {
defines = [ defines = [
...@@ -687,7 +668,6 @@ shared_library("libGLESv2${angle_libs_suffix}") { ...@@ -687,7 +668,6 @@ shared_library("libGLESv2${angle_libs_suffix}") {
":commit_id_config", ":commit_id_config",
":debug_annotations_config", ":debug_annotations_config",
":extra_warnings", ":extra_warnings",
":gl_prototypes",
":internal_config", ":internal_config",
] ]
...@@ -770,28 +750,6 @@ static_library("libGLESv1_CM_static") { ...@@ -770,28 +750,6 @@ static_library("libGLESv1_CM_static") {
] ]
} }
config("libEGL_egl_loader_config") {
defines = [ "ANGLE_USE_EGL_LOADER" ]
}
source_set("libEGL_egl_loader") {
sources = [
"src/libEGL/egl_loader_autogen.cpp",
"src/libEGL/egl_loader_autogen.h",
]
public_configs = [
":libEGL_egl_loader_config",
":gl_prototypes",
":extra_warnings",
":internal_config",
]
deps = [
":includes",
]
}
shared_library("libEGL${angle_libs_suffix}") { shared_library("libEGL${angle_libs_suffix}") {
sources = libegl_sources sources = libegl_sources
...@@ -805,7 +763,6 @@ shared_library("libEGL${angle_libs_suffix}") { ...@@ -805,7 +763,6 @@ shared_library("libEGL${angle_libs_suffix}") {
":debug_annotations_config", ":debug_annotations_config",
":extra_warnings", ":extra_warnings",
":internal_config", ":internal_config",
":library_name_config",
] ]
defines = [ "LIBEGL_IMPLEMENTATION" ] defines = [ "LIBEGL_IMPLEMENTATION" ]
...@@ -828,12 +785,7 @@ shared_library("libEGL${angle_libs_suffix}") { ...@@ -828,12 +785,7 @@ shared_library("libEGL${angle_libs_suffix}") {
} }
deps = [ deps = [
":angle_system_utils",
":includes", ":includes",
":libEGL_egl_loader",
]
data_deps = [
":libGLESv2${angle_libs_suffix}", ":libGLESv2${angle_libs_suffix}",
] ]
} }
...@@ -847,7 +799,6 @@ static_library("libEGL_static") { ...@@ -847,7 +799,6 @@ static_library("libEGL_static") {
":debug_annotations_config", ":debug_annotations_config",
":extra_warnings", ":extra_warnings",
":internal_config", ":internal_config",
":library_name_config",
] ]
public_configs = [ ":angle_static" ] public_configs = [ ":angle_static" ]
...@@ -932,7 +883,6 @@ foreach(is_shared_library, ...@@ -932,7 +883,6 @@ foreach(is_shared_library,
configs += [ configs += [
":debug_annotations_config", ":debug_annotations_config",
":extra_warnings", ":extra_warnings",
":gl_prototypes",
] ]
public_configs = [ public_configs = [
......
# ANGLE EGL Headers
The EGL headers ANGLE uses are generated using the Khronos tools but modified to include function pointer types and function prototype guards.
### Regenerating EGL.h
1. Install **Python 3** (not 2) with the **lxml** addon. You can do this using `pip install lxml` from your Python's Scripts folder.
1. Clone [https://github.com/KhronosGroup/EGL-Registry.git](https://github.com/KhronosGroup/EGL-Registry.git).
1. Edit `EGL-Registry/api/genheaders.py`:
1. Look for the section titled `# EGL API - EGL/egl.h (no function pointers, yet @@@)`
1. Change `genFuncPointers = False,` to `genFuncPointers = True,`
1. Change `protectProto = False,` to `protectProto = 'nonzero',`
1. Change `protectProtoStr = 'EGL_EGLEXT_PROTOTYPES',` to `protectProtoStr = 'EGL_EGL_PROTOTYPES',`
1. Set your working directory to `EGL-Registry/api/`.
1. Run `python genheaders.py -registry egl.xml EGL/egl.h`
1. The generated header will now be in `EGL-Registry/api/EGL/egl.h`. You can copy the header over to this folder.
1. Also update `egl.xml` with the latest version from `EGL-Registry/api/`.
...@@ -28,17 +28,17 @@ extern "C" { ...@@ -28,17 +28,17 @@ extern "C" {
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/ */
/* /*
** This header is generated from the Khronos EGL XML API Registry. ** This header is generated from the Khronos OpenGL / OpenGL ES XML
** The current version of the Registry, generator scripts ** API Registry. The current version of the Registry, generator scripts
** used to make the header, and the header can be found at ** used to make the header, and the header can be found at
** http://www.khronos.org/registry/egl ** http://www.khronos.org/registry/egl
** **
** Khronos $Git commit SHA1: 4136522c4d $ on $Git commit date: 2018-12-06 03:51:22 -0800 $ ** Khronos $Git commit SHA1: bae3518c48 $ on $Git commit date: 2018-05-17 10:56:57 -0700 $
*/ */
#include <EGL/eglplatform.h> #include <EGL/eglplatform.h>
/* Generated on date 20181214 */ /* Generated on date 20180517 */
/* Generated C header for: /* Generated C header for:
* API: egl * API: egl
...@@ -53,8 +53,8 @@ extern "C" { ...@@ -53,8 +53,8 @@ extern "C" {
#define EGL_VERSION_1_0 1 #define EGL_VERSION_1_0 1
typedef unsigned int EGLBoolean; typedef unsigned int EGLBoolean;
typedef void *EGLDisplay; typedef void *EGLDisplay;
#include <EGL/eglplatform.h>
#include <KHR/khrplatform.h> #include <KHR/khrplatform.h>
#include <EGL/eglplatform.h>
typedef void *EGLConfig; typedef void *EGLConfig;
typedef void *EGLSurface; typedef void *EGLSurface;
typedef void *EGLContext; typedef void *EGLContext;
...@@ -118,31 +118,6 @@ typedef void (*__eglMustCastToProperFunctionPointerType)(void); ...@@ -118,31 +118,6 @@ typedef void (*__eglMustCastToProperFunctionPointerType)(void);
#define EGL_VERSION 0x3054 #define EGL_VERSION 0x3054
#define EGL_WIDTH 0x3057 #define EGL_WIDTH 0x3057
#define EGL_WINDOW_BIT 0x0004 #define EGL_WINDOW_BIT 0x0004
typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSECONFIGPROC) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
typedef EGLContext (EGLAPIENTRYP PFNEGLCREATECONTEXTPROC) (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERSURFACEPROC) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGATTRIBPROC) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGSPROC) (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETCURRENTDISPLAYPROC) (void);
typedef EGLSurface (EGLAPIENTRYP PFNEGLGETCURRENTSURFACEPROC) (EGLint readdraw);
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDISPLAYPROC) (EGLNativeDisplayType display_id);
typedef EGLint (EGLAPIENTRYP PFNEGLGETERRORPROC) (void);
typedef __eglMustCastToProperFunctionPointerType (EGLAPIENTRYP PFNEGLGETPROCADDRESSPROC) (const char *procname);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLINITIALIZEPROC) (EGLDisplay dpy, EGLint *major, EGLint *minor);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLMAKECURRENTPROC) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGPROC) (EGLDisplay dpy, EGLint name);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLTERMINATEPROC) (EGLDisplay dpy);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITGLPROC) (void);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITNATIVEPROC) (EGLint engine);
#if EGL_EGL_PROTOTYPES
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
...@@ -167,7 +142,6 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface ...@@ -167,7 +142,6 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy); EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void); EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
#endif
#endif /* EGL_VERSION_1_0 */ #endif /* EGL_VERSION_1_0 */
#ifndef EGL_VERSION_1_1 #ifndef EGL_VERSION_1_1
...@@ -186,16 +160,10 @@ EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); ...@@ -186,16 +160,10 @@ EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
#define EGL_TEXTURE_RGB 0x305D #define EGL_TEXTURE_RGB 0x305D
#define EGL_TEXTURE_RGBA 0x305E #define EGL_TEXTURE_RGBA 0x305E
#define EGL_TEXTURE_TARGET 0x3081 #define EGL_TEXTURE_TARGET 0x3081
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDTEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSURFACEATTRIBPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPINTERVALPROC) (EGLDisplay dpy, EGLint interval);
#if EGL_EGL_PROTOTYPES
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval); EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
#endif
#endif /* EGL_VERSION_1_1 */ #endif /* EGL_VERSION_1_1 */
#ifndef EGL_VERSION_1_2 #ifndef EGL_VERSION_1_2
...@@ -231,18 +199,11 @@ typedef void *EGLClientBuffer; ...@@ -231,18 +199,11 @@ typedef void *EGLClientBuffer;
#define EGL_SWAP_BEHAVIOR 0x3093 #define EGL_SWAP_BEHAVIOR 0x3093
#define EGL_UNKNOWN EGL_CAST(EGLint,-1) #define EGL_UNKNOWN EGL_CAST(EGLint,-1)
#define EGL_VERTICAL_RESOLUTION 0x3091 #define EGL_VERTICAL_RESOLUTION 0x3091
typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDAPIPROC) (EGLenum api);
typedef EGLenum (EGLAPIENTRYP PFNEGLQUERYAPIPROC) (void);
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC) (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETHREADPROC) (void);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITCLIENTPROC) (void);
#if EGL_EGL_PROTOTYPES
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api); EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void); EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void); EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
#endif
#endif /* EGL_VERSION_1_2 */ #endif /* EGL_VERSION_1_2 */
#ifndef EGL_VERSION_1_3 #ifndef EGL_VERSION_1_3
...@@ -271,10 +232,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); ...@@ -271,10 +232,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
#define EGL_OPENGL_API 0x30A2 #define EGL_OPENGL_API 0x30A2
#define EGL_OPENGL_BIT 0x0008 #define EGL_OPENGL_BIT 0x0008
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
typedef EGLContext (EGLAPIENTRYP PFNEGLGETCURRENTCONTEXTPROC) (void);
#if EGL_EGL_PROTOTYPES
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void); EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
#endif
#endif /* EGL_VERSION_1_4 */ #endif /* EGL_VERSION_1_4 */
#ifndef EGL_VERSION_1_5 #ifndef EGL_VERSION_1_5
...@@ -326,17 +284,6 @@ typedef void *EGLImage; ...@@ -326,17 +284,6 @@ typedef void *EGLImage;
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
#define EGL_IMAGE_PRESERVED 0x30D2 #define EGL_IMAGE_PRESERVED 0x30D2
#define EGL_NO_IMAGE EGL_CAST(EGLImage,0) #define EGL_NO_IMAGE EGL_CAST(EGLImage,0)
typedef EGLSync (EGLAPIENTRYP PFNEGLCREATESYNCPROC) (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCPROC) (EGLDisplay dpy, EGLSync sync);
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBPROC) (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags);
#if EGL_EGL_PROTOTYPES
EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
...@@ -347,7 +294,6 @@ EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *nat ...@@ -347,7 +294,6 @@ EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *nat
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags); EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
#endif
#endif /* EGL_VERSION_1_5 */ #endif /* EGL_VERSION_1_5 */
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -162,7 +162,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device); ...@@ -162,7 +162,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device);
#define EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE 0x3459 #define EGL_CONTEXT_PROGRAM_BINARY_CACHE_ENABLED_ANGLE 0x3459
typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC) (EGLDisplay dpy, EGLenum attrib); typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC) (EGLDisplay dpy, EGLenum attrib);
typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEQUERYANGLEPROC) (EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize); typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEQUERYANGLEPROC) (EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize);
typedef void (EGLAPIENTRYP PFNEGLPROGRAMCACHEPOPULATEANGLEPROC) (EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize); typedef void (EGLAPIENTRYP PFNEGPROGRAMCACHELPOPULATEANGLEPROC) (EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize);
typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHERESIZEANGLEPROC) (EGLDisplay dpy, EGLint limit, EGLenum mode); typedef EGLint (EGLAPIENTRYP PFNEGLPROGRAMCACHERESIZEANGLEPROC) (EGLDisplay dpy, EGLint limit, EGLenum mode);
#ifdef EGL_EGLEXT_PROTOTYPES #ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib); EGLAPI EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib);
...@@ -186,22 +186,6 @@ EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limi ...@@ -186,22 +186,6 @@ EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limi
#define EGL_EXTENSIONS_ENABLED_ANGLE 0x345F #define EGL_EXTENSIONS_ENABLED_ANGLE 0x345F
#endif /* EGL_ANGLE_create_context_extensions_enabled */ #endif /* EGL_ANGLE_create_context_extensions_enabled */
#ifndef EGL_CHROMIUM_get_sync_values
#define EGL_CHROMIUM_get_sync_values 1
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCVALUESCHROMIUMPROC) (EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR *ust,
EGLuint64KHR *msc,
EGLuint64KHR *sbc);
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR *ust,
EGLuint64KHR *msc,
EGLuint64KHR *sbc);
#endif
#endif /* EGL_CHROMIUM_get_sync_values */
// clang-format on // clang-format on
#endif // INCLUDE_EGL_EGLEXT_ANGLE_ #endif // INCLUDE_EGL_EGLEXT_ANGLE_
...@@ -34,10 +34,7 @@ static_library("sample_util") { ...@@ -34,10 +34,7 @@ static_library("sample_util") {
"../:libGLESv1_CM${angle_libs_suffix}", "../:libGLESv1_CM${angle_libs_suffix}",
"../:libGLESv2${angle_libs_suffix}", "../:libGLESv2${angle_libs_suffix}",
] ]
public_configs = [ public_configs = [ ":sample_util_config" ]
":sample_util_config",
"../:gl_prototypes",
]
} }
template("angle_sample") { template("angle_sample") {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<registry>
<comment>
Copyright 2018 The ANGLE Project Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
egl_angle_ext.xml
Includes data used to auto-generate ANGLE classes.
</comment>
<!-- SECTION: EGL command definitions. -->
<commands namespace="EGL">
<command>
<proto><ptype>EGLDeviceEXT</ptype> <name>eglCreateDeviceANGLE</name></proto>
<param><ptype>EGLint</ptype> <name>device_type</name></param>
<param>void *<name>native_device</name></param>
<param>const <ptype>EGLattrib</ptype> *<name>attrib_list</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglReleaseDeviceANGLE</name></proto>
<param><ptype>EGLDeviceEXT</ptype> <name>device</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglCreateStreamProducerD3DTextureANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
<param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglStreamPostD3DTextureANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
<param>void *<name>texture</name></param>
<param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglGetSyncValuesCHROMIUM</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLSurface</ptype> <name>surface</name></param>
<param><ptype>EGLuint64KHR</ptype> *<name>ust</name></param>
<param><ptype>EGLuint64KHR</ptype> *<name>msc</name></param>
<param><ptype>EGLuint64KHR</ptype> *<name>sbc</name></param>
</command>
<command>
<proto><ptype>EGLint</ptype> <name>eglProgramCacheGetAttribANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLenum</ptype> <name>attrib</name></param>
</command>
<command>
<proto>void <name>eglProgramCacheQueryANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLint</ptype> <name>index</name></param>
<param>void *<name>key</name></param>
<param><ptype>EGLint</ptype> *<name>keysize</name></param>
<param>void *<name>binary</name></param>
<param><ptype>EGLint</ptype> *<name>binarysize</name></param>
</command>
<command>
<proto>void <name>eglProgramCachePopulateANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param>const void *<name>key</name></param>
<param><ptype>EGLint</ptype> <name>keysize</name></param>
<param>const void *<name>binary</name></param>
<param><ptype>EGLint</ptype> <name>binarysize</name></param>
</command>
<command>
<proto><ptype>EGLint</ptype> <name>eglProgramCacheResizeANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLint</ptype> <name>limit</name></param>
<param><ptype>EGLint</ptype> <name>mode</name></param>
</command>
</commands>
<!-- SECTION: ANGLE extension interface definitions -->
<extensions>
<extension name="EGL_ANGLE_device_creation" supported="egl">
<require>
<command name="eglCreateDeviceANGLE"/>
<command name="eglReleaseDeviceANGLE"/>
</require>
</extension>
<extension name="EGL_ANGLE_stream_producer_d3d_texture" supported="egl">
<require>
<command name="eglCreateStreamProducerD3DTextureANGLE"/>
<command name="eglStreamPostD3DTextureANGLE"/>
</require>
</extension>
<extension name="EGL_CHROMIUM_get_sync_values" supported="egl">
<require>
<command name="eglGetSyncValuesCHROMIUM"/>
</require>
</extension>
<extension name="EGL_ANGLE_program_cache_control" supported="egl">
<require>
<command name="eglProgramCacheGetAttribANGLE"/>
<command name="eglProgramCacheQueryANGLE"/>
<command name="eglProgramCachePopulateANGLE"/>
<command name="eglProgramCacheResizeANGLE"/>
</require>
</extension>
</extensions>
</registry>
#!/usr/bin/python2
#
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# generate_loader.py:
# Generates dynamic loaders for various binding interfaces.
import sys, os, pprint, json
from datetime import date
import registry_xml
# Handle inputs/outputs for run_code_generation.py's auto_script
if len(sys.argv) == 2 and sys.argv[1] == 'inputs':
inputs = [
'egl.xml',
'egl_angle_ext.xml',
'registry_xml.py',
]
print(",".join(inputs))
sys.exit(0)
def write_header(data_source_name, all_cmds, api, preamble, path, ns = "", prefix = None):
file_name = "%s_loader_autogen.h" % api
header_path = registry_xml.path_to(path, file_name)
if prefix == None:
prefix = api
def pre(cmd):
return prefix + cmd[len(api):]
with open(header_path, "w") as out:
var_protos = ["extern PFN%sPROC %s%s;" % (cmd.upper(), ns, pre(cmd)) for cmd in all_cmds]
loader_header = template_loader_h.format(
script_name = os.path.basename(sys.argv[0]),
data_source_name = data_source_name,
year = date.today().year,
function_pointers = "\n".join(var_protos),
api_upper = api.upper(),
api_lower = api,
preamble = preamble)
out.write(loader_header)
out.close()
def write_source(data_source_name, all_cmds, api, path, ns = "", prefix = None):
file_name = "%s_loader_autogen.cpp" % api
source_path = registry_xml.path_to(path, file_name)
if prefix == None:
prefix = api
def pre(cmd):
return prefix + cmd[len(api):]
with open(source_path, "w") as out:
var_defs = ["PFN%sPROC %s%s;" % (cmd.upper(), ns, pre(cmd)) for cmd in all_cmds]
setter = " %s%s = reinterpret_cast<PFN%sPROC>(loadProc(\"%s\"));"
setters = [setter % (ns, pre(cmd), cmd.upper(), pre(cmd)) for cmd in all_cmds]
loader_source = template_loader_cpp.format(
script_name = os.path.basename(sys.argv[0]),
data_source_name = data_source_name,
year = date.today().year,
function_pointers = "\n".join(var_defs),
set_pointers = "\n".join(setters),
api_upper = api.upper(),
api_lower = api)
out.write(loader_source)
out.close()
def gen_libegl_loader():
data_source_name = "egl.xml and egl_angle_ext.xml"
xml = registry_xml.RegistryXML("egl.xml", "egl_angle_ext.xml")
for major_version, minor_version in [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]:
annotation = "{}_{}".format(major_version, minor_version)
name_prefix = "EGL_VERSION_"
feature_name = "{}{}".format(name_prefix, annotation)
xml.AddCommands(feature_name, annotation)
xml.AddExtensionCommands(registry_xml.supported_egl_extensions, ['egl'])
all_cmds = xml.all_cmd_names.get_all_commands()
path = os.path.join("..", "src", "libEGL")
write_header(data_source_name, all_cmds, "egl", egl_preamble, path, "", "EGL_")
write_source(data_source_name, all_cmds, "egl", path, "", "EGL_")
# Generate simple function loader for the tests.
def main():
gen_libegl_loader()
gles_preamble = """#if defined(GL_GLES_PROTOTYPES)
#undef GL_GLES_PROTOTYPES
#endif // defined(GL_GLES_PROTOTYPES)
#if defined(GL_GLEXT_PROTOTYPES)
#undef GL_GLEXT_PROTOTYPES
#endif // defined(GL_GLEXT_PROTOTYPES)
#define GL_GLES_PROTOTYPES 0
#include <GLES/gl.h>
#include <GLES/glext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES3/gl3.h>
#include <GLES3/gl31.h>
#include <GLES3/gl32.h>
"""
egl_preamble = """#include <EGL/egl.h>
#include <EGL/eglext.h>
"""
template_loader_h = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}.
//
// Copyright {year} The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// {api_lower}_loader_autogen.h:
// Simple {api_upper} function loader.
#ifndef LIBEGL_{api_upper}_LOADER_AUTOGEN_H_
#define LIBEGL_{api_upper}_LOADER_AUTOGEN_H_
{preamble}
{function_pointers}
namespace angle
{{
using GenericProc = void (*)();
using LoadProc = GenericProc (KHRONOS_APIENTRY *)(const char *);
void Load{api_upper}(LoadProc loadProc);
}} // namespace angle
#endif // LIBEGL_{api_upper}_LOADER_AUTOGEN_H_
"""
template_loader_cpp = """// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}.
//
// Copyright {year} The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// {api_lower}_loader_autogen.cpp:
// Simple {api_upper} function loader.
#include "{api_lower}_loader_autogen.h"
{function_pointers}
namespace angle
{{
void Load{api_upper}(LoadProc loadProc)
{{
{set_pointers}
}}
}} // namespace angle
"""
if __name__ == '__main__':
sys.exit(main())
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
found in the LICENSE file. found in the LICENSE file.
gl_angle_ext.xml gl_angle_ext.xml
Includes data used to auto-generate ANGLE classes. Includes data used to generate ANGLE extension entry points using generate_entry_points.py
</comment> </comment>
<!-- SECTION: GL command definitions. --> <!-- SECTION: GL command definitions. -->
<commands namespace="GL"> <commands namespace="GL">
...@@ -917,19 +917,19 @@ ...@@ -917,19 +917,19 @@
</commands> </commands>
<!-- SECTION: ANGLE extension interface definitions --> <!-- SECTION: ANGLE extension interface definitions -->
<extensions> <extensions>
<extension name="GL_CHROMIUM_bind_uniform_location" supported='gles2'> <extension name="GL_CHROMIUM_bind_uniform_location" supported='gl'>
<require> <require>
<command name="glBindUniformLocationCHROMIUM"/> <command name="glBindUniformLocationCHROMIUM"/>
</require> </require>
</extension> </extension>
<extension name="GL_CHROMIUM_framebuffer_mixed_samples" supported='gles2'> <extension name="GL_CHROMIUM_framebuffer_mixed_samples" supported='gl'>
<require> <require>
<command name="glMatrixLoadfCHROMIUM"/> <command name="glMatrixLoadfCHROMIUM"/>
<command name="glMatrixLoadIdentityCHROMIUM"/> <command name="glMatrixLoadIdentityCHROMIUM"/>
<command name="glCoverageModulationCHROMIUM"/> <command name="glCoverageModulationCHROMIUM"/>
</require> </require>
</extension> </extension>
<extension name="GL_CHROMIUM_path_rendering" supported='gles2'> <extension name="GL_CHROMIUM_path_rendering" supported='gl'>
<require> <require>
<command name="glGenPathsCHROMIUM"/> <command name="glGenPathsCHROMIUM"/>
<command name="glDeletePathsCHROMIUM"/> <command name="glDeletePathsCHROMIUM"/>
...@@ -956,23 +956,23 @@ ...@@ -956,23 +956,23 @@
<command name="glProgramPathFragmentInputGenCHROMIUM"/> <command name="glProgramPathFragmentInputGenCHROMIUM"/>
</require> </require>
</extension> </extension>
<extension name="GL_CHROMIUM_copy_texture" supported='gles2'> <extension name="GL_CHROMIUM_copy_texture" supported='gl'>
<require> <require>
<command name="glCopyTextureCHROMIUM"/> <command name="glCopyTextureCHROMIUM"/>
<command name="glCopySubTextureCHROMIUM"/> <command name="glCopySubTextureCHROMIUM"/>
</require> </require>
</extension> </extension>
<extension name="GL_CHROMIUM_copy_compressed_texture" supported='gles2'> <extension name="GL_CHROMIUM_copy_compressed_texture" supported='gl'>
<require> <require>
<command name="glCompressedCopyTextureCHROMIUM"/> <command name="glCompressedCopyTextureCHROMIUM"/>
</require> </require>
</extension> </extension>
<extension name="GL_ANGLE_request_extension" supported='gles2'> <extension name="GL_ANGLE_request_extension" supported='gl'>
<require> <require>
<command name="glRequestExtensionANGLE"/> <command name="glRequestExtensionANGLE"/>
</require> </require>
</extension> </extension>
<extension name="GL_ANGLE_robust_client_memory" supported='gles2'> <extension name="GL_ANGLE_robust_client_memory" supported='gl'>
<require> <require>
<command name="glGetBooleanvRobustANGLE"/> <command name="glGetBooleanvRobustANGLE"/>
<command name="glGetBufferParameterivRobustANGLE"/> <command name="glGetBufferParameterivRobustANGLE"/>
...@@ -1040,19 +1040,19 @@ ...@@ -1040,19 +1040,19 @@
<command name="glGetQueryObjectui64vRobustANGLE"/> <command name="glGetQueryObjectui64vRobustANGLE"/>
</require> </require>
</extension> </extension>
<extension name="GL_ANGLE_multiview" supported='gles2'> <extension name="GL_ANGLE_multiview" supported='gl'>
<require> <require>
<command name="glFramebufferTextureMultiviewSideBySideANGLE"/> <command name="glFramebufferTextureMultiviewSideBySideANGLE"/>
<command name="glFramebufferTextureMultiviewLayeredANGLE"/> <command name="glFramebufferTextureMultiviewLayeredANGLE"/>
</require> </require>
</extension> </extension>
<extension name="GL_ANGLE_copy_texture_3d" supported='gles2'> <extension name="GL_ANGLE_copy_texture_3d" supported='gl'>
<require> <require>
<command name="glCopyTexture3DANGLE"/> <command name="glCopyTexture3DANGLE"/>
<command name="glCopySubTexture3DANGLE"/> <command name="glCopySubTexture3DANGLE"/>
</require> </require>
</extension> </extension>
<extension name="GL_ANGLE_texture_multisample" supported='gles2'> <extension name="GL_ANGLE_texture_multisample" supported='gl'>
<require> <require>
<command name="glTexStorage2DMultisampleANGLE"/> <command name="glTexStorage2DMultisampleANGLE"/>
<command name="glGetTexLevelParameterivANGLE"/> <command name="glGetTexLevelParameterivANGLE"/>
...@@ -1061,7 +1061,7 @@ ...@@ -1061,7 +1061,7 @@
<command name="glSampleMaskiANGLE"/> <command name="glSampleMaskiANGLE"/>
</require> </require>
</extension> </extension>
<extension name="GL_ANGLE_multi_draw" supported='gles2'> <extension name="GL_ANGLE_multi_draw" supported='gl|gles2'>
<require> <require>
<command name="glMultiDrawArraysANGLE"/> <command name="glMultiDrawArraysANGLE"/>
<command name="glMultiDrawArraysInstancedANGLE"/> <command name="glMultiDrawArraysInstancedANGLE"/>
......
#!/usr/bin/python2
#
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# registry_xml.py:
# Parses information from Khronos registry files..
# List of supported extensions. Add to this list to enable new extensions
# available in gl.xml.
import sys, os
import xml.etree.ElementTree as etree
angle_extensions = [
# ANGLE extensions
"GL_CHROMIUM_bind_uniform_location",
"GL_CHROMIUM_framebuffer_mixed_samples",
"GL_CHROMIUM_path_rendering",
"GL_CHROMIUM_copy_texture",
"GL_CHROMIUM_copy_compressed_texture",
"GL_ANGLE_request_extension",
"GL_ANGLE_robust_client_memory",
"GL_ANGLE_multiview",
"GL_ANGLE_copy_texture_3d",
]
gles1_extensions = [
# ES1 (Possibly the min set of extensions needed by Android)
"GL_OES_draw_texture",
"GL_OES_framebuffer_object",
"GL_OES_matrix_palette",
"GL_OES_point_size_array",
"GL_OES_query_matrix",
"GL_OES_texture_cube_map",
]
supported_extensions = sorted(angle_extensions + gles1_extensions + [
# ES2+
"GL_ANGLE_framebuffer_blit",
"GL_ANGLE_framebuffer_multisample",
"GL_ANGLE_instanced_arrays",
"GL_ANGLE_texture_multisample",
"GL_ANGLE_translated_shader_source",
"GL_EXT_blend_func_extended",
"GL_EXT_debug_marker",
"GL_EXT_discard_framebuffer",
"GL_EXT_disjoint_timer_query",
"GL_EXT_draw_buffers",
"GL_EXT_geometry_shader",
"GL_EXT_map_buffer_range",
"GL_EXT_occlusion_query_boolean",
"GL_EXT_robustness",
"GL_EXT_texture_storage",
"GL_KHR_debug",
"GL_NV_fence",
"GL_OES_EGL_image",
"GL_OES_get_program_binary",
"GL_OES_mapbuffer",
"GL_OES_texture_border_clamp",
"GL_OES_texture_storage_multisample_2d_array",
"GL_OES_vertex_array_object",
"GL_KHR_parallel_shader_compile",
"GL_ANGLE_multi_draw",
])
supported_egl_extensions = [
"EGL_ANDROID_blob_cache",
"EGL_ANDROID_get_frame_timestamps",
"EGL_ANDROID_presentation_time",
"EGL_ANGLE_d3d_share_handle_client_buffer",
"EGL_ANGLE_device_creation",
"EGL_ANGLE_device_d3d",
"EGL_ANGLE_program_cache_control",
"EGL_ANGLE_query_surface_pointer",
"EGL_ANGLE_stream_producer_d3d_texture",
"EGL_ANGLE_surface_d3d_texture_2d_share_handle",
"EGL_ANGLE_window_fixed_size",
"EGL_CHROMIUM_get_sync_values",
"EGL_EXT_create_context_robustness",
"EGL_EXT_device_query",
"EGL_EXT_platform_base",
"EGL_EXT_platform_device",
"EGL_KHR_debug",
"EGL_KHR_image",
"EGL_KHR_stream",
"EGL_KHR_stream_consumer_gltexture",
"EGL_KHR_swap_buffers_with_damage",
"EGL_NV_post_sub_buffer",
"EGL_NV_stream_consumer_gltexture_yuv",
]
# Strip these suffixes from Context entry point names. NV is excluded (for now).
strip_suffixes = ["ANGLE", "EXT", "KHR", "OES", "CHROMIUM"]
# The EGL_ANGLE_explicit_context extension is generated differently from other extensions.
# Toggle generation here.
support_EGL_ANGLE_explicit_context = True
def script_relative(path):
return os.path.join(os.path.dirname(sys.argv[0]), path)
def path_to(folder, file):
return os.path.join(script_relative(".."), "src", folder, file)
class GLCommandNames:
def __init__(self):
self.command_names = {}
def get_commands(self, version):
return self.command_names[version]
def get_all_commands(self):
cmd_names = []
# Combine all the version lists into a single list
for version, version_cmd_names in sorted(self.command_names.iteritems()):
cmd_names += version_cmd_names
return cmd_names
def add_commands(self, version, commands):
# Add key if it doesn't exist
if version not in self.command_names:
self.command_names[version] = []
# Add the commands that aren't duplicates
self.command_names[version] += commands
class RegistryXML:
def __init__(self, xml_file, ext_file = None):
tree = etree.parse(script_relative(xml_file))
self.root = tree.getroot()
if (ext_file):
self._AppendANGLEExts(ext_file)
self.all_commands = self.root.findall('commands/command')
self.all_cmd_names = GLCommandNames()
self.commands = {}
def _AppendANGLEExts(self, ext_file):
angle_ext_tree = etree.parse(script_relative(ext_file))
angle_ext_root = angle_ext_tree.getroot()
insertion_point = self.root.findall("./commands")[0]
for command in angle_ext_root.iter('commands'):
insertion_point.extend(command)
insertion_point = self.root.findall("./extensions")[0]
for extension in angle_ext_root.iter('extensions'):
insertion_point.extend(extension)
def AddCommands(self, feature_name, annotation):
xpath = ".//feature[@name='%s']//command" % feature_name
commands = [cmd.attrib['name'] for cmd in self.root.findall(xpath)]
# Remove commands that have already been processed
current_cmds = self.all_cmd_names.get_all_commands()
commands = [cmd for cmd in commands if cmd not in current_cmds]
self.all_cmd_names.add_commands(annotation, commands)
self.commands[annotation] = commands
def _ClassifySupport(self, supported):
if 'gles2' in supported:
return 'gl2ext'
elif 'gles1' in supported:
return 'glext'
elif 'egl' in supported:
return 'eglext'
elif 'wgl' in supported:
return 'wglext'
else:
assert False
return 'unknown'
def AddExtensionCommands(self, supported_extensions, apis):
# Use a first step to run through the extensions so we can generate them
# in sorted order.
self.ext_data = {}
self.ext_dupes = {}
ext_annotations = {}
for extension in self.root.findall("extensions/extension"):
extension_name = extension.attrib['name']
if not extension_name in supported_extensions:
continue
ext_annotations[extension_name] = self._ClassifySupport(extension.attrib['supported'])
ext_cmd_names = []
# There's an extra step here to filter out 'api=gl' extensions. This
# is necessary for handling KHR extensions, which have separate entry
# point signatures (without the suffix) for desktop GL. Note that this
# extra step is necessary because of Etree's limited Xpath support.
for require in extension.findall('require'):
if 'api' in require.attrib and require.attrib['api'] not in apis:
continue
# A special case for EXT_texture_storage
filter_out_comment = "Supported only if GL_EXT_direct_state_access is supported"
if 'comment' in require.attrib and require.attrib['comment'] == filter_out_comment:
continue
extension_commands = require.findall('command')
ext_cmd_names += [command.attrib['name'] for command in extension_commands]
self.ext_data[extension_name] = sorted(ext_cmd_names)
for extension_name, ext_cmd_names in sorted(self.ext_data.iteritems()):
# Detect and filter duplicate extensions.
dupes = []
for ext_cmd in ext_cmd_names:
if ext_cmd in self.all_cmd_names.get_all_commands():
dupes.append(ext_cmd)
for dupe in dupes:
ext_cmd_names.remove(dupe)
self.ext_data[extension_name] = sorted(ext_cmd_names)
self.ext_dupes[extension_name] = dupes
self.all_cmd_names.add_commands(ext_annotations[extension_name], ext_cmd_names)
...@@ -89,16 +89,20 @@ generators = { ...@@ -89,16 +89,20 @@ generators = {
], ],
'script': 'src/libANGLE/renderer/d3d/d3d11/gen_dxgi_support_tables.py', 'script': 'src/libANGLE/renderer/d3d/d3d11/gen_dxgi_support_tables.py',
}, },
'GL/EGL/WGL loader':
auto_script('scripts/generate_loader.py'),
'GL/EGL entry points':
auto_script('scripts/generate_entry_points.py'),
'GL copy conversion table': { 'GL copy conversion table': {
'inputs': [ 'inputs': [
'src/libANGLE/es3_copy_conversion_formats.json', 'src/libANGLE/es3_copy_conversion_formats.json',
], ],
'script': 'src/libANGLE/gen_copy_conversion_table.py', 'script': 'src/libANGLE/gen_copy_conversion_table.py',
}, },
'GL entry point': {
'inputs': [
'scripts/entry_point_packed_gl_enums.json',
'scripts/gl.xml',
'scripts/gl_angle_ext.xml',
],
'script': 'scripts/generate_entry_points.py',
},
'GL format map': { 'GL format map': {
'inputs': [ 'inputs': [
'src/libANGLE/es3_format_type_combinations.json', 'src/libANGLE/es3_format_type_combinations.json',
......
...@@ -49,34 +49,20 @@ ...@@ -49,34 +49,20 @@
"54608f6f7d9aa7c59a8458ccf3ab9935", "54608f6f7d9aa7c59a8458ccf3ab9935",
"GL copy conversion table:src/libANGLE/gen_copy_conversion_table.py": "GL copy conversion table:src/libANGLE/gen_copy_conversion_table.py":
"ac1afe23d9578bd1d2ef74f4a7aa927a", "ac1afe23d9578bd1d2ef74f4a7aa927a",
"GL entry point:scripts/entry_point_packed_gl_enums.json":
"0554a67f70407e82c872010014721099",
"GL entry point:scripts/generate_entry_points.py":
"460bbd980ec533628c5866142d22214d",
"GL entry point:scripts/gl.xml":
"b470cb06b06cbbe7adb2c8129ec85708",
"GL entry point:scripts/gl_angle_ext.xml":
"9fd7020b8c63816320df0bdcd4582741",
"GL format map:src/libANGLE/es3_format_type_combinations.json": "GL format map:src/libANGLE/es3_format_type_combinations.json":
"a232823cd6430f14e28793ccabb968ee", "a232823cd6430f14e28793ccabb968ee",
"GL format map:src/libANGLE/format_map_data.json": "GL format map:src/libANGLE/format_map_data.json":
"779798d4879e5f73a5a108e3e3fd3095", "779798d4879e5f73a5a108e3e3fd3095",
"GL format map:src/libANGLE/gen_format_map.py": "GL format map:src/libANGLE/gen_format_map.py":
"a383ee79a7bf929d145165f3e76c1079", "a383ee79a7bf929d145165f3e76c1079",
"GL/EGL entry points:scripts/egl.xml":
"842e24514c4cfe09fba703c17a0fd292",
"GL/EGL entry points:scripts/egl_angle_ext.xml":
"745534010f31fbe8e1a1fcddce15ed2d",
"GL/EGL entry points:scripts/entry_point_packed_gl_enums.json":
"0554a67f70407e82c872010014721099",
"GL/EGL entry points:scripts/generate_entry_points.py":
"9fc8f8bd28f5511108b9046d9066774c",
"GL/EGL entry points:scripts/gl.xml":
"b470cb06b06cbbe7adb2c8129ec85708",
"GL/EGL entry points:scripts/gl_angle_ext.xml":
"35df932f522cd92fe1d4127bb9ab2c04",
"GL/EGL entry points:scripts/registry_xml.py":
"fcc6e75568f9c25b70f6692b9080a447",
"GL/EGL/WGL loader:scripts/egl.xml":
"842e24514c4cfe09fba703c17a0fd292",
"GL/EGL/WGL loader:scripts/egl_angle_ext.xml":
"745534010f31fbe8e1a1fcddce15ed2d",
"GL/EGL/WGL loader:scripts/generate_loader.py":
"408e48ccb03f7a92bcd49cd376943474",
"GL/EGL/WGL loader:scripts/registry_xml.py":
"fcc6e75568f9c25b70f6692b9080a447",
"OpenGL dispatch table:scripts/gl.xml": "OpenGL dispatch table:scripts/gl.xml":
"b470cb06b06cbbe7adb2c8129ec85708", "b470cb06b06cbbe7adb2c8129ec85708",
"OpenGL dispatch table:src/libANGLE/renderer/gl/generate_gl_dispatch_table.py": "OpenGL dispatch table:src/libANGLE/renderer/gl/generate_gl_dispatch_table.py":
...@@ -114,7 +100,7 @@ ...@@ -114,7 +100,7 @@
"packed enum:src/common/packed_gl_enums.json": "packed enum:src/common/packed_gl_enums.json":
"b54346c106ab4a7b0acb69eb65123c1a", "b54346c106ab4a7b0acb69eb65123c1a",
"proc table:src/libGLESv2/gen_proc_table.py": "proc table:src/libGLESv2/gen_proc_table.py":
"ee265eada3dd238646010dd03874d242", "027bfd5a8a8dffe91f492bf199029cde",
"proc table:src/libGLESv2/proc_table_data.json": "proc table:src/libGLESv2/proc_table_data.json":
"bcb5dbd7b57c0d56d5e8849c46d9c36e", "bcb5dbd7b57c0d56d5e8849c46d9c36e",
"uniform type:src/common/gen_uniform_type_table.py": "uniform type:src/common/gen_uniform_type_table.py":
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
namespace angle namespace angle
{ {
const char *GetExecutablePath(); const char *GetExecutablePath();
const char *GetExecutableDirectory(); const char *GetExecutableDirectory();
const char *GetSharedLibraryExtension(); const char *GetSharedLibraryExtension();
...@@ -25,14 +26,6 @@ std::string GetEnvironmentVar(const char *variableName); ...@@ -25,14 +26,6 @@ std::string GetEnvironmentVar(const char *variableName);
const char *GetPathSeparator(); const char *GetPathSeparator();
bool PrependPathToEnvironmentVar(const char *variableName, const char *path); bool PrependPathToEnvironmentVar(const char *variableName, const char *path);
class Library : angle::NonCopyable
{
public:
virtual ~Library() {}
virtual void *getSymbol(const char *symbolName) = 0;
};
Library *OpenSharedLibrary(const char *libraryName);
} // namespace angle } // namespace angle
#endif // COMMON_SYSTEM_UTILS_H_ #endif // COMMON_SYSTEM_UTILS_H_
...@@ -64,4 +64,42 @@ const char *GetSharedLibraryExtension() ...@@ -64,4 +64,42 @@ const char *GetSharedLibraryExtension()
{ {
return "so"; return "so";
} }
Optional<std::string> GetCWD()
{
std::array<char, 4096> pathBuf;
char *result = getcwd(pathBuf.data(), pathBuf.size());
if (result == nullptr)
{
return Optional<std::string>::Invalid();
}
return std::string(pathBuf.data());
}
bool SetCWD(const char *dirName)
{
return (chdir(dirName) == 0);
}
bool UnsetEnvironmentVar(const char *variableName)
{
return (unsetenv(variableName) == 0);
}
bool SetEnvironmentVar(const char *variableName, const char *value)
{
return (setenv(variableName, value, 1) == 0);
}
std::string GetEnvironmentVar(const char *variableName)
{
const char *value = getenv(variableName);
return (value == nullptr ? std::string() : std::string(value));
}
const char *GetPathSeparator()
{
return ":";
}
} // namespace angle } // namespace angle
...@@ -69,4 +69,42 @@ const char *GetSharedLibraryExtension() ...@@ -69,4 +69,42 @@ const char *GetSharedLibraryExtension()
{ {
return "dylib"; return "dylib";
} }
Optional<std::string> GetCWD()
{
std::array<char, 4096> pathBuf;
char *result = getcwd(pathBuf.data(), pathBuf.size());
if (result == nullptr)
{
return Optional<std::string>::Invalid();
}
return std::string(pathBuf.data());
}
bool SetCWD(const char *dirName)
{
return (chdir(dirName) == 0);
}
bool UnsetEnvironmentVar(const char *variableName)
{
return (unsetenv(variableName) == 0);
}
bool SetEnvironmentVar(const char *variableName, const char *value)
{
return (setenv(variableName, value, 1) == 0);
}
std::string GetEnvironmentVar(const char *variableName)
{
const char *value = getenv(variableName);
return (value == nullptr ? std::string() : std::string(value));
}
const char *GetPathSeparator()
{
return ":";
}
} // namespace angle } // namespace angle
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// system_utils_posix.cpp: Implementation of POSIX OS-specific functions.
#include "system_utils.h"
#include <array>
#include <dlfcn.h>
#include <unistd.h>
namespace angle
{
Optional<std::string> GetCWD()
{
std::array<char, 4096> pathBuf;
char *result = getcwd(pathBuf.data(), pathBuf.size());
if (result == nullptr)
{
return Optional<std::string>::Invalid();
}
return std::string(pathBuf.data());
}
bool SetCWD(const char *dirName)
{
return (chdir(dirName) == 0);
}
bool UnsetEnvironmentVar(const char *variableName)
{
return (unsetenv(variableName) == 0);
}
bool SetEnvironmentVar(const char *variableName, const char *value)
{
return (setenv(variableName, value, 1) == 0);
}
std::string GetEnvironmentVar(const char *variableName)
{
const char *value = getenv(variableName);
return (value == nullptr ? std::string() : std::string(value));
}
const char *GetPathSeparator()
{
return ":";
}
class PosixLibrary : public Library
{
public:
PosixLibrary(const char *libraryName)
{
char buffer[1000];
int ret = snprintf(buffer, 1000, "%s.%s", libraryName, GetSharedLibraryExtension());
if (ret > 0 && ret < 1000)
{
mModule = dlopen(buffer, RTLD_NOW);
}
}
~PosixLibrary() override
{
if (mModule)
{
dlclose(mModule);
}
}
void *getSymbol(const char *symbolName) override
{
if (!mModule)
{
return nullptr;
}
return dlsym(mModule, symbolName);
}
private:
void *mModule = nullptr;
};
Library *OpenSharedLibrary(const char *libraryName)
{
return new PosixLibrary(libraryName);
}
} // namespace angle
...@@ -101,43 +101,4 @@ const char *GetPathSeparator() ...@@ -101,43 +101,4 @@ const char *GetPathSeparator()
return ";"; return ";";
} }
class Win32Library : public Library
{
public:
Win32Library(const char *libraryName)
{
char buffer[MAX_PATH];
int ret = snprintf(buffer, MAX_PATH, "%s.%s", libraryName, GetSharedLibraryExtension());
if (ret > 0 && ret < MAX_PATH)
{
mModule = LoadLibraryA(buffer);
}
}
~Win32Library() override
{
if (mModule)
{
FreeLibrary(mModule);
}
}
void *getSymbol(const char *symbolName) override
{
if (!mModule)
{
return nullptr;
}
return reinterpret_cast<void *>(GetProcAddress(mModule, symbolName));
}
private:
HMODULE mModule = nullptr;
};
Library *OpenSharedLibrary(const char *libraryName)
{
return new Win32Library(libraryName);
}
} // namespace angle } // namespace angle
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_loader.py using data from egl.xml and egl_angle_ext.xml.
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// egl_loader_autogen.h:
// Simple EGL function loader.
#ifndef LIBEGL_EGL_LOADER_AUTOGEN_H_
#define LIBEGL_EGL_LOADER_AUTOGEN_H_
#include <EGL/egl.h>
#include <EGL/eglext.h>
extern PFNEGLCHOOSECONFIGPROC EGL_ChooseConfig;
extern PFNEGLCOPYBUFFERSPROC EGL_CopyBuffers;
extern PFNEGLCREATECONTEXTPROC EGL_CreateContext;
extern PFNEGLCREATEPBUFFERSURFACEPROC EGL_CreatePbufferSurface;
extern PFNEGLCREATEPIXMAPSURFACEPROC EGL_CreatePixmapSurface;
extern PFNEGLCREATEWINDOWSURFACEPROC EGL_CreateWindowSurface;
extern PFNEGLDESTROYCONTEXTPROC EGL_DestroyContext;
extern PFNEGLDESTROYSURFACEPROC EGL_DestroySurface;
extern PFNEGLGETCONFIGATTRIBPROC EGL_GetConfigAttrib;
extern PFNEGLGETCONFIGSPROC EGL_GetConfigs;
extern PFNEGLGETCURRENTDISPLAYPROC EGL_GetCurrentDisplay;
extern PFNEGLGETCURRENTSURFACEPROC EGL_GetCurrentSurface;
extern PFNEGLGETDISPLAYPROC EGL_GetDisplay;
extern PFNEGLGETERRORPROC EGL_GetError;
extern PFNEGLGETPROCADDRESSPROC EGL_GetProcAddress;
extern PFNEGLINITIALIZEPROC EGL_Initialize;
extern PFNEGLMAKECURRENTPROC EGL_MakeCurrent;
extern PFNEGLQUERYCONTEXTPROC EGL_QueryContext;
extern PFNEGLQUERYSTRINGPROC EGL_QueryString;
extern PFNEGLQUERYSURFACEPROC EGL_QuerySurface;
extern PFNEGLSWAPBUFFERSPROC EGL_SwapBuffers;
extern PFNEGLTERMINATEPROC EGL_Terminate;
extern PFNEGLWAITGLPROC EGL_WaitGL;
extern PFNEGLWAITNATIVEPROC EGL_WaitNative;
extern PFNEGLBINDTEXIMAGEPROC EGL_BindTexImage;
extern PFNEGLRELEASETEXIMAGEPROC EGL_ReleaseTexImage;
extern PFNEGLSURFACEATTRIBPROC EGL_SurfaceAttrib;
extern PFNEGLSWAPINTERVALPROC EGL_SwapInterval;
extern PFNEGLBINDAPIPROC EGL_BindAPI;
extern PFNEGLQUERYAPIPROC EGL_QueryAPI;
extern PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC EGL_CreatePbufferFromClientBuffer;
extern PFNEGLRELEASETHREADPROC EGL_ReleaseThread;
extern PFNEGLWAITCLIENTPROC EGL_WaitClient;
extern PFNEGLGETCURRENTCONTEXTPROC EGL_GetCurrentContext;
extern PFNEGLCREATESYNCPROC EGL_CreateSync;
extern PFNEGLDESTROYSYNCPROC EGL_DestroySync;
extern PFNEGLCLIENTWAITSYNCPROC EGL_ClientWaitSync;
extern PFNEGLGETSYNCATTRIBPROC EGL_GetSyncAttrib;
extern PFNEGLCREATEIMAGEPROC EGL_CreateImage;
extern PFNEGLDESTROYIMAGEPROC EGL_DestroyImage;
extern PFNEGLGETPLATFORMDISPLAYPROC EGL_GetPlatformDisplay;
extern PFNEGLCREATEPLATFORMWINDOWSURFACEPROC EGL_CreatePlatformWindowSurface;
extern PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC EGL_CreatePlatformPixmapSurface;
extern PFNEGLWAITSYNCPROC EGL_WaitSync;
extern PFNEGLSETBLOBCACHEFUNCSANDROIDPROC EGL_SetBlobCacheFuncsANDROID;
extern PFNEGLGETCOMPOSITORTIMINGANDROIDPROC EGL_GetCompositorTimingANDROID;
extern PFNEGLGETCOMPOSITORTIMINGSUPPORTEDANDROIDPROC EGL_GetCompositorTimingSupportedANDROID;
extern PFNEGLGETFRAMETIMESTAMPSUPPORTEDANDROIDPROC EGL_GetFrameTimestampSupportedANDROID;
extern PFNEGLGETFRAMETIMESTAMPSANDROIDPROC EGL_GetFrameTimestampsANDROID;
extern PFNEGLGETNEXTFRAMEIDANDROIDPROC EGL_GetNextFrameIdANDROID;
extern PFNEGLPRESENTATIONTIMEANDROIDPROC EGL_PresentationTimeANDROID;
extern PFNEGLCREATEDEVICEANGLEPROC EGL_CreateDeviceANGLE;
extern PFNEGLRELEASEDEVICEANGLEPROC EGL_ReleaseDeviceANGLE;
extern PFNEGLPROGRAMCACHEGETATTRIBANGLEPROC EGL_ProgramCacheGetAttribANGLE;
extern PFNEGLPROGRAMCACHEPOPULATEANGLEPROC EGL_ProgramCachePopulateANGLE;
extern PFNEGLPROGRAMCACHEQUERYANGLEPROC EGL_ProgramCacheQueryANGLE;
extern PFNEGLPROGRAMCACHERESIZEANGLEPROC EGL_ProgramCacheResizeANGLE;
extern PFNEGLQUERYSURFACEPOINTERANGLEPROC EGL_QuerySurfacePointerANGLE;
extern PFNEGLCREATESTREAMPRODUCERD3DTEXTUREANGLEPROC EGL_CreateStreamProducerD3DTextureANGLE;
extern PFNEGLSTREAMPOSTD3DTEXTUREANGLEPROC EGL_StreamPostD3DTextureANGLE;
extern PFNEGLGETSYNCVALUESCHROMIUMPROC EGL_GetSyncValuesCHROMIUM;
extern PFNEGLQUERYDEVICEATTRIBEXTPROC EGL_QueryDeviceAttribEXT;
extern PFNEGLQUERYDEVICESTRINGEXTPROC EGL_QueryDeviceStringEXT;
extern PFNEGLQUERYDISPLAYATTRIBEXTPROC EGL_QueryDisplayAttribEXT;
extern PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC EGL_CreatePlatformPixmapSurfaceEXT;
extern PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC EGL_CreatePlatformWindowSurfaceEXT;
extern PFNEGLGETPLATFORMDISPLAYEXTPROC EGL_GetPlatformDisplayEXT;
extern PFNEGLDEBUGMESSAGECONTROLKHRPROC EGL_DebugMessageControlKHR;
extern PFNEGLLABELOBJECTKHRPROC EGL_LabelObjectKHR;
extern PFNEGLQUERYDEBUGKHRPROC EGL_QueryDebugKHR;
extern PFNEGLCREATEIMAGEKHRPROC EGL_CreateImageKHR;
extern PFNEGLDESTROYIMAGEKHRPROC EGL_DestroyImageKHR;
extern PFNEGLCREATESTREAMKHRPROC EGL_CreateStreamKHR;
extern PFNEGLDESTROYSTREAMKHRPROC EGL_DestroyStreamKHR;
extern PFNEGLQUERYSTREAMKHRPROC EGL_QueryStreamKHR;
extern PFNEGLQUERYSTREAMU64KHRPROC EGL_QueryStreamu64KHR;
extern PFNEGLSTREAMATTRIBKHRPROC EGL_StreamAttribKHR;
extern PFNEGLSTREAMCONSUMERACQUIREKHRPROC EGL_StreamConsumerAcquireKHR;
extern PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC EGL_StreamConsumerGLTextureExternalKHR;
extern PFNEGLSTREAMCONSUMERRELEASEKHRPROC EGL_StreamConsumerReleaseKHR;
extern PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC EGL_SwapBuffersWithDamageKHR;
extern PFNEGLPOSTSUBBUFFERNVPROC EGL_PostSubBufferNV;
extern PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC
EGL_StreamConsumerGLTextureExternalAttribsNV;
namespace angle
{
using GenericProc = void (*)();
using LoadProc = GenericProc(KHRONOS_APIENTRY *)(const char *);
void LoadEGL(LoadProc loadProc);
} // namespace angle
#endif // LIBEGL_EGL_LOADER_AUTOGEN_H_
...@@ -32,6 +32,8 @@ libangle_common_sources = [ ...@@ -32,6 +32,8 @@ libangle_common_sources = [
"src/common/platform.h", "src/common/platform.h",
"src/common/string_utils.cpp", "src/common/string_utils.cpp",
"src/common/string_utils.h", "src/common/string_utils.h",
"src/common/system_utils.cpp",
"src/common/system_utils.h",
"src/common/third_party/base/anglebase/base_export.h", "src/common/third_party/base/anglebase/base_export.h",
"src/common/third_party/base/anglebase/containers/mru_cache.h", "src/common/third_party/base/anglebase/containers/mru_cache.h",
"src/common/third_party/base/anglebase/logging.h", "src/common/third_party/base/anglebase/logging.h",
...@@ -55,30 +57,9 @@ libangle_common_sources = [ ...@@ -55,30 +57,9 @@ libangle_common_sources = [
"src/common/vector_utils.h", "src/common/vector_utils.h",
"src/common/version.h", "src/common/version.h",
] ]
libangle_common_linux_sources = [ "src/common/system_utils_linux.cpp" ]
angle_system_utils_sources = [ libangle_common_mac_sources = [ "src/common/system_utils_mac.cpp" ]
"src/common/system_utils.cpp", libangle_common_win_sources = [ "src/common/system_utils_win.cpp" ]
"src/common/system_utils.h",
]
if (is_linux || is_android || is_fuchsia) {
angle_system_utils_sources += [
"src/common/system_utils_linux.cpp",
"src/common/system_utils_posix.cpp",
]
}
if (is_mac) {
angle_system_utils_sources += [
"src/common/system_utils_mac.cpp",
"src/common/system_utils_posix.cpp",
]
}
if (is_win) {
angle_system_utils_sources += [ "src/common/system_utils_win.cpp" ]
}
libangle_image_util_sources = [ libangle_image_util_sources = [
"src/image_util/copyimage.cpp", "src/image_util/copyimage.cpp",
"src/image_util/copyimage.h", "src/image_util/copyimage.h",
......
...@@ -67,7 +67,7 @@ for description, functions in json_data.iteritems(): ...@@ -67,7 +67,7 @@ for description, functions in json_data.iteritems():
if support_egl_ANGLE_explicit_context: if support_egl_ANGLE_explicit_context:
all_functions[function + "ContextANGLE"] = "gl::" + function[2:] + "ContextANGLE" all_functions[function + "ContextANGLE"] = "gl::" + function[2:] + "ContextANGLE"
elif function.startswith("egl"): elif function.startswith("egl"):
all_functions[function] = "EGL_" + function[3:] all_functions[function] = "egl::" + function[3:]
else: else:
all_functions[function] = function all_functions[function] = function
......
...@@ -1338,130 +1338,3 @@ EXPORTS ...@@ -1338,130 +1338,3 @@ EXPORTS
glViewportContextANGLE glViewportContextANGLE
glWaitSyncContextANGLE glWaitSyncContextANGLE
glWeightPointerOESContextANGLE glWeightPointerOESContextANGLE
; EGL 1.0
EGL_ChooseConfig
EGL_CopyBuffers
EGL_CreateContext
EGL_CreatePbufferSurface
EGL_CreatePixmapSurface
EGL_CreateWindowSurface
EGL_DestroyContext
EGL_DestroySurface
EGL_GetConfigAttrib
EGL_GetConfigs
EGL_GetCurrentDisplay
EGL_GetCurrentSurface
EGL_GetDisplay
EGL_GetError
EGL_GetProcAddress
EGL_Initialize
EGL_MakeCurrent
EGL_QueryContext
EGL_QueryString
EGL_QuerySurface
EGL_SwapBuffers
EGL_Terminate
EGL_WaitGL
EGL_WaitNative
; EGL 1.1
EGL_BindTexImage
EGL_ReleaseTexImage
EGL_SurfaceAttrib
EGL_SwapInterval
; EGL 1.2
EGL_BindAPI
EGL_CreatePbufferFromClientBuffer
EGL_QueryAPI
EGL_ReleaseThread
EGL_WaitClient
; EGL 1.4
EGL_GetCurrentContext
; EGL 1.5
EGL_ClientWaitSync
EGL_CreateImage
EGL_CreatePlatformPixmapSurface
EGL_CreatePlatformWindowSurface
EGL_CreateSync
EGL_DestroyImage
EGL_DestroySync
EGL_GetPlatformDisplay
EGL_GetSyncAttrib
EGL_WaitSync
; EGL_ANDROID_blob_cache
EGL_SetBlobCacheFuncsANDROID
; EGL_ANDROID_get_frame_timestamps
EGL_GetCompositorTimingANDROID
EGL_GetCompositorTimingSupportedANDROID
EGL_GetFrameTimestampSupportedANDROID
EGL_GetFrameTimestampsANDROID
EGL_GetNextFrameIdANDROID
; EGL_ANDROID_presentation_time
EGL_PresentationTimeANDROID
; EGL_ANGLE_device_creation
EGL_CreateDeviceANGLE
EGL_ReleaseDeviceANGLE
; EGL_ANGLE_program_cache_control
EGL_ProgramCacheGetAttribANGLE
EGL_ProgramCachePopulateANGLE
EGL_ProgramCacheQueryANGLE
EGL_ProgramCacheResizeANGLE
; EGL_ANGLE_query_surface_pointer
EGL_QuerySurfacePointerANGLE
; EGL_ANGLE_stream_producer_d3d_texture
EGL_CreateStreamProducerD3DTextureANGLE
EGL_StreamPostD3DTextureANGLE
; EGL_CHROMIUM_get_sync_values
EGL_GetSyncValuesCHROMIUM
; EGL_EXT_device_query
EGL_QueryDeviceAttribEXT
EGL_QueryDeviceStringEXT
EGL_QueryDisplayAttribEXT
; EGL_EXT_platform_base
EGL_CreatePlatformPixmapSurfaceEXT
EGL_CreatePlatformWindowSurfaceEXT
EGL_GetPlatformDisplayEXT
; EGL_KHR_debug
EGL_DebugMessageControlKHR
EGL_LabelObjectKHR
EGL_QueryDebugKHR
; EGL_KHR_image
EGL_CreateImageKHR
EGL_DestroyImageKHR
; EGL_KHR_stream
EGL_CreateStreamKHR
EGL_DestroyStreamKHR
EGL_QueryStreamKHR
EGL_QueryStreamu64KHR
EGL_StreamAttribKHR
; EGL_KHR_stream_consumer_gltexture
EGL_StreamConsumerAcquireKHR
EGL_StreamConsumerGLTextureExternalKHR
EGL_StreamConsumerReleaseKHR
; EGL_KHR_swap_buffers_with_damage
EGL_SwapBuffersWithDamageKHR
; EGL_NV_post_sub_buffer
EGL_PostSubBufferNV
; EGL_NV_stream_consumer_gltexture_yuv
EGL_StreamConsumerGLTextureExternalAttribsNV
...@@ -27,90 +27,90 @@ namespace egl ...@@ -27,90 +27,90 @@ namespace egl
ProcEntry g_procTable[] = { ProcEntry g_procTable[] = {
{"ANGLEGetDisplayPlatform", P(ANGLEGetDisplayPlatform)}, {"ANGLEGetDisplayPlatform", P(ANGLEGetDisplayPlatform)},
{"ANGLEResetDisplayPlatform", P(ANGLEResetDisplayPlatform)}, {"ANGLEResetDisplayPlatform", P(ANGLEResetDisplayPlatform)},
{"eglBindAPI", P(EGL_BindAPI)}, {"eglBindAPI", P(egl::BindAPI)},
{"eglBindTexImage", P(EGL_BindTexImage)}, {"eglBindTexImage", P(egl::BindTexImage)},
{"eglChooseConfig", P(EGL_ChooseConfig)}, {"eglChooseConfig", P(egl::ChooseConfig)},
{"eglClientWaitSync", P(EGL_ClientWaitSync)}, {"eglClientWaitSync", P(egl::ClientWaitSync)},
{"eglCopyBuffers", P(EGL_CopyBuffers)}, {"eglCopyBuffers", P(egl::CopyBuffers)},
{"eglCreateContext", P(EGL_CreateContext)}, {"eglCreateContext", P(egl::CreateContext)},
{"eglCreateDeviceANGLE", P(EGL_CreateDeviceANGLE)}, {"eglCreateDeviceANGLE", P(egl::CreateDeviceANGLE)},
{"eglCreateImage", P(EGL_CreateImage)}, {"eglCreateImage", P(egl::CreateImage)},
{"eglCreateImageKHR", P(EGL_CreateImageKHR)}, {"eglCreateImageKHR", P(egl::CreateImageKHR)},
{"eglCreatePbufferFromClientBuffer", P(EGL_CreatePbufferFromClientBuffer)}, {"eglCreatePbufferFromClientBuffer", P(egl::CreatePbufferFromClientBuffer)},
{"eglCreatePbufferSurface", P(EGL_CreatePbufferSurface)}, {"eglCreatePbufferSurface", P(egl::CreatePbufferSurface)},
{"eglCreatePixmapSurface", P(EGL_CreatePixmapSurface)}, {"eglCreatePixmapSurface", P(egl::CreatePixmapSurface)},
{"eglCreatePlatformPixmapSurface", P(EGL_CreatePlatformPixmapSurface)}, {"eglCreatePlatformPixmapSurface", P(egl::CreatePlatformPixmapSurface)},
{"eglCreatePlatformPixmapSurfaceEXT", P(EGL_CreatePlatformPixmapSurfaceEXT)}, {"eglCreatePlatformPixmapSurfaceEXT", P(egl::CreatePlatformPixmapSurfaceEXT)},
{"eglCreatePlatformWindowSurface", P(EGL_CreatePlatformWindowSurface)}, {"eglCreatePlatformWindowSurface", P(egl::CreatePlatformWindowSurface)},
{"eglCreatePlatformWindowSurfaceEXT", P(EGL_CreatePlatformWindowSurfaceEXT)}, {"eglCreatePlatformWindowSurfaceEXT", P(egl::CreatePlatformWindowSurfaceEXT)},
{"eglCreateStreamKHR", P(EGL_CreateStreamKHR)}, {"eglCreateStreamKHR", P(egl::CreateStreamKHR)},
{"eglCreateStreamProducerD3DTextureANGLE", P(EGL_CreateStreamProducerD3DTextureANGLE)}, {"eglCreateStreamProducerD3DTextureANGLE", P(egl::CreateStreamProducerD3DTextureANGLE)},
{"eglCreateSync", P(EGL_CreateSync)}, {"eglCreateSync", P(egl::CreateSync)},
{"eglCreateWindowSurface", P(EGL_CreateWindowSurface)}, {"eglCreateWindowSurface", P(egl::CreateWindowSurface)},
{"eglDebugMessageControlKHR", P(EGL_DebugMessageControlKHR)}, {"eglDebugMessageControlKHR", P(egl::DebugMessageControlKHR)},
{"eglDestroyContext", P(EGL_DestroyContext)}, {"eglDestroyContext", P(egl::DestroyContext)},
{"eglDestroyImage", P(EGL_DestroyImage)}, {"eglDestroyImage", P(egl::DestroyImage)},
{"eglDestroyImageKHR", P(EGL_DestroyImageKHR)}, {"eglDestroyImageKHR", P(egl::DestroyImageKHR)},
{"eglDestroyStreamKHR", P(EGL_DestroyStreamKHR)}, {"eglDestroyStreamKHR", P(egl::DestroyStreamKHR)},
{"eglDestroySurface", P(EGL_DestroySurface)}, {"eglDestroySurface", P(egl::DestroySurface)},
{"eglDestroySync", P(EGL_DestroySync)}, {"eglDestroySync", P(egl::DestroySync)},
{"eglGetCompositorTimingANDROID", P(EGL_GetCompositorTimingANDROID)}, {"eglGetCompositorTimingANDROID", P(egl::GetCompositorTimingANDROID)},
{"eglGetCompositorTimingSupportedANDROID", P(EGL_GetCompositorTimingSupportedANDROID)}, {"eglGetCompositorTimingSupportedANDROID", P(egl::GetCompositorTimingSupportedANDROID)},
{"eglGetConfigAttrib", P(EGL_GetConfigAttrib)}, {"eglGetConfigAttrib", P(egl::GetConfigAttrib)},
{"eglGetConfigs", P(EGL_GetConfigs)}, {"eglGetConfigs", P(egl::GetConfigs)},
{"eglGetCurrentContext", P(EGL_GetCurrentContext)}, {"eglGetCurrentContext", P(egl::GetCurrentContext)},
{"eglGetCurrentDisplay", P(EGL_GetCurrentDisplay)}, {"eglGetCurrentDisplay", P(egl::GetCurrentDisplay)},
{"eglGetCurrentSurface", P(EGL_GetCurrentSurface)}, {"eglGetCurrentSurface", P(egl::GetCurrentSurface)},
{"eglGetDisplay", P(EGL_GetDisplay)}, {"eglGetDisplay", P(egl::GetDisplay)},
{"eglGetError", P(EGL_GetError)}, {"eglGetError", P(egl::GetError)},
{"eglGetFrameTimestampSupportedANDROID", P(EGL_GetFrameTimestampSupportedANDROID)}, {"eglGetFrameTimestampSupportedANDROID", P(egl::GetFrameTimestampSupportedANDROID)},
{"eglGetFrameTimestampsANDROID", P(EGL_GetFrameTimestampsANDROID)}, {"eglGetFrameTimestampsANDROID", P(egl::GetFrameTimestampsANDROID)},
{"eglGetNextFrameIdANDROID", P(EGL_GetNextFrameIdANDROID)}, {"eglGetNextFrameIdANDROID", P(egl::GetNextFrameIdANDROID)},
{"eglGetPlatformDisplay", P(EGL_GetPlatformDisplay)}, {"eglGetPlatformDisplay", P(egl::GetPlatformDisplay)},
{"eglGetPlatformDisplayEXT", P(EGL_GetPlatformDisplayEXT)}, {"eglGetPlatformDisplayEXT", P(egl::GetPlatformDisplayEXT)},
{"eglGetProcAddress", P(EGL_GetProcAddress)}, {"eglGetProcAddress", P(egl::GetProcAddress)},
{"eglGetSyncAttrib", P(EGL_GetSyncAttrib)}, {"eglGetSyncAttrib", P(egl::GetSyncAttrib)},
{"eglGetSyncValuesCHROMIUM", P(EGL_GetSyncValuesCHROMIUM)}, {"eglGetSyncValuesCHROMIUM", P(egl::GetSyncValuesCHROMIUM)},
{"eglInitialize", P(EGL_Initialize)}, {"eglInitialize", P(egl::Initialize)},
{"eglLabelObjectKHR", P(EGL_LabelObjectKHR)}, {"eglLabelObjectKHR", P(egl::LabelObjectKHR)},
{"eglMakeCurrent", P(EGL_MakeCurrent)}, {"eglMakeCurrent", P(egl::MakeCurrent)},
{"eglPostSubBufferNV", P(EGL_PostSubBufferNV)}, {"eglPostSubBufferNV", P(egl::PostSubBufferNV)},
{"eglPresentationTimeANDROID", P(EGL_PresentationTimeANDROID)}, {"eglPresentationTimeANDROID", P(egl::PresentationTimeANDROID)},
{"eglProgramCacheGetAttribANGLE", P(EGL_ProgramCacheGetAttribANGLE)}, {"eglProgramCacheGetAttribANGLE", P(egl::ProgramCacheGetAttribANGLE)},
{"eglProgramCachePopulateANGLE", P(EGL_ProgramCachePopulateANGLE)}, {"eglProgramCachePopulateANGLE", P(egl::ProgramCachePopulateANGLE)},
{"eglProgramCacheQueryANGLE", P(EGL_ProgramCacheQueryANGLE)}, {"eglProgramCacheQueryANGLE", P(egl::ProgramCacheQueryANGLE)},
{"eglProgramCacheResizeANGLE", P(EGL_ProgramCacheResizeANGLE)}, {"eglProgramCacheResizeANGLE", P(egl::ProgramCacheResizeANGLE)},
{"eglQueryAPI", P(EGL_QueryAPI)}, {"eglQueryAPI", P(egl::QueryAPI)},
{"eglQueryContext", P(EGL_QueryContext)}, {"eglQueryContext", P(egl::QueryContext)},
{"eglQueryDebugKHR", P(EGL_QueryDebugKHR)}, {"eglQueryDebugKHR", P(egl::QueryDebugKHR)},
{"eglQueryDeviceAttribEXT", P(EGL_QueryDeviceAttribEXT)}, {"eglQueryDeviceAttribEXT", P(egl::QueryDeviceAttribEXT)},
{"eglQueryDeviceStringEXT", P(EGL_QueryDeviceStringEXT)}, {"eglQueryDeviceStringEXT", P(egl::QueryDeviceStringEXT)},
{"eglQueryDisplayAttribEXT", P(EGL_QueryDisplayAttribEXT)}, {"eglQueryDisplayAttribEXT", P(egl::QueryDisplayAttribEXT)},
{"eglQueryStreamKHR", P(EGL_QueryStreamKHR)}, {"eglQueryStreamKHR", P(egl::QueryStreamKHR)},
{"eglQueryStreamu64KHR", P(EGL_QueryStreamu64KHR)}, {"eglQueryStreamu64KHR", P(egl::QueryStreamu64KHR)},
{"eglQueryString", P(EGL_QueryString)}, {"eglQueryString", P(egl::QueryString)},
{"eglQuerySurface", P(EGL_QuerySurface)}, {"eglQuerySurface", P(egl::QuerySurface)},
{"eglQuerySurfacePointerANGLE", P(EGL_QuerySurfacePointerANGLE)}, {"eglQuerySurfacePointerANGLE", P(egl::QuerySurfacePointerANGLE)},
{"eglReleaseDeviceANGLE", P(EGL_ReleaseDeviceANGLE)}, {"eglReleaseDeviceANGLE", P(egl::ReleaseDeviceANGLE)},
{"eglReleaseTexImage", P(EGL_ReleaseTexImage)}, {"eglReleaseTexImage", P(egl::ReleaseTexImage)},
{"eglReleaseThread", P(EGL_ReleaseThread)}, {"eglReleaseThread", P(egl::ReleaseThread)},
{"eglSetBlobCacheFuncsANDROID", P(EGL_SetBlobCacheFuncsANDROID)}, {"eglSetBlobCacheFuncsANDROID", P(egl::SetBlobCacheFuncsANDROID)},
{"eglStreamAttribKHR", P(EGL_StreamAttribKHR)}, {"eglStreamAttribKHR", P(egl::StreamAttribKHR)},
{"eglStreamConsumerAcquireKHR", P(EGL_StreamConsumerAcquireKHR)}, {"eglStreamConsumerAcquireKHR", P(egl::StreamConsumerAcquireKHR)},
{"eglStreamConsumerGLTextureExternalAttribsNV", {"eglStreamConsumerGLTextureExternalAttribsNV",
P(EGL_StreamConsumerGLTextureExternalAttribsNV)}, P(egl::StreamConsumerGLTextureExternalAttribsNV)},
{"eglStreamConsumerGLTextureExternalKHR", P(EGL_StreamConsumerGLTextureExternalKHR)}, {"eglStreamConsumerGLTextureExternalKHR", P(egl::StreamConsumerGLTextureExternalKHR)},
{"eglStreamConsumerReleaseKHR", P(EGL_StreamConsumerReleaseKHR)}, {"eglStreamConsumerReleaseKHR", P(egl::StreamConsumerReleaseKHR)},
{"eglStreamPostD3DTextureANGLE", P(EGL_StreamPostD3DTextureANGLE)}, {"eglStreamPostD3DTextureANGLE", P(egl::StreamPostD3DTextureANGLE)},
{"eglSurfaceAttrib", P(EGL_SurfaceAttrib)}, {"eglSurfaceAttrib", P(egl::SurfaceAttrib)},
{"eglSwapBuffers", P(EGL_SwapBuffers)}, {"eglSwapBuffers", P(egl::SwapBuffers)},
{"eglSwapBuffersWithDamageKHR", P(EGL_SwapBuffersWithDamageKHR)}, {"eglSwapBuffersWithDamageKHR", P(egl::SwapBuffersWithDamageKHR)},
{"eglSwapInterval", P(EGL_SwapInterval)}, {"eglSwapInterval", P(egl::SwapInterval)},
{"eglTerminate", P(EGL_Terminate)}, {"eglTerminate", P(egl::Terminate)},
{"eglWaitClient", P(EGL_WaitClient)}, {"eglWaitClient", P(egl::WaitClient)},
{"eglWaitGL", P(EGL_WaitGL)}, {"eglWaitGL", P(egl::WaitGL)},
{"eglWaitNative", P(EGL_WaitNative)}, {"eglWaitNative", P(egl::WaitNative)},
{"eglWaitSync", P(EGL_WaitSync)}, {"eglWaitSync", P(egl::WaitSync)},
{"glActiveShaderProgram", P(gl::ActiveShaderProgram)}, {"glActiveShaderProgram", P(gl::ActiveShaderProgram)},
{"glActiveShaderProgramContextANGLE", P(gl::ActiveShaderProgramContextANGLE)}, {"glActiveShaderProgramContextANGLE", P(gl::ActiveShaderProgramContextANGLE)},
{"glActiveTexture", P(gl::ActiveTexture)}, {"glActiveTexture", P(gl::ActiveTexture)},
......
...@@ -132,6 +132,10 @@ if (is_win || is_linux || is_mac || is_android) { ...@@ -132,6 +132,10 @@ if (is_win || is_linux || is_mac || is_android) {
test("angle_end2end_tests") { test("angle_end2end_tests") {
include_dirs = [ "../../src/tests" ] include_dirs = [ "../../src/tests" ]
defines = [
"ANGLE_EGL_LIBRARY_NAME=\"libEGL${angle_libs_suffix}\"",
"ANGLE_GLESV2_LIBRARY_NAME=\"libGLESv2${angle_libs_suffix}\"",
]
if (is_android) { if (is_android) {
use_native_activity = true use_native_activity = true
...@@ -162,10 +166,8 @@ if (is_win || is_linux || is_mac || is_android) { ...@@ -162,10 +166,8 @@ if (is_win || is_linux || is_mac || is_android) {
} }
configs += [ configs += [
angle_root + ":gl_prototypes",
angle_root + ":internal_config", angle_root + ":internal_config",
angle_root + ":libANGLE_config", angle_root + ":libANGLE_config",
angle_root + ":library_name_config",
] ]
if (is_linux && !is_component_build) { if (is_linux && !is_component_build) {
...@@ -213,7 +215,6 @@ if (is_win || is_linux || is_mac || is_android) { ...@@ -213,7 +215,6 @@ if (is_win || is_linux || is_mac || is_android) {
} }
configs += [ configs += [
angle_root + ":gl_prototypes",
angle_root + ":internal_config", angle_root + ":internal_config",
angle_root + ":libANGLE_config", angle_root + ":libANGLE_config",
] ]
...@@ -277,7 +278,6 @@ if (is_win || is_linux || is_android || is_mac) { ...@@ -277,7 +278,6 @@ if (is_win || is_linux || is_android || is_mac) {
configs += [ configs += [
angle_root + ":internal_config", angle_root + ":internal_config",
angle_root + ":gl_prototypes",
angle_root + ":libANGLE_config", angle_root + ":libANGLE_config",
] ]
...@@ -316,7 +316,6 @@ if (is_win || is_linux || is_android || is_mac) { ...@@ -316,7 +316,6 @@ if (is_win || is_linux || is_android || is_mac) {
configs += [ configs += [
angle_root + ":internal_config", angle_root + ":internal_config",
angle_root + ":gl_prototypes",
angle_root + ":libANGLE_config", angle_root + ":libANGLE_config",
] ]
...@@ -523,7 +522,6 @@ if (build_angle_gles1_conform_tests) { ...@@ -523,7 +522,6 @@ if (build_angle_gles1_conform_tests) {
configs += [ configs += [
angle_root + ":internal_config", angle_root + ":internal_config",
angle_root + ":libANGLE_config", angle_root + ":libANGLE_config",
angle_root + ":gl_prototypes",
] ]
if (build_with_chromium) { if (build_with_chromium) {
...@@ -663,8 +661,9 @@ if (build_angle_deqp_tests) { ...@@ -663,8 +661,9 @@ if (build_angle_deqp_tests) {
"//third_party/libpng:libpng", "//third_party/libpng:libpng",
] ]
defines = [ "ANGLE_EGL_LIBRARY_NAME=\"libEGL${angle_libs_suffix}\"" ]
configs -= deqp_undefine_configs configs -= deqp_undefine_configs
configs += [ angle_root + ":library_name_config" ]
public_configs = [ ":angle_deqp_libtester_config" ] public_configs = [ ":angle_deqp_libtester_config" ]
sources = deqp_libtester_sources sources = deqp_libtester_sources
if (is_win) { if (is_win) {
......
...@@ -52,10 +52,10 @@ TEST_P(ExplicitContextTest, GetProcAddress) ...@@ -52,10 +52,10 @@ TEST_P(ExplicitContextTest, GetProcAddress)
EGLContext context = getEGLWindow()->getContext(); EGLContext context = getEGLWindow()->getContext();
PFNGLCLEARCOLORCONTEXTANGLEPROC clearColor = reinterpret_cast<PFNGLCLEARCOLORCONTEXTANGLEPROC>( PFNGLCLEARCOLORCONTEXTANGLE clearColor = reinterpret_cast<PFNGLCLEARCOLORCONTEXTANGLE>(
eglGetProcAddress("glClearColorContextANGLE")); eglGetProcAddress("glClearColorContextANGLE"));
PFNGLCLEARCONTEXTANGLEPROC clear = PFNGLCLEARCONTEXTANGLE clear =
reinterpret_cast<PFNGLCLEARCONTEXTANGLEPROC>(eglGetProcAddress("glClearContextANGLE")); reinterpret_cast<PFNGLCLEARCONTEXTANGLE>(eglGetProcAddress("glClearContextANGLE"));
// Clear to green // Clear to green
clearColor(context, 1.0f, 0, 0, 1.0f); clearColor(context, 1.0f, 0, 0, 1.0f);
......
...@@ -1163,8 +1163,7 @@ bool IsAndroid() ...@@ -1163,8 +1163,7 @@ bool IsAndroid()
bool IsVulkan() bool IsVulkan()
{ {
const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER)); std::string rendererString(reinterpret_cast<const char *>(glGetString(GL_RENDERER)));
std::string rendererString(renderer);
return (rendererString.find("Vulkan") != std::string::npos); return (rendererString.find("Vulkan") != std::string::npos);
} }
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#include "system_utils.h" #include "system_utils.h"
#include <sys/resource.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <sched.h> #include <sched.h>
#include <sys/resource.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
...@@ -27,8 +27,9 @@ void Sleep(unsigned int milliseconds) ...@@ -27,8 +27,9 @@ void Sleep(unsigned int milliseconds)
} }
else else
{ {
timespec sleepTime = { timespec sleepTime =
.tv_sec = milliseconds / 1000, {
.tv_sec = milliseconds / 1000,
.tv_nsec = (milliseconds % 1000) * 1000000, .tv_nsec = (milliseconds % 1000) * 1000000,
}; };
...@@ -79,4 +80,5 @@ bool StabilizeCPUForBenchmarking() ...@@ -79,4 +80,5 @@ bool StabilizeCPUForBenchmarking()
return success; return success;
} }
} // namespace angle
} // namespace angle
...@@ -29,6 +29,7 @@ ANGLE_EXPORT void WriteDebugMessage(const char *format, ...); ...@@ -29,6 +29,7 @@ ANGLE_EXPORT void WriteDebugMessage(const char *format, ...);
// Set thread affinity and priority. // Set thread affinity and priority.
ANGLE_EXPORT bool StabilizeCPUForBenchmarking(); ANGLE_EXPORT bool StabilizeCPUForBenchmarking();
} // namespace angle
} // namespace angle
#endif // UTIL_SYSTEM_UTILS_H_ #endif // UTIL_SYSTEM_UTILS_H_
...@@ -36,4 +36,5 @@ bool StabilizeCPUForBenchmarking() ...@@ -36,4 +36,5 @@ bool StabilizeCPUForBenchmarking()
return true; return true;
} }
} // namespace angle } // namespace angle
...@@ -24,4 +24,5 @@ bool StabilizeCPUForBenchmarking() ...@@ -24,4 +24,5 @@ bool StabilizeCPUForBenchmarking()
// No equivalent to this in WinRT // No equivalent to this in WinRT
return true; return true;
} }
} // namespace angle } // namespace angle
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment