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/vtxfmt_tmp.h | |
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/vtxfmt_tmp.h')
-rw-r--r-- | src/mesa/main/vtxfmt_tmp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h index 6f5d01e40f2..1308d0aa466 100644 --- a/src/mesa/main/vtxfmt_tmp.h +++ b/src/mesa/main/vtxfmt_tmp.h @@ -335,6 +335,17 @@ static void GLAPIENTRY TAG(DrawElements)( GLenum mode, GLsizei count, GLenum typ CALL_DrawElements(GET_DISPATCH(), ( mode, count, type, indices )); } +static void GLAPIENTRY TAG(MultiDrawElementsEXT)( GLenum mode, + const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount) +{ + PRE_LOOPBACK( MultiDrawElementsEXT ); + CALL_MultiDrawElementsEXT(GET_DISPATCH(), ( mode, count, type, indices, + primcount )); +} + static void GLAPIENTRY TAG(DrawRangeElements)( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) @@ -522,6 +533,7 @@ static GLvertexformat TAG(vtxfmt) = { TAG(DrawArrays), TAG(DrawElements), TAG(DrawRangeElements), + TAG(MultiDrawElementsEXT), TAG(EvalMesh1), TAG(EvalMesh2) }; |