Commit 3efa290d by Jamie Madill Committed by Commit Bot

EGL: Auto-generate validation header.

This is a first step towards auto-generating more EGL code. It includes format handling for all the EGL parameter types, type reinterpretation for EGL types using the "packed enum" handling, and code refactoring to support the new consistent validation entry point pattern. Bug: angleproject:2621 Change-Id: I2740e82928db311aa934825cbe74bd75bf49c33c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552976 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 10b22c11
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"scripts/egl.xml": "scripts/egl.xml":
"4e5911cfe91274cc5112ff2f70092376", "4e5911cfe91274cc5112ff2f70092376",
"scripts/egl_angle_ext.xml": "scripts/egl_angle_ext.xml":
"087d6a3996a91fbb0b664cac57c50c4c", "91f7718effe50d444f8d81ce285721db",
"scripts/generate_loader.py": "scripts/generate_loader.py":
"ef16088fdf3e7e97132f7737d20f563a", "ef16088fdf3e7e97132f7737d20f563a",
"scripts/gl.xml": "scripts/gl.xml":
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
"scripts/egl.xml": "scripts/egl.xml":
"4e5911cfe91274cc5112ff2f70092376", "4e5911cfe91274cc5112ff2f70092376",
"scripts/egl_angle_ext.xml": "scripts/egl_angle_ext.xml":
"087d6a3996a91fbb0b664cac57c50c4c", "91f7718effe50d444f8d81ce285721db",
"scripts/entry_point_packed_egl_enums.json":
"7cb78d6bea4e0df9e74d3ce5faf824dc",
"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":
"bce338a2d1cae08cd5836405759107bc", "ec6a54bce430567b493ac6a5ee145a7e",
"scripts/gl.xml": "scripts/gl.xml":
"f66967f3f3d696b5d8306fd80bbd49a8", "f66967f3f3d696b5d8306fd80bbd49a8",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
...@@ -99,6 +101,8 @@ ...@@ -99,6 +101,8 @@
"442ed8cd644833c56ff5e50083e3d94d", "442ed8cd644833c56ff5e50083e3d94d",
"src/libANGLE/frame_capture_utils_autogen.h": "src/libANGLE/frame_capture_utils_autogen.h":
"652b821a877d6eb2c62ba8d151157eea", "652b821a877d6eb2c62ba8d151157eea",
"src/libANGLE/validationEGL_autogen.h":
"ecdb1d2c7cd19d2a4faeafb19de4d77e",
"src/libANGLE/validationES1_autogen.h": "src/libANGLE/validationES1_autogen.h":
"c8edb0a5b26303bf7c4692b9d0b05c1f", "c8edb0a5b26303bf7c4692b9d0b05c1f",
"src/libANGLE/validationES2_autogen.h": "src/libANGLE/validationES2_autogen.h":
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"scripts/egl.xml": "scripts/egl.xml":
"4e5911cfe91274cc5112ff2f70092376", "4e5911cfe91274cc5112ff2f70092376",
"scripts/egl_angle_ext.xml": "scripts/egl_angle_ext.xml":
"087d6a3996a91fbb0b664cac57c50c4c", "91f7718effe50d444f8d81ce285721db",
"scripts/gen_proc_table.py": "scripts/gen_proc_table.py":
"30317d8175c0dafe55c80e67a2d3aeae", "30317d8175c0dafe55c80e67a2d3aeae",
"scripts/gl.xml": "scripts/gl.xml":
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<proto><ptype>EGLDeviceEXT</ptype> <name>eglCreateDeviceANGLE</name></proto> <proto><ptype>EGLDeviceEXT</ptype> <name>eglCreateDeviceANGLE</name></proto>
<param><ptype>EGLint</ptype> <name>device_type</name></param> <param><ptype>EGLint</ptype> <name>device_type</name></param>
<param>void *<name>native_device</name></param> <param>void *<name>native_device</name></param>
<param>const <ptype>EGLattrib</ptype> *<name>attrib_list</name></param> <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
</command> </command>
<command> <command>
<proto><ptype>EGLBoolean</ptype> <name>eglReleaseDeviceANGLE</name></proto> <proto><ptype>EGLBoolean</ptype> <name>eglReleaseDeviceANGLE</name></proto>
...@@ -108,6 +108,12 @@ ...@@ -108,6 +108,12 @@
<proto><pytpe>void</pytpe> <name>eglHandleGPUSwitchANGLE</name></proto> <proto><pytpe>void</pytpe> <name>eglHandleGPUSwitchANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param> <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
</command> </command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglQueryDisplayAttribANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLint</ptype> <name>attribute</name></param>
<param><ptype>EGLAttrib *</ptype> <name>value</name></param>
</command>
</commands> </commands>
<!-- SECTION: ANGLE extension interface definitions --> <!-- SECTION: ANGLE extension interface definitions -->
<extensions> <extensions>
......
{
"description": [
"Copyright 2020 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.",
"",
"entry_point_packed_egl_enums.json: Metadata for packing entry point params.",
"",
"Note that all entry points have their suffixes stripped in this file.",
"These enums are used by generate_entry_points.py."
],
"eglChooseConfig": {
"attrib_list": "const AttributeMap &"
},
"eglCreateContext": {
"attrib_list": "const AttributeMap &"
},
"eglCreateImage": {
"attrib_list": "const AttributeMap &"
},
"eglCreateNativeClientBuffer": {
"attrib_list": "const AttributeMap &"
},
"eglCreatePbufferSurface": {
"attrib_list": "const AttributeMap &"
},
"eglCreatePixmapSurface": {
"attrib_list": "const AttributeMap &"
},
"eglCreatePbufferFromClientBuffer": {
"attrib_list": "const AttributeMap &"
},
"eglCreatePlatformPixmapSurface": {
"native_pixmap": "EGLNativePixmapType",
"attrib_list": "const AttributeMap &"
},
"eglCreatePlatformWindowSurface": {
"native_window": "EGLNativeWindowType",
"attrib_list": "const AttributeMap &"
},
"eglCreateStream": {
"attrib_list": "const AttributeMap &"
},
"eglCreateStreamProducerD3DTexture": {
"attrib_list": "const AttributeMap &"
},
"eglCreateSync": {
"attrib_list": "const AttributeMap &"
},
"eglCreateWindowSurface": {
"attrib_list": "const AttributeMap &"
},
"eglDebugMessageControl": {
"attrib_list": "const AttributeMap &"
},
"eglGetCompositorTimingSupported": {
"name": "CompositorTiming"
},
"eglGetFrameTimestampSupported": {
"timestamp": "Timestamp"
},
"eglGetPlatformDisplay": {
"attrib_list": "const AttributeMap &"
},
"eglLabelObject": {
"objectType": "ObjectType"
},
"eglStreamConsumerGLTextureExternalAttribsNV": {
"attrib_list": "const AttributeMap &"
},
"eglStreamPostD3DTexture": {
"attrib_list": "const AttributeMap &"
}
}
\ No newline at end of file
...@@ -325,6 +325,7 @@ libangle_headers = [ ...@@ -325,6 +325,7 @@ libangle_headers = [
"src/libANGLE/renderer/renderer_utils.h", "src/libANGLE/renderer/renderer_utils.h",
"src/libANGLE/renderer/serial_utils.h", "src/libANGLE/renderer/serial_utils.h",
"src/libANGLE/validationEGL.h", "src/libANGLE/validationEGL.h",
"src/libANGLE/validationEGL_autogen.h",
"src/libANGLE/validationES.h", "src/libANGLE/validationES.h",
"src/libANGLE/validationES1.h", "src/libANGLE/validationES1.h",
"src/libANGLE/validationES1_autogen.h", "src/libANGLE/validationES1_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