glthread: don't upload for glDraw inside a display list and always sync
[mesa.git] / src / mapi / glapi / gen / gl_API.xml
index 929e5f6b0240cf58bf950625caa909650b49b933..b3511665280d4cc80d42c12a271454722143b5f6 100644 (file)
     <type name="DEBUGPROCARB" size="4" pointer="true"/>
     <type name="DEBUGPROC" size="4" pointer="true"/>
 
-    <function name="NewList" deprecated="3.1" marshal_fail="true">
+    <function name="NewList" deprecated="3.1"
+              marshal_call_after="if (COMPAT) ctx->GLThread.inside_dlist = true;">
         <param name="list" type="GLuint"/>
         <param name="mode" type="GLenum"/>
         <glx sop="101"/>
     </function>
 
-    <function name="EndList" deprecated="3.1">
+    <function name="EndList" deprecated="3.1"
+              marshal_call_after="if (COMPAT) ctx->GLThread.inside_dlist = false;">
         <glx sop="102"/>
     </function>
 
     <function name="CallLists" deprecated="3.1">
         <param name="n" type="GLsizei" counter="true"/>
         <param name="type" type="GLenum"/>
-        <param name="lists" type="const GLvoid *" variable_param="type" count="n"/>
+        <param name="lists" type="const GLvoid *" variable_param="type" count="n"
+               marshal_count="(n * _mesa_calllists_enum_to_count(type))"/>
         <glx rop="2" large="true"/>
     </function>
 
 
     <function name="Fogfv" es1="1.0" deprecated="3.1">
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_fog_enum_to_count(pname)"/>
         <glx rop="81"/>
     </function>
 
 
     <function name="Fogiv" deprecated="3.1">
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_fog_enum_to_count(pname)"/>
         <glx rop="83"/>
     </function>
 
     <function name="Lightfv" es1="1.0" deprecated="3.1">
         <param name="light" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_light_enum_to_count(pname)"/>
         <glx rop="87"/>
     </function>
 
     <function name="Lightiv" deprecated="3.1">
         <param name="light" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_light_enum_to_count(pname)"/>
         <glx rop="89"/>
     </function>
 
 
     <function name="LightModelfv" es1="1.0" deprecated="3.1">
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_light_model_enum_to_count(pname)"/>
         <glx rop="91"/>
     </function>
 
 
     <function name="LightModeliv" deprecated="3.1">
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_light_model_enum_to_count(pname)"/>
         <glx rop="93"/>
     </function>
 
     <function name="Materialfv" es1="1.0" deprecated="3.1" exec="dynamic">
         <param name="face" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_material_enum_to_count(pname)"/>
         <glx rop="97"/>
     </function>
 
     <function name="Materialiv" deprecated="3.1">
         <param name="face" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_material_enum_to_count(pname)"/>
         <glx rop="99"/>
     </function>
 
     <function name="TexParameterfv" es1="1.1" es2="2.0">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_tex_param_enum_to_count(pname)"/>
         <glx rop="106"/>
     </function>
 
     <function name="TexParameteriv" es1="1.1" es2="2.0">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_tex_param_enum_to_count(pname)"/>
         <glx rop="108"/>
     </function>
 
     <function name="TexEnvfv" es1="1.0" deprecated="3.1">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_texenv_enum_to_count(pname)"/>
         <glx rop="112"/>
     </function>
 
     <function name="TexEnviv" es1="1.1" deprecated="3.1">
         <param name="target" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_texenv_enum_to_count(pname)"/>
         <glx rop="114"/>
     </function>
 
     <function name="TexGendv" deprecated="3.1">
         <param name="coord" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLdouble *" variable_param="pname"/>
+        <param name="params" type="const GLdouble *" variable_param="pname"
+               marshal_count="_mesa_texgen_enum_to_count(pname)"/>
         <glx rop="116"/>
     </function>
 
     <function name="TexGenfv" deprecated="3.1">
         <param name="coord" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_texgen_enum_to_count(pname)"/>
         <glx rop="118"/>
     </function>
 
     <function name="TexGeniv" deprecated="3.1">
         <param name="coord" type="GLenum"/>
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_texgen_enum_to_count(pname)"/>
         <glx rop="120"/>
     </function>
 
         <glx rop="137"/>
     </function>
 
