r600g,radeonsi: add a bunch of useful queries for the HUD
[mesa.git] / src / mapi / mapi_abi.py
index faa34311cafd85bbd03ed77691794eeb9dad4d4d..d783ed32f5a7d5a0ddabbcb0fd7734dcff7cd331 100644 (file)
@@ -728,7 +728,6 @@ class GLAPIPrinter(ABIPrinter):
 #define GLAPI_PREFIX_STR(func)  "gl"#func
 #endif /* USE_MGL_NAMESPACE */
 
-typedef int GLfixed;
 typedef int GLclampx;
 #endif /* _GLAPI_TMP_H_ */"""
 
@@ -745,14 +744,14 @@ class ES1APIPrinter(GLAPIPrinter):
     def _override_for_api(self, ent):
         if ent.xml_data is None:
             raise Exception('ES2 API printer requires XML input')
-        ent.hidden = ent.name not in \
-            ent.xml_data.entry_points_for_api_version('es1')
+        ent.hidden = (ent.name not in \
+            ent.xml_data.entry_points_for_api_version('es1')) \
+            or ent.hidden
         ent.handcode = False
 
     def _get_c_header(self):
         header = """#ifndef _GLAPI_TMP_H_
 #define _GLAPI_TMP_H_
-typedef int GLfixed;
 typedef int GLclampx;
 #endif /* _GLAPI_TMP_H_ */"""
 
@@ -769,14 +768,22 @@ class ES2APIPrinter(GLAPIPrinter):
     def _override_for_api(self, ent):
         if ent.xml_data is None:
             raise Exception('ES2 API printer requires XML input')
-        ent.hidden = ent.name not in \
-            ent.xml_data.entry_points_for_api_version('es2')
+        ent.hidden = (ent.name not in \
+            ent.xml_data.entry_points_for_api_version('es2')) \
+            or ent.hidden
+
+        # 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):
         header = """#ifndef _GLAPI_TMP_H_
 #define _GLAPI_TMP_H_
-typedef int GLfixed;
 typedef int GLclampx;
 #endif /* _GLAPI_TMP_H_ */"""
 
@@ -804,7 +811,6 @@ class SharedGLAPIPrinter(GLAPIPrinter):
     def _get_c_header(self):
         header = """#ifndef _GLAPI_TMP_H_
 #define _GLAPI_TMP_H_
-typedef int GLfixed;
 typedef int GLclampx;
 #endif /* _GLAPI_TMP_H_ */"""