diff options
author | Fredrik Höglund <[email protected]> | 2012-06-18 22:50:01 +0200 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-06-19 07:57:22 -0600 |
commit | ae5d7d5e8970f90b9713897387d7d46a2b4485ab (patch) | |
tree | 613e018da02dea4c833b03259ecf1c5c9e80ed58 /src/mesa/main/dlist.c | |
parent | ee99647e02fe5b947838cfea276f095775eb1537 (diff) |
mesa: Add support for GL_ARB_base_instance
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r-- | src/mesa/main/dlist.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index e04f7ae6bbe..a0d84cfdc55 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1337,6 +1337,46 @@ save_DrawElementsInstancedBaseVertexARB(GLenum mode, "glDrawElementsInstancedBaseVertex() during display list compile"); } +/* GL_ARB_base_instance. */ +static void GLAPIENTRY +save_DrawArraysInstancedBaseInstance(GLenum mode, + GLint first, + GLsizei count, + GLsizei primcount, + GLuint baseinstance) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDrawArraysInstancedBaseInstance() during display list compile"); +} + +static void APIENTRY +save_DrawElementsInstancedBaseInstance(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount, + GLuint baseinstance) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDrawElementsInstancedBaseInstance() during display list compile"); +} + +static void APIENTRY +save_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode, + GLsizei count, + GLenum type, + const void *indices, + GLsizei primcount, + GLint basevertex, + GLuint baseinstance) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glDrawElementsInstancedBaseVertexBaseInstance() during display list compile"); +} + static void invalidate_saved_current_state( struct gl_context *ctx ) { GLint i; @@ -10816,6 +10856,11 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) /* GL_ARB_draw_elements_base_vertex */ vfmt->DrawElementsInstancedBaseVertex = save_DrawElementsInstancedBaseVertexARB; + /* GL_ARB_base_instance */ + vfmt->DrawArraysInstancedBaseInstance = save_DrawArraysInstancedBaseInstance; + vfmt->DrawElementsInstancedBaseInstance = save_DrawElementsInstancedBaseInstance; + vfmt->DrawElementsInstancedBaseVertexBaseInstance = save_DrawElementsInstancedBaseVertexBaseInstance; + /* The driver is required to implement these as * 1) They can probably do a better job. * 2) A lot of new mechanisms would have to be added to this module |