-    <function name="Disable" es1="1.0" es2="2.0">
+    <function name="Disable" es1="1.0" es2="2.0"
+              marshal_call_after="if (cap == GL_PRIMITIVE_RESTART || cap == GL_PRIMITIVE_RESTART_FIXED_INDEX) _mesa_glthread_set_prim_restart(ctx, cap, false);">
         <param name="cap" type="GLenum"/>
         <glx rop="138" handcode="client"/>
     </function>
 
-    <function name="Enable" es1="1.0" es2="2.0" marshal="custom">
+    <function name="Enable" es1="1.0" es2="2.0"
+              marshal_call_after='if (cap == GL_PRIMITIVE_RESTART || cap == GL_PRIMITIVE_RESTART_FIXED_INDEX) { _mesa_glthread_set_prim_restart(ctx, cap, true); } else if (cap == GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) { _mesa_glthread_disable(ctx, "Enable(DEBUG_OUTPUT_SYNCHRONOUS)"); }'>
         <param name="cap" type="GLenum"/>
         <glx rop="139" handcode="client"/>
     </function>
         <glx sop="108" handcode="true"/>
     </function>
 
-    <!-- TODO: Flush is marshalled synchronously as a temporary hack
-    since we don't yet have a hook into SwapBuffers.
-
-    NOTE: when we remove this hack, we'll still have to handle Flush
-    specially to ensure that it causes all previous commands to get
-    delivered to the server thread.
-    -->
-    <function name="Flush" es1="1.0" es2="2.0" marshal="custom">
+    <function name="Flush" es1="1.0" es2="2.0"
+              marshal_call_after="_mesa_glthread_flush_batch(ctx);">
         <glx sop="142" handcode="true"/>
     </function>
 
         <param name="u" type="GLfloat"/>
     </function>
 
-    <function name="EvalCoord1fv" deprecated="3.1">
+    <function name="EvalCoord1fv" deprecated="3.1" exec="dynamic">
         <param name="u" type="const GLfloat *" count="1"/>
         <glx rop="152"/>
     </function>
         <param name="v" type="GLfloat"/>
     </function>
 
-    <function name="EvalCoord2fv" deprecated="3.1">
+    <function name="EvalCoord2fv" deprecated="3.1" exec="dynamic">
         <param name="u" type="const GLfloat *" count="2"/>
         <glx rop="154"/>
     </function>
 
-    <function name="EvalMesh1" deprecated="3.1" exec="dynamic">
+    <function name="EvalMesh1" deprecated="3.1">
         <param name="mode" type="GLenum"/>
         <param name="i1" type="GLint"/>
         <param name="i2" type="GLint"/>
         <glx rop="156"/>
     </function>
 
-    <function name="EvalMesh2" deprecated="3.1" exec="dynamic">
+    <function name="EvalMesh2" deprecated="3.1">
         <param name="mode" type="GLenum"/>
         <param name="i1" type="GLint"/>
         <param name="i2" type="GLint"/>
 
     <function name="ColorPointer" es1="1.0" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_COLOR0, size, type, stride, pointer);">
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <glx handcode="true"/>
     </function>
 
-    <function name="DisableClientState" es1="1.0" deprecated="3.1">
+    <function name="DisableClientState" es1="1.0" deprecated="3.1"
+              marshal_call_after="if (COMPAT) _mesa_glthread_ClientState(ctx, NULL, _mesa_array_to_attrib(ctx, array), false);">
         <param name="array" type="GLenum"/>
         <glx handcode="true"/>
     </function>
 
-    <function name="DrawArrays" es1="1.0" es2="2.0" exec="dynamic" marshal="draw">
+    <function name="DrawArrays" es1="1.0" es2="2.0" exec="dynamic" marshal="custom">
         <param name="mode" type="GLenum"/>
         <param name="first" type="GLint"/>
         <param name="count" type="GLsizei"/>
         <glx rop="193" handcode="true"/>
     </function>
 
-    <function name="DrawElements" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"
-              marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+    <function name="DrawElements" es1="1.0" es2="2.0" exec="dynamic" marshal="custom">
         <param name="mode" type="GLenum"/>
         <param name="count" type="GLsizei"/>
         <param name="type" type="GLenum"/>
 
     <function name="EdgeFlagPointer" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_EDGEFLAG, 1, GL_UNSIGNED_BYTE, stride, pointer);">
         <param name="stride" type="GLsizei"/>
         <param name="pointer" type="const GLvoid *"/>
         <glx handcode="true"/>
     </function>
 
