[Mesa-dev] [PATCH 09/17] glapi: Annotate XML with desktop="false" for GLES-only functions.

Paul Berry stereotype441 at gmail.com
Thu Nov 1 15:19:15 PDT 2012


Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine which functions should be
skipped when the API is desktop GL.
---
 src/mapi/glapi/gen/OES_fixed_point.xml      |  8 +--
 src/mapi/glapi/gen/OES_single_precision.xml |  2 +-
 src/mapi/glapi/gen/es_EXT.xml               | 20 +++----
 src/mapi/glapi/gen/gl_API.dtd               |  3 +-
 src/mapi/glapi/gen/gl_and_es_API.xml        | 84 +++++++++++++++--------------
 5 files changed, 60 insertions(+), 57 deletions(-)

diff --git a/src/mapi/glapi/gen/OES_fixed_point.xml b/src/mapi/glapi/gen/OES_fixed_point.xml
index 4996d35..92e29b1 100644
--- a/src/mapi/glapi/gen/OES_fixed_point.xml
+++ b/src/mapi/glapi/gen/OES_fixed_point.xml
@@ -217,7 +217,7 @@
     </function>
 
     <function name="GetClipPlanexOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="es">
+              es1="1.0" exec="es" desktop="false">
         <param name="plane" type="GLenum"/>
         <param name="equation" type="GLfixed *" output="true" count="4"/>
     </function>
@@ -277,21 +277,21 @@
 
     <!-- texgen -->
     <function name="GetTexGenxvOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="check">
+              es1="1.0" exec="check" desktop="false">
         <param name="coord" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
     </function>
 
     <function name="TexGenxOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="check">
+              es1="1.0" exec="check" desktop="false">
         <param name="coord" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLint"/>
     </function>
 
     <function name="TexGenxvOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="check">
+              es1="1.0" exec="check" desktop="false">
         <param name="coord" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *" variable_param="pname"/>
diff --git a/src/mapi/glapi/gen/OES_single_precision.xml b/src/mapi/glapi/gen/OES_single_precision.xml
index 112e08f..935aea8 100644
--- a/src/mapi/glapi/gen/OES_single_precision.xml
+++ b/src/mapi/glapi/gen/OES_single_precision.xml
@@ -24,7 +24,7 @@
     </function>
 
     <function name="GetClipPlanefOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="es">
+              es1="1.0" exec="es" desktop="false">
         <param name="plane" type="GLenum"/>
         <param name="equation" type="GLfloat *" output="true" count="4"/>
     </function>
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index e86f2ed..a78cec3 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -73,7 +73,7 @@
     <enum name="TEXTURE_CROP_RECT_OES"                    value="0x8B9D"/>
 
     <function name="DrawTexiOES" offset="assign" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="x" type="GLint"/>
         <param name="y" type="GLint"/>
         <param name="z" type="GLint"/>
@@ -82,12 +82,12 @@
     </function>
 
     <function name="DrawTexivOES" offset="assign" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="coords" type="const GLint *" count="5"/>
     </function>
 
     <function name="DrawTexfOES" offset="assign" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="x" type="GLfloat"/>
         <param name="y" type="GLfloat"/>
         <param name="z" type="GLfloat"/>
@@ -96,12 +96,12 @@
     </function>
 
     <function name="DrawTexfvOES" offset="assign" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="coords" type="const GLfloat *" count="5"/>
     </function>
 
     <function name="DrawTexsOES" offset="assign" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="x" type="GLshort"/>
         <param name="y" type="GLshort"/>
         <param name="z" type="GLshort"/>
@@ -110,12 +110,12 @@
     </function>
 
     <function name="DrawTexsvOES" offset="assign" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="coords" type="const GLshort *" count="5"/>
     </function>
 
     <function name="DrawTexxOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="es">
+              es1="1.0" exec="es" desktop="false">
         <param name="x" type="GLfixed"/>
         <param name="y" type="GLfixed"/>
         <param name="z" type="GLfixed"/>
@@ -124,7 +124,7 @@
     </function>
 
     <function name="DrawTexxvOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="es">
+              es1="1.0" exec="es" desktop="false">
         <param name="coords" type="const GLfixed *" count="5"/>
     </function>
 
@@ -343,7 +343,7 @@
     <enum name="POINT_SIZE_ARRAY_BUFFER_BINDING_OES"	  value="0x8B9F"/>
 
     <function name="PointSizePointerOES" offset="assign"
-              static_dispatch="false" es1="1.0">
+              static_dispatch="false" es1="1.0" desktop="false">
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <param name="pointer" type="const GLvoid *"/>
@@ -359,7 +359,7 @@
 <!-- optional for es1.0 -->
 <category name="GL_OES_query_matrix" number="16">
     <function name="QueryMatrixxOES" offset="assign" static_dispatch="false"
