Commit 0a5bc0ce by Jamie Madill Committed by Commit Bot

EGL: Auto-generate "libEGL" export cpp file.

This steps towards full auto-generation of EGL entry point files. Bug: angleproject:2621 Change-Id: I629447bb6754ee1e87bef020de21b28e37e20eaf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552774 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent 105b43f9
...@@ -204,12 +204,12 @@ EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device); ...@@ -204,12 +204,12 @@ EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device);
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 PFNEGLPROGRAMCACHEPOPULATEANGLEPROC) (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, EGLint 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);
EGLAPI void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize); EGLAPI void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy, EGLint index, void *key, EGLint *keysize, void *binary, EGLint *binarysize);
EGLAPI void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize); EGLAPI void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy, const void *key, EGLint keysize, const void *binary, EGLint binarysize);
EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLenum mode); EGLAPI EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode);
#endif #endif
#endif /* EGL_ANGLE_program_cache_control */ #endif /* EGL_ANGLE_program_cache_control */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"scripts/entry_point_packed_gl_enums.json": "scripts/entry_point_packed_gl_enums.json":
"846be5dc8cb36076207699b025633fcc", "846be5dc8cb36076207699b025633fcc",
"scripts/generate_entry_points.py": "scripts/generate_entry_points.py":
"aae0f372d7db77f2cafa40f20c5a68d5", "06fac560bdbe1a51d7a5d0b5985dc894",
"scripts/gl.xml": "scripts/gl.xml":
"f66967f3f3d696b5d8306fd80bbd49a8", "f66967f3f3d696b5d8306fd80bbd49a8",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
...@@ -153,6 +153,8 @@ ...@@ -153,6 +153,8 @@
"46f74a3b19fd7e243ddd47a7478ae818", "46f74a3b19fd7e243ddd47a7478ae818",
"src/libANGLE/validationGL4_autogen.h": "src/libANGLE/validationGL4_autogen.h":
"cbe3f917024a93a3adcbd2806f3e951f", "cbe3f917024a93a3adcbd2806f3e951f",
"src/libEGL/libEGL_autogen.cpp":
"e6a94332f3bbea212b9a5df9654b59f8",
"src/libGL/entry_points_gl_1_0_autogen.cpp": "src/libGL/entry_points_gl_1_0_autogen.cpp":
"cb974a5a4230f15b0de83a3f690dc481", "cb974a5a4230f15b0de83a3f690dc481",
"src/libGL/entry_points_gl_1_0_autogen.h": "src/libGL/entry_points_gl_1_0_autogen.h":
......
...@@ -233,13 +233,21 @@ CONTEXT_HEADER = """\ ...@@ -233,13 +233,21 @@ CONTEXT_HEADER = """\
CONTEXT_DECL_FORMAT = """ {return_type} {name_lower_no_suffix}({internal_params}){maybe_const}; \\""" CONTEXT_DECL_FORMAT = """ {return_type} {name_lower_no_suffix}({internal_params}){maybe_const}; \\"""
LIBGLES_ENTRY_POINT_DEF = """\ TEMPLATE_GL_ENTRY_POINT_EXPORT = """\
{return_type}GL_APIENTRY gl{name}{explicit_context_suffix}({explicit_context_param}{explicit_context_comma}{params}) {return_type}GL_APIENTRY gl{name}{explicit_context_suffix}({explicit_context_param}{explicit_context_comma}{params})
{{ {{
return gl::{name}{explicit_context_suffix}({explicit_context_internal_param}{explicit_context_comma}{internal_params}); return gl::{name}{explicit_context_suffix}({explicit_context_internal_param}{explicit_context_comma}{internal_params});
}} }}
""" """
TEMPLATE_EGL_ENTRY_POINT_EXPORT = """\
{return_type}EGLAPIENTRY egl{name}({params})
{{
EnsureEGLLoaded();
return EGL_{name}({internal_params});
}}
"""
TEMPLATE_GLEXT_EXPLICIT_CONTEXT_INC = """\ TEMPLATE_GLEXT_EXPLICIT_CONTEXT_INC = """\
// GENERATED FILE - DO NOT EDIT. // GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {data_source_name}. // Generated by {script_name} using data from {data_source_name}.
...@@ -582,6 +590,99 @@ EGL_EXT_HEADER_INCLUDES = """\ ...@@ -582,6 +590,99 @@ EGL_EXT_HEADER_INCLUDES = """\
#include <export.h> #include <export.h>
""" """
LIBGLESV2_EXPORT_INCLUDES = """
#include "angle_gl.h"
#include "libGLESv2/entry_points_gles_1_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h"
#include "libGLESv2/entry_points_gles_3_2_autogen.h"
#include "libGLESv2/entry_points_gles_ext_autogen.h"
#include "common/event_tracer.h"
"""
LIBGL_EXPORT_INCLUDES = """
#include "angle_gl.h"
#include "libGL/entry_points_gl_1_0_autogen.h"
#include "libGL/entry_points_gl_1_1_autogen.h"
#include "libGL/entry_points_gl_1_2_autogen.h"
#include "libGL/entry_points_gl_1_3_autogen.h"
#include "libGL/entry_points_gl_1_4_autogen.h"
#include "libGL/entry_points_gl_1_5_autogen.h"
#include "libGL/entry_points_gl_2_0_autogen.h"
#include "libGL/entry_points_gl_2_1_autogen.h"
#include "libGL/entry_points_gl_3_0_autogen.h"
#include "libGL/entry_points_gl_3_1_autogen.h"
#include "libGL/entry_points_gl_3_2_autogen.h"
#include "libGL/entry_points_gl_3_3_autogen.h"
#include "libGL/entry_points_gl_4_0_autogen.h"
#include "libGL/entry_points_gl_4_1_autogen.h"
#include "libGL/entry_points_gl_4_2_autogen.h"
#include "libGL/entry_points_gl_4_3_autogen.h"
#include "libGL/entry_points_gl_4_4_autogen.h"
#include "libGL/entry_points_gl_4_5_autogen.h"
#include "libGL/entry_points_gl_4_6_autogen.h"
#include "common/event_tracer.h"
"""
LIBEGL_EXPORT_INCLUDES_AND_PREAMBLE = """
#include "anglebase/no_destructor.h"
#include "common/system_utils.h"
#include <memory>
#if defined(ANGLE_USE_EGL_LOADER)
# include "libEGL/egl_loader_autogen.h"
#else
# include "libGLESv2/entry_points_egl_autogen.h"
# include "libGLESv2/entry_points_egl_ext_autogen.h"
#endif // defined(ANGLE_USE_EGL_LOADER)
namespace
{
#if defined(ANGLE_USE_EGL_LOADER)
bool gLoaded = false;
std::unique_ptr<angle::Library> &EntryPointsLib()
{
static angle::base::NoDestructor<std::unique_ptr<angle::Library>> sEntryPointsLib;
return *sEntryPointsLib;
}
angle::GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol)
{
return reinterpret_cast<angle::GenericProc>(EntryPointsLib()->getSymbol(symbol));
}
void EnsureEGLLoaded()
{
if (gLoaded)
{
return;
}
EntryPointsLib().reset(
angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir));
angle::LoadEGL_EGL(GlobalLoad);
if (!EGL_GetPlatformDisplay)
{
fprintf(stderr, "Error loading EGL entry points.\\n");
}
else
{
gLoaded = true;
}
}
#else
void EnsureEGLLoaded() {}
#endif // defined(ANGLE_USE_EGL_LOADER)
} // anonymous namespace
"""
TEMPLATE_EVENT_COMMENT = """\ TEMPLATE_EVENT_COMMENT = """\
// Don't run the EVENT() macro on the EXT_debug_marker entry points. // Don't run the EVENT() macro on the EXT_debug_marker entry points.
// It can interfere with the debug events being set by the caller. // It can interfere with the debug events being set by the caller.
...@@ -1192,11 +1293,11 @@ def format_context_decl(api, cmd_name, proto, params, template, cmd_packed_gl_en ...@@ -1192,11 +1293,11 @@ def format_context_decl(api, cmd_name, proto, params, template, cmd_packed_gl_en
maybe_const=maybe_const) maybe_const=maybe_const)
def format_libgles_entry_point_def(cmd_name, proto, params, is_explicit_context): def format_entry_point_export(cmd_name, proto, params, is_explicit_context, template):
internal_params = [just_the_name(param) for param in params] internal_params = [just_the_name(param) for param in params]
return_type = proto[:-len(cmd_name)] return_type = proto[:-len(cmd_name)]
return LIBGLES_ENTRY_POINT_DEF.format( return template.format(
name=strip_api_prefix(cmd_name), name=strip_api_prefix(cmd_name),
return_type=return_type, return_type=return_type,
params=", ".join(params), params=", ".join(params),
...@@ -1266,8 +1367,10 @@ def get_entry_points(api, ...@@ -1266,8 +1367,10 @@ def get_entry_points(api,
format_entry_point_def(api, command, cmd_name, proto_text, param_text, format_entry_point_def(api, command, cmd_name, proto_text, param_text,
is_explicit_context, cmd_packed_gl_enums, packed_param_types)) is_explicit_context, cmd_packed_gl_enums, packed_param_types))
export_template = TEMPLATE_EGL_ENTRY_POINT_EXPORT if api == "EGL" else TEMPLATE_GL_ENTRY_POINT_EXPORT
export_defs.append( export_defs.append(
format_libgles_entry_point_def(cmd_name, proto_text, param_text, is_explicit_context)) format_entry_point_export(cmd_name, proto_text, param_text, is_explicit_context,
export_template))
validation_protos.append( validation_protos.append(
format_validation_proto(api, cmd_name, param_text, cmd_packed_gl_enums, format_validation_proto(api, cmd_name, param_text, cmd_packed_gl_enums,
...@@ -1904,6 +2007,7 @@ def main(): ...@@ -1904,6 +2007,7 @@ def main():
'../src/libANGLE/validationGL44_autogen.h', '../src/libANGLE/validationGL44_autogen.h',
'../src/libANGLE/validationGL45_autogen.h', '../src/libANGLE/validationGL45_autogen.h',
'../src/libANGLE/validationGL46_autogen.h', '../src/libANGLE/validationGL46_autogen.h',
'../src/libEGL/libEGL_autogen.cpp',
'../src/libGLESv2/entry_points_egl_autogen.h', '../src/libGLESv2/entry_points_egl_autogen.h',
'../src/libGLESv2/entry_points_egl_ext_autogen.h', '../src/libGLESv2/entry_points_egl_ext_autogen.h',
'../src/libGLESv2/entry_points_gles_1_0_autogen.cpp', '../src/libGLESv2/entry_points_gles_1_0_autogen.cpp',
...@@ -2258,6 +2362,7 @@ def main(): ...@@ -2258,6 +2362,7 @@ def main():
egl_validation_protos = [] egl_validation_protos = []
egl_decls = [] egl_decls = []
egl_defs = [] egl_defs = []
libegl_ep_defs = []
for major_version, minor_version in [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]: for major_version, minor_version in [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]:
version = "%d_%d" % (major_version, minor_version) version = "%d_%d" % (major_version, minor_version)
...@@ -2275,7 +2380,7 @@ def main(): ...@@ -2275,7 +2380,7 @@ def main():
if not egl_version_commands: if not egl_version_commands:
continue continue
decls, defs, _, validation_protos, _, _, _ = get_entry_points( decls, defs, export_defs, validation_protos, _, _, _ = get_entry_points(
EGL, eglxml.all_commands, egl_version_commands, False, egl_param_types, EGL, eglxml.all_commands, egl_version_commands, False, egl_param_types,
cmd_packed_egl_enums, EGL_PACKED_TYPES) cmd_packed_egl_enums, EGL_PACKED_TYPES)
...@@ -2284,6 +2389,7 @@ def main(): ...@@ -2284,6 +2389,7 @@ def main():
egl_validation_protos += [comment] + validation_protos egl_validation_protos += [comment] + validation_protos
egl_decls += [comment] + decls egl_decls += [comment] + decls
egl_defs += [comment] + defs egl_defs += [comment] + defs
libegl_ep_defs += [comment] + export_defs
write_file("egl", "EGL", TEMPLATE_ENTRY_POINT_HEADER, "\n".join(egl_decls), "h", write_file("egl", "EGL", TEMPLATE_ENTRY_POINT_HEADER, "\n".join(egl_decls), "h",
EGL_HEADER_INCLUDES, "libGLESv2", "egl.xml", "extern \"C\"") EGL_HEADER_INCLUDES, "libGLESv2", "egl.xml", "extern \"C\"")
...@@ -2299,7 +2405,7 @@ def main(): ...@@ -2299,7 +2405,7 @@ def main():
continue continue
# Detect and filter duplicate extensions. # Detect and filter duplicate extensions.
decls, defs, _, validation_protos, _, _, _ = get_entry_points( decls, defs, export_defs, validation_protos, _, _, _ = get_entry_points(
EGL, eglxml.all_commands, ext_cmd_names, False, egl_param_types, cmd_packed_egl_enums, EGL, eglxml.all_commands, ext_cmd_names, False, egl_param_types, cmd_packed_egl_enums,
EGL_PACKED_TYPES) EGL_PACKED_TYPES)
...@@ -2313,6 +2419,7 @@ def main(): ...@@ -2313,6 +2419,7 @@ def main():
egl_validation_protos += [comment] + validation_protos egl_validation_protos += [comment] + validation_protos
egl_ext_decls += [comment] + decls egl_ext_decls += [comment] + decls
egl_ext_defs += [comment] + defs egl_ext_defs += [comment] + defs
libegl_ep_defs += [comment] + export_defs
write_file("egl_ext", "EGL Extension", TEMPLATE_ENTRY_POINT_HEADER, "\n".join(egl_ext_decls), write_file("egl_ext", "EGL Extension", TEMPLATE_ENTRY_POINT_HEADER, "\n".join(egl_ext_decls),
"h", EGL_EXT_HEADER_INCLUDES, "libGLESv2", "egl.xml and egl_angle_ext.xml", "h", EGL_EXT_HEADER_INCLUDES, "libGLESv2", "egl.xml and egl_angle_ext.xml",
...@@ -2419,50 +2526,13 @@ def main(): ...@@ -2419,50 +2526,13 @@ def main():
out.write(entry_points_enum_source) out.write(entry_points_enum_source)
out.close() out.close()
source_includes = """ write_export_files("\n".join([item for item in libgles_ep_defs]), LIBGLESV2_EXPORT_INCLUDES,
#include "angle_gl.h"
#include "libGLESv2/entry_points_gles_1_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_0_autogen.h"
#include "libGLESv2/entry_points_gles_3_1_autogen.h"
#include "libGLESv2/entry_points_gles_3_2_autogen.h"
#include "libGLESv2/entry_points_gles_ext_autogen.h"
#include "common/event_tracer.h"
"""
write_export_files("\n".join([item for item in libgles_ep_defs]), source_includes,
"gl.xml and gl_angle_ext.xml", "libGLESv2", "OpenGL ES") "gl.xml and gl_angle_ext.xml", "libGLESv2", "OpenGL ES")
write_export_files("\n".join([item for item in libgl_ep_defs]), LIBGL_EXPORT_INCLUDES,
source_includes = """
#include "angle_gl.h"
#include "libGL/entry_points_gl_1_0_autogen.h"
#include "libGL/entry_points_gl_1_1_autogen.h"
#include "libGL/entry_points_gl_1_2_autogen.h"
#include "libGL/entry_points_gl_1_3_autogen.h"
#include "libGL/entry_points_gl_1_4_autogen.h"
#include "libGL/entry_points_gl_1_5_autogen.h"
#include "libGL/entry_points_gl_2_0_autogen.h"
#include "libGL/entry_points_gl_2_1_autogen.h"
#include "libGL/entry_points_gl_3_0_autogen.h"
#include "libGL/entry_points_gl_3_1_autogen.h"
#include "libGL/entry_points_gl_3_2_autogen.h"
#include "libGL/entry_points_gl_3_3_autogen.h"
#include "libGL/entry_points_gl_4_0_autogen.h"
#include "libGL/entry_points_gl_4_1_autogen.h"
#include "libGL/entry_points_gl_4_2_autogen.h"
#include "libGL/entry_points_gl_4_3_autogen.h"
#include "libGL/entry_points_gl_4_4_autogen.h"
#include "libGL/entry_points_gl_4_5_autogen.h"
#include "libGL/entry_points_gl_4_6_autogen.h"
#include "common/event_tracer.h"
"""
write_export_files("\n".join([item for item in libgl_ep_defs]), source_includes,
"gl.xml and wgl.xml", "libGL", "Windows GL") "gl.xml and wgl.xml", "libGL", "Windows GL")
write_export_files("\n".join([item for item in libegl_ep_defs]),
LIBEGL_EXPORT_INCLUDES_AND_PREAMBLE, "egl.xml and egl_angle_ext.xml",
"libEGL", "EGL")
libgles_ep_exports += get_egl_exports() libgles_ep_exports += get_egl_exports()
......
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from egl.xml and egl_angle_ext.xml.
// //
// Copyright 2002 The ANGLE Project Authors. All rights reserved. // Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// libEGL_autogen.cpp: Implements the exported EGL functions.
// libEGL.cpp: Implements the exported EGL functions.
#include "anglebase/no_destructor.h" #include "anglebase/no_destructor.h"
#include "common/system_utils.h" #include "common/system_utils.h"
...@@ -25,8 +26,8 @@ bool gLoaded = false; ...@@ -25,8 +26,8 @@ bool gLoaded = false;
std::unique_ptr<angle::Library> &EntryPointsLib() std::unique_ptr<angle::Library> &EntryPointsLib()
{ {
static angle::base::NoDestructor<std::unique_ptr<angle::Library>> entryPointsLib; static angle::base::NoDestructor<std::unique_ptr<angle::Library>> sEntryPointsLib;
return *entryPointsLib; return *sEntryPointsLib;
} }
angle::GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol) angle::GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol)
...@@ -37,7 +38,9 @@ angle::GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol) ...@@ -37,7 +38,9 @@ angle::GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol)
void EnsureEGLLoaded() void EnsureEGLLoaded()
{ {
if (gLoaded) if (gLoaded)
{
return; return;
}
EntryPointsLib().reset( EntryPointsLib().reset(
angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir)); angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir));
...@@ -58,6 +61,7 @@ void EnsureEGLLoaded() {} ...@@ -58,6 +61,7 @@ void EnsureEGLLoaded() {}
extern "C" { extern "C" {
// EGL 1.0
EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy,
const EGLint *attrib_list, const EGLint *attrib_list,
EGLConfig *configs, EGLConfig *configs,
...@@ -141,7 +145,7 @@ EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, ...@@ -141,7 +145,7 @@ EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy,
return EGL_GetConfigs(dpy, configs, config_size, num_config); return EGL_GetConfigs(dpy, configs, config_size, num_config);
} }
EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void) EGLDisplay EGLAPIENTRY eglGetCurrentDisplay()
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetCurrentDisplay(); return EGL_GetCurrentDisplay();
...@@ -159,12 +163,18 @@ EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id) ...@@ -159,12 +163,18 @@ EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
return EGL_GetDisplay(display_id); return EGL_GetDisplay(display_id);
} }
EGLint EGLAPIENTRY eglGetError(void) EGLint EGLAPIENTRY eglGetError()
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetError(); return EGL_GetError();
} }
__eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
{
EnsureEGLLoaded();
return EGL_GetProcAddress(procname);
}
EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
...@@ -216,7 +226,7 @@ EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) ...@@ -216,7 +226,7 @@ EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
return EGL_Terminate(dpy); return EGL_Terminate(dpy);
} }
EGLBoolean EGLAPIENTRY eglWaitGL(void) EGLBoolean EGLAPIENTRY eglWaitGL()
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_WaitGL(); return EGL_WaitGL();
...@@ -228,6 +238,7 @@ EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine) ...@@ -228,6 +238,7 @@ EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine)
return EGL_WaitNative(engine); return EGL_WaitNative(engine);
} }
// EGL 1.1
EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
...@@ -255,18 +266,13 @@ EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval) ...@@ -255,18 +266,13 @@ EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
return EGL_SwapInterval(dpy, interval); return EGL_SwapInterval(dpy, interval);
} }
// EGL 1.2
EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api) EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_BindAPI(api); return EGL_BindAPI(api);
} }
EGLenum EGLAPIENTRY eglQueryAPI(void)
{
EnsureEGLLoaded();
return EGL_QueryAPI();
}
EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
EGLenum buftype, EGLenum buftype,
EGLClientBuffer buffer, EGLClientBuffer buffer,
...@@ -277,59 +283,70 @@ EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, ...@@ -277,59 +283,70 @@ EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
return EGL_CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); return EGL_CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
} }
EGLBoolean EGLAPIENTRY eglReleaseThread(void) EGLenum EGLAPIENTRY eglQueryAPI()
{
EnsureEGLLoaded();
return EGL_QueryAPI();
}
EGLBoolean EGLAPIENTRY eglReleaseThread()
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_ReleaseThread(); return EGL_ReleaseThread();
} }
EGLBoolean EGLAPIENTRY eglWaitClient(void) EGLBoolean EGLAPIENTRY eglWaitClient()
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_WaitClient(); return EGL_WaitClient();
} }
EGLContext EGLAPIENTRY eglGetCurrentContext(void) // EGL 1.4
EGLContext EGLAPIENTRY eglGetCurrentContext()
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetCurrentContext(); return EGL_GetCurrentContext();
} }
EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list) // EGL 1.5
EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreateSync(dpy, type, attrib_list); return EGL_ClientWaitSync(dpy, sync, flags, timeout);
} }
EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync) EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy,
EGLContext ctx,
EGLenum target,
EGLClientBuffer buffer,
const EGLAttrib *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_DestroySync(dpy, sync); return EGL_CreateImage(dpy, ctx, target, buffer, attrib_list);
} }
EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface(EGLDisplay dpy,
EGLConfig config,
void *native_pixmap,
const EGLAttrib *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_ClientWaitSync(dpy, sync, flags, timeout); return EGL_CreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list);
} }
EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy, EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface(EGLDisplay dpy,
EGLSync sync, EGLConfig config,
EGLint attribute, void *native_window,
EGLAttrib *value) const EGLAttrib *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetSyncAttrib(dpy, sync, attribute, value); return EGL_CreatePlatformWindowSurface(dpy, config, native_window, attrib_list);
} }
EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy, EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
EGLContext ctx,
EGLenum target,
EGLClientBuffer buffer,
const EGLAttrib *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreateImage(dpy, ctx, target, buffer, attrib_list); return EGL_CreateSync(dpy, type, attrib_list);
} }
EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image) EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image)
...@@ -338,30 +355,27 @@ EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image) ...@@ -338,30 +355,27 @@ EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image)
return EGL_DestroyImage(dpy, image); return EGL_DestroyImage(dpy, image);
} }
EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform, EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync)
void *native_display,
const EGLAttrib *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetPlatformDisplay(platform, native_display, attrib_list); return EGL_DestroySync(dpy, sync);
} }
EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface(EGLDisplay dpy, EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform,
EGLConfig config, void *native_display,
void *native_window,
const EGLAttrib *attrib_list) const EGLAttrib *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreatePlatformWindowSurface(dpy, config, native_window, attrib_list); return EGL_GetPlatformDisplay(platform, native_display, attrib_list);
} }
EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy,
EGLConfig config, EGLSync sync,
void *native_pixmap, EGLint attribute,
const EGLAttrib *attrib_list) EGLAttrib *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list); return EGL_GetSyncAttrib(dpy, sync, attribute, value);
} }
EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags)
...@@ -370,96 +384,92 @@ EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) ...@@ -370,96 +384,92 @@ EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags)
return EGL_WaitSync(dpy, sync, flags); return EGL_WaitSync(dpy, sync, flags);
} }
EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy, // EGL_ANDROID_blob_cache
EGLSurface surface, void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy,
EGLint attribute, EGLSetBlobFuncANDROID set,
void **value) EGLGetBlobFuncANDROID get)
{
EnsureEGLLoaded();
return EGL_QuerySurfacePointerANGLE(dpy, surface, attribute, value);
}
EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy,
EGLSurface surface,
EGLint x,
EGLint y,
EGLint width,
EGLint height)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_PostSubBufferNV(dpy, surface, x, y, width, height); return EGL_SetBlobCacheFuncsANDROID(dpy, set, get);
} }
EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, // EGL_ANDROID_create_native_client_buffer
void *native_display, EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID(const EGLint *attrib_list)
const EGLint *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetPlatformDisplayEXT(platform, native_display, attrib_list); return EGL_CreateNativeClientBufferANDROID(attrib_list);
} }
EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, // EGL_ANDROID_get_frame_timestamps
EGLConfig config, EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID(EGLDisplay dpy,
void *native_window, EGLSurface surface,
const EGLint *attrib_list) EGLint name)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list); return EGL_GetCompositorTimingSupportedANDROID(dpy, surface, name);
} }
EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID(EGLDisplay dpy,
EGLConfig config, EGLSurface surface,
void *native_pixmap, EGLint numTimestamps,
const EGLint *attrib_list) const EGLint *names,
EGLnsecsANDROID *values)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list); return EGL_GetCompositorTimingANDROID(dpy, surface, numTimestamps, names, values);
} }
EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value) EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR *frameId)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryDisplayAttribEXT(dpy, attribute, value); return EGL_GetNextFrameIdANDROID(dpy, surface, frameId);
} }
EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID(EGLDisplay dpy,
EGLint attribute, EGLSurface surface,
EGLAttrib *value) EGLint timestamp)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryDisplayAttribANGLE(dpy, attribute, value); return EGL_GetFrameTimestampSupportedANDROID(dpy, surface, timestamp);
} }
EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device, EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID(EGLDisplay dpy,
EGLint attribute, EGLSurface surface,
EGLAttrib *value) EGLuint64KHR frameId,
EGLint numTimestamps,
const EGLint *timestamps,
EGLnsecsANDROID *values)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryDeviceAttribEXT(device, attribute, value); return EGL_GetFrameTimestampsANDROID(dpy, surface, frameId, numTimestamps, timestamps, values);
} }
const char *EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, EGLint name) // EGL_ANDROID_get_native_client_buffer
EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryDeviceStringEXT(device, name); return EGL_GetNativeClientBufferANDROID(buffer);
} }
EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, // EGL_ANDROID_native_fence_sync
EGLContext ctx, EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync)
EGLenum target,
EGLClientBuffer buffer,
const EGLint *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreateImageKHR(dpy, ctx, target, buffer, attrib_list); return EGL_DupNativeFenceFDANDROID(dpy, sync);
} }
EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) // EGL_ANDROID_presentation_time
EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLnsecsANDROID time)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_DestroyImageKHR(dpy, image); return EGL_PresentationTimeANDROID(dpy, surface, time);
} }
// EGL_ANGLE_device_creation
EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type, EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type,
void *native_device, void *native_device,
const EGLAttrib *attrib_list) const EGLAttrib *attrib_list)
...@@ -474,77 +484,85 @@ EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device) ...@@ -474,77 +484,85 @@ EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device)
return EGL_ReleaseDeviceANGLE(device); return EGL_ReleaseDeviceANGLE(device);
} }
__eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname) // EGL_ANGLE_feature_control
const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetProcAddress(procname); return EGL_QueryStringiANGLE(dpy, name, index);
} }
EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list) EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy,
EGLint attribute,
EGLAttrib *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreateStreamKHR(dpy, attrib_list); return EGL_QueryDisplayAttribANGLE(dpy, attribute, value);
} }
EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) // EGL_ANGLE_power_preference
void EGLAPIENTRY eglReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_DestroyStreamKHR(dpy, stream); return EGL_ReleaseHighPowerGPUANGLE(dpy, ctx);
} }
EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, void EGLAPIENTRY eglReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
EGLStreamKHR stream,
EGLenum attribute,
EGLint value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_StreamAttribKHR(dpy, stream, attribute, value); return EGL_ReacquireHighPowerGPUANGLE(dpy, ctx);
} }
EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, void EGLAPIENTRY eglHandleGPUSwitchANGLE(EGLDisplay dpy)
EGLStreamKHR stream,
EGLenum attribute,
EGLint *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryStreamKHR(dpy, stream, attribute, value); return EGL_HandleGPUSwitchANGLE(dpy);
} }
EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, // EGL_ANGLE_program_cache_control
EGLStreamKHR stream, EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib)
EGLenum attribute,
EGLuint64KHR *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryStreamu64KHR(dpy, stream, attribute, value); return EGL_ProgramCacheGetAttribANGLE(dpy, attrib);
} }
EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream) void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy,
EGLint index,
void *key,
EGLint *keysize,
void *binary,
EGLint *binarysize)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_StreamConsumerGLTextureExternalKHR(dpy, stream); return EGL_ProgramCacheQueryANGLE(dpy, index, key, keysize, binary, binarysize);
} }
EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy,
const void *key,
EGLint keysize,
const void *binary,
EGLint binarysize)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_StreamConsumerAcquireKHR(dpy, stream); return EGL_ProgramCachePopulateANGLE(dpy, key, keysize, binary, binarysize);
} }
EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_StreamConsumerReleaseKHR(dpy, stream); return EGL_ProgramCacheResizeANGLE(dpy, limit, mode);
} }
EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, // EGL_ANGLE_query_surface_pointer
EGLStreamKHR stream, EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy,
const EGLAttrib *attrib_list) EGLSurface surface,
EGLint attribute,
void **value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_StreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list); return EGL_QuerySurfacePointerANGLE(dpy, surface, attribute, value);
} }
// EGL_ANGLE_stream_producer_d3d_texture
EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,
EGLStreamKHR stream, EGLStreamKHR stream,
const EGLAttrib *attrib_list) const EGLAttrib *attrib_list)
...@@ -562,16 +580,16 @@ EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy, ...@@ -562,16 +580,16 @@ EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy,
return EGL_StreamPostD3DTextureANGLE(dpy, stream, texture, attrib_list); return EGL_StreamPostD3DTextureANGLE(dpy, stream, texture, attrib_list);
} }
EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy, // EGL_ANGLE_swap_with_frame_token
EGLBoolean EGLAPIENTRY eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,
EGLSurface surface, EGLSurface surface,
EGLuint64KHR *ust, EGLFrameTokenANGLE frametoken)
EGLuint64KHR *msc,
EGLuint64KHR *sbc)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetSyncValuesCHROMIUM(dpy, surface, ust, msc, sbc); return EGL_SwapBuffersWithFrameTokenANGLE(dpy, surface, frametoken);
} }
// EGL_ANGLE_sync_control_rate
EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy,
EGLSurface surface, EGLSurface surface,
EGLint *numerator, EGLint *numerator,
...@@ -581,197 +599,237 @@ EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy, ...@@ -581,197 +599,237 @@ EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy,
return EGL_GetMscRateANGLE(dpy, surface, numerator, denominator); return EGL_GetMscRateANGLE(dpy, surface, numerator, denominator);
} }
EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR(EGLDisplay dpy, // EGL_CHROMIUM_sync_control
EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
EGLSurface surface, EGLSurface surface,
EGLint *rects, EGLuint64KHR *ust,
EGLint n_rects) EGLuint64KHR *msc,
EGLuint64KHR *sbc)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_SwapBuffersWithDamageKHR(dpy, surface, rects, n_rects); return EGL_GetSyncValuesCHROMIUM(dpy, surface, ust, msc, sbc);
} }
EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID(EGLDisplay dpy, // EGL_EXT_device_query
EGLSurface surface, EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device,
EGLnsecsANDROID time) EGLint attribute,
EGLAttrib *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_PresentationTimeANDROID(dpy, surface, time); return EGL_QueryDeviceAttribEXT(device, attribute, value);
} }
EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib) const char *EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, EGLint name)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_ProgramCacheGetAttribANGLE(dpy, attrib); return EGL_QueryDeviceStringEXT(device, name);
} }
void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value)
EGLint index,
void *key,
EGLint *keysize,
void *binary,
EGLint *binarysize)
{ {
EGL_ProgramCacheQueryANGLE(dpy, index, key, keysize, binary, binarysize); EnsureEGLLoaded();
return EGL_QueryDisplayAttribEXT(dpy, attribute, value);
} }
void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy, // EGL_EXT_platform_base
const void *key, EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
EGLint keysize, EGLConfig config,
const void *binary, void *native_pixmap,
EGLint binarysize) const EGLint *attrib_list)
{ {
EGL_ProgramCachePopulateANGLE(dpy, key, keysize, binary, binarysize); EnsureEGLLoaded();
return EGL_CreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list);
} }
EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLenum mode) EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLint *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_ProgramCacheResizeANGLE(dpy, limit, mode); return EGL_CreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list);
} }
EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform,
void *native_display,
const EGLint *attrib_list)
{
EnsureEGLLoaded();
return EGL_GetPlatformDisplayEXT(platform, native_display, attrib_list);
}
// EGL_KHR_debug
EGLint EGLAPIENTRY eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list) EGLint EGLAPIENTRY eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_DebugMessageControlKHR(callback, attrib_list); return EGL_DebugMessageControlKHR(callback, attrib_list);
} }
EGLint EGLAPIENTRY eglLabelObjectKHR(EGLDisplay display,
EGLenum objectType,
EGLObjectKHR object,
EGLLabelKHR label)
{
EnsureEGLLoaded();
return EGL_LabelObjectKHR(display, objectType, object, label);
}
EGLBoolean EGLAPIENTRY eglQueryDebugKHR(EGLint attribute, EGLAttrib *value) EGLBoolean EGLAPIENTRY eglQueryDebugKHR(EGLint attribute, EGLAttrib *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryDebugKHR(attribute, value); return EGL_QueryDebugKHR(attribute, value);
} }
EGLint EGLAPIENTRY eglLabelObjectKHR(EGLDisplay dpy, // EGL_KHR_fence_sync
EGLenum objectType, EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy,
EGLObjectKHR object, EGLSyncKHR sync,
EGLLabelKHR label) EGLint flags,
EGLTimeKHR timeout)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_LabelObjectKHR(dpy, objectType, object, label); return EGL_ClientWaitSyncKHR(dpy, sync, flags, timeout);
} }
void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_SetBlobCacheFuncsANDROID(dpy, set, get); return EGL_CreateSyncKHR(dpy, type, attrib_list);
} }
EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
EGLSurface surface,
EGLint name)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetCompositorTimingSupportedANDROID(dpy, surface, name); return EGL_DestroySyncKHR(dpy, sync);
} }
EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy,
EGLSurface surface, EGLSyncKHR sync,
EGLint numTimestamps, EGLint attribute,
const EGLint *names, EGLint *value)
EGLnsecsANDROID *values)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetCompositorTimingANDROID(dpy, surface, numTimestamps, names, values); return EGL_GetSyncAttribKHR(dpy, sync, attribute, value);
} }
EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID(EGLDisplay dpy, // EGL_KHR_image
EGLSurface surface, EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy,
EGLuint64KHR *frameId) EGLContext ctx,
EGLenum target,
EGLClientBuffer buffer,
const EGLint *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetNextFrameIdANDROID(dpy, surface, frameId); return EGL_CreateImageKHR(dpy, ctx, target, buffer, attrib_list);
} }
EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
EGLSurface surface,
EGLint timestamp)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetFrameTimestampSupportedANDROID(dpy, surface, timestamp); return EGL_DestroyImageKHR(dpy, image);
} }
EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID(EGLDisplay dpy, // EGL_KHR_reusable_sync
EGLSurface surface, EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
EGLuint64KHR frameId,
EGLint numTimestamps,
const EGLint *timestamps,
EGLnsecsANDROID *values)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetFrameTimestampsANDROID(dpy, surface, frameId, numTimestamps, timestamps, values); return EGL_SignalSyncKHR(dpy, sync, mode);
} }
const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index) // EGL_KHR_stream
EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_QueryStringiANGLE(dpy, name, index); return EGL_CreateStreamKHR(dpy, attrib_list);
} }
EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer) EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetNativeClientBufferANDROID(buffer); return EGL_DestroyStreamKHR(dpy, stream);
} }
EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID(const EGLint *attrib_list) EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLint *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreateNativeClientBufferANDROID(attrib_list); return EGL_QueryStreamKHR(dpy, stream, attribute, value);
} }
EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLuint64KHR *value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_DupNativeFenceFDANDROID(dpy, sync); return EGL_QueryStreamu64KHR(dpy, stream, attribute, value);
} }
EGLBoolean EGLAPIENTRY eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy, EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy,
EGLSurface surface, EGLStreamKHR stream,
EGLFrameTokenANGLE frametoken) EGLenum attribute,
EGLint value)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_SwapBuffersWithFrameTokenANGLE(dpy, surface, frametoken); return EGL_StreamAttribKHR(dpy, stream, attribute, value);
} }
EGLSync EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) // EGL_KHR_stream_consumer_gltexture
EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_CreateSyncKHR(dpy, type, attrib_list); return EGL_StreamConsumerAcquireKHR(dpy, stream);
} }
EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSync sync) EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_DestroySyncKHR(dpy, sync); return EGL_StreamConsumerGLTextureExternalKHR(dpy, stream);
} }
EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_ClientWaitSyncKHR(dpy, sync, flags, timeout); return EGL_StreamConsumerReleaseKHR(dpy, stream);
} }
EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, // EGL_KHR_swap_buffers_with_damage
EGLSync sync, EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR(EGLDisplay dpy,
EGLint attribute, EGLSurface surface,
EGLint *value) EGLint *rects,
EGLint n_rects)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_GetSyncAttribKHR(dpy, sync, attribute, value); return EGL_SwapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
} }
EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags) // EGL_KHR_wait_sync
EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_WaitSyncKHR(dpy, sync, flags); return EGL_WaitSyncKHR(dpy, sync, flags);
} }
EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode) // EGL_NV_post_sub_buffer
EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy,
EGLSurface surface,
EGLint x,
EGLint y,
EGLint width,
EGLint height)
{ {
EnsureEGLLoaded(); EnsureEGLLoaded();
return EGL_SignalSyncKHR(dpy, sync, mode); return EGL_PostSubBufferNV(dpy, surface, x, y, width, height);
}
// EGL_NV_stream_consumer_gltexture_yuv
EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,
EGLStreamKHR stream,
const EGLAttrib *attrib_list)
{
EnsureEGLLoaded();
return EGL_StreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list);
} }
} // extern "C" } // extern "C"
...@@ -604,7 +604,7 @@ if (is_win) { ...@@ -604,7 +604,7 @@ if (is_win) {
libegl_sources = [ libegl_sources = [
"src/libEGL/egl_loader_autogen.h", "src/libEGL/egl_loader_autogen.h",
"src/libEGL/libEGL.cpp", "src/libEGL/libEGL_autogen.cpp",
"src/libEGL/resource.h", "src/libEGL/resource.h",
"src/libGLESv2/entry_points_egl_autogen.h", "src/libGLESv2/entry_points_egl_autogen.h",
"src/libGLESv2/entry_points_egl_ext_autogen.h", "src/libGLESv2/entry_points_egl_ext_autogen.h",
......
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