diff options
author | Marek Olšák <[email protected]> | 2012-06-27 06:29:42 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-06-28 22:46:51 +0200 |
commit | fcebb157f0eb6c2f374dee609a01b0b14856e7fc (patch) | |
tree | 71c4e05e724c27cc7e8365d0dfa467eded66de3f /src/mesa/vbo/vbo_exec_array.c | |
parent | 62b971673950148eb949ba23d7fdc47debea16f0 (diff) |
vbo: optimize validation for glMultiDrawElements
Some parameters need to be checked only once.
check_valid_to_render needs to be called only once.
The validate function is based on the one for DrawElements.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index ab9e246b20d..d2854dd6c29 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -1254,13 +1254,10 @@ vbo_exec_MultiDrawElements(GLenum mode, GLsizei primcount) { GET_CURRENT_CONTEXT(ctx); - GLint i; - for (i = 0; i < primcount; i++) { - if (!_mesa_validate_DrawElements(ctx, mode, count[i], type, indices[i], - 0)) - return; - } + if (!_mesa_validate_MultiDrawElements(ctx, mode, count, type, indices, + primcount, NULL)) + return; vbo_validated_multidrawelements(ctx, mode, count, type, indices, primcount, NULL); @@ -1275,13 +1272,10 @@ vbo_exec_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *basevertex) { GET_CURRENT_CONTEXT(ctx); - GLint i; - for (i = 0; i < primcount; i++) { - if (!_mesa_validate_DrawElements(ctx, mode, count[i], type, indices[i], - basevertex[i])) - return; - } + if (!_mesa_validate_MultiDrawElements(ctx, mode, count, type, indices, + primcount, basevertex)) + return; vbo_validated_multidrawelements(ctx, mode, count, type, indices, primcount, basevertex); |