mesa: remove exec="dynamic" from Draw functions that are not really dynamic
authorMarek Olšák <marek.olsak@amd.com>
Sun, 22 Mar 2020 23:35:28 +0000 (19:35 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Apr 2020 11:56:06 +0000 (11:56 +0000)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

12 files changed:
src/mapi/glapi/gen/ARB_base_instance.xml
src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml
src/mapi/glapi/gen/ARB_draw_indirect.xml
src/mapi/glapi/gen/ARB_draw_instanced.xml
src/mapi/glapi/gen/ARB_indirect_parameters.xml
src/mapi/glapi/gen/EXT_transform_feedback.xml
src/mapi/glapi/gen/es_EXT.xml
src/mapi/glapi/gen/gl_API.xml
src/mesa/drivers/common/meta.c
src/mesa/main/draw.c
src/mesa/main/draw.h
src/mesa/main/tests/dispatch_sanity.cpp

index f9a7661e9529c696b0f312d5dbd347698a92a36e..c4c2a5b99ab5a0dff65450294cf6c3a8511712c4 100644 (file)
@@ -8,7 +8,7 @@
 
 <category name="GL_ARB_base_instance" number="107">
 
-  <function name="DrawArraysInstancedBaseInstance" exec="dynamic" marshal="draw"
+  <function name="DrawArraysInstancedBaseInstance" marshal="draw"
             marshal_sync="_mesa_glthread_has_non_vbo_vertices(ctx)">
     <param name="mode" type="GLenum"/>
     <param name="first" type="GLint"/>
@@ -17,7 +17,7 @@
     <param name="baseinstance" type="GLuint"/>
   </function>
 
-  <function name="DrawElementsInstancedBaseInstance" exec="dynamic" marshal="draw"
+  <function name="DrawElementsInstancedBaseInstance" marshal="draw"
             marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indices(ctx)">
     <param name="mode" type="GLenum"/>
     <param name="count" type="GLsizei"/>
@@ -27,7 +27,7 @@
     <param name="baseinstance" type="GLuint"/>
   </function>
 
-  <function name="DrawElementsInstancedBaseVertexBaseInstance" exec="dynamic" marshal="draw"
+  <function name="DrawElementsInstancedBaseVertexBaseInstance" marshal="draw"
             marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indices(ctx)">
     <param name="mode" type="GLenum"/>
     <param name="count" type="GLsizei"/>
index 915501a9c280e1a3f83bea10b34173273b809cd1..18940b84223ebe0752c5ac2c3d834367ace0af44 100644 (file)
@@ -38,7 +38,7 @@
         <param name="basevertex" type="const GLint *" count="primcount"/>
     </function>
 
-    <function name="DrawElementsInstancedBaseVertex" es2="3.2" exec="dynamic" marshal="draw"
+    <function name="DrawElementsInstancedBaseVertex" es2="3.2" marshal="draw"
               marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indices(ctx)">
         <param name="mode" type="GLenum"/>
         <param name="count" type="GLsizei"/>
index dc50cc3bd9ef7bff1b4e7b6c0e0198e29d9305a9..6dc1d6feeec06af72353500526a6fc7ed89f40f9 100644 (file)
@@ -8,14 +8,14 @@
     <enum name="DRAW_INDIRECT_BUFFER"                   value="0x8F3F"/>
     <enum name="DRAW_INDIRECT_BUFFER_BINDING"           value="0x8F43"/>
 
-    <function name="DrawArraysIndirect" exec="dynamic" es2="3.1"
+    <function name="DrawArraysIndirect" es2="3.1"
               marshal="draw"
               marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indirect(ctx)">
         <param name="mode" type="GLenum"/>
         <param name="indirect" type="const GLvoid *"/>
     </function>
 
-    <function name="DrawElementsIndirect" exec="dynamic" es2="3.1"
+    <function name="DrawElementsIndirect" es2="3.1"
               marshal="draw"
               marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indices_or_indirect(ctx)">
         <param name="mode" type="GLenum"/>
@@ -28,7 +28,7 @@
 
 <category name="GL_ARB_multi_draw_indirect" number="133">
 
-    <function name="MultiDrawArraysIndirect" exec="dynamic" marshal="draw"
+    <function name="MultiDrawArraysIndirect" marshal="draw"
               marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indirect(ctx)">
         <param name="mode" type="GLenum"/>
         <param name="indirect" type="const GLvoid *"/>
@@ -36,7 +36,7 @@
         <param name="stride" type="GLsizei"/>
     </function>
 
-    <function name="MultiDrawElementsIndirect" exec="dynamic" marshal="draw"
+    <function name="MultiDrawElementsIndirect" marshal="draw"
               marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indices_or_indirect(ctx)">
         <param name="mode" type="GLenum"/>
         <param name="type" type="GLenum"/>
 
 <category name="GL_AMD_multi_draw_indirect" number="408">
 
-    <function name="MultiDrawArraysIndirectAMD" exec="dynamic" alias="MultiDrawArraysIndirect">
+    <function name="MultiDrawArraysIndirectAMD" alias="MultiDrawArraysIndirect">
         <param name="mode" type="GLenum"/>
         <param name="indirect" type="const GLvoid *"/>
         <param name="primcount" type="GLsizei"/>
         <param name="stride" type="GLsizei"/>
     </function>
 
-    <function name="MultiDrawElementsIndirectAMD" exec="dynamic" alias="MultiDrawElementsIndirect">
+    <function name="MultiDrawElementsIndirectAMD" alias="MultiDrawElementsIndirect">
         <param name="mode" type="GLenum"/>
         <param name="type" type="GLenum"/>
         <param name="indirect" type="const GLvoid *"/>
index 52006c223c3b313d974b73f1a284fdaaf6c081ab..67846ea1b4287c11c7ab5fa95fa7bd88ed520122 100644 (file)
@@ -8,7 +8,7 @@
 
 <category name="GL_ARB_draw_instanced" number="44">
 
-  <function name="DrawArraysInstancedARB" exec="dynamic" marshal="draw"
+  <function name="DrawArraysInstancedARB" marshal="draw"
             marshal_sync="_mesa_glthread_has_non_vbo_vertices(ctx)">
     <param name="mode" type="GLenum"/>
     <param name="first" type="GLint"/>
@@ -16,7 +16,7 @@
     <param name="primcount" type="GLsizei"/>
   </function>
 
-  <function name="DrawElementsInstancedARB" exec="dynamic" marshal="draw"
+  <function name="DrawElementsInstancedARB" marshal="draw"
             marshal_sync="_mesa_glthread_has_non_vbo_vertices_or_indices(ctx)">
     <param name="mode" type="GLenum"/>
     <param name="count" type="GLsizei"/>
index 7d4f15d825005067a244312e50843096c7634d73..2739f153875b0c988585cab64e9da098ca042f0a 100644 (file)
@@ -8,7 +8,7 @@
     <enum name="PARAMETER_BUFFER_ARB"                   value="0x80EE"/>
     <enum name="PARAMETER_BUFFER_BINDING_ARB"           value="0x80EF"/>
 
-    <function name="MultiDrawArraysIndirectCountARB" exec="dynamic" marshal="draw"
+    <function name="MultiDrawArraysIndirectCountARB" marshal="draw"
               marshal_sync="_mesa_glthread_has_non_vbo_vertices(ctx)">
         <param name="mode" type="GLenum"/>
         <param name="indirect" type="GLintptr"/>
@@ -18,7 +18,7 @@
     </function>
 
     <!-- Use "...has_non_vbo_vertices", because indices always come from a buffer object. -->
-    <function name="MultiDrawElementsIndirectCountARB" exec="dynamic" marshal="draw"
+    <function name="MultiDrawElementsIndirectCountARB" marshal="draw"
               marshal_sync="_mesa_glthread_has_non_vbo_vertices(ctx)">
         <param name="mode" type="GLenum"/>
         <param name="type" type="GLenum"/>
index 9982a3f81a5479ddff2d12fb8b5669480eb08ad2..604ab7cd0d57ce7df81a743bd5db378ebe4c35c7 100644 (file)
   <function name="ResumeTransformFeedback" es2="3.0" no_error="true">
   </function>
 
-  <function name="DrawTransformFeedback" exec="dynamic" marshal="draw">
+  <function name="DrawTransformFeedback" marshal="draw">
     <param name="mode" type="GLenum"/>
     <param name="id" type="GLuint"/>
   </function>
index a5653313605fda495870983ba327edfb7b89f602..de3c14dafede65e540aabd2751f3283c1f3f864b 100644 (file)
     </function>
 
     <function name="DrawElementsInstancedBaseVertexEXT" alias="DrawElementsInstancedBaseVertex"
-              es2="3.0" exec="dynamic">
+              es2="3.0">
         <param name="mode" type="GLenum"/>
         <param name="count" type="GLsizei"/>
         <param name="type" type="GLenum"/>
     </function>
 
     <function name="DrawElementsInstancedBaseVertexOES" alias="DrawElementsInstancedBaseVertex"
-              es2="3.0" exec="dynamic">
+              es2="3.0">
         <param name="mode" type="GLenum"/>
         <param name="count" type="GLsizei"/>
         <param name="type" type="GLenum"/>
index 39c80dabbf44ed5eb7fa8fd4db4c68cbcac87a2b..d421e778091b1b82ae08c2e30d94f24afcbc46df 100644 (file)
         <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"/>
   <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"/>
index 30116721c7eb85e5689b5c39ddc220b3e3c60ee9..ad289a54bff75ab6864d24a72e410f3a3815782e 100644 (file)
@@ -1861,7 +1861,7 @@ meta_clear(struct gl_context *ctx, GLbitfield buffers, bool glsl)
 
    /* draw quad(s) */
    if (fb->MaxNumLayers > 0) {
-      _mesa_DrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, fb->MaxNumLayers);
+      _mesa_DrawArraysInstancedARB(GL_TRIANGLE_FAN, 0, 4, fb->MaxNumLayers);
    } else {
       _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);
    }