-    <function name="EnableClientState" es1="1.0" deprecated="3.1">
+    <function name="EnableClientState" es1="1.0" deprecated="3.1"
+              marshal_call_after="if (COMPAT) _mesa_glthread_ClientState(ctx, NULL, _mesa_array_to_attrib(ctx, array), true);">
         <param name="array" type="GLenum"/>
         <glx handcode="true"/>
     </function>
 
     <function name="IndexPointer" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_COLOR_INDEX, 1, type, stride, pointer);">
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <param name="pointer" type="const GLvoid *"/>
 
     <function name="NormalPointer" es1="1.0" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_NORMAL, 3, type, stride, pointer);">
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <param name="pointer" type="const GLvoid *"/>
 
     <function name="TexCoordPointer" es1="1.0" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_TEX(ctx->GLThread.ClientActiveTexture), size, type, stride, pointer);">
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
 
     <function name="VertexPointer" es1="1.0" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_POS, size, type, stride, pointer);">
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <glx rop="194"/>
     </function>
 
-    <function name="PopClientAttrib" deprecated="3.1">
+    <function name="PopClientAttrib" deprecated="3.1"
+              marshal_call_after="if (COMPAT) _mesa_glthread_PopClientAttrib(ctx);">
         <glx handcode="true"/>
     </function>
 
-    <function name="PushClientAttrib" deprecated="3.1">
+    <function name="PushClientAttrib" deprecated="3.1"
+              marshal_call_after="if (COMPAT) _mesa_glthread_PushClientAttrib(ctx, mask, false);">
         <param name="mask" type="GLbitfield"/>
         <glx handcode="true"/>
     </function>
         <glx rop="4097"/>
     </function>
 
-    <function name="DrawRangeElements" es2="3.0" exec="dynamic" marshal="draw"
-              marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+    <function name="DrawRangeElements" es2="3.0" exec="dynamic" marshal="custom">
         <param name="mode" type="GLenum"/>
         <param name="start" type="GLuint"/>
         <param name="end" type="GLuint"/>
         <glx rop="197"/>
     </function>
 
-    <function name="ClientActiveTexture" es1="1.0" deprecated="3.1">
+    <function name="ClientActiveTexture" es1="1.0" deprecated="3.1"
+              marshal_call_after="ctx->GLThread.ClientActiveTexture = texture - GL_TEXTURE0;">
         <param name="texture" type="GLenum"/>
         <glx handcode="true"/>
     </function>
     </function>
 
     <function name="LoadTransposeMatrixf" deprecated="3.1">
-        <param name="m" type="const GLfloat *"/>
+        <param name="m" type="const GLfloat *" count="16"/>
         <glx handcode="true"/>
     </function>
 
     <function name="LoadTransposeMatrixd" deprecated="3.1">
-        <param name="m" type="const GLdouble *"/>
+        <param name="m" type="const GLdouble *" count="16"/>
         <glx handcode="true"/>
     </function>
 
     <function name="MultTransposeMatrixf" deprecated="3.1">
-        <param name="m" type="const GLfloat *"/>
+        <param name="m" type="const GLfloat *" count="16"/>
         <glx handcode="true"/>
     </function>
 
     <function name="MultTransposeMatrixd" deprecated="3.1">
-        <param name="m" type="const GLdouble *"/>
+        <param name="m" type="const GLdouble *" count="16"/>
         <glx handcode="true"/>
     </function>
 
 
     <function name="FogCoordPointer" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_FOG, 1, type, stride, pointer);">
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <param name="pointer" type="const GLvoid *"/>
         <glx handcode="true"/>
     </function>
 
-    <function name="MultiDrawArrays" marshal="draw">
+    <function name="MultiDrawArrays" marshal="custom">
         <param name="mode" type="GLenum"/>
-        <param name="first" type="const GLint *"/>
-        <param name="count" type="const GLsizei *"/>
+        <param name="first" type="const GLint *" count="primcount"/>
+        <param name="count" type="const GLsizei *" count="primcount"/>
         <param name="primcount" type="GLsizei"/>
         <glx handcode="true"/>
     </function>
 
     <function name="PointParameterfv" es1="1.1">
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLfloat *" variable_param="pname"/>
+        <param name="params" type="const GLfloat *" variable_param="pname"
+               marshal_count="_mesa_point_param_enum_to_count(pname)"/>
         <glx rop="2066"/>
     </function>
 
 
     <function name="PointParameteriv">
         <param name="pname" type="GLenum"/>
