GLX protocol fixes for glMap* functions (bug 8899)
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 22 Nov 2006 16:01:48 +0000 (16:01 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 22 Nov 2006 16:01:48 +0000 (16:01 +0000)
src/mesa/glapi/glX_XML.py
src/mesa/glapi/gl_API.dtd
src/mesa/glapi/gl_API.xml
src/mesa/glapi/gl_XML.py

index 3759e8da02e517d476098be14ef1fc9372ad7579..1b5c3239e0143daafbded5c9495763ddf041708c 100644 (file)
@@ -262,7 +262,7 @@ class glx_function(gl_XML.gl_function):
 
                                if param.name != self.img_reset:
                                        param.offset = offset
-                                       if not param.is_variable_length():
+                                       if not param.is_variable_length() and not param.is_client_only:
                                                offset += param.size()
                                        
                                if self.pad_after( param ):
@@ -331,7 +331,7 @@ class glx_function(gl_XML.gl_function):
 
                size = 0
                for param in self.parameterIterateGlxSend(0):
-                       if param.name != self.img_reset:
+                       if param.name != self.img_reset and not param.is_client_only:
                                if size == 0:
                                        size = param.offset + param.size()
                                else:
index 2f0c88aae5bbc8ae3ef8ea90c01784ab695aee62..f89d3818663a8a9a14c70a367accafe5ba5afce1 100644 (file)
@@ -40,6 +40,7 @@
                    mode                (get | set) "set">
 <!ATTLIST param    name                NMTOKEN #REQUIRED
                    type                CDATA   #REQUIRED
+                  client_only         (true | false) "false"
                    count               NMTOKEN #IMPLIED
                    counter             (true | false) "false"
                    count_scale         NMTOKEN "1"
@@ -79,6 +80,9 @@ will just mean adding a '<glx ignore="true"/>' tag.
 param:
      name - name of the parameter
      type - fully qualified type (e.g., with "const", etc.)
+     client_only - boolean flag set on parameters which are interpreted only
+         by the client and are not present in the protocol encoding (e.g.,
+        the stride parameters to Map1f, etc.)
      count - for counted arrays (e.g., the 'lists' parameter to glCallLists),
          the parameter or literal that represents the count.  For functions
          like glVertex3fv it will be a litteral, for others it will be one of
index 4f3a8805e088d989a437cc4df55cbef0ca071a04..905c4a03a6764aad7faf2f80ce34940897f1b707 100644 (file)
         <param name="target" type="GLenum"/>
         <param name="u1" type="GLdouble"/>
         <param name="u2" type="GLdouble"/>
-        <param name="stride" type="GLint"/>
+        <param name="stride" type="GLint" client_only="true"/>
         <param name="order" type="GLint"/>
-        <param name="points" type="const GLdouble *"/>
+        <param name="points" type="const GLdouble *" variable_param="order"/>
         <glx rop="143" handcode="true"/>
     </function>
 
         <param name="target" type="GLenum"/>
         <param name="u1" type="GLfloat"/>
         <param name="u2" type="GLfloat"/>
-        <param name="stride" type="GLint"/>
+        <param name="stride" type="GLint" client_only="true"/>
         <param name="order" type="GLint"/>
-        <param name="points" type="const GLfloat *"/>
+        <param name="points" type="const GLfloat *" variable_param="order"/>
         <glx rop="144" handcode="true"/>
     </function>
 
         <param name="target" type="GLenum"/>
         <param name="u1" type="GLdouble"/>
         <param name="u2" type="GLdouble"/>
-        <param name="ustride" type="GLint"/>
+        <param name="ustride" type="GLint" client_only="true"/>
         <param name="uorder" type="GLint"/>
         <param name="v1" type="GLdouble"/>
         <param name="v2" type="GLdouble"/>
-        <param name="vstride" type="GLint"/>
+        <param name="vstride" type="GLint" client_only="true"/>
         <param name="vorder" type="GLint"/>
-        <param name="points" type="const GLdouble *"/>
+        <param name="points" type="const GLdouble *" variable_param="uorder"/>
         <glx rop="145" handcode="true"/>
     </function>
 
         <param name="target" type="GLenum"/>
         <param name="u1" type="GLfloat"/>
         <param name="u2" type="GLfloat"/>
-        <param name="ustride" type="GLint"/>
+        <param name="ustride" type="GLint" client_only="true"/>
         <param name="uorder" type="GLint"/>
         <param name="v1" type="GLfloat"/>
         <param name="v2" type="GLfloat"/>
-        <param name="vstride" type="GLint"/>
+        <param name="vstride" type="GLint" client_only="true"/>
         <param name="vorder" type="GLint"/>
-        <param name="points" type="const GLfloat *"/>
+        <param name="points" type="const GLfloat *" variable_param="uorder"/>
         <glx rop="146" handcode="true"/>
     </function>
 
index 15c3adc02b7c7839e8301c2a1166f3aaf9396254..b7a7388400dd261b303d3239998362ecdf134558 100644 (file)
@@ -438,8 +438,9 @@ class gl_parameter:
                #if ts == "GLdouble":
                #       print '/* stack size -> %s = %u (after) */' % (self.name, self.type_expr.get_stack_size())
 
-               self.is_counter = is_attr_true( element, 'counter' )
-               self.is_output  = is_attr_true( element, 'output' )
+               self.is_client_only = is_attr_true( element, 'client_only' )
+               self.is_counter     = is_attr_true( element, 'counter' )
+               self.is_output      = is_attr_true( element, 'output' )
 
 
                # Pixel data has special parameters.