[Mesa-dev] [PATCH] mesa: Remove unnecessary FLUSH_VERTICES in bind_buffer_range

Marek Olšák maraeo at gmail.com
Fri Dec 16 17:16:09 PST 2011


Reviewed-by: Marek Olšák <maraeo at gmail.com>

Thanks!

Marek

On Fri, Dec 16, 2011 at 11:06 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> 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.
> ---
>  src/mesa/main/transformfeedback.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
> index 824f66a..3305613 100644
> --- a/src/mesa/main/transformfeedback.c
> +++ b/src/mesa/main/transformfeedback.c
> @@ -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,
> --
> 1.7.6.4
>


More information about the mesa-dev mailing list