-              es1="1.0" exec="es">
+              es1="1.0" exec="es" desktop="false">
         <param name="mantissa" type="GLfixed *" count="16" />
         <param name="exponent" type="GLint *" count="16" />
 	<return type="GLbitfield"/>
diff --git a/src/mapi/glapi/gen/gl_API.dtd b/src/mapi/glapi/gen/gl_API.dtd
index b07b696..ab321fa 100644
--- a/src/mapi/glapi/gen/gl_API.dtd
+++ b/src/mapi/glapi/gen/gl_API.dtd
@@ -39,7 +39,8 @@
                    es1                 CDATA   "none"
                    es2                 CDATA   "none"
                    deprecated          CDATA   "none"
-                   exec                NMTOKEN #IMPLIED>
+                   exec                NMTOKEN #IMPLIED
+                   desktop             (true | false) "true">
 <!ATTLIST size     name                NMTOKEN #REQUIRED
                    count               NMTOKEN #IMPLIED
                    mode                (get | set) "set">
diff --git a/src/mapi/glapi/gen/gl_and_es_API.xml b/src/mapi/glapi/gen/gl_and_es_API.xml
index 8e000a8..b7a976f 100644
--- a/src/mapi/glapi/gen/gl_and_es_API.xml
+++ b/src/mapi/glapi/gen/gl_and_es_API.xml
@@ -20,13 +20,13 @@
     <type name="clampx"  size="4"                                    />
 
     <function name="AlphaFuncx" alias="AlphaFuncxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="func" type="GLenum"/>
         <param name="ref" type="GLclampx"/>
     </function>
 
     <function name="ClearColorx" alias="ClearColorxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="red" type="GLclampx"/>
         <param name="green" type="GLclampx"/>
         <param name="blue" type="GLclampx"/>
@@ -34,12 +34,12 @@
     </function>
 
     <function name="ClearDepthx" alias="ClearDepthxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="depth" type="GLclampx"/>
     </function>
 
     <function name="Color4x" alias="Color4xOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="red" type="GLfixed"/>
         <param name="green" type="GLfixed"/>
         <param name="blue" type="GLfixed"/>
@@ -47,23 +47,25 @@
     </function>
 
     <function name="DepthRangex" alias="DepthRangexOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="zNear" type="GLclampx"/>
         <param name="zFar" type="GLclampx"/>
     </function>
 
-    <function name="Fogx" alias="FogxOES" static_dispatch="false" es1="1.0">
+    <function name="Fogx" alias="FogxOES" static_dispatch="false" es1="1.0"
+              desktop="false">
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfixed"/>
     </function>
 
-    <function name="Fogxv" alias="FogxvOES" static_dispatch="false" es1="1.0">
+    <function name="Fogxv" alias="FogxvOES" static_dispatch="false" es1="1.0"
+              desktop="false">
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *" variable_param="pname"/>
     </function>
 
     <function name="Frustumx" alias="FrustumxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="left" type="GLfixed"/>
         <param name="right" type="GLfixed"/>
         <param name="bottom" type="GLfixed"/>
@@ -73,62 +75,62 @@
     </function>
 
     <function name="LightModelx" alias="LightModelxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfixed"/>
     </function>
 
     <function name="LightModelxv" alias="LightModelxvOES"
-              static_dispatch="false" es1="1.0">
+              static_dispatch="false" es1="1.0" desktop="false">
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *" variable_param="pname"/>
     </function>
 
     <function name="Lightx" alias="LightxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="light" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfixed"/>
     </function>
 
     <function name="Lightxv" alias="LightxvOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="light" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *" variable_param="pname"/>
     </function>
 
     <function name="LineWidthx" alias="LineWidthxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="width" type="GLfixed"/>
     </function>
 
     <function name="LoadMatrixx" alias="LoadMatrixxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="m" type="const GLfixed *" count="16"/>
     </function>
 
     <function name="Materialx" alias="MaterialxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="face" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfixed"/>
     </function>
 
     <function name="Materialxv" alias="MaterialxvOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="face" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *" variable_param="pname"/>
     </function>
 
     <function name="MultMatrixx" alias="MultMatrixxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="m" type="const GLfixed *" count="16"/>
     </function>
 
     <function name="MultiTexCoord4x" alias="MultiTexCoord4xOES"
-              static_dispatch="false" es1="1.0">
+              static_dispatch="false" es1="1.0" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="s" type="GLfixed"/>
         <param name="t" type="GLfixed"/>
@@ -137,14 +139,14 @@
     </function>
 
     <function name="Normal3x" alias="Normal3xOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="nx" type="GLfixed"/>
         <param name="ny" type="GLfixed"/>
         <param name="nz" type="GLfixed"/>
     </function>
 
     <function name="Orthox" alias="OrthoxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="left" type="GLfixed"/>
         <param name="right" type="GLfixed"/>
         <param name="bottom" type="GLfixed"/>