-        <param name="params" type="const GLint *" variable_param="pname"/>
+        <param name="params" type="const GLint *" variable_param="pname"
+               marshal_count="_mesa_point_param_enum_to_count(pname)"/>
         <glx rop="4222"/>
     </function>
 
 
     <function name="SecondaryColorPointer" deprecated="3.1" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_COLOR1, size, type, stride, pointer);">
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
     </function>
 
     <function name="WindowPos2dv" deprecated="3.1">
-        <param name="v" type="const GLdouble *"/>
+        <param name="v" type="const GLdouble *" count="2"/>
         <glx handcode="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos2fv" deprecated="3.1">
-        <param name="v" type="const GLfloat *"/>
+        <param name="v" type="const GLfloat *" count="2"/>
         <glx handcode="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos2iv" deprecated="3.1">
-        <param name="v" type="const GLint *"/>
+        <param name="v" type="const GLint *" count="2"/>
         <glx handcode="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos2sv" deprecated="3.1">
-        <param name="v" type="const GLshort *"/>
+        <param name="v" type="const GLshort *" count="2"/>
         <glx handcode="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos3dv" deprecated="3.1">
-        <param name="v" type="const GLdouble *"/>
+        <param name="v" type="const GLdouble *" count="3"/>
         <glx handcode="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos3iv" deprecated="3.1">
-        <param name="v" type="const GLint *"/>
+        <param name="v" type="const GLint *" count="3"/>
         <glx handcode="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos3sv" deprecated="3.1">
-        <param name="v" type="const GLshort *"/>
+        <param name="v" type="const GLshort *" count="3"/>
         <glx handcode="true"/>
     </function>
 </category>
     <type name="intptr"   size="4"                  glx_name="CARD32"/>
     <type name="sizeiptr" size="4"  unsigned="true" glx_name="CARD32"/>
 
-    <function name="BindBuffer" es1="1.1" es2="2.0" marshal="custom" no_error="true">
+    <function name="BindBuffer" es1="1.1" es2="2.0" no_error="true"
+              marshal_call_after="if (COMPAT) _mesa_glthread_BindBuffer(ctx, target, buffer);">
         <param name="target" type="GLenum"/>
         <param name="buffer" type="GLuint"/>
         <glx ignore="true"/>
         <glx ignore="true"/>
     </function>
 
-    <function name="DeleteBuffers" es1="1.1" es2="2.0" no_error="true">
+    <function name="DeleteBuffers" es1="1.1" es2="2.0" no_error="true"
+              marshal_call_after="if (COMPAT) _mesa_glthread_DeleteBuffers(ctx, n, buffer);">
         <param name="n" type="GLsizei" counter="true"/>
         <param name="buffer" type="const GLuint *" count="n"/>
         <glx ignore="true"/>
     <function name="BindAttribLocation" es2="2.0" no_error="true">
         <param name="program" type="GLuint"/>
         <param name="index" type="GLuint"/>
-        <param name="name" type="const GLchar *"/>
+        <param name="name" type="const GLchar *" count="(strlen(name) + 1)"/>
         <glx ignore="true"/>
     </function>
 
         <glx ignore="true"/>
     </function>
 
-    <function name="DisableVertexAttribArray" es2="2.0" no_error="true">
+    <function name="DisableVertexAttribArray" es2="2.0" no_error="true"
+              marshal_call_after="if (COMPAT) _mesa_glthread_ClientState(ctx, NULL, VERT_ATTRIB_GENERIC(index), false);">
         <param name="index" type="GLuint"/>
         <glx ignore="true"/>
         <glx handcode="true"/>
     </function>
 
