[Mesa-dev] [PATCH 22/23] meta: Don't save or restore the VBO binding

Anuj Phogat anuj.phogat at gmail.com
Fri Nov 13 10:44:30 PST 2015


On Mon, Nov 9, 2015 at 4:56 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Nothing left in meta does anything with the VBO binding, so we don't
> need to save or restore it.  The VAO binding is still modified.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
>  src/mesa/drivers/common/meta.c | 6 ------
>  src/mesa/drivers/common/meta.h | 1 -
>  2 files changed, 7 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index b06f683..b774d3c 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -735,8 +735,6 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
>        /* save vertex array object state */
>        _mesa_reference_vao(ctx, &save->VAO,
>                                     ctx->Array.VAO);
> -      _mesa_reference_buffer_object(ctx, &save->ArrayBufferObj,
> -                                    ctx->Array.ArrayBufferObj);
>        /* set some default state? */
>     }
>
> @@ -1146,10 +1144,6 @@ _mesa_meta_end(struct gl_context *ctx)
>     }
>
>     if (state & MESA_META_VERTEX) {
> -      /* restore vertex buffer object */
> -      _mesa_BindBuffer(GL_ARRAY_BUFFER_ARB, save->ArrayBufferObj->Name);
> -      _mesa_reference_buffer_object(ctx, &save->ArrayBufferObj, NULL);
> -
>        /* restore vertex array object */
>        _mesa_BindVertexArray(save->VAO->Name);
>        _mesa_reference_vao(ctx, &save->VAO, NULL);
> diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
> index 503e743..8121ed4 100644
> --- a/src/mesa/drivers/common/meta.h
> +++ b/src/mesa/drivers/common/meta.h
> @@ -155,7 +155,6 @@ struct save_state
>
>     /** MESA_META_VERTEX */
>     struct gl_vertex_array_object *VAO;
> -   struct gl_buffer_object *ArrayBufferObj;
>
>     /** MESA_META_VIEWPORT */
>     GLfloat ViewportX, ViewportY, ViewportW, ViewportH;
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the mesa-dev mailing list