@@ -154,18 +156,18 @@
     </function>
 
     <function name="PointSizex" alias="PointSizexOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="size" type="GLfixed"/>
     </function>
 
     <function name="PolygonOffsetx" alias="PolygonOffsetxOES"
-              static_dispatch="false" es1="1.0">
+              static_dispatch="false" es1="1.0" desktop="false">
         <param name="factor" type="GLfixed"/>
         <param name="units" type="GLfixed"/>
     </function>
 
     <function name="Rotatex" alias="RotatexOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="angle" type="GLfixed"/>
         <param name="x" type="GLfixed"/>
         <param name="y" type="GLfixed"/>
@@ -173,41 +175,41 @@
     </function>
 
     <function name="SampleCoveragex" alias="SampleCoveragexOES"
-              static_dispatch="false" es1="1.0">
+              static_dispatch="false" es1="1.0" desktop="false">
         <param name="value" type="GLclampx"/>
         <param name="invert" type="GLboolean"/>
     </function>
 
     <function name="Scalex" alias="ScalexOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="x" type="GLfixed"/>
         <param name="y" type="GLfixed"/>
         <param name="z" type="GLfixed"/>
     </function>
 
     <function name="TexEnvx" alias="TexEnvxOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfixed"/>
     </function>
 
     <function name="TexEnvxv" alias="TexEnvxvOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *" variable_param="pname"/>
     </function>
 
     <function name="TexParameterx" alias="TexParameterxOES"
-              static_dispatch="false" es1="1.0">
+              static_dispatch="false" es1="1.0" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfixed"/>
     </function>
 
     <function name="Translatex" alias="TranslatexOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="x" type="GLfixed"/>
         <param name="y" type="GLfixed"/>
         <param name="z" type="GLfixed"/>
@@ -215,7 +217,7 @@
 
     <!-- from GL_OES_single_precision -->
     <function name="Frustumf" alias="FrustumfOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="left" type="GLfloat"/>
         <param name="right" type="GLfloat"/>
         <param name="bottom" type="GLfloat"/>
@@ -225,7 +227,7 @@
     </function>
 
     <function name="Orthof" alias="OrthofOES" static_dispatch="false"
-              es1="1.0">
+              es1="1.0" desktop="false">
         <param name="left" type="GLfloat"/>
         <param name="right" type="GLfloat"/>
         <param name="bottom" type="GLfloat"/>
@@ -238,7 +240,7 @@
 <category name="es1.1">
     <!-- from GL_OES_fixed_point -->
     <function name="ClipPlanex" alias="ClipPlanexOES" static_dispatch="false"
-              es1="1.1">
+              es1="1.1" desktop="false">
         <param name="plane" type="GLenum"/>
         <param name="equation" type="const GLfixed *" count="4"/>
     </function>
@@ -250,53 +252,53 @@
     </function>
 
     <function name="GetFixedv" alias="GetFixedvOES" static_dispatch="false"
-              es1="1.1">
+              es1="1.1" desktop="false">
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
     </function>
 
     <function name="GetLightxv" alias="GetLightxvOES" static_dispatch="false"
-              es1="1.1">
+              es1="1.1" desktop="false">
         <param name="light" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
     </function>
 
     <function name="GetMaterialxv" alias="GetMaterialxvOES"
-              static_dispatch="false" es1="1.1">
+              static_dispatch="false" es1="1.1" desktop="false">
         <param name="face" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
     </function>
 
     <function name="GetTexEnvxv" alias="GetTexEnvxvOES" static_dispatch="false"
-              es1="1.1">
+              es1="1.1" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
     </function>
 
     <function name="GetTexParameterxv" alias="GetTexParameterxvOES"
-              static_dispatch="false" es1="1.1">
+              static_dispatch="false" es1="1.1" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
     </function>
 
     <function name="PointParameterx" alias="PointParameterxOES"
-              static_dispatch="false" es1="1.1">
+              static_dispatch="false" es1="1.1" desktop="false">
         <param name="pname" type="GLenum"/>
         <param name="param" type="GLfixed"/>
     </function>
 
     <function name="PointParameterxv" alias="PointParameterxvOES"
-              static_dispatch="false" es1="1.1">
+              static_dispatch="false" es1="1.1" desktop="false">
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *"/>
     </function>
 
     <function name="TexParameterxv" alias="TexParameterxvOES"
-              static_dispatch="false" es1="1.1">
+              static_dispatch="false" es1="1.1" desktop="false">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="const GLfixed *" variable_param="pname"/>
@@ -304,7 +306,7 @@
 
     <!-- from GL_OES_single_precision -->
     <function name="ClipPlanef" alias="ClipPlanefOES" static_dispatch="false"
-              es1="1.1">
+              es1="1.1" desktop="false">
         <param name="plane" type="GLenum"/>
         <param name="equation" type="const GLfloat *" count="4"/>
     </function>
-- 
1.8.0



More information about the mesa-dev mailing list