-    <function name="EnableVertexAttribArray" es2="2.0" no_error="true">
+    <function name="EnableVertexAttribArray" es2="2.0" no_error="true"
+              marshal_call_after="if (COMPAT) _mesa_glthread_ClientState(ctx, NULL, VERT_ATTRIB_GENERIC(index), true);">
         <param name="index" type="GLuint"/>
         <glx ignore="true"/>
         <glx handcode="true"/>
 
     <function name="VertexAttribPointer" es2="2.0" marshal="async"
               no_error="true"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_GENERIC(index), size, type, stride, pointer);">
         <param name="index" type="GLuint"/>
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
 <!-- ARB extension number 74 is a WGL extension. -->
 <!-- ARB extension number 75 is a GLX extension. -->
 
-<!-- 76. GL_ARB_shading_language_include -->
+<xi:include href="ARB_shading_language_include.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <!-- 77. GL_ARB_texture_compression_bptc -->
 
 <xi:include href="ARB_blend_func_extended.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
   <enum name="MAX_TRANSFORM_FEEDBACK_BUFFERS" value="0x8E70"/>
   <enum name="MAX_VERTEX_STREAMS"             value="0x8E71"/>
 
-  <function name="DrawTransformFeedbackStream" exec="dynamic" marshal="draw">
+  <function name="DrawTransformFeedbackStream" marshal="draw">
     <param name="mode" type="GLenum"/>
     <param name="id" type="GLuint"/>
     <param name="stream" type="GLuint"/>
 <xi:include href="ARB_base_instance.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <category name="GL_ARB_transform_feedback_instanced" number="109">
-  <function name="DrawTransformFeedbackInstanced" exec="dynamic" marshal="draw">
+  <function name="DrawTransformFeedbackInstanced" marshal="draw">
     <param name="mode" type="GLenum"/>
     <param name="id" type="GLuint"/>
     <param name="primcount" type="GLsizei"/>
   </function>
 
-  <function name="DrawTransformFeedbackStreamInstanced" exec="dynamic" marshal="draw">
+  <function name="DrawTransformFeedbackStreamInstanced" marshal="draw">
     <param name="mode" type="GLenum"/>
     <param name="id" type="GLuint"/>
     <param name="stream" type="GLuint"/>
         <param name="data" type="const GLvoid *"/>
         <param name="flags" type="GLbitfield"/>
     </function>
+
+   <function name="NamedBufferStorageEXT">
+      <param name="buffer" type="GLuint" />
+      <param name="size" type="GLsizeiptr" />
+      <param name="data" type="const GLvoid *" />
+      <param name="flags" type="GLbitfield" />
+   </function>
 </category>
 
 <xi:include href="ARB_clear_texture.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <xi:include href="ARB_gpu_shader_int64.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
-<!-- ARB extension 179 - 189 -->
+<category name="ARB_parallel_shader_compile" number="179">
+    <enum name="MAX_SHADER_COMPILER_THREADS_ARB"   value="0x91B0"/>
+    <enum name="COMPLETION_STATUS_ARB"             value="0x91B1"/>
+
+    <function name="MaxShaderCompilerThreadsKHR" es2="2.0">
+        <param name="count" type="GLuint"/>
+    </function>
+
+    <function name="MaxShaderCompilerThreadsARB" alias="MaxShaderCompilerThreadsKHR">
+        <param name="count" type="GLuint"/>
+    </function>
+</category>
+
+<!-- ARB extension 180 - 189 -->
 
 <xi:include href="ARB_gl_spirv.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<!-- ARB extensions 191 - 193 -->
+
+<xi:include href="ARB_spirv_extensions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <!-- Non-ARB extensions sorted by extension number. -->
 
 <category name="GL_EXT_blend_color" number="2">
     </function>
 
     <function name="ColorPointerEXT" deprecated="3.1" marshal="async"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_COLOR0, size, type, stride, pointer);">
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
     </function>
 
     <function name="EdgeFlagPointerEXT" deprecated="3.1" marshal="async"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_EDGEFLAG, 1, GL_UNSIGNED_BYTE, stride, pointer);">
         <param name="stride" type="GLsizei"/>
         <param name="count" type="GLsizei"/>
         <param name="pointer" type="const GLboolean *"/>
     </function>
 
     <function name="IndexPointerEXT" deprecated="3.1" marshal="async"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_COLOR_INDEX, 1, type, stride, pointer);">
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <param name="count" type="GLsizei"/>
     </function>
 
     <function name="NormalPointerEXT" deprecated="3.1" marshal="async"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_NORMAL, 3, type, stride, pointer);">
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <param name="count" type="GLsizei"/>
     </function>
 
     <function name="TexCoordPointerEXT" deprecated="3.1" marshal="async"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_TEX(ctx->GLThread.ClientActiveTexture), size, type, stride, pointer);">
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
     </function>
 
     <function name="VertexPointerEXT" deprecated="3.1" marshal="async"
