Commit 11c81534 by Jamie Madill Committed by Commit Bot

EGL: Auto-generate entry point headers.

This steps towards the goal of auto-generating EGL entry points. Also cleans up some EP definition inconsistencies. Bug: angleproject:2621 Change-Id: I94dcf3d080b6864bca3f9db6c4c01429f4f8b91f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2553968 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent da1e4122
...@@ -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":
"ec6a54bce430567b493ac6a5ee145a7e", "dc814a0e2125559ee8f36fb0fa8cefd9",
"scripts/gl.xml": "scripts/gl.xml":
"f66967f3f3d696b5d8306fd80bbd49a8", "f66967f3f3d696b5d8306fd80bbd49a8",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
...@@ -233,6 +233,10 @@ ...@@ -233,6 +233,10 @@
"846fe3b32c9b0931ca2d749216131b00", "846fe3b32c9b0931ca2d749216131b00",
"src/libGL/libGL_autogen.def": "src/libGL/libGL_autogen.def":
"2789d87b05eea9f53d52e2aff499b785", "2789d87b05eea9f53d52e2aff499b785",
"src/libGLESv2/entry_points_egl_autogen.h":
"3bc7a8df9deadd7cfd615d0cfad0c6a8",
"src/libGLESv2/entry_points_egl_ext_autogen.h":
"9154781afd9bd6354ec6fc201b43c790",
"src/libGLESv2/entry_points_gles_1_0_autogen.cpp": "src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
"3e96283f3ebd6428e0e7c04a7e38db14", "3e96283f3ebd6428e0e7c04a7e38db14",
"src/libGLESv2/entry_points_gles_1_0_autogen.h": "src/libGLESv2/entry_points_gles_1_0_autogen.h":
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"scripts/egl_angle_ext.xml": "scripts/egl_angle_ext.xml":
"91f7718effe50d444f8d81ce285721db", "91f7718effe50d444f8d81ce285721db",
"scripts/gen_proc_table.py": "scripts/gen_proc_table.py":
"30317d8175c0dafe55c80e67a2d3aeae", "2f59a2df6a96808de9c4b49e3510140a",
"scripts/gl.xml": "scripts/gl.xml":
"f66967f3f3d696b5d8306fd80bbd49a8", "f66967f3f3d696b5d8306fd80bbd49a8",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
"src/libGL/proc_table_wgl_autogen.cpp": "src/libGL/proc_table_wgl_autogen.cpp":
"253f59ef3aa9ccfcab1364ae5101dbe2", "253f59ef3aa9ccfcab1364ae5101dbe2",
"src/libGLESv2/proc_table_egl_autogen.cpp": "src/libGLESv2/proc_table_egl_autogen.cpp":
"e1aac110ccb057658dc25c0de1949e86" "922f96df0bb5f90381cd8f2b496c54d3"
} }
\ No newline at end of file
...@@ -47,8 +47,8 @@ const size_t g_numProcs = {num_procs}; ...@@ -47,8 +47,8 @@ const size_t g_numProcs = {num_procs};
includes_gles = """#include "libGLESv2/proc_table_egl.h" includes_gles = """#include "libGLESv2/proc_table_egl.h"
#include "libGLESv2/entry_points_egl.h" #include "libGLESv2/entry_points_egl_autogen.h"
#include "libGLESv2/entry_points_egl_ext.h" #include "libGLESv2/entry_points_egl_ext_autogen.h"
#include "libGLESv2/entry_points_gles_1_0_autogen.h" #include "libGLESv2/entry_points_gles_1_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_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_0_autogen.h"
......
...@@ -55,10 +55,10 @@ TEMPLATE_ENTRY_POINT_HEADER = """\ ...@@ -55,10 +55,10 @@ TEMPLATE_ENTRY_POINT_HEADER = """\
{includes} {includes}
namespace gl {ns}
{{ {{
{entry_points} {entry_points}
}} // namespace gl }} // {ns}
#endif // {lib}_ENTRY_POINTS_{annotation_upper}_AUTOGEN_H_ #endif // {lib}_ENTRY_POINTS_{annotation_upper}_AUTOGEN_H_
""" """
...@@ -76,9 +76,9 @@ TEMPLATE_ENTRY_POINT_SOURCE = """\ ...@@ -76,9 +76,9 @@ TEMPLATE_ENTRY_POINT_SOURCE = """\
{includes} {includes}
namespace gl {ns}
{{ {{
{entry_points}}} // namespace gl {entry_points}}} // {ns}
""" """
TEMPLATE_ENTRY_POINTS_ENUM_HEADER = """\ TEMPLATE_ENTRY_POINTS_ENUM_HEADER = """\
...@@ -157,7 +157,7 @@ extern "C" {{ ...@@ -157,7 +157,7 @@ extern "C" {{
}} // extern "C" }} // extern "C"
""" """
TEMPLATE_ENTRY_POINT_DECL = """ANGLE_EXPORT {return_type}GL_APIENTRY {name}{explicit_context_suffix}({explicit_context_param}{explicit_context_comma}{params});""" TEMPLATE_ENTRY_POINT_DECL = """ANGLE_EXPORT {return_type}{api}APIENTRY {name}{explicit_context_suffix}({explicit_context_param}{explicit_context_comma}{params});"""
TEMPLATE_ENTRY_POINT_NO_RETURN = """\ TEMPLATE_ENTRY_POINT_NO_RETURN = """\
void GL_APIENTRY {name}{explicit_context_suffix}({explicit_context_param}{explicit_context_comma}{params}) void GL_APIENTRY {name}{explicit_context_suffix}({explicit_context_param}{explicit_context_comma}{params})
...@@ -571,6 +571,17 @@ TEMPLATE_SOURCES_INCLUDES_GL32 = """\ ...@@ -571,6 +571,17 @@ TEMPLATE_SOURCES_INCLUDES_GL32 = """\
#include "libGLESv2/global_state.h" #include "libGLESv2/global_state.h"
""" """
EGL_HEADER_INCLUDES = """\
#include <EGL/egl.h>
#include <export.h>
"""
EGL_EXT_HEADER_INCLUDES = """\
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <export.h>
"""
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.
...@@ -809,10 +820,12 @@ def strip_api_prefix(cmd_name): ...@@ -809,10 +820,12 @@ def strip_api_prefix(cmd_name):
return cmd_name.lstrip("egl") return cmd_name.lstrip("egl")
def format_entry_point_decl(cmd_name, proto, params, is_explicit_context): def format_entry_point_decl(api, cmd_name, proto, params, is_explicit_context):
comma_if_needed = ", " if len(params) > 0 else "" comma_if_needed = ", " if len(params) > 0 else ""
stripped = strip_api_prefix(cmd_name)
return TEMPLATE_ENTRY_POINT_DECL.format( return TEMPLATE_ENTRY_POINT_DECL.format(
name=strip_api_prefix(cmd_name), api="EGL" if api == EGL else "GL_",
name="EGL_%s" % stripped if api == EGL else stripped,
return_type=proto[:-len(cmd_name)], return_type=proto[:-len(cmd_name)],
params=", ".join(params), params=", ".join(params),
comma_if_needed=comma_if_needed, comma_if_needed=comma_if_needed,
...@@ -1248,7 +1261,7 @@ def get_entry_points(api, ...@@ -1248,7 +1261,7 @@ def get_entry_points(api,
param_text = ["".join(param.itertext()) for param in command.findall('param')] param_text = ["".join(param.itertext()) for param in command.findall('param')]
proto_text = "".join(proto.itertext()) proto_text = "".join(proto.itertext())
decls.append( decls.append(
format_entry_point_decl(cmd_name, proto_text, param_text, is_explicit_context)) format_entry_point_decl(api, cmd_name, proto_text, param_text, is_explicit_context))
defs.append( defs.append(
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))
...@@ -1336,7 +1349,7 @@ def get_glext_decls(all_commands, gles_commands, version, is_explicit_context): ...@@ -1336,7 +1349,7 @@ def get_glext_decls(all_commands, gles_commands, version, is_explicit_context):
return glext_ptrs, glext_protos return glext_ptrs, glext_protos
def write_file(annotation, comment, template, entry_points, suffix, includes, lib, file): def write_file(annotation, comment, template, entry_points, suffix, includes, lib, file, ns):
content = template.format( content = template.format(
script_name=os.path.basename(sys.argv[0]), script_name=os.path.basename(sys.argv[0]),
...@@ -1346,7 +1359,8 @@ def write_file(annotation, comment, template, entry_points, suffix, includes, li ...@@ -1346,7 +1359,8 @@ def write_file(annotation, comment, template, entry_points, suffix, includes, li
comment=comment, comment=comment,
lib=lib.upper(), lib=lib.upper(),
includes=includes, includes=includes,
entry_points=entry_points) entry_points=entry_points,
ns=ns)
path = path_to(lib, "entry_points_{}_autogen.{}".format(annotation.lower(), suffix)) path = path_to(lib, "entry_points_{}_autogen.{}".format(annotation.lower(), suffix))
...@@ -1890,6 +1904,8 @@ def main(): ...@@ -1890,6 +1904,8 @@ 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/libGLESv2/entry_points_egl_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',
'../src/libGLESv2/entry_points_gles_1_0_autogen.h', '../src/libGLESv2/entry_points_gles_1_0_autogen.h',
'../src/libGLESv2/entry_points_gles_2_0_autogen.cpp', '../src/libGLESv2/entry_points_gles_2_0_autogen.cpp',
...@@ -2024,9 +2040,9 @@ def main(): ...@@ -2024,9 +2040,9 @@ def main():
header_version=annotation.lower(), validation_header_version="ES" + version_annotation) header_version=annotation.lower(), validation_header_version="ES" + version_annotation)
write_file(annotation, "GLES " + comment, TEMPLATE_ENTRY_POINT_HEADER, "\n".join(decls), write_file(annotation, "GLES " + comment, TEMPLATE_ENTRY_POINT_HEADER, "\n".join(decls),
"h", header_includes, "libGLESv2", "gl.xml") "h", header_includes, "libGLESv2", "gl.xml", "namespace gl")
write_file(annotation, "GLES " + comment, TEMPLATE_ENTRY_POINT_SOURCE, "\n".join(defs), write_file(annotation, "GLES " + comment, TEMPLATE_ENTRY_POINT_SOURCE, "\n".join(defs),
"cpp", source_includes, "libGLESv2", "gl.xml") "cpp", source_includes, "libGLESv2", "gl.xml", "namespace gl")
glesdecls['core'][(major_version, glesdecls['core'][(major_version,
minor_version)] = get_decls(GLES, CONTEXT_DECL_FORMAT, all_commands, minor_version)] = get_decls(GLES, CONTEXT_DECL_FORMAT, all_commands,
...@@ -2218,9 +2234,9 @@ def main(): ...@@ -2218,9 +2234,9 @@ def main():
# Entry point files # Entry point files
write_file(annotation, "GL " + comment, TEMPLATE_ENTRY_POINT_HEADER, "\n".join(decls_gl), write_file(annotation, "GL " + comment, TEMPLATE_ENTRY_POINT_HEADER, "\n".join(decls_gl),
"h", header_includes, "libGL", "gl.xml") "h", header_includes, "libGL", "gl.xml", "namespace gl")
write_file(annotation, "GL " + comment, TEMPLATE_ENTRY_POINT_SOURCE, "\n".join(defs_gl), write_file(annotation, "GL " + comment, TEMPLATE_ENTRY_POINT_SOURCE, "\n".join(defs_gl),
"cpp", source_includes, "libGL", "gl.xml") "cpp", source_includes, "libGL", "gl.xml", "namespace gl")
gldecls['core'][(major_version, gldecls['core'][(major_version,
minor_version)] = get_decls(GL, CONTEXT_DECL_FORMAT, all_commands32, minor_version)] = get_decls(GL, CONTEXT_DECL_FORMAT, all_commands32,
...@@ -2240,6 +2256,8 @@ def main(): ...@@ -2240,6 +2256,8 @@ def main():
cmd_packed_egl_enums = json.loads(f.read()) cmd_packed_egl_enums = json.loads(f.read())
egl_validation_protos = [] egl_validation_protos = []
egl_decls = []
egl_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)
...@@ -2257,17 +2275,22 @@ def main(): ...@@ -2257,17 +2275,22 @@ def main():
if not egl_version_commands: if not egl_version_commands:
continue continue
_, _, _, validation_protos, _, _, _ = get_entry_points(EGL, eglxml.all_commands, decls, defs, _, validation_protos, _, _, _ = get_entry_points(
egl_version_commands, False, EGL, eglxml.all_commands, egl_version_commands, False, egl_param_types,
egl_param_types, cmd_packed_egl_enums, EGL_PACKED_TYPES)
cmd_packed_egl_enums,
EGL_PACKED_TYPES)
comment = "\n// EGL %d.%d" % (major_version, minor_version) comment = "\n// EGL %d.%d" % (major_version, minor_version)
egl_validation_protos += [comment] + validation_protos egl_validation_protos += [comment] + validation_protos
egl_decls += [comment] + decls
egl_defs += [comment] + defs
write_file("egl", "EGL", TEMPLATE_ENTRY_POINT_HEADER, "\n".join(egl_decls), "h",
EGL_HEADER_INCLUDES, "libGLESv2", "egl.xml", "extern \"C\"")
eglxml.AddExtensionCommands(registry_xml.supported_egl_extensions, ['egl']) eglxml.AddExtensionCommands(registry_xml.supported_egl_extensions, ['egl'])
egl_ext_decls = []
egl_ext_defs = []
for extension_name, ext_cmd_names in sorted(eglxml.ext_data.iteritems()): for extension_name, ext_cmd_names in sorted(eglxml.ext_data.iteritems()):
...@@ -2276,22 +2299,24 @@ def main(): ...@@ -2276,22 +2299,24 @@ def main():
continue continue
# Detect and filter duplicate extensions. # Detect and filter duplicate extensions.
_, _, _, validation_protos, _, _, _ = get_entry_points(EGL, eglxml.all_commands, decls, defs, _, validation_protos, _, _, _ = get_entry_points(
ext_cmd_names, False, EGL, eglxml.all_commands, ext_cmd_names, False, egl_param_types, cmd_packed_egl_enums,
egl_param_types, EGL_PACKED_TYPES)
cmd_packed_egl_enums,
EGL_PACKED_TYPES)
# Avoid writing out entry points defined by a prior extension. # Avoid writing out entry points defined by a prior extension.
for dupe in eglxml.ext_dupes[extension_name]: for dupe in eglxml.ext_dupes[extension_name]:
msg = "// %s is already defined.\n" % strip_api_prefix(dupe) msg = "// %s is already defined.\n" % strip_api_prefix(dupe)
defs.append(msg) defs.append(msg)
# Write the extension name as a comment before the first EP.
comment = "\n// %s" % extension_name comment = "\n// %s" % extension_name
egl_validation_protos += [comment] + validation_protos egl_validation_protos += [comment] + validation_protos
egl_ext_decls += [comment] + decls
egl_ext_defs += [comment] + defs
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",
"extern \"C\"")
write_validation_header("EGL", "EGL", egl_validation_protos, "egl.xml and egl_angle_ext.xml", write_validation_header("EGL", "EGL", egl_validation_protos, "egl.xml and egl_angle_ext.xml",
TEMPLATE_EGL_VALIDATION_HEADER) TEMPLATE_EGL_VALIDATION_HEADER)
...@@ -2346,10 +2371,10 @@ def main(): ...@@ -2346,10 +2371,10 @@ def main():
write_file("gles_ext", "GLES extension", TEMPLATE_ENTRY_POINT_HEADER, write_file("gles_ext", "GLES extension", TEMPLATE_ENTRY_POINT_HEADER,
"\n".join([item for item in extension_decls]), "h", header_includes, "libGLESv2", "\n".join([item for item in extension_decls]), "h", header_includes, "libGLESv2",
"gl.xml and gl_angle_ext.xml") "gl.xml and gl_angle_ext.xml", "namespace gl")
write_file("gles_ext", "GLES extension", TEMPLATE_ENTRY_POINT_SOURCE, write_file("gles_ext", "GLES extension", TEMPLATE_ENTRY_POINT_SOURCE,
"\n".join([item for item in extension_defs]), "cpp", source_includes, "libGLESv2", "\n".join([item for item in extension_defs]), "cpp", source_includes, "libGLESv2",
"gl.xml and gl_angle_ext.xml") "gl.xml and gl_angle_ext.xml", "namespace gl")
write_gl_validation_header("ESEXT", "ES extension", ext_validation_protos, write_gl_validation_header("ESEXT", "ES extension", ext_validation_protos,
"gl.xml and gl_angle_ext.xml") "gl.xml and gl_angle_ext.xml")
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#if defined(ANGLE_USE_EGL_LOADER) #if defined(ANGLE_USE_EGL_LOADER)
# include "libEGL/egl_loader_autogen.h" # include "libEGL/egl_loader_autogen.h"
#else #else
# include "libGLESv2/entry_points_egl.h" # include "libGLESv2/entry_points_egl_autogen.h"
# include "libGLESv2/entry_points_egl_ext.h" # include "libGLESv2/entry_points_egl_ext_autogen.h"
#endif // defined(ANGLE_USE_EGL_LOADER) #endif // defined(ANGLE_USE_EGL_LOADER)
namespace namespace
......
...@@ -566,9 +566,9 @@ if (is_win) { ...@@ -566,9 +566,9 @@ if (is_win) {
libglesv2_sources = [ libglesv2_sources = [
"src/libGLESv2/entry_points_egl.cpp", "src/libGLESv2/entry_points_egl.cpp",
"src/libGLESv2/entry_points_egl.h", "src/libGLESv2/entry_points_egl_autogen.h",
"src/libGLESv2/entry_points_egl_ext.cpp", "src/libGLESv2/entry_points_egl_ext.cpp",
"src/libGLESv2/entry_points_egl_ext.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",
"src/libGLESv2/entry_points_gles_1_0_autogen.h", "src/libGLESv2/entry_points_gles_1_0_autogen.h",
"src/libGLESv2/entry_points_gles_2_0_autogen.cpp", "src/libGLESv2/entry_points_gles_2_0_autogen.cpp",
...@@ -606,8 +606,8 @@ libegl_sources = [ ...@@ -606,8 +606,8 @@ libegl_sources = [
"src/libEGL/egl_loader_autogen.h", "src/libEGL/egl_loader_autogen.h",
"src/libEGL/libEGL.cpp", "src/libEGL/libEGL.cpp",
"src/libEGL/resource.h", "src/libEGL/resource.h",
"src/libGLESv2/entry_points_egl.h", "src/libGLESv2/entry_points_egl_autogen.h",
"src/libGLESv2/entry_points_egl_ext.h", "src/libGLESv2/entry_points_egl_ext_autogen.h",
] ]
if (is_win) { if (is_win) {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// entry_points_egl.cpp : Implements the EGL entry points. // entry_points_egl.cpp : Implements the EGL entry points.
#include "libGLESv2/entry_points_egl.h" #include "libGLESv2/entry_points_egl_autogen.h"
#include "common/angle_version.h" #include "common/angle_version.h"
#include "common/debug.h" #include "common/debug.h"
......
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from egl.xml.
// //
// Copyright 2014 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.
// //
// entry_points_egl_autogen.h:
// Defines the EGL entry points.
// entry_points_egl.h : Defines the EGL entry points. #ifndef LIBGLESV2_ENTRY_POINTS_EGL_AUTOGEN_H_
#define LIBGLESV2_ENTRY_POINTS_EGL_AUTOGEN_H_
#ifndef LIBGLESV2_ENTRYPOINTSEGL_H_
#define LIBGLESV2_ENTRYPOINTSEGL_H_
#include <EGL/egl.h> #include <EGL/egl.h>
#include <export.h> #include <export.h>
...@@ -48,10 +50,10 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetConfigs(EGLDisplay dpy, ...@@ -48,10 +50,10 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetConfigs(EGLDisplay dpy,
EGLConfig *configs, EGLConfig *configs,
EGLint config_size, EGLint config_size,
EGLint *num_config); EGLint *num_config);
ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetCurrentDisplay(void); ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetCurrentDisplay();
ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_GetCurrentSurface(EGLint readdraw); ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_GetCurrentSurface(EGLint readdraw);
ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetDisplay(EGLNativeDisplayType display_id); ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetDisplay(EGLNativeDisplayType display_id);
ANGLE_EXPORT EGLint EGLAPIENTRY EGL_GetError(void); ANGLE_EXPORT EGLint EGLAPIENTRY EGL_GetError();
ANGLE_EXPORT __eglMustCastToProperFunctionPointerType EGLAPIENTRY ANGLE_EXPORT __eglMustCastToProperFunctionPointerType EGLAPIENTRY
EGL_GetProcAddress(const char *procname); EGL_GetProcAddress(const char *procname);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_Initialize(EGLDisplay dpy, EGLint *major, EGLint *minor); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_Initialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
...@@ -70,7 +72,7 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QuerySurface(EGLDisplay dpy, ...@@ -70,7 +72,7 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QuerySurface(EGLDisplay dpy,
EGLint *value); EGLint *value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SwapBuffers(EGLDisplay dpy, EGLSurface surface); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SwapBuffers(EGLDisplay dpy, EGLSurface surface);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_Terminate(EGLDisplay dpy); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_Terminate(EGLDisplay dpy);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitGL(void); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitGL();
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitNative(EGLint engine); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitNative(EGLint engine);
// EGL 1.1 // EGL 1.1
...@@ -88,49 +90,49 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SwapInterval(EGLDisplay dpy, EGLint inte ...@@ -88,49 +90,49 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SwapInterval(EGLDisplay dpy, EGLint inte
// EGL 1.2 // EGL 1.2
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_BindAPI(EGLenum api); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_BindAPI(EGLenum api);
ANGLE_EXPORT EGLenum EGLAPIENTRY EGL_QueryAPI(void);
ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePbufferFromClientBuffer(EGLDisplay dpy, ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePbufferFromClientBuffer(EGLDisplay dpy,
EGLenum buftype, EGLenum buftype,
EGLClientBuffer buffer, EGLClientBuffer buffer,
EGLConfig config, EGLConfig config,
const EGLint *attrib_list); const EGLint *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_ReleaseThread(void); ANGLE_EXPORT EGLenum EGLAPIENTRY EGL_QueryAPI();
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitClient(void); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_ReleaseThread();
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitClient();
// EGL 1.4 // EGL 1.4
ANGLE_EXPORT EGLContext EGLAPIENTRY EGL_GetCurrentContext(void); ANGLE_EXPORT EGLContext EGLAPIENTRY EGL_GetCurrentContext();
// EGL 1.5 // EGL 1.5
ANGLE_EXPORT EGLSync EGLAPIENTRY EGL_CreateSync(EGLDisplay dpy,
EGLenum type,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySync(EGLDisplay dpy, EGLSync sync);
ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSync(EGLDisplay dpy, ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSync(EGLDisplay dpy,
EGLSync sync, EGLSync sync,
EGLint flags, EGLint flags,
EGLTime timeout); EGLTime timeout);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttrib(EGLDisplay dpy,
EGLSync sync,
EGLint attribute,
EGLAttrib *value);
ANGLE_EXPORT EGLImage EGLAPIENTRY EGL_CreateImage(EGLDisplay dpy, ANGLE_EXPORT EGLImage EGLAPIENTRY EGL_CreateImage(EGLDisplay dpy,
EGLContext ctx, EGLContext ctx,
EGLenum target, EGLenum target,
EGLClientBuffer buffer, EGLClientBuffer buffer,
const EGLAttrib *attrib_list); const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroyImage(EGLDisplay dpy, EGLImage image);
ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplay(EGLenum platform,
void *native_display,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurface(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurface(EGLDisplay dpy, ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurface(EGLDisplay dpy,
EGLConfig config, EGLConfig config,
void *native_pixmap, void *native_pixmap,
const EGLAttrib *attrib_list); const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurface(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLSync EGLAPIENTRY EGL_CreateSync(EGLDisplay dpy,
EGLenum type,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroyImage(EGLDisplay dpy, EGLImage image);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySync(EGLDisplay dpy, EGLSync sync);
ANGLE_EXPORT EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplay(EGLenum platform,
void *native_display,
const EGLAttrib *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttrib(EGLDisplay dpy,
EGLSync sync,
EGLint attribute,
EGLAttrib *value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags); ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags);
} // extern "C" } // extern "C"
#endif // LIBGLESV2_ENTRYPOINTSEGL_H_ #endif // LIBGLESV2_ENTRY_POINTS_EGL_AUTOGEN_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// entry_points_ext.cpp : Implements the EGL extension entry points. // entry_points_ext.cpp : Implements the EGL extension entry points.
#include "libGLESv2/entry_points_egl_ext.h" #include "libGLESv2/entry_points_egl_ext_autogen.h"
#include "common/debug.h" #include "common/debug.h"
#include "libANGLE/Context.h" #include "libANGLE/Context.h"
...@@ -685,7 +685,7 @@ ANGLE_EXPORT EGLSync EGLAPIENTRY EGL_CreateSyncKHR(EGLDisplay dpy, ...@@ -685,7 +685,7 @@ ANGLE_EXPORT EGLSync EGLAPIENTRY EGL_CreateSyncKHR(EGLDisplay dpy,
return static_cast<EGLSync>(syncObject); return static_cast<EGLSync>(syncObject);
} }
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSync sync) ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
{ {
ANGLE_SCOPED_GLOBAL_LOCK(); ANGLE_SCOPED_GLOBAL_LOCK();
FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLSync sync = 0x%016" PRIxPTR, (uintptr_t)dpy, FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLSync sync = 0x%016" PRIxPTR, (uintptr_t)dpy,
...@@ -706,9 +706,9 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSync s ...@@ -706,9 +706,9 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroySyncKHR(EGLDisplay dpy, EGLSync s
} }
ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy, ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy,
EGLSync sync, EGLSyncKHR sync,
EGLint flags, EGLint flags,
EGLTime timeout) EGLTimeKHR timeout)
{ {
ANGLE_SCOPED_GLOBAL_LOCK(); ANGLE_SCOPED_GLOBAL_LOCK();
FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLSync sync = 0x%016" PRIxPTR FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLSync sync = 0x%016" PRIxPTR
...@@ -735,7 +735,7 @@ ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy, ...@@ -735,7 +735,7 @@ ANGLE_EXPORT EGLint EGLAPIENTRY EGL_ClientWaitSyncKHR(EGLDisplay dpy,
} }
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy, ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy,
EGLSync sync, EGLSyncKHR sync,
EGLint attribute, EGLint attribute,
EGLint *value) EGLint *value)
{ {
...@@ -761,7 +761,7 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy, ...@@ -761,7 +761,7 @@ ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_GetSyncAttribKHR(EGLDisplay dpy,
} }
// EGL_KHR_wait_sync // EGL_KHR_wait_sync
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_WaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags) ANGLE_EXPORT EGLint EGLAPIENTRY EGL_WaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
{ {
ANGLE_SCOPED_GLOBAL_LOCK(); ANGLE_SCOPED_GLOBAL_LOCK();
FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR "p, EGLSync sync = 0x%016" PRIxPTR FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR "p, EGLSync sync = 0x%016" PRIxPTR
...@@ -980,7 +980,7 @@ void EGLAPIENTRY EGL_ProgramCachePopulateANGLE(EGLDisplay dpy, ...@@ -980,7 +980,7 @@ void EGLAPIENTRY EGL_ProgramCachePopulateANGLE(EGLDisplay dpy,
thread->setSuccess(); thread->setSuccess();
} }
EGLint EGLAPIENTRY EGL_ProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLenum mode) EGLint EGLAPIENTRY EGL_ProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode)
{ {
ANGLE_SCOPED_GLOBAL_LOCK(); ANGLE_SCOPED_GLOBAL_LOCK();
FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLint limit = %d, EGLenum mode = 0x%X", FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLint limit = %d, EGLenum mode = 0x%X",
...@@ -1374,7 +1374,7 @@ void EGLAPIENTRY EGL_HandleGPUSwitchANGLE(EGLDisplay dpy) ...@@ -1374,7 +1374,7 @@ void EGLAPIENTRY EGL_HandleGPUSwitchANGLE(EGLDisplay dpy)
} }
// EGL_KHR_reusable_sync // EGL_KHR_reusable_sync
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode) ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
{ {
ANGLE_SCOPED_GLOBAL_LOCK(); ANGLE_SCOPED_GLOBAL_LOCK();
FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLSync sync = 0x%016" PRIxPTR FUNC_EVENT("EGLDisplay dpy = 0x%016" PRIxPTR ", EGLSync sync = 0x%016" PRIxPTR
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include "libGLESv2/proc_table_egl.h" #include "libGLESv2/proc_table_egl.h"
#include "libGLESv2/entry_points_egl.h" #include "libGLESv2/entry_points_egl_autogen.h"
#include "libGLESv2/entry_points_egl_ext.h" #include "libGLESv2/entry_points_egl_ext_autogen.h"
#include "libGLESv2/entry_points_gles_1_0_autogen.h" #include "libGLESv2/entry_points_gles_1_0_autogen.h"
#include "libGLESv2/entry_points_gles_2_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_0_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