st/mesa: Reset the constant buffers before destroying the pipe context.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
This commit is contained in:
Tilman Sauerbeck 2010-11-02 22:15:15 +01:00
parent e7f5d19a11
commit 646a8b7e1d
1 changed files with 5 additions and 0 deletions

View File

@ -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);