From: Tilman Sauerbeck Date: Tue, 2 Nov 2010 21:15:15 +0000 (+0100) Subject: st/mesa: Reset the constant buffers before destroying the pipe context. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=646a8b7e1dfbd126819d577a94102e64748d0b9d;p=mesa.git st/mesa: Reset the constant buffers before destroying the pipe context. Signed-off-by: Tilman Sauerbeck --- diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index b5ea6d0f809..d0dcdd4e29b 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);