diff options
author | Marek Olšák <[email protected]> | 2020-03-22 19:35:28 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-27 11:56:06 +0000 |
commit | 41671ec544dc76e7eb926910e3db69803550c3aa (patch) | |
tree | 21299ad38f796ecd4135f138cdc14194eab3c49e | |
parent | 00b57915414da01868ff40ecacfe61db9af0d9c5 (diff) |
mesa: remove exec="dynamic" from Draw functions that are not really dynamic
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>
-rw-r--r-- | src/mapi/glapi/gen/ARB_base_instance.xml | 6 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_draw_indirect.xml | 12 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_draw_instanced.xml | 4 | ||||
-rw-r--r-- | src/mapi/glapi/gen/ARB_indirect_parameters.xml | 4 | ||||
-rw-r--r-- | src/mapi/glapi/gen/EXT_transform_feedback.xml | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen/es_EXT.xml | 4 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_API.xml | 10 | ||||
-rw-r--r-- | src/mesa/drivers/common/meta.c | 2 | ||||
-rw-r--r-- | src/mesa/main/draw.c | 185 | ||||
-rw-r--r-- | src/mesa/main/draw.h | 77 | ||||
-rw-r--r-- | src/mesa/main/tests/dispatch_sanity.cpp | 2 |
12 files changed, 173 insertions, 137 deletions
diff --git a/src/mapi/glapi/gen/ARB_base_instance.xml b/src/mapi/glapi/gen/ARB_base_instance.xml index f9a7661e952..c4c2a5b99ab 100644 --- a/src/mapi/glapi/gen/ARB_base_instance.xml +++ b/src/mapi/glapi/gen/ARB_base_instance.xml @@ -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"/> diff --git a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml index 915501a9c28..18940b84223 100644 --- a/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml +++ b/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml @@ -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"/> diff --git a/src/mapi/glapi/gen/ARB_draw_indirect.xml b/src/mapi/glapi/gen/ARB_draw_indirect.xml index dc50cc3bd9e..6dc1d6feeec 100644 --- a/src/mapi/glapi/gen/ARB_draw_indirect.xml +++ b/src/mapi/glapi/gen/ARB_draw_indirect.xml @@ -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"/> @@ -50,14 +50,14 @@ <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 *"/> diff --git a/src/mapi/glapi/gen/ARB_draw_instanced.xml b/src/mapi/glapi/gen/ARB_draw_instanced.xml index 52006c223c3..67846ea1b42 100644 --- a/src/mapi/glapi/gen/ARB_draw_instanced.xml +++ b/src/mapi/glapi/gen/ARB_draw_instanced.xml @@ -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"/> diff --git a/src/mapi/glapi/gen/ARB_indirect_parameters.xml b/src/mapi/glapi/gen/ARB_indirect_parameters.xml index 7d4f15d8250..2739f153875 100644 --- a/src/mapi/glapi/gen/ARB_indirect_parameters.xml +++ b/src/mapi/glapi/gen/ARB_indirect_parameters.xml @@ -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"/> diff --git a/src/mapi/glapi/gen/EXT_transform_feedback.xml b/src/mapi/glapi/gen/EXT_transform_feedback.xml index 9982a3f81a5..604ab7cd0d5 100644 --- a/src/mapi/glapi/gen/EXT_transform_feedback.xml +++ b/src/mapi/glapi/gen/EXT_transform_feedback.xml @@ -108,7 +108,7 @@ <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> diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index a5653313605..de3c14dafed 100644 --- a/src/mapi/glapi/gen/es_EXT.xml +++ b/src/mapi/glapi/gen/es_EXT.xml @@ -1101,7 +1101,7 @@ </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"/> @@ -1243,7 +1243,7 @@ </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"/> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 39c80dabbf4..d421e778091 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -2523,7 +2523,7 @@ <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"/> @@ -2535,7 +2535,7 @@ <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"/> @@ -8144,7 +8144,7 @@ <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"/> @@ -8192,13 +8192,13 @@ <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"/> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 30116721c7e..ad289a54bff 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -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); } diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 253e2fdbee7..686a065ffb5 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -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); - } } diff --git a/src/mesa/main/draw.h b/src/mesa/main/draw.h index d815d6d1bfd..212e70a3fd4 100644 --- a/src/mesa/main/draw.h +++ b/src/mesa/main/draw.h @@ -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, diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 0fe3c9c348c..6ff28309c6d 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -2654,6 +2654,8 @@ const struct function gles3_functions_possible[] = { /* EXT_EGL_image_storage */ { "glEGLImageTargetTexStorageEXT", 30, -1 }, + { "glDrawElementsInstancedBaseVertex", 30, -1 }, + { NULL, 0, -1 } }; |