diff options
author | Eric Anholt <[email protected]> | 2009-08-31 10:13:22 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-09-01 20:35:19 -0700 |
commit | 60b08eb1fdf287d28ec66b9282513ab35a61aee0 (patch) | |
tree | 0230f446c99b4957f146289c7295e019e0670ed7 /src/mesa/main/dlist.c | |
parent | a82cd55a5cb1ad617960551560b107edffad1e9a (diff) |
mesa: Make MultiDrawElements submit multiple primitives at once.
Previously, MultiDrawElements just called DrawElements a bunch of times.
By sending several primitives down the pipeline at once, we avoid a bunch
of validation. On my GL demo, this improves fps by 2.5% (+/- .41%) and
reduces CPU usage by 70.5% (+/- 2.9%) (n=3).
Reviewed by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r-- | src/mesa/main/dlist.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 9b68b3e1162..8cff9ea64a0 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -7751,18 +7751,6 @@ exec_MultiDrawArraysEXT(GLenum mode, GLint * first, CALL_MultiDrawArraysEXT(ctx->Exec, (mode, first, count, primcount)); } -/* GL_EXT_multi_draw_arrays */ -static void GLAPIENTRY -exec_MultiDrawElementsEXT(GLenum mode, const GLsizei * count, - GLenum type, const GLvoid ** indices, - GLsizei primcount) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - CALL_MultiDrawElementsEXT(ctx->Exec, - (mode, count, type, indices, primcount)); -} - /* GL_IBM_multimode_draw_arrays */ static void GLAPIENTRY exec_MultiModeDrawArraysIBM(const GLenum * mode, const GLint * first, @@ -8108,7 +8096,6 @@ _mesa_init_dlist_table(struct _glapi_table *table) /* 148. GL_EXT_multi_draw_arrays */ SET_MultiDrawArraysEXT(table, exec_MultiDrawArraysEXT); - SET_MultiDrawElementsEXT(table, exec_MultiDrawElementsEXT); /* 149. GL_EXT_fog_coord */ SET_FogCoordPointerEXT(table, exec_FogCoordPointerEXT); @@ -8723,6 +8710,7 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) vfmt->DrawArrays = 0; vfmt->DrawElements = 0; vfmt->DrawRangeElements = 0; + vfmt->MultiDrawElemementsEXT = 0; #endif } |