[Mesa-dev] [PATCH] st/mesa: Reset the constant buffers before destroying the pipe context.

Keith Whitwell keith.whitwell at gmail.com
Wed Nov 3 02:44:44 PDT 2010


Looks good Tillman.

Keith

On Tue, Nov 2, 2010 at 9:17 PM, Tilman Sauerbeck <tilman at code-monkey.de> wrote:
> Signed-off-by: Tilman Sauerbeck <tilman at code-monkey.de>
> ---
>
> v2: Also call into the pipe driver to make it release its reference.
>
>  src/mesa/state_tracker/st_context.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
> index b5ea6d0..d0dcdd4 100644
> --- a/src/mesa/state_tracker/st_context.c
> +++ b/src/mesa/state_tracker/st_context.c
> @@ -238,6 +238,11 @@ void st_destroy_context( struct st_context *st )
>
>    pipe->set_index_buffer(pipe, NULL);
>
> +   for (i = 0; i < PIPE_SHADER_TYPES; i++) {
> +      pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, NULL);
> +      pipe_resource_reference(&st->state.constants[PIPE_SHADER_VERTEX], NULL);
> +   }
> +
>    _mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache);
>
>    _vbo_DestroyContext(st->ctx);
> --
> 1.7.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


More information about the mesa-dev mailing list