-              marshal_fail="_mesa_glthread_is_non_vbo_vertex_attrib_pointer(ctx)">
+              marshal_call_after="if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_POS, size, type, stride, pointer);">
         <param name="size" type="GLint"/>
         <param name="type" type="GLenum"/>
         <param name="stride" type="GLsizei"/>
         <param name="primcount" type="GLsizei"/>
     </function>
 
-    <function name="MultiDrawElementsEXT" es1="1.0" es2="2.0" exec="dynamic" marshal="draw"
-              marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
+    <function name="MultiDrawElementsEXT" es1="1.0" es2="2.0" exec="dynamic" marshal="custom">
         <param name="mode" type="GLenum"/>
-        <param name="count" type="const GLsizei *"/>
+        <param name="count" type="const GLsizei *" count="primcount"/>
         <param name="type" type="GLenum"/>
-        <param name="indices" type="const GLvoid * const *"/>
+        <param name="indices" type="const GLvoid * const *" count="(sizeof(GLvoid *) * primcount)"/>
         <param name="primcount" type="GLsizei"/>
         <glx handcode="true"/>
     </function>
 
     <enum name="FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB" value="0x9342">
         <size name="FramebufferParameteri"/>
-        <size name="GetFramebufferParameteri"/>
+        <size name="GetFramebufferParameteriv"/>
     </enum>
 
     <enum name="FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB"    value="0x9343">
         <size name="FramebufferParameteri"/>
-        <size name="GetFramebufferParameteri"/>
+        <size name="GetFramebufferParameteriv"/>
     </enum>
 
     <function name="FramebufferSampleLocationsfvARB" no_error="true">
         <param name="target" type="GLenum"/>
         <param name="start"  type="GLuint"/>
         <param name="count"  type="GLsizei"/>
-        <param name="v"      type="const GLfloat *"/>
+        <param name="v"      type="const GLfloat *" count="(2 * count)"/>
     </function>
 
     <function name="NamedFramebufferSampleLocationsfvARB" no_error="true">
         <param name="framebuffer" type="GLuint"/>
         <param name="start"       type="GLuint"/>
         <param name="count"       type="GLsizei"/>
-        <param name="v"           type="const GLfloat *"/>
+        <param name="v"           type="const GLfloat *" count="(2 * count)"/>
     </function>
 
     <function name="EvaluateDepthValuesARB"/>
 
     <enum name="FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV" value="0x9342" alias="FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_ARB">
         <size name="FramebufferParameteri"/>
-        <size name="GetFramebufferParameteri"/>
+        <size name="GetFramebufferParameteriv"/>
     </enum>
 
     <enum name="FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV"    value="0x9343" alias="FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_ARB">
         <size name="FramebufferParameteri"/>
-        <size name="GetFramebufferParameteri"/>
+        <size name="GetFramebufferParameteriv"/>
     </enum>
 
     <function name="FramebufferSampleLocationsfvNV" no_error="true" es2="3.1" alias="FramebufferSampleLocationsfvARB">
     </function>
 
     <function name="WindowPos4dvMESA" deprecated="3.1">
-        <param name="v" type="const GLdouble *"/>
+        <param name="v" type="const GLdouble *" count="4"/>
         <glx ignore="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos4fvMESA" deprecated="3.1">
-        <param name="v" type="const GLfloat *"/>
+        <param name="v" type="const GLfloat *" count="4"/>
         <glx ignore="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos4ivMESA" deprecated="3.1">
-        <param name="v" type="const GLint *"/>
+        <param name="v" type="const GLint *" count="4"/>
         <glx ignore="true"/>
     </function>
 
     </function>
 
     <function name="WindowPos4svMESA" deprecated="3.1">
-        <param name="v" type="const GLshort *"/>
+        <param name="v" type="const GLshort *" count="4"/>
         <glx ignore="true"/>
     </function>
 </category>
 </category>
 
 <category name="GL_IBM_multimode_draw_arrays" number="200">