index 253e2fdbee72079a0df4743b3458da6617bfc56f..686a065ffb5e6600fa2418aefbccd0663ffc9aed 100644 (file)
@@ -392,8 +392,8 @@ _mesa_exec_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_EvalMesh1(GLenum mode, GLint i1, GLint i2)
+void GLAPIENTRY
+_mesa_EvalMesh1(GLenum mode, GLint i1, GLint i2)
 {
    GET_CURRENT_CONTEXT(ctx);
    GLint i;
@@ -428,8 +428,8 @@ _mesa_exec_EvalMesh1(GLenum mode, GLint i1, GLint i2)
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+void GLAPIENTRY
+_mesa_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
 {
    GET_CURRENT_CONTEXT(ctx);
    GLfloat u, du, v, dv, v1, u1;
@@ -534,8 +534,8 @@ _mesa_DrawArrays(GLenum mode, GLint start, GLsizei count)
  * display list mode).
  */
 void GLAPIENTRY
-_mesa_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
-                          GLsizei numInstances)
+_mesa_DrawArraysInstancedARB(GLenum mode, GLint start, GLsizei count,
+                             GLsizei numInstances)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -569,10 +569,10 @@ _mesa_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
 /**
  * Called from glDrawArraysInstancedBaseInstance when in immediate mode.
  */
