Mesa (master): vbo: don't check twice whether it's valid to render

Marek Olšák mareko at kemper.freedesktop.org
Thu Apr 19 12:48:24 UTC 2012


Module: Mesa
Branch: master
Commit: 81afdd20f3f574ce29559d8ad77df5c77652009e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=81afdd20f3f574ce29559d8ad77df5c77652009e

Author: Marek Olšák <maraeo at gmail.com>
Date:   Mon Apr 16 05:55:08 2012 +0200

vbo: don't check twice whether it's valid to render

It's already done in _mesa_validate_Draw* and it's not needed to do it again
unless I am missing something.

Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich at web.de>

---

 src/mesa/vbo/vbo_exec_array.c |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 2e324a2..30a954a 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -644,10 +644,6 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
 
    FLUSH_CURRENT( ctx, 0 );
 
-   if (!_mesa_valid_to_render(ctx, "glDrawArrays")) {
-      return;
-   }
-
    if (0)
       check_draw_arrays_data(ctx, start, count);
 
@@ -677,10 +673,6 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
 
    FLUSH_CURRENT( ctx, 0 );
 
-   if (!_mesa_valid_to_render(ctx, "glDrawArraysInstanced")) {
-      return;
-   }
-
    if (0)
       check_draw_arrays_data(ctx, start, count);
 
@@ -770,10 +762,6 @@ vbo_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
 
    FLUSH_CURRENT( ctx, 0 );
 
-   if (!_mesa_valid_to_render(ctx, "glDraw[Range]Elements")) {
-      return;
-   }
-
    vbo_bind_arrays(ctx);
 
    ib.count = count;
@@ -1050,10 +1038,6 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
 
    FLUSH_CURRENT( ctx, 0 );
 
-   if (!_mesa_valid_to_render(ctx, "glMultiDrawElements")) {
-      return;
-   }
-
    prim = calloc(1, primcount * sizeof(*prim));
    if (prim == NULL) {
       _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMultiDrawElements");
@@ -1247,10 +1231,6 @@ vbo_exec_DrawTransformFeedback(GLenum mode, GLuint name)
 
    FLUSH_CURRENT(ctx, 0);
 
-   if (!_mesa_valid_to_render(ctx, "glDrawTransformFeedback")) {
-      return;
-   }
-
    vbo_draw_transform_feedback(ctx, mode, obj, 1);
 }
 




More information about the mesa-commit mailing list