-    <function name="MultiModeDrawArraysIBM" marshal="draw">
-        <param name="mode" type="const GLenum *"/>
-        <param name="first" type="const GLint *"/>
-        <param name="count" type="const GLsizei *"/>
+    <function name="MultiModeDrawArraysIBM" marshal="draw"
+              marshal_sync="_mesa_glthread_has_non_vbo_vertices(ctx)">
+        <param name="mode" type="const GLenum *" count="primcount"/>
+        <param name="first" type="const GLint *" count="primcount"/>
+        <param name="count" type="const GLsizei *" count="primcount"/>
         <param name="primcount" type="GLsizei"/>
         <param name="modestride" type="GLint"/>
         <glx handcode="true" ignore="true"/>
     </function>
 
     <function name="MultiModeDrawElementsIBM" marshal="draw"
-              marshal_fail="_mesa_glthread_is_non_vbo_draw_elements(ctx)">
-        <param name="mode" type="const GLenum *"/>
-        <param name="count" type="const GLsizei *"/>
+              marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indices(ctx)">
+        <param name="mode" type="const GLenum *" count="primcount"/>
+        <param name="count" type="const GLsizei *" count="primcount"/>
         <param name="type" type="GLenum"/>
-        <param name="indices" type="const GLvoid * const *"/>
+        <param name="indices" type="const GLvoid * const *" count="(sizeof(GLvoid *) * primcount)"/>
         <param name="primcount" type="GLsizei"/>
         <param name="modestride" type="GLint"/>
         <glx handcode="true" ignore="true"/>
 
     <function name="SetFragmentShaderConstantATI" deprecated="3.1">
       <param name="dst" type="GLuint"/>
-      <param name="value" type="const GLfloat *"/>
+      <param name="value" type="const GLfloat *" count="4"/>
       <glx ignore="true"/>
     </function>
 </category>
 <xi:include href="EXT_separate_shader_objects.xml"
            xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="NV_copy_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <xi:include href="EXT_vertex_attrib_64bit.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <xi:include href="AMD_depth_clamp_separate.xml"
            xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="EXT_direct_state_access.xml"
+            xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<xi:include href="EXT_shader_image_load_store.xml"
+            xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <category name="GL_EXT_texture_sRGB_decode" number="402">
     <enum name="TEXTURE_SRGB_DECODE_EXT"              value="0x8A48"/>
     <enum name="DECODE_EXT"                           value="0x8A49"/>
 
 <xi:include href="INTEL_performance_query.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="NV_alpha_to_coverage_dither_control.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <category name="GL_EXT_polygon_offset_clamp" number="460">
     <enum name="POLYGON_OFFSET_CLAMP_EXT"             value="0x8E1B">
         <size name="Get" mode="get"/>
         <param name="target" type="GLenum"/>
         <param name="index" type="GLuint"/>
         <param name="count" type="GLsizei"/>
-        <param name="params" type="const GLfloat *"/>
+        <param name="params" type="const GLfloat *" count="4"/>
     </function>
 
     <function name="ProgramLocalParameters4fvEXT" deprecated="3.1">
         <param name="target" type="GLenum"/>
         <param name="index" type="GLuint"/>
         <param name="count" type="GLsizei"/>
-        <param name="params" type="const GLfloat *"/>
+        <param name="params" type="const GLfloat *" count="4"/>
     </function>
 </category>
 
     </function>
 </category>
 
+<category name="GL_MESA_internal_functions">
+    <!-- Internal function for glthread to implement BufferSubData as a GPU copy. -->
+    <function name="InternalBufferSubDataCopyMESA" es2="2.0">
+        <param name="srcBuffer" type="GLintptr"/> <!-- "struct gl_buffer_object *" really -->
+        <param name="srcOffset" type="GLuint"/>
+        <param name="dstTargetOrName" type="GLuint"/>
+        <param name="dstOffset" type="GLintptr"/>
+        <param name="size" type="GLsizeiptr"/>
+        <param name="named" type="GLboolean"/>
+        <param name="ext_dsa" type="GLboolean"/>
+    </function>
+</category>
+
 <xi:include href="OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="EXT_EGL_image_storage.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <xi:include href="EXT_texture_integer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <xi:include href="EXT_external_objects.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 <xi:include href="EXT_external_objects_fd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="NV_viewport_swizzle.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <xi:include href="GL4x.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 </OpenGLAPI>