diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/dd.h | 5 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt.c | 2 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt_tmp.h | 21 |
3 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 7c02faaa535..4679be72f76 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -1186,6 +1186,11 @@ typedef struct { const GLvoid **indices, GLsizei primcount, const GLint *basevertex); + void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first, + GLsizei count, GLsizei primcount); + void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount); /*@}*/ /** diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index 0dd3e5e52ee..ca352e88e6b 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -140,6 +140,8 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex); SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex); SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex); + SET_DrawArraysInstanced(tab, vfmt->DrawArraysInstanced); + SET_DrawElementsInstanced(tab, vfmt->DrawElementsInstanced); /* GL_NV_vertex_program */ SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV); diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h index 037c4b1888b..9ec6ea49aa2 100644 --- a/src/mesa/main/vtxfmt_tmp.h +++ b/src/mesa/main/vtxfmt_tmp.h @@ -391,6 +391,25 @@ static void GLAPIENTRY TAG(MultiDrawElementsBaseVertex)( GLenum mode, primcount, basevertex )); } +static void GLAPIENTRY +TAG(DrawArraysInstanced)(GLenum mode, GLint first, + GLsizei count, GLsizei primcount) +{ + PRE_LOOPBACK( DrawArraysInstanced ); + CALL_DrawArraysInstanced(GET_DISPATCH(), (mode, first, count, primcount)); +} + +static void GLAPIENTRY +TAG(DrawElementsInstanced)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount) +{ + PRE_LOOPBACK( DrawElementsInstanced ); + CALL_DrawElementsInstanced(GET_DISPATCH(), + (mode, count, type, indices, primcount)); +} + + static void GLAPIENTRY TAG(EvalMesh1)( GLenum mode, GLint i1, GLint i2 ) { PRE_LOOPBACK( EvalMesh1 ); @@ -574,6 +593,8 @@ static GLvertexformat TAG(vtxfmt) = { TAG(DrawElementsBaseVertex), TAG(DrawRangeElementsBaseVertex), TAG(MultiDrawElementsBaseVertex), + TAG(DrawArraysInstanced), + TAG(DrawElementsInstanced), TAG(EvalMesh1), TAG(EvalMesh2) }; |