-static void GLAPIENTRY
-_mesa_exec_DrawArraysInstancedBaseInstance(GLenum mode, GLint first,
-                                           GLsizei count, GLsizei numInstances,
-                                           GLuint baseInstance)
+void GLAPIENTRY
+_mesa_DrawArraysInstancedBaseInstance(GLenum mode, GLint first,
+                                      GLsizei count, GLsizei numInstances,
+                                      GLuint baseInstance)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1025,9 +1025,9 @@ _mesa_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
 /**
  * Called by glDrawElementsInstanced() in immediate mode.
  */
-static void GLAPIENTRY
-_mesa_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
-                                 const GLvoid * indices, GLsizei numInstances)
+void GLAPIENTRY
+_mesa_DrawElementsInstancedARB(GLenum mode, GLsizei count, GLenum type,
+                               const GLvoid * indices, GLsizei numInstances)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1057,11 +1057,11 @@ _mesa_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
 /**
  * Called by glDrawElementsInstancedBaseVertex() in immediate mode.
  */
-static void GLAPIENTRY
-_mesa_exec_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count,
-                                           GLenum type, const GLvoid * indices,
-                                           GLsizei numInstances,
-                                           GLint basevertex)
+void GLAPIENTRY
+_mesa_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count,
+                                      GLenum type, const GLvoid * indices,
+                                      GLsizei numInstances,
+                                      GLint basevertex)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1095,12 +1095,12 @@ _mesa_exec_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count,
 /**
  * Called by glDrawElementsInstancedBaseInstance() in immediate mode.
  */
