Mesa (master): mapi: Hack around glGetInternalformativ not being hidden in GLES

Ian Romanick idr at kemper.freedesktop.org
Mon Mar 31 22:09:59 UTC 2014


Module: Mesa
Branch: master
Commit: dfccd5ccd73ec8e9607826c62fb6bf31f9628719
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dfccd5ccd73ec8e9607826c62fb6bf31f9628719

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Mar 26 16:24:54 2014 -0700

mapi: Hack around glGetInternalformativ not being hidden in GLES

This is hella ugly.  The same-named function in desktop OpenGL is
hidden, but it needs to be exposed by libGLESv2 for OpenGL ES 3.0.
There's no way to express in the XML that a function should be be hidden
in one API but exposed in another.

This won't affect any change now, but it will prevent a regression in a
later patch.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

---

 src/mapi/mapi_abi.py |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mapi/mapi_abi.py b/src/mapi/mapi_abi.py
index f5ff8d8..48050e8 100644
--- a/src/mapi/mapi_abi.py
+++ b/src/mapi/mapi_abi.py
@@ -769,6 +769,14 @@ class ES2APIPrinter(GLAPIPrinter):
             raise Exception('ES2 API printer requires XML input')
         ent.hidden = ent.name not in \
             ent.xml_data.entry_points_for_api_version('es2')
+
+        # This is hella ugly.  The same-named function in desktop OpenGL is
+        # hidden, but it needs to be exposed by libGLESv2 for OpenGL ES 3.0.
+        # There's no way to express in the XML that a function should be be
+        # hidden in one API but exposed in another.
+        if ent.name == 'GetInternalformativ':
+            ent.hidden = False
+
         ent.handcode = False
 
     def _get_c_header(self):




More information about the mesa-commit mailing list