mesa: Remove unnecessary FLUSH_VERTICES in bind_buffer_range
authorPaul Berry <stereotype441@gmail.com>
Fri, 16 Dec 2011 21:55:37 +0000 (13:55 -0800)
committerPaul Berry <stereotype441@gmail.com>
Tue, 20 Dec 2011 23:22:28 +0000 (15:22 -0800)
It isn't necessary to call FLUSH_VERTICES from bind_buffer_range,
because transform feedback buffers are not allowed to be changed when
transform feedback is active.

Thanks to Marek Olšák for pointing out this bug.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/mesa/main/transformfeedback.c

index b0b75eaf5c3cf508ae679b7e29a3a6df6cb40cee..53c09e26544a5693a40155ae1c02d2b5af12fcc4 100644 (file)
@@ -404,7 +404,11 @@ bind_buffer_range(struct gl_context *ctx, GLuint index,
 {
    struct gl_transform_feedback_object *obj =
       ctx->TransformFeedback.CurrentObject;
-   FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK);
+
+   /* Note: no need to FLUSH_VERTICES or flag _NEW_TRANSFORM_FEEDBACK, because
+    * transform feedback buffers can't be changed while transform feedback is
+    * active.
+    */
 
    /* The general binding point */
    _mesa_reference_buffer_object(ctx,