-static void GLAPIENTRY
-_mesa_exec_DrawElementsInstancedBaseInstance(GLenum mode, GLsizei count,
-                                             GLenum type,
-                                             const GLvoid *indices,
-                                             GLsizei numInstances,
-                                             GLuint baseInstance)
+void GLAPIENTRY
+_mesa_DrawElementsInstancedBaseInstance(GLenum mode, GLsizei count,
+                                        GLenum type,
+                                        const GLvoid *indices,
+                                        GLsizei numInstances,
+                                        GLuint baseInstance)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1134,14 +1134,14 @@ _mesa_exec_DrawElementsInstancedBaseInstance(GLenum mode, GLsizei count,
 /**
  * Called by glDrawElementsInstancedBaseVertexBaseInstance() in immediate mode.
  */
-static void GLAPIENTRY
-_mesa_exec_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
-                                                       GLsizei count,
-                                                       GLenum type,
-                                                       const GLvoid *indices,
-                                                       GLsizei numInstances,
-                                                       GLint basevertex,
-                                                       GLuint baseInstance)
+void GLAPIENTRY
+_mesa_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
+                                                  GLsizei count,
+                                                  GLenum type,
+                                                  const GLvoid *indices,
+                                                  GLsizei numInstances,
+                                                  GLint basevertex,
+                                                  GLuint baseInstance)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1424,8 +1424,8 @@ _mesa_DrawTransformFeedback(GLenum mode, GLuint name)
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
+void GLAPIENTRY
+_mesa_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
 {
    GET_CURRENT_CONTEXT(ctx);
    struct gl_transform_feedback_object *obj =
@@ -1439,9 +1439,9 @@ _mesa_exec_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
-                                          GLsizei primcount)
+void GLAPIENTRY
+_mesa_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
+                                     GLsizei primcount)
 {
    GET_CURRENT_CONTEXT(ctx);
    struct gl_transform_feedback_object *obj =
@@ -1455,10 +1455,10 @@ _mesa_exec_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
-                                                GLuint stream,
-                                                GLsizei primcount)
+void GLAPIENTRY
+_mesa_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
+                                           GLuint stream,
+                                           GLsizei primcount)
 {
    GET_CURRENT_CONTEXT(ctx);
    struct gl_transform_feedback_object *obj =
@@ -1525,8 +1525,8 @@ _mesa_validated_multidrawelementsindirect(struct gl_context *ctx,
  * Like [Multi]DrawArrays/Elements, but they take most arguments from
  * a buffer object.
  */
-static void GLAPIENTRY
-_mesa_exec_DrawArraysIndirect(GLenum mode, const GLvoid *indirect)
+void GLAPIENTRY
+_mesa_DrawArraysIndirect(GLenum mode, const GLvoid *indirect)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1545,9 +1545,9 @@ _mesa_exec_DrawArraysIndirect(GLenum mode, const GLvoid *indirect)
        !ctx->DrawIndirectBuffer) {
       DrawArraysIndirectCommand *cmd = (DrawArraysIndirectCommand *) indirect;
 
-      _mesa_exec_DrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count,
-                                                 cmd->primCount,
-                                                 cmd->baseInstance);
+      _mesa_DrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count,
+                                            cmd->primCount,
+                                            cmd->baseInstance);
       return;
    }
 
@@ -1571,8 +1571,8 @@ _mesa_exec_DrawArraysIndirect(GLenum mode, const GLvoid *indirect)
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect)
+void GLAPIENTRY
+_mesa_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1608,11 +1608,11 @@ _mesa_exec_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect
          void *offset = (void *)
             (uintptr_t)((cmd->firstIndex * _mesa_sizeof_type(type)) & 0xffffffffUL);
 
-         _mesa_exec_DrawElementsInstancedBaseVertexBaseInstance(mode, cmd->count,
-                                                                type, offset,
-                                                                cmd->primCount,
-                                                                cmd->baseVertex,
-                                                                cmd->baseInstance);
+         _mesa_DrawElementsInstancedBaseVertexBaseInstance(mode, cmd->count,
+                                                           type, offset,
+                                                           cmd->primCount,
+                                                           cmd->baseVertex,
+                                                           cmd->baseInstance);
       }
 
       return;
@@ -1639,9 +1639,9 @@ _mesa_exec_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect,
-                                   GLsizei primcount, GLsizei stride)
+void GLAPIENTRY
+_mesa_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect,
+                              GLsizei primcount, GLsizei stride)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1670,9 +1670,9 @@ _mesa_exec_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect,
       const uint8_t *ptr = (const uint8_t *) indirect;
       for (unsigned i = 0; i < primcount; i++) {
          DrawArraysIndirectCommand *cmd = (DrawArraysIndirectCommand *) ptr;
-         _mesa_exec_DrawArraysInstancedBaseInstance(mode, cmd->first,
-                                                    cmd->count, cmd->primCount,
-                                                    cmd->baseInstance);
+         _mesa_DrawArraysInstancedBaseInstance(mode, cmd->first,
+                                               cmd->count, cmd->primCount,
+                                               cmd->baseInstance);
 
          if (stride == 0) {
             ptr += sizeof(DrawArraysIndirectCommand);
@@ -1705,10 +1705,10 @@ _mesa_exec_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect,
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_MultiDrawElementsIndirect(GLenum mode, GLenum type,
-                                     const GLvoid *indirect,
-                                     GLsizei primcount, GLsizei stride)
+void GLAPIENTRY
+_mesa_MultiDrawElementsIndirect(GLenum mode, GLenum type,
+                                const GLvoid *indirect,
+                                GLsizei primcount, GLsizei stride)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1751,7 +1751,7 @@ _mesa_exec_MultiDrawElementsIndirect(GLenum mode, GLenum type,
 
       const uint8_t *ptr = (const uint8_t *) indirect;
       for (unsigned i = 0; i < primcount; i++) {
-         _mesa_exec_DrawElementsIndirect(mode, type, ptr);
+         _mesa_DrawElementsIndirect(mode, type, ptr);
 
          if (stride == 0) {
             ptr += sizeof(DrawElementsIndirectCommand);
@@ -1785,10 +1785,10 @@ _mesa_exec_MultiDrawElementsIndirect(GLenum mode, GLenum type,
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_MultiDrawArraysIndirectCount(GLenum mode, GLintptr indirect,
-                                        GLintptr drawcount_offset,
-                                        GLsizei maxdrawcount, GLsizei stride)
+void GLAPIENTRY
+_mesa_MultiDrawArraysIndirectCountARB(GLenum mode, GLintptr indirect,
+                                      GLintptr drawcount_offset,
+                                      GLsizei maxdrawcount, GLsizei stride)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1827,11 +1827,11 @@ _mesa_exec_MultiDrawArraysIndirectCount(GLenum mode, GLintptr indirect,
 }
 
 
-static void GLAPIENTRY
-_mesa_exec_MultiDrawElementsIndirectCount(GLenum mode, GLenum type,
-                                          GLintptr indirect,
-                                          GLintptr drawcount_offset,
-                                          GLsizei maxdrawcount, GLsizei stride)
+void GLAPIENTRY
+_mesa_MultiDrawElementsIndirectCountARB(GLenum mode, GLenum type,
+                                        GLintptr indirect,
+                                        GLintptr drawcount_offset,
+                                        GLsizei maxdrawcount, GLsizei stride)
 {
    GET_CURRENT_CONTEXT(ctx);
 
@@ -1889,8 +1889,6 @@ _mesa_initialize_exec_dispatch(const struct gl_context *ctx,
 
    if (ctx->API == API_OPENGL_COMPAT) {
       SET_Rectf(exec, _mesa_exec_Rectf);
-      SET_EvalMesh1(exec, _mesa_exec_EvalMesh1);
-      SET_EvalMesh2(exec, _mesa_exec_EvalMesh2);
    }
 
    if (ctx->API != API_OPENGLES &&
@@ -1902,45 +1900,8 @@ _mesa_initialize_exec_dispatch(const struct gl_context *ctx,
       if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
          SET_DrawRangeElementsBaseVertex(exec,
                                          _mesa_DrawRangeElementsBaseVertex);
-         SET_DrawElementsInstancedBaseVertex(exec,
-                                             _mesa_exec_DrawElementsInstancedBaseVertex);
       }
    }
-
-   if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
-      SET_DrawArraysInstancedBaseInstance(exec,
-                                          _mesa_exec_DrawArraysInstancedBaseInstance);
-      SET_DrawElementsInstancedBaseInstance(exec,
-                                            _mesa_exec_DrawElementsInstancedBaseInstance);
-      SET_DrawElementsInstancedBaseVertexBaseInstance(exec,
-                                                      _mesa_exec_DrawElementsInstancedBaseVertexBaseInstance);
-   }
-
-   if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles31(ctx)) {
-      SET_DrawArraysIndirect(exec, _mesa_exec_DrawArraysIndirect);
-      SET_DrawElementsIndirect(exec, _mesa_exec_DrawElementsIndirect);
-   }
-
-   if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
-      SET_DrawArraysInstancedARB(exec, _mesa_DrawArraysInstanced);
-      SET_DrawElementsInstancedARB(exec, _mesa_exec_DrawElementsInstanced);
-   }
-
-   if (_mesa_is_desktop_gl(ctx)) {
-      SET_DrawTransformFeedback(exec, _mesa_DrawTransformFeedback);
-      SET_DrawTransformFeedbackStream(exec,
-                                      _mesa_exec_DrawTransformFeedbackStream);
-      SET_DrawTransformFeedbackInstanced(exec,
-                                         _mesa_exec_DrawTransformFeedbackInstanced);
-      SET_DrawTransformFeedbackStreamInstanced(exec,
-                                               _mesa_exec_DrawTransformFeedbackStreamInstanced);
-      SET_MultiDrawArraysIndirect(exec, _mesa_exec_MultiDrawArraysIndirect);
-      SET_MultiDrawElementsIndirect(exec, _mesa_exec_MultiDrawElementsIndirect);
-      SET_MultiDrawArraysIndirectCountARB(exec,
-                                          _mesa_exec_MultiDrawArraysIndirectCount);
-      SET_MultiDrawElementsIndirectCountARB(exec,
-                                            _mesa_exec_MultiDrawElementsIndirectCount);
-   }
 }
 
 
index d815d6d1bfd2e9a4a9dff18b98a7b4d7769e20ea..212e70a3fd494517e9d9d597fa22eb52c054beb2 100644 (file)
@@ -81,15 +81,88 @@ void
 _mesa_initialize_exec_dispatch(const struct gl_context *ctx,
                                struct _glapi_table *exec);
 
+void GLAPIENTRY
+_mesa_EvalMesh1(GLenum mode, GLint i1, GLint i2);
+
+void GLAPIENTRY
+_mesa_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+
+void GLAPIENTRY
+_mesa_DrawElementsInstancedARB(GLenum mode, GLsizei count, GLenum type,
+                               const GLvoid * indices, GLsizei numInstances);
+
+void GLAPIENTRY
+_mesa_DrawArraysInstancedBaseInstance(GLenum mode, GLint first,
+                                      GLsizei count, GLsizei numInstances,
+                                      GLuint baseInstance);
+
+void GLAPIENTRY
+_mesa_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count,
+                                      GLenum type, const GLvoid * indices,
+                                      GLsizei numInstances,
+                                      GLint basevertex);
+
+void GLAPIENTRY
+_mesa_DrawElementsInstancedBaseInstance(GLenum mode, GLsizei count,
+                                        GLenum type,
+                                        const GLvoid *indices,
+                                        GLsizei numInstances,
+                                        GLuint baseInstance);
+
+void GLAPIENTRY
+_mesa_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream);
+
+void GLAPIENTRY
+_mesa_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
+                                     GLsizei primcount);
+
+void GLAPIENTRY
+_mesa_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
+                                           GLuint stream,
+                                           GLsizei primcount);
+
+void GLAPIENTRY
+_mesa_DrawArraysIndirect(GLenum mode, const GLvoid *indirect);
+
+void GLAPIENTRY
+_mesa_DrawElementsIndirect(GLenum mode, GLenum type, const GLvoid *indirect);
+
+void GLAPIENTRY
+_mesa_MultiDrawArraysIndirect(GLenum mode, const GLvoid *indirect,
+                              GLsizei primcount, GLsizei stride);
+
+void GLAPIENTRY
+_mesa_MultiDrawElementsIndirect(GLenum mode, GLenum type,
+                                const GLvoid *indirect,
+                                GLsizei primcount, GLsizei stride);
+
+void GLAPIENTRY
+_mesa_MultiDrawArraysIndirectCountARB(GLenum mode, GLintptr indirect,
+                                      GLintptr drawcount_offset,
+                                      GLsizei maxdrawcount, GLsizei stride);
+
+void GLAPIENTRY
+_mesa_MultiDrawElementsIndirectCountARB(GLenum mode, GLenum type,
+                                        GLintptr indirect,
+                                        GLintptr drawcount_offset,
+                                        GLsizei maxdrawcount, GLsizei stride);
 
 void GLAPIENTRY
 _mesa_DrawArrays(GLenum mode, GLint first, GLsizei count);
 
 
 void GLAPIENTRY
-_mesa_DrawArraysInstanced(GLenum mode, GLint first, GLsizei count,
-                          GLsizei primcount);
+_mesa_DrawArraysInstancedARB(GLenum mode, GLint first, GLsizei count,
+                             GLsizei primcount);
 
+void GLAPIENTRY
+_mesa_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode,
+                                                  GLsizei count,
+                                                  GLenum type,
+                                                  const GLvoid *indices,
+                                                  GLsizei numInstances,
+                                                  GLint basevertex,
+                                                  GLuint baseInstance);
 
 void GLAPIENTRY
 _mesa_DrawElements(GLenum mode, GLsizei count, GLenum type,
index 0fe3c9c348c0503359d7647394e48a7062cb2d8b..6ff28309c6d34b483d6d1fdd0e1d3e5a659ce7bd 100644 (file)
@@ -2654,6 +2654,8 @@ const struct function gles3_functions_possible[] = {
    /* EXT_EGL_image_storage */
    { "glEGLImageTargetTexStorageEXT", 30, -1 },
 
+   { "glDrawElementsInstancedBaseVertex", 30, -1 },
+
    { NULL, 0